Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/ras: Handle SPI out of flash error
@ 2026-11-23  7:02 Soham Purkait
  2026-11-23  7:17 ` ✗ CI.KUnit: failure for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Soham Purkait @ 2026-11-23  7:02 UTC (permalink / raw)
  To: intel-xe, riana.tauro, anshuman.gupta, aravind.iddamsetty,
	badal.nilawar, raag.jadav, rodrigo.vivi
  Cc: soham.purkait

Wedge the device with an unknown recovery method if Page-Offline returns
OUT_OF_RESOURCES, or if the offline list is full at probe.

Signed-off-by: Soham Purkait <soham.purkait@intel.com>
---
 drivers/gpu/drm/xe/xe_ras.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c
index 0fb891d00b36..76441858391d 100644
--- a/drivers/gpu/drm/xe/xe_ras.c
+++ b/drivers/gpu/drm/xe/xe_ras.c
@@ -80,6 +80,7 @@ enum xe_ras_response_status {
 	XE_RAS_STATUS_TIMEOUT,
 	XE_RAS_STATUS_HARDWARE_FAILURE,
 	XE_RAS_STATUS_INSUFFICIENT_RESOURCES,
+	XE_RAS_STATUS_OUT_OF_RESOURCES = 0x9,
 	XE_RAS_STATUS_MAX
 };
 
@@ -226,6 +227,7 @@ static int ras_status_to_errno(u32 status)
 	case XE_RAS_STATUS_HARDWARE_FAILURE:
 		return -EIO;
 	case XE_RAS_STATUS_INSUFFICIENT_RESOURCES:
+	case XE_RAS_STATUS_OUT_OF_RESOURCES:
 		return -ENOSPC;
 	default:
 		return -EPROTO;
@@ -299,6 +301,11 @@ static int send_page_offline_cmd(struct xe_device *xe, u64 page_address,
 	if (ret) {
 		xe_log_err(xe, SYSCTRL, ret, "page offline command failed with status %u\n",
 			   response.status);
+		if (response.status == XE_RAS_STATUS_OUT_OF_RESOURCES) {
+			xe_log_err(xe, SYSCTRL, ret,
+				   "No space left in SPI flash for bad pages, manual intervention required\n");
+			xe_wedge_declare(xe, 0);
+		}
 		return ret;
 	}
 
@@ -504,8 +511,17 @@ static void get_offline_list(struct xe_device *xe)
 	struct xe_ras_offline_list_response response = {0};
 	struct xe_ras_offline_list_request request = {0};
 
+	struct xe_ras_state *state = &xe->ras.state;
+
 	process_offline_pages(xe, XE_SYSCTRL_CMD_GET_OFFLINE_LIST, &request, sizeof(request),
 			      &response, sizeof(response), &response.common, false);
+
+	if (state->max_pages && response.common.total_pages >= state->max_pages) {
+		xe_log_err(xe, SYSCTRL, -ENOSPC,
+			   "Offline list full (%u/%u), manual intervention required\n",
+			   response.common.total_pages, state->max_pages);
+		xe_wedge_declare(xe, 0);
+	}
 }
 
 static void ras_usp_aer_init(struct xe_device *xe)
-- 
2.43.0


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

end of thread, other threads:[~2026-11-23  7:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23  7:02 [PATCH] drm/xe/ras: Handle SPI out of flash error Soham Purkait
2026-11-23  7:17 ` ✗ CI.KUnit: failure for " Patchwork
2026-11-23  7:28 ` [PATCH] " Tauro, Riana
2026-11-23  7:30 ` sashiko-bot

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