All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Riana Tauro" <riana.tauro@intel.com>, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe/ras: Add RAS config command to downgrade AER uncorrectable internal error
Date: Tue, 17 Nov 2026 10:11:41 +0000	[thread overview]
Message-ID: <sashiko-outbox-218574@kernel.org> (raw)
In-Reply-To: <20261117095701.404369-2-riana.tauro@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/xe/ras: pcie_aer_is_native() precedes aer_cap check in
  ras_usp_aer_init()
--

commit 023f37be15fd1e9b09b34f30302beed059ea93be
Author: Riana Tauro <riana.tauro@intel.com>

drm/xe/ras: Add RAS config command to downgrade AER uncorrectable internal error

This commit adds support for the XE_SYSCTRL_CMD_RAS_CONFIG mailbox command
and uses it in ras_usp_aer_init() to request firmware to downgrade the USP
AER uncorrectable internal error severity when the OS does not have native
control of AER.

> diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c
> index 0fb891d00b36a..4f732e9723f9f 100644
> --- a/drivers/gpu/drm/xe/xe_ras.c
> +++ b/drivers/gpu/drm/xe/xe_ras.c
[ ... ]
> @@ -508,17 +509,80 @@ static void get_offline_list(struct xe_device *xe)
[ ... ]
>  static void ras_usp_aer_init(struct xe_device *xe)
>  {
>  	struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
> +	enum xe_ras_config config;
>  	struct pci_dev *usp;
>  	u16 aer_cap;
>  	u32 status;
> +	int ret;
>  
>  	usp = xe_pci_get_usp_dev(pdev);
>  	if (!usp)
>  		return;
>  
> +	if (!pcie_aer_is_native(usp)) {
> +		config = XE_RAS_CONFIG_USP_AER_UNCOR_INTERNAL_NONFATAL;
> +
> +		ret = ras_config(xe, config, XE_RAS_CONFIG_ACTION_SET);
> +		if (ret)
> +			return;
> +
> +		/* Read the configuration */
> +		ras_config(xe, config, XE_RAS_CONFIG_ACTION_GET);
> +		return;
> +	}
> +
>  	aer_cap = pci_find_ext_capability(usp, PCI_EXT_CAP_ID_ERR);
>  	if (!aer_cap) {
>  		dev_warn(&usp->dev, "AER capability unavailable\n");

[Severity: Low]
Should pci_find_ext_capability(usp, PCI_EXT_CAP_ID_ERR) be checked before
pcie_aer_is_native(usp)?

pcie_aer_is_native() returns 0 whenever usp->aer_cap is 0, before checking
host->native_aer.  If usp lacks the AER capability on a system with native
OS AER control, ras_usp_aer_init() sends the firmware RAS config command
instead of logging the warning and returning, and the !aer_cap check below
becomes unreachable.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117095701.404369-2-riana.tauro@intel.com?part=1

  parent reply	other threads:[~2026-11-17 10:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  9:57 [PATCH] drm/xe/ras: Add RAS config command to downgrade AER uncorrectable internal error Riana Tauro
2026-11-17 10:06 ` ✓ CI.KUnit: success for " Patchwork
2026-11-17 10:11 ` sashiko-bot [this message]
2026-11-17 10:39 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-17 22:39 ` ✓ 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=sashiko-outbox-218574@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=riana.tauro@intel.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.