All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5] drm/xe/xe_ras: Add support for PCIe error component handling
@ 2026-12-03  9:39 Riana Tauro
  2026-12-03 10:18 ` ✓ CI.KUnit: success for drm/xe/xe_ras: Add support for PCIe error component handling (rev3) Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Riana Tauro @ 2026-12-03  9:39 UTC (permalink / raw)
  To: intel-xe
  Cc: riana.tauro, anshuman.gupta, aravind.iddamsetty, raag.jadav,
	badal.nilawar, ravi.kishore.koppuravuri, mallesh.koujalagi,
	soham.purkait

Add support for handling PCIe subsystem errors. PCIe subsystem power
management errors require a Seconday bus reset(SBR) for recovery. Treat all
others as recovered and take no further action.

Signed-off-by: Riana Tauro <riana.tauro@intel.com>
Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
Reviewed-by: Raag Jadav <raag.jadav@intel.com>
---
v2: add mapping to cper severity (Badal, Rodrigo)
    add abbreviations
    fix punctuations (Raag)

v3: drop fabric patch

v4: add global_error_status in log (Raag, Mallesh)

v5: rebase
---
 drivers/gpu/drm/xe/xe_ras.c       | 16 ++++++++++++++++
 drivers/gpu/drm/xe/xe_ras_types.h |  2 ++
 2 files changed, 18 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c
index 57d3f4b92fad..4001560b46b0 100644
--- a/drivers/gpu/drm/xe/xe_ras.c
+++ b/drivers/gpu/drm/xe/xe_ras.c
@@ -691,6 +691,19 @@ static u8 handle_device_memory_errors(struct xe_device *xe, struct xe_ras_error_
 	return XE_RAS_RECOVERY_ACTION_RECOVERED;
 }
 
+static u8 handle_pcie_errors(struct xe_device *xe, struct xe_ras_error_array *arr)
+{
+	struct xe_ras_ieh_error *info = (void *)arr->details;
+
+	xe_log_comp(xe, ras_sev_to_cper_sev(arr->counter.common.severity), PCIE, &arr->counter,
+		    sizeof(arr->counter), "error detected: 0x%08x\n", info->global_error_status);
+
+	if (info->global_error_status & XE_RAS_PCIE_IEH_GPMA)
+		return XE_RAS_RECOVERY_ACTION_RESET;
+
+	return XE_RAS_RECOVERY_ACTION_RECOVERED;
+}
+
 void xe_ras_counter_threshold_crossed(struct xe_device *xe,
 				      struct xe_sysctrl_event_response *response)
 {
@@ -892,6 +905,9 @@ enum xe_ras_recovery_action xe_ras_process_errors(struct xe_device *xe)
 			case XE_RAS_COMP_DEVICE_MEMORY:
 				action = handle_device_memory_errors(xe, arr);
 				break;
+			case XE_RAS_COMP_PCIE:
+				action = handle_pcie_errors(xe, arr);
+				break;
 			case XE_RAS_COMP_FABRIC:
 				xe_log_comp(xe, ras_sev_to_cper_sev(severity), FABRIC,
 					    &arr->counter, sizeof(arr->counter),
diff --git a/drivers/gpu/drm/xe/xe_ras_types.h b/drivers/gpu/drm/xe/xe_ras_types.h
index 63c8ed3aaf17..64fd816e6abc 100644
--- a/drivers/gpu/drm/xe/xe_ras_types.h
+++ b/drivers/gpu/drm/xe/xe_ras_types.h
@@ -16,6 +16,8 @@
 
 /* Error bits in IEH global error status register */
 #define XE_RAS_SOC_IEH_PUNIT			BIT(1)
+#define XE_RAS_PCIE_IEH_GPMA			BIT(5)
+
 /* Device memory error categories */
 #define XE_RAS_MEMORY_DB_ECC			BIT(1)
 #define XE_RAS_MEMORY_POISON			BIT(2)
-- 
2.47.1


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

end of thread, other threads:[~2026-12-05  5:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03  9:39 [PATCH v5] drm/xe/xe_ras: Add support for PCIe error component handling Riana Tauro
2026-12-03 10:18 ` ✓ CI.KUnit: success for drm/xe/xe_ras: Add support for PCIe error component handling (rev3) Patchwork
2026-12-03 10:50 ` ✓ Xe.CI.BAT: " Patchwork
2026-12-04  6:51 ` ✓ CI.KUnit: success for drm/xe/xe_ras: Add support for PCIe error component handling (rev4) Patchwork
2026-12-04  7:26 ` ✓ Xe.CI.BAT: " Patchwork
2026-12-04 14:10 ` [PATCH v5] drm/xe/xe_ras: Add support for PCIe error component handling Rodrigo Vivi
2026-12-05  5:00 ` ✓ Xe.CI.FULL: success for drm/xe/xe_ras: Add support for PCIe error component handling (rev4) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.