From: Matthew Brost <matthew.brost@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/xe: Use guard(spinlock_irqsave) in pagefault handler
Date: Tue, 11 Aug 2026 16:26:04 -0700 [thread overview]
Message-ID: <anuvjL1bJW1KJP2H@gsse-cloud1.jf.intel.com> (raw)
In-Reply-To: <20260811200906.10400-2-michal.wajdeczko@intel.com>
On Tue, Aug 11, 2026 at 10:09:04PM +0200, Michal Wajdeczko wrote:
> It is safer and easier to use guard() instead of explicit lock
> unlock calls.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/xe/xe_pagefault.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_pagefault.c b/drivers/gpu/drm/xe/xe_pagefault.c
> index b2d7bca9e407..cfb65621baec 100644
> --- a/drivers/gpu/drm/xe/xe_pagefault.c
> +++ b/drivers/gpu/drm/xe/xe_pagefault.c
> @@ -864,10 +864,9 @@ static int xe_pagefault_work_index(struct xe_device *xe)
> int xe_pagefault_handler(struct xe_device *xe, struct xe_pagefault *pf)
> {
> struct xe_pagefault_queue *pf_queue = &xe->usm.pf_queue;
> - unsigned long flags;
> bool full;
>
> - spin_lock_irqsave(&pf_queue->lock, flags);
> + guard(spinlock_irqsave)(&pf_queue->lock);
> full = xe_pagefault_queue_full(pf_queue);
> if (!full) {
> struct xe_pagefault *lpf;
> @@ -898,7 +897,6 @@ int xe_pagefault_handler(struct xe_device *xe, struct xe_pagefault *pf)
> drm_warn(&xe->drm,
> "PageFault Queue full, shouldn't be possible\n");
> }
> - spin_unlock_irqrestore(&pf_queue->lock, flags);
>
> return full ? -ENOSPC : 0;
> }
> --
> 2.47.1
>
next prev parent reply other threads:[~2026-08-11 23:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 20:09 [PATCH 0/2] drm/xe: small pagefault handler improvements Michal Wajdeczko
2026-08-11 20:09 ` [PATCH 1/2] drm/xe: Use guard(spinlock_irqsave) in pagefault handler Michal Wajdeczko
2026-08-11 23:26 ` Matthew Brost [this message]
2026-08-11 20:09 ` [PATCH 2/2] drm/xe: Remove redundant full pagefault queue check Michal Wajdeczko
2026-08-11 23:27 ` Matthew Brost
2026-08-11 20:20 ` ✓ CI.KUnit: success for drm/xe: small pagefault handler improvements Patchwork
2026-08-11 21:32 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-11 23:58 ` ✓ 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=anuvjL1bJW1KJP2H@gsse-cloud1.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=michal.wajdeczko@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