All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nilawar, Badal" <badal.nilawar@intel.com>
To: Mallesh Koujalagi <mallesh.koujalagi@intel.com>,
	<intel-xe@lists.freedesktop.org>, <rodrigo.vivi@intel.com>,
	<matthew.brost@intel.com>
Cc: <anshuman.gupta@intel.com>, <vinay.belgaumkar@intel.com>,
	<riana.tauro@intel.com>, <karthik.poosa@intel.com>,
	<sk.anirban@intel.com>, <raag.jadav@intel.com>,
	<aravind.iddamsetty@linux.intel.com>,
	<jani.nikula@linux.intel.com>
Subject: Re: [PATCH v3 1/6] drm/xe/cper: Add software CPER emission entry point
Date: Tue, 10 Nov 2026 18:58:51 +0530	[thread overview]
Message-ID: <f58d57bc-05c2-42fc-94af-dbd5ea260323@intel.com> (raw)
In-Reply-To: <20261105085348.1467925-9-mallesh.koujalagi@intel.com>


On 05-11-2026 14:23, Mallesh Koujalagi wrote:
> Add a software CPER emission handler for CRI SIGIDs.
>
> Keep hardware CPER handling unchanged and return early
> when the Xe device is unavailable.
>
> Cc: Badal Nilawar <badal.nilawar@intel.com>
> Signed-off-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
> ---
> v3:
> - Handle early PCI probe where xe device is null. (Sashiko)
> ---
>   drivers/gpu/drm/xe/xe_cper.c | 22 +++++++++++++++++++++-
>   1 file changed, 21 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_cper.c b/drivers/gpu/drm/xe/xe_cper.c
> index bb90030bcd2d..db3513c59834 100644
> --- a/drivers/gpu/drm/xe/xe_cper.c
> +++ b/drivers/gpu/drm/xe/xe_cper.c
> @@ -32,6 +32,11 @@ static bool is_hw_sigid(enum xe_sigid sigid)
>   	return in_range(sigid, INTEL_SIGID_GPU_XE_HARDWARE_START, INTEL_SIGID_BATCH);
>   }
>   
> +static bool is_sw_sigid(enum xe_sigid sigid)
> +{
> +	return in_range(sigid, INTEL_SIGID_GPU_XE_SOFTWARE_START, INTEL_SIGID_BATCH);
> +}
> +
>   /* CPER platform_id GUIDs (RFC 9562 UUIDv5) for each PCI device ID. */
>   static const struct xe_device_guid_entry xe_device_guids[] = {
>   	{ 0x674C, GUID_INIT(0x9046afe5, 0x9041, 0x5124,
> @@ -240,6 +245,12 @@ static void cper_emit_hw_err(struct xe_device *xe, int cper_sev, enum xe_sigid s
>   	xe_cper_emit_counter(xe, cper_sev, sigid, counter, &response);
>   }
>   
> +static void cper_emit_sw_err(struct xe_device *xe, int cper_sev, enum xe_sigid sigid,
> +			     u32 component, u32 location, const void *data,
> +			     struct va_format *vaf)
> +{
> +}
> +
>   /**
>    * xe_cper_emit() - Emit a CPER record for a SIGID log entry
>    * @xe: The &xe_device
> @@ -268,12 +279,21 @@ void xe_cper_emit(struct xe_device *xe, int cper_sev, enum xe_sigid sigid,
>   		  u32 component, u32 location, const void *data, size_t len,
>   		  struct va_format *vaf)
>   {
> +	if (!xe)
> +		return;

xe is expected to be valid here. Silently returning on NULL would hide a 
caller bug.

> +
>   	if (is_hw_sigid(sigid) && !IS_ERR_OR_NULL(data)) {
>   		cper_emit_hw_err(xe, cper_sev, sigid, data);
>   		return;
>   	}
>   
> -	/* TODO software CPER */
> +	if (xe->info.platform == XE_CRESCENTISLAND) {

Introduce has_driver_cper flag here.

Thanks,
Badal

> +		if (is_sw_sigid(sigid) &&
> +		    (cper_sev == CPER_SEV_RECOVERABLE ||
> +		     cper_sev == CPER_SEV_FATAL))
> +			cper_emit_sw_err(xe, cper_sev, sigid, component, location, data, vaf);
> +		return;
> +	}
>   }
>   
>   static ssize_t cper_on_query_show(struct device *dev, struct device_attribute *attr, char *buf)

  reply	other threads:[~2026-11-10 13:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05  8:53 [PATCH v3 0/6] drm/xe/cper: Software (driver-detected) CPER error reporting Mallesh Koujalagi
2026-11-05  8:53 ` [PATCH v3 1/6] drm/xe/cper: Add software CPER emission entry point Mallesh Koujalagi
2026-11-10 13:28   ` Nilawar, Badal [this message]
2026-11-10 13:49     ` Mallesh, Koujalagi
2026-11-10 14:58       ` Nilawar, Badal
2026-11-11  8:51         ` Mallesh, Koujalagi
2026-11-05  8:53 ` [PATCH v3 2/6] drm/xe/cper: Prepare CPER headers for software errors Mallesh Koujalagi
2026-11-10 13:55   ` Nilawar, Badal
2026-11-11 10:31     ` Mallesh, Koujalagi
2026-11-05  8:53 ` [PATCH v3 3/6] drm/xe/cper: Emit software CPER records Mallesh Koujalagi
2026-11-10 15:12   ` Nilawar, Badal
2026-11-11  8:20     ` Mallesh, Koujalagi
2026-11-05  8:53 ` [PATCH v3 4/6] drm/xe/cper: Make software CPER emission atomic-safe Mallesh Koujalagi
2026-11-10 15:01   ` Nilawar, Badal
2026-11-11  4:59     ` Mallesh, Koujalagi
2026-11-05  8:53 ` [PATCH v3 5/6] drm/xe/log: Add software CPER information to KUnit output Mallesh Koujalagi
2026-11-05  8:53 ` [PATCH v3 6/6] drm/xe/log: Test software CPER emission parameters Mallesh Koujalagi
2026-11-05  9:03 ` ✓ CI.KUnit: success for drm/xe/cper: Software (driver-detected) CPER error reporting (rev3) Patchwork
2026-11-05  9:39 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-06  4:19 ` ✗ Xe.CI.FULL: failure " 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=f58d57bc-05c2-42fc-94af-dbd5ea260323@intel.com \
    --to=badal.nilawar@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=aravind.iddamsetty@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=karthik.poosa@intel.com \
    --cc=mallesh.koujalagi@intel.com \
    --cc=matthew.brost@intel.com \
    --cc=raag.jadav@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=sk.anirban@intel.com \
    --cc=vinay.belgaumkar@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 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.