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 v5 2/8] drm/xe/hw_error: Initialize hw_error_work per tile
Date: Thu, 12 Nov 2026 06:29:43 +0000	[thread overview]
Message-ID: <sashiko-outbox-210526@kernel.org> (raw)
In-Reply-To: <20261112060701.3327125-12-riana.tauro@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/xe/hw_error: check devm_add_action_or_reset() in
  xe_hw_error_init()
--

commit 507eb21a794f9cbaaf41a0422e6f54d0d752cfac
Author: Raag Jadav <raag.jadav@intel.com>

drm/xe/hw_error: Initialize hw_error_work per tile

This commit initializes tile->hw_error_work across all tiles instead of
only the root tile and registers a devm action to disable the work items on
teardown.

> diff --git a/drivers/gpu/drm/xe/xe_hw_error.c b/drivers/gpu/drm/xe/xe_hw_error.c
> index a934b649575c7..ef41bd24ece0c 100644
> --- a/drivers/gpu/drm/xe/xe_hw_error.c
> +++ b/drivers/gpu/drm/xe/xe_hw_error.c
> @@ -537,6 +537,16 @@ static void process_hw_errors(struct xe_device *xe)
>  	}
>  }
>  
> +static void hw_error_fini(void *arg)
> +{
> +	struct xe_device *xe = arg;
> +	struct xe_tile *tile;
> +	u8 id;
> +
> +	for_each_tile(tile, xe, id)
> +		disable_work_sync(&tile->hw_error_work);
> +}
> +
>  /**
>   * xe_hw_error_init - Initialize hw errors
>   * @xe: xe device instance
> @@ -546,12 +556,15 @@ static void process_hw_errors(struct xe_device *xe)
>   */
>  void xe_hw_error_init(struct xe_device *xe)
>  {
> -	struct xe_tile *tile = xe_device_get_root_tile(xe);
> +	struct xe_tile *tile;
> +	u8 id;
>  
>  	if (!IS_DGFX(xe) || IS_SRIOV_VF(xe))
>  		return;
>  
> -	INIT_WORK(&tile->hw_error_work, hw_error_work);
> +	for_each_tile(tile, xe, id)
> +		INIT_WORK(&tile->hw_error_work, hw_error_work);
>  
>  	process_hw_errors(xe);
> +	devm_add_action_or_reset(xe->drm.dev, hw_error_fini, xe);
>  }

[Severity: Medium]
As reported by Andi Shyti on v2 [1], should xe_hw_error_init() return int
and propagate the return value of devm_add_action_or_reset() to
xe_irq_install()?

If devm_add_action_or_reset() fails with -ENOMEM, it immediately invokes
hw_error_fini(), which calls disable_work_sync() on every
tile->hw_error_work.  Because the error is ignored, driver probe succeeds
with all per-tile hw_error_work items permanently disabled, so subsequent
hardware error interrupts calling schedule_work(&tile->hw_error_work) will
silently fail to queue hw_error_work().

[1] https://lore.kernel.org/r/auIW6DsRRyZ0GWnz@zenone.zhora.eu

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

  reply	other threads:[~2026-11-12  6:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12  6:07 [PATCH v5 0/8] Handle non-fatal errors routed via IRQ Riana Tauro
2026-11-12  6:07 ` [PATCH v5 1/8] drm/xe/hw_error: Reuse CSC worker for generic error handling Riana Tauro
2026-11-12  6:07 ` [PATCH v5 2/8] drm/xe/hw_error: Initialize hw_error_work per tile Riana Tauro
2026-11-12  6:29   ` sashiko-bot [this message]
2026-11-12  6:07 ` [PATCH v5 3/8] drm/xe/survivability: Guard runtime survivability enable against unbind Riana Tauro
2026-11-12  6:07 ` [PATCH v5 4/8] drm/xe/ras: Treat non-fatal PCIe errors as recovered Riana Tauro
2026-11-12  6:07 ` [PATCH v5 5/8] drm/xe/pci: Add upstream switch port lookup helper Riana Tauro
2026-11-12  6:07 ` [PATCH v5 6/8] drm/xe/xe_ras: Add a flag for uncorrectable internal error Riana Tauro
2026-11-12  6:07 ` [PATCH v5 7/8] drm/xe: Add support for wa_14028434957 Riana Tauro
2026-11-12  6:39   ` sashiko-bot
2026-11-12  6:07 ` [PATCH v5 8/8] drm/xe/xe_ras: Skip double-bit ECC page offlining on AER path Riana Tauro
2026-11-12  6:16 ` ✓ CI.KUnit: success for Handle non-fatal errors routed via IRQ (rev5) Patchwork
2026-11-12  7:00 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-12 12:50 ` ✗ 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=sashiko-outbox-210526@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.