[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250425082726.Z3fE3m9I@linutronix.de>
Date: Fri, 25 Apr 2025 10:27:26 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Junxiao Chang <junxiao.chang@...el.com>
Cc: tomas.winkler@...el.com, Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Tvrtko Ursulin <tursulin@...ulin.net>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Clark Williams <clrkwllms@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Daniele Ceraolo Spurio <daniele.ceraolospurio@...el.com>,
Vitaly Lubart <vitaly.lubart@...el.com>,
Alexander Usyskin <alexander.usyskin@...el.com>,
intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, linux-rt-devel@...ts.linux.dev,
furong.zhou@...el.com
Subject: Re: [PATCH] drm/i915/gsc: mei interrupt top half should be in irq
disabled context
On 2025-04-25 14:04:54 [+0800], Junxiao Chang wrote:
> MEI GSC interrupt comes from i915. It has top half and bottom half.
> Top half is called from i915 interrupt handler. It should be in
> irq disabled context.
>
> With RT kernel, by default i915 IRQ handler is in threaded IRQ. MEI GSC
> top half might be in threaded IRQ context. generic_handle_irq_safe API
> could be called from either IRQ or process context, it disables local
> IRQ then calls MEI GSC interrupt top half.
>
> This change fixes A380/A770 GPU boot hang issue with RT kernel.
>
> Fixes: 1e3dc1d8622b ("drm/i915/gsc: add gsc as a mei auxiliary device")
> Tested-by: Furong Zhou <furong.zhou@...el.com>
> Suggested-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> Signed-off-by: Junxiao Chang <junxiao.chang@...el.com>
> ---
> drivers/gpu/drm/i915/gt/intel_gsc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_gsc.c b/drivers/gpu/drm/i915/gt/intel_gsc.c
> index 1e925c75fb080..a099d885508ac 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gsc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gsc.c
> @@ -284,7 +284,9 @@ static void gsc_irq_handler(struct intel_gt *gt, unsigned int intf_id)
> if (gt->gsc.intf[intf_id].irq < 0)
> return;
>
> - ret = generic_handle_irq(gt->gsc.intf[intf_id].irq);
> + /* It can be called in both irq context and in thread context */
I don't know why this deserves a comment. However, generic_handle_irq()
is used from the IRQ chip, everything that signals the interrupt. This,
if it comes from an interrupt handler itself, should use the _safe()
variant. It used to be a issue also with threaded interrupts on !RT but
for other reasons this is no longer the case.
> + ret = generic_handle_irq_safe(gt->gsc.intf[intf_id].irq);
> +
> if (ret)
> gt_err_ratelimited(gt, "error handling GSC irq: %d\n", ret);
> }
Sebastian
Powered by blists - more mailing lists