All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <anshuman.gupta@intel.com>,
	<badal.nilawar@intel.com>, <riana.tauro@intel.com>,
	<karthik.poosa@intel.com>, <sk.anirban@intel.com>,
	<raag.jadav@intel.com>, <himal.prasad.ghimiray@intel.com>,
	<tejas.upadhyay@intel.com>, <aravind.iddamsetty@linux.intel.com>
Subject: Re: [PATCH v1 1/4] drm/xe/ras: Add helper to check hard-offlined pages
Date: Wed, 2 Dec 2026 12:51:16 -0500	[thread overview]
Message-ID: <axBalDmYoumfdonx@intel.com> (raw)
In-Reply-To: <20261202115714.2320298-7-mallesh.koujalagi@intel.com>

On Wed, Dec 02, 2026 at 05:27:16PM +0530, Mallesh Koujalagi wrote:
> From: Aravind Iddamsetty <aravind.iddamsetty@linux.intel.com>
> 
> Introduce page_is_hard_offlined() to encapsulate the lookup of
> hard-offlined pages in the offlined_pages xarray.
> 
> Cc: Raag Jadav <raag.jadav@intel.com>
> Cc: Riana Tauro <riana.tauro@intel.com>
> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
> Cc: Tejas Upadhyay <tejas.upadhyay@intel.com>
> Signed-off-by: Aravind Iddamsetty <aravind.iddamsetty@linux.intel.com>
> Co-developed-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
> Signed-off-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_ras.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c
> index 57d3f4b92fad..6bce682c32d0 100644
> --- a/drivers/gpu/drm/xe/xe_ras.c
> +++ b/drivers/gpu/drm/xe/xe_ras.c
> @@ -254,6 +254,11 @@ static inline const char *comp_to_str(u8 component)
>  	return xe_ras_components[component];
>  }
>  
> +static bool page_is_hard_offlined(struct xe_device *xe, u64 page_address)
> +{
> +	return !!xa_load(&xe->ras.state.offlined_pages, page_address >> XE_PTE_SHIFT);

I hate this !!

but looks right

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> +}
> +
>  static int send_page_offline_cmd(struct xe_device *xe, u64 page_address,
>  				 enum xe_ras_page_action action)
>  {
> @@ -311,7 +316,6 @@ static int send_page_offline_cmd(struct xe_device *xe, u64 page_address,
>  
>  static int handle_page_offline(struct xe_device *xe, u64 page_address, bool notify_fw)
>  {
> -	struct xe_ras_state *state = &xe->ras.state;
>  	enum xe_ras_page_action action;
>  	u64 addr;
>  	int ret;
> @@ -351,7 +355,7 @@ static int handle_page_offline(struct xe_device *xe, u64 page_address, bool noti
>  	case -EEXIST:
>  		xe_dbg(xe, "[RAS]: Repeated error on already soft-offlined page address 0x%llx\n",
>  		       page_address);
> -		if (xa_load(&state->offlined_pages, page_address >> XE_PTE_SHIFT))
> +		if (page_is_hard_offlined(xe, page_address))
>  			action = XE_RAS_PAGE_ACTION_REMOVE;
>  		else
>  			action = XE_RAS_PAGE_ACTION_OFFLINE;
> -- 
> 2.48.1
> 

  parent reply	other threads:[~2026-12-02 17:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 11:57 [PATCH v1 0/4] drm/xe/ras: Suppress repeated DB-ECC reports Mallesh Koujalagi
2026-12-02 11:57 ` [PATCH v1 1/4] drm/xe/ras: Add helper to check hard-offlined pages Mallesh Koujalagi
2026-12-02 13:16   ` Raag Jadav
2026-12-02 13:47     ` Mallesh, Koujalagi
2026-12-02 17:51   ` Rodrigo Vivi [this message]
2026-12-02 11:57 ` [PATCH v1 2/4] drm/xe/ras: Downgrade repeated page removal message to debug Mallesh Koujalagi
2026-12-02 17:52   ` Rodrigo Vivi
2026-12-02 11:57 ` [PATCH v1 3/4] drm/xe/ras: Skip reports for repeated DB-ECC errors Mallesh Koujalagi
2026-12-02 12:08   ` sashiko-bot
2026-12-02 18:21   ` Rodrigo Vivi
2026-12-02 11:57 ` [PATCH v1 4/4] drm/xe/ras: Avoid duplicate logging for recurrent " Mallesh Koujalagi
2026-12-02 12:06   ` sashiko-bot
2026-12-02 17:53   ` Rodrigo Vivi
2026-12-02 13:36 ` ✓ CI.KUnit: success for drm/xe/ras: Suppress repeated DB-ECC reports Patchwork
2026-12-02 14:08 ` ✓ Xe.CI.BAT: " 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=axBalDmYoumfdonx@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=aravind.iddamsetty@linux.intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=karthik.poosa@intel.com \
    --cc=mallesh.koujalagi@intel.com \
    --cc=raag.jadav@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=sk.anirban@intel.com \
    --cc=tejas.upadhyay@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.