From: sashiko-bot@kernel.org
To: "Soham Purkait" <soham.purkait@intel.com>,
intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe/ras: Handle SPI out of flash error
Date: Mon, 23 Nov 2026 07:30:22 +0000 [thread overview]
Message-ID: <sashiko-outbox-228814@kernel.org> (raw)
In-Reply-To: <20261123070221.1611306-2-soham.purkait@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/xe/ras: premature xe_wedge_declare() in xe_ras_init()
breaks probe
--
commit 07b9c0ad4fdd94029dc1f2b35d45d971a7d1846c
Author: Soham Purkait <soham.purkait@intel.com>
drm/xe/ras: Handle SPI out of flash error
This commit declares the device wedged when a page-offline command returns
XE_RAS_STATUS_OUT_OF_RESOURCES or when the offline page list is already
full during probe.
> diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c
> index 0fb891d00b36a..76441858391da 100644
> --- a/drivers/gpu/drm/xe/xe_ras.c
> +++ b/drivers/gpu/drm/xe/xe_ras.c
[ ... ]
> @@ -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);
> + }
> }
[Severity: High]
Does calling xe_wedge_declare() during xe_ras_init() break
xe_device_probe() instead of bringing the device up in a wedged state?
In xe_device_probe(), xe_ras_init() runs before xe_gt_init() and
drm_dev_register(). When get_offline_list() or a probe-time
send_page_offline_cmd() calls xe_wedge_declare(xe, 0), it sets
xe->wedged.perm = 1 while the GTs are still uninitialized:
1. Subsequent GuC CT transfers in xe_gt_init() -> xe_uc_load_hw() are
rejected by __guc_ct_send_locked() with -ENOTRECOVERABLE because
xe_wedged_permanent() is now true. xe_gt_record_default_lrcs()
then times out in emit_job_sync() and aborts xe_device_probe().
2. Because gt->initialized is not set yet, xe_wedge_declare() skips
xe_gt_wedge_declare(). When xe_gt_record_default_lrcs() cleans up
its kernel exec queue on error, __guc_exec_queue_process_msg_cleanup()
takes the disable_scheduling_deregister() path, waits 5 seconds for
the dropped enable H2G, and returns early without calling
guc_exec_queue_destroy_async(), leaking the exec queue and its
drm_dev_get() reference.
3. wedge_work schedules drm_dev_wedged_event() before drm_dev_register()
has registered the primary minor kdev with device_add(), so the
wedged uevent is emitted on an unregistered kobject.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123070221.1611306-2-soham.purkait@intel.com?part=1
prev parent reply other threads:[~2026-11-23 7:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-228814@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=soham.purkait@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox