[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87ms4hlxci.ffs@tglx>
Date: Wed, 19 Nov 2025 18:57:01 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Shrikanth Hegde <sshegde@...ux.ibm.com>, Mukesh Kumar Chaurasiya
<mkchauras@...ux.ibm.com>, maddy@...ux.ibm.com, mpe@...erman.id.au,
npiggin@...il.com
Cc: christophe.leroy@...roup.eu, oleg@...hat.com, kees@...nel.org,
luto@...capital.net, wad@...omium.org, mchauras@...ux.ibm.com,
thuth@...hat.com, akpm@...ux-foundation.org, macro@...am.me.uk,
ldv@...ace.io, deller@....de, charlie@...osinc.com, bigeasy@...utronix.de,
segher@...nel.crashing.org, thomas.weissschuh@...utronix.de,
menglong8.dong@...il.com, ankur.a.arora@...cle.com, peterz@...radead.org,
namcao@...utronix.de, kan.liang@...ux.intel.com, mingo@...nel.org,
atrajeev@...ux.vnet.ibm.com, mark.barnett@....com, coltonlewis@...gle.com,
rppt@...nel.org, linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/8] Generic IRQ entry/exit support for powerpc
On Fri, Nov 07 2025 at 21:53, Shrikanth Hegde wrote:
> On 11/2/25 5:23 PM, Mukesh Kumar Chaurasiya wrote:
> diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c
> index ce59431f977c..c7cf9a3f1202 100644
> --- a/arch/powerpc/kernel/interrupt.c
> +++ b/arch/powerpc/kernel/interrupt.c
> @@ -118,16 +118,18 @@ notrace unsigned long syscall_exit_prepare(unsigned long r3,
> regs->exit_flags |= _TIF_RESTOREALL;
> }
>
> -again:
> + local_irq_disable();
> +
> + user_exit_irqoff();
> syscall_exit_to_user_mode(regs);
>
> - user_enter_irqoff();
> - if (!prep_irq_for_enabled_exit(true)) {
> - user_exit_irqoff();
> - local_irq_enable();
> - local_irq_disable();
> - goto again;
> - }
> +again:
> + if (!prep_irq_for_enabled_exit(true)) {
> + local_irq_enable();
> + local_irq_disable();
> + goto again;
> + }
> +
This does not look right at all.
syscall_exit_to_user_mode(regs)
syscall_exit_to_user_mode_work()
exit_to_user_mode()
user_exit_irqoff()
What you really want to do here is:
again:
syscall_exit_to_user_mode_work(regs);
exit_to_user_mode(regs);
if (!prep_irq_for_enabled_exit(true)) {
// Re-establishes the full state required
// to restart
enter_from_user_mode(regs);
local_irq_enable();
local_irq_disable();
goto again;
That should cure it. Same issue in the other places.
Thanks,
tglx
Powered by blists - more mailing lists