[Intel-xe] [RFC 1/4] drm/xe: Moving and renaming existing frequency sysfs attributes

Dixit, Ashutosh ashutosh.dixit at intel.com
Tue Nov 21 04:58:17 UTC 2023


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.


More information about the Intel-xe mailing list