From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: "Mallesh, Koujalagi" <mallesh.koujalagi@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>,
Riana Tauro <riana.tauro@intel.com>,
Aravind Iddamsetty <aravind.iddamsetty@intel.com>
Subject: Re: [PATCH v4 20/32] drm/xe/survivability: Report 'boot status' using SIGID
Date: Thu, 13 Aug 2026 12:18:48 +0200 [thread overview]
Message-ID: <2662b52e-6fbc-4fbf-8528-e55656c387c2@intel.com> (raw)
In-Reply-To: <b0d83bf9-a060-4593-b040-7988b91bef79@intel.com>
On 8/13/2026 12:07 PM, Mallesh, Koujalagi wrote:
>
> On 13-08-2026 02:58 pm, Michal Wajdeczko wrote:
>>
>> On 8/13/2026 10:38 AM, Mallesh, Koujalagi wrote:
>>> On 13-08-2026 12:44 am, Michal Wajdeczko wrote:
>>>> Report 'boot status' details using xe_log_err_fatal/info() macros.
>>>> While around, move static helper code closer to the caller and let
>>>> it take xe instead of pdev.
>>>>
>>>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>>>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>>>> Cc: Riana Tauro <riana.tauro@intel.com>
>>>> Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
>>>> Cc: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
>>>> ---
>>>> drivers/gpu/drm/xe/xe_survivability_mode.c | 35 ++++++++++++----------
>>>> 1 file changed, 19 insertions(+), 16 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/xe/xe_survivability_mode.c b/drivers/gpu/drm/xe/xe_survivability_mode.c
>>>> index 4c506027fa94..85b4c125a217 100644
>>>> --- a/drivers/gpu/drm/xe/xe_survivability_mode.c
>>>> +++ b/drivers/gpu/drm/xe/xe_survivability_mode.c
>>>> @@ -14,6 +14,7 @@
>>>> #include "xe_device.h"
>>>> #include "xe_heci_gsc.h"
>>>> #include "xe_i2c.h"
>>>> +#include "xe_log.h"
>>>> #include "xe_mmio.h"
>>>> #include "xe_nvm.h"
>>>> #include "xe_pcode_api.h"
>>>> @@ -172,21 +173,6 @@ static void populate_survivability_info(struct xe_device *xe)
>>>> }
>>>> }
>>>> -static void log_survivability_info(struct pci_dev *pdev)
>>>> -{
>>>> - struct xe_device *xe = pdev_to_xe_device(pdev);
>>>> - struct xe_survivability *survivability = &xe->survivability;
>>>> - u32 *info = survivability->info;
>>>> - int id;
>>>> -
>>>> - dev_info(&pdev->dev, "Survivability Boot Status : Critical Failure (%d)\n",
>>>> - survivability->boot_status);
>>>> - for (id = 0; id < MAX_SCRATCH_REG; id++) {
>>>> - if (info[id])
>>>> - dev_info(&pdev->dev, "%s: 0x%x\n", reg_map[id], info[id]);
>>>> - }
>>>> -}
>>>> -
>>>> static int check_boot_failure(struct xe_device *xe)
>>>> {
>>>> struct xe_survivability *survivability = &xe->survivability;
>>>> @@ -429,6 +415,23 @@ void xe_survivability_mode_runtime_enable(struct xe_device *xe)
>>>> dev_err(&pdev->dev, "Firmware flash required, Please refer to the userspace documentation for more details!\n");
>>>> }
>>>> +static void log_survivability_info(struct xe_device *xe)
>>>> +{
>>>> + struct xe_survivability *survivability = &xe->survivability;
>>>> + u32 *info = survivability->info;
>>>> + int id;
>>>> +
>>>> + xe_log_err_fatal(xe, SURVIVABILITY, -ENXIO, "Boot Status: %s (%u)\n",
>>>> + survivability->boot_status == CRITICAL_FAILURE ?
>>>> + "Critical Failure" : "Other", survivability->boot_status);
>>> Since log_survivability_info is called when survivability->boot_status == CRITICAL_FAILURE true, so please use "Critical Failure" string directly.
>> well, that's the current usage and function name didn't strictly say "log critical failure" only
>>
>> btw, printing fixed "Critical Failure" string followed by flexible %d also doesn't make sense IMO
>>
>> that's why I decided to make this function more flexible and reusable if needed
>
> Totally agreed, u made it generic one, however current usage, we never going to hit "Other" case, which is dead here.
>
> btw, "Other" is "Non Critical Failure" right?
only if boot_status == 7
but since BOOT_STATUS is REG_GENMASK(3, 1) I assume that there
might be other values, beyond currently documented 4 & 7
so even if we print "Other" there will be still numerical
value "(7)" or "(1)" that could be used for debug/triage
but I can add helper
static const char *boot_status_str(u8 boot_status)
to return friendly name for all currently known codes
(and "Other" or NULL for unknown codes)
>
>
> Thanks,
>
> -/Mallesh
>
>>
>>> Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
>>>
>>>> +
>>>> + for (id = 0; id < MAX_SCRATCH_REG; id++) {
>>>> + if (!info[id])
>>>> + continue;
>>>> + xe_log_info(xe, SURVIVABILITY, "%s: %#x\n", reg_map[id], info[id]);
>>>> + }
>>>> +}
>>>> +
>>>> /**
>>>> * xe_survivability_mode_boot_enable - Initialize and enable boot survivability mode
>>>> * @xe: xe device instance
>>>> @@ -452,7 +455,7 @@ int xe_survivability_mode_boot_enable(struct xe_device *xe)
>>>> * v2 supports survivability mode for critical errors
>>>> */
>>>> if (survivability->version < 2 && survivability->boot_status == CRITICAL_FAILURE) {
>>>> - log_survivability_info(pdev);
>>>> + log_survivability_info(xe);
>>>> return -ENXIO;
>>>> }
>>>>
next prev parent reply other threads:[~2026-08-13 10:19 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 19:14 [PATCH v4 00/32] drm/xe: Add structured SIGID error logging infrastructure Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 01/32] drm/xe: Introduce xe_any helpers Michal Wajdeczko
2026-08-12 19:29 ` sashiko-bot
2026-08-12 19:14 ` [PATCH v4 02/32] drm/xe/log: Add structured SIGID error logging infrastructure Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 03/32] drm/xe/log: Introduce structured component/location identifiers Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 04/32] drm/xe/log: Add component/location decorations to dmesg Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 05/32] drm/xe/log: Add SIGID log helpers for severity Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 06/32] drm/xe/log: Add SIGID log helpers for location Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 07/32] drm/xe/log: Add SIGID log helpers for location & severity Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 08/32] drm/xe/log: Add SIGID log helpers for components Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 09/32] drm/xe/log: Add SIGID log helpers for component & severity Michal Wajdeczko
2026-08-13 4:38 ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 10/32] drm/xe/log: Add SIGID log helpers for errno-only Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 11/32] drm/xe/log: Index all SIGID printk messages Michal Wajdeczko
2026-08-12 19:35 ` sashiko-bot
2026-08-13 12:31 ` Mallesh, Koujalagi
2026-08-13 12:54 ` Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 12/32] drm/xe/log: Add hardware error signatures Michal Wajdeczko
2026-08-13 5:03 ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 13/32] drm/xe/log: Extend components list with hardware items Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 14/32] drm/xe/ras: Check RAS and LOG component definitions Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 15/32] drm/xe/kunit: Setup driver data in the test device Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 16/32] drm/xe/tests: Add Kunit tests for xe_log Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 17/32] drm/xe/tests: Add kunit tests for xe_any Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 18/32] drm/xe: Report 'probe blocked' error using SIGID Michal Wajdeczko
2026-08-13 6:26 ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 19/32] drm/xe: Report all probe errors " Michal Wajdeczko
2026-08-13 6:50 ` Mallesh, Koujalagi
2026-08-13 9:12 ` Michal Wajdeczko
2026-08-13 9:58 ` Mallesh, Koujalagi
2026-08-13 10:09 ` Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 20/32] drm/xe/survivability: Report 'boot status' " Michal Wajdeczko
2026-08-13 8:38 ` Mallesh, Koujalagi
2026-08-13 9:28 ` Michal Wajdeczko
2026-08-13 10:07 ` Mallesh, Koujalagi
2026-08-13 10:18 ` Michal Wajdeczko [this message]
2026-08-12 19:14 ` [PATCH v4 21/32] drm/xe/survivability: Report 'sysfs failure' error " Michal Wajdeczko
2026-08-13 8:54 ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 22/32] drm/xe/survivability: Report 'Boot Mode enabled' status " Michal Wajdeczko
2026-08-13 10:52 ` Mallesh, Koujalagi
2026-08-13 11:01 ` Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 23/32] drm/xe/survivability: Report 'Runtime " Michal Wajdeczko
2026-08-13 11:40 ` Mallesh, Koujalagi
2026-08-13 12:46 ` Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 24/32] drm/xe: Report 'device wedged' errors " Michal Wajdeczko
2026-08-12 22:28 ` Rodrigo Vivi
2026-08-13 11:56 ` Mallesh, Koujalagi
2026-08-12 19:14 ` [PATCH v4 25/32] drm/xe/pcode: Report 'Mailbox failed' error " Michal Wajdeczko
2026-08-13 12:10 ` Bhadane, Dnyaneshwar
2026-08-13 12:35 ` Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 26/32] drm/xe/pcode: Report 'timeout, retrying' " Michal Wajdeczko
2026-08-12 19:51 ` sashiko-bot
2026-08-12 19:14 ` [PATCH v4 27/32] drm/xe/pcode: Report 'initialization timedout' " Michal Wajdeczko
2026-08-12 19:49 ` sashiko-bot
2026-08-12 19:14 ` [PATCH v4 28/32] drm/xe/guc: Report 'GuC mmio' errors " Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 29/32] drm/xe/gt: Report 'reset failed' " Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 30/32] drm/xe/gt: Report 'Fault response' pagefault error " Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 31/32] drm/xe/gt: Report 'Queue full' " Michal Wajdeczko
2026-08-12 19:14 ` [PATCH v4 32/32] drm/xe/pci: Report 'cannot re-enable' " Michal Wajdeczko
2026-08-12 19:22 ` ✗ CI.checkpatch: warning for drm/xe: Add structured SIGID error logging infrastructure (rev4) Patchwork
2026-08-12 19:24 ` ✓ CI.KUnit: success " Patchwork
2026-08-12 20:34 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-08-13 2:47 ` ✗ Xe.CI.FULL: " Patchwork
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=2662b52e-6fbc-4fbf-8528-e55656c387c2@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=aravind.iddamsetty@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=mallesh.koujalagi@intel.com \
--cc=riana.tauro@intel.com \
--cc=rodrigo.vivi@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