From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6A3D9C5ACB3 for ; Tue, 21 Nov 2023 04:58:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2956310E035; Tue, 21 Nov 2023 04:58:22 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5DE6F10E035 for ; Tue, 21 Nov 2023 04:58:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700542699; x=1732078699; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=dCe6izSQfPh81deOzv529vFyjZAj9r/ldljx0TPEMnw=; b=UcXn8JzNUzGn10tgJMEr+bucNKnlSy0l1oELel3AgB7C3fPjJ6R+toV2 sCElPjKLaqQ2A+Ci+llITjXmYopXqsMd2568N/8W4dNCvp7I4aVCx7MGi TP52WdZAWCBIweMH7sezIhIDXW7ezoneA1OD/uWEfxVamIdlmpny7y7tg E+N1T14KbVc1IoOfHNS4tH4YYRFWi5gFN7IDApBkcfMwy+DSmwgiustZ1 tSv7MwjR1zNVXm6qz+yh+sEQfFSTPp08t+QsEiAmlGW9haPfbiClN5QSZ oY6uEKxGWMlddULQiBwG81OjuzYx5nY9AjBN17ykY1r5bZMlZ1jFL6vIE Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="390620210" X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="390620210" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2023 20:58:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="1013793716" X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="1013793716" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.209.102.163]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2023 20:58:18 -0800 Date: Mon, 20 Nov 2023 20:58:17 -0800 Message-ID: <8734wz7lee.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Riana Tauro In-Reply-To: <27e7aba4-6048-4023-ae71-f1501bca570d@intel.com> References: <20231116143043.908412-1-sujaritha.sundaresan@intel.com> <20231116143043.908412-2-sujaritha.sundaresan@intel.com> <27e7aba4-6048-4023-ae71-f1501bca570d@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [Intel-xe] [RFC 1/4] drm/xe: Moving and renaming existing frequency sysfs attributes X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sujaritha Sundaresan , intel-xe@lists.freedesktop.org, vivi.rodrigo@intel.com Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Mon, 20 Nov 2023 20:50:00 -0800, Riana Tauro wrote: > > > @@ -950,6 +950,7 @@ int xe_guc_pc_init(struct xe_guc_pc *pc) > > struct xe_tile *tile = gt_to_tile(gt); > > struct xe_device *xe = gt_to_xe(gt); > > struct xe_bo *bo; > > + struct kobject *kobj; > > u32 size = PAGE_ALIGN(sizeof(struct slpc_shared_data)); > > int err; > > @@ -965,7 +966,9 @@ int xe_guc_pc_init(struct xe_guc_pc *pc) > > pc->bo = bo; > > - err = sysfs_create_files(gt->sysfs, pc_attrs); > > + kobj = kobject_create_and_add("freq", gt->sysfs); > Handle error here > > + > > + err = sysfs_create_files(kobj, pc_attrs); > if (err) > add kobject put if creating files returns error > > also clean up on finish These are needed too but won't fix the kernel crash. Look at existing sysfs functions, at least i915 has those. Hint: the issue is creating the new freq directory.