Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/8] drm/xe/device_sysfs: switch over to devm
@ 2024-04-29 12:14 Matthew Auld
  2024-04-29 12:14 ` [PATCH 2/8] drm/xe: covert sysfs " Matthew Auld
                   ` (10 more replies)
  0 siblings, 11 replies; 28+ messages in thread
From: Matthew Auld @ 2024-04-29 12:14 UTC (permalink / raw)
  To: intel-xe; +Cc: Rodrigo Vivi

When hotunplugging the device we currently hit:

kernfs: can not remove 'vram_d3cold_threshold', no directory

Due to directory already being removed. Using drmm for sysfs device
stuff like vram_d3cold_threshold doesn't really make sense when you
consider hot unplugging of the pci device. In such a case the device is
removed however the drmm release action will only fire once the driver
instance can be released, which can be long after the device has already
been hotunplugged. Rather use devm which is directly tied to the device
and should be called when it is removed.

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1432
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/xe/xe_device_sysfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_device_sysfs.c b/drivers/gpu/drm/xe/xe_device_sysfs.c
index 21677b8cd977..7375937934fa 100644
--- a/drivers/gpu/drm/xe/xe_device_sysfs.c
+++ b/drivers/gpu/drm/xe/xe_device_sysfs.c
@@ -69,7 +69,7 @@ vram_d3cold_threshold_store(struct device *dev, struct device_attribute *attr,
 
 static DEVICE_ATTR_RW(vram_d3cold_threshold);
 
-static void xe_device_sysfs_fini(struct drm_device *drm, void *arg)
+static void xe_device_sysfs_fini(void *arg)
 {
 	struct xe_device *xe = arg;
 
@@ -85,5 +85,5 @@ int xe_device_sysfs_init(struct xe_device *xe)
 	if (ret)
 		return ret;
 
-	return drmm_add_action_or_reset(&xe->drm, xe_device_sysfs_fini, xe);
+	return devm_add_action_or_reset(dev, xe_device_sysfs_fini, xe);
 }
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2024-05-06 17:25 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-29 12:14 [PATCH 1/8] drm/xe/device_sysfs: switch over to devm Matthew Auld
2024-04-29 12:14 ` [PATCH 2/8] drm/xe: covert sysfs " Matthew Auld
2024-04-29 13:28   ` Rodrigo Vivi
2024-04-29 13:52     ` Lucas De Marchi
2024-04-29 15:17       ` Matthew Auld
2024-04-29 18:45         ` Rodrigo Vivi
2024-04-29 21:28           ` Lucas De Marchi
2024-04-30  8:43             ` Jani Nikula
2024-04-30  9:42               ` Aravind Iddamsetty
2024-04-30 10:51                 ` Matthew Auld
2024-04-30 13:29             ` drmm vs devm (was Re: [PATCH 2/8] drm/xe: covert sysfs over to devm) Daniel Vetter
2024-05-06  8:07   ` [PATCH 2/8] drm/xe: covert sysfs over to devm Andrzej Hajda
2024-04-29 12:14 ` [PATCH 3/8] drm/xe/ggtt: use drm_dev_enter to mark device section Matthew Auld
2024-05-06  8:42   ` Andrzej Hajda
2024-04-29 12:14 ` [PATCH 4/8] drm/xe/guc: move guc_fini over to devm Matthew Auld
2024-05-06  9:03   ` Andrzej Hajda
2024-04-29 12:14 ` [PATCH 5/8] drm/xe/guc_pc: move pc_fini " Matthew Auld
2024-05-06  9:11   ` Andrzej Hajda
2024-04-29 12:14 ` [PATCH 6/8] drm/xe/irq: move irq_uninstall over " Matthew Auld
2024-05-06  9:12   ` Andrzej Hajda
2024-04-29 12:14 ` [PATCH 7/8] drm/xe/device: move flr " Matthew Auld
2024-05-06  9:12   ` Andrzej Hajda
2024-04-29 12:14 ` [PATCH 8/8] drm/xe/device: move xe_device_sanitize over " Matthew Auld
2024-05-06 17:25   ` Andrzej Hajda
2024-04-29 12:21 ` ✓ CI.Patch_applied: success for series starting with [1/8] drm/xe/device_sysfs: switch " Patchwork
2024-04-29 12:21 ` ✗ CI.checkpatch: warning " Patchwork
2024-04-29 12:22 ` ✓ CI.KUnit: success " Patchwork
2024-05-06  8:04 ` [PATCH 1/8] " Andrzej Hajda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox