]> git.hungrycats.org Git - linux/commit
drm/xe/xe_pci_error: Group all devres to release them on PCIe slot reset
authorRiana Tauro <riana.tauro@intel.com>
Mon, 29 Jun 2026 08:28:04 +0000 (13:58 +0530)
committerRiana Tauro <riana.tauro@intel.com>
Thu, 2 Jul 2026 08:09:38 +0000 (13:39 +0530)
commit0a0fae3327a537b23e86463240e7381ddb5e31a1
tree478199805bb0691a177ab9494eea6eb1cffe5800
parent13b9555ffb0304d736fcad01e7a75d329b81ae9a
drm/xe/xe_pci_error: Group all devres to release them on PCIe slot reset

Add devres grouping to handle device resource cleanup during
PCI error recovery.

Secondary Bus Reset (SBR) is triggered by PCI core when the
error_detected/mmio_enabled callbacks return PCI_ERS_RESULT_NEED_RESET.

Once SBR is complete, the slot_reset callback is triggered. SBR wipes
out all device memory requiring XE KMD to perform a device removal and
reprobe.
Calling xe_pci_remove() alone does not free the devres allocated.
Since there are no exported functions to release all devres, group the
devres allocations and release the entire group during slot reset to
ensure proper cleanup.

Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
Link: https://patch.msgid.link/20260629082802.3690896-8-riana.tauro@intel.com
Signed-off-by: Riana Tauro <riana.tauro@intel.com>
drivers/gpu/drm/xe/xe_device_types.h
drivers/gpu/drm/xe/xe_pci.c
drivers/gpu/drm/xe/xe_pci_error.c