Re: [PATCH 0/8] Generic IRQ entry/exit support for powerpc
From: Mukesh Kumar Chaurasiya
Date: Fri Nov 21 2025 - 00:49:09 EST
On 11/19/25 11:27 PM, Thomas Gleixner wrote:
On Fri, Nov 07 2025 at 21:53, Shrikanth Hegde wrote:yeah we also found an issue with context tracking here. I am working on fixing it.
On 11/2/25 5:23 PM, Mukesh Kumar Chaurasiya wrote:This does not look right at all.
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;
+ }
+
syscall_exit_to_user_mode(regs)
syscall_exit_to_user_mode_work()
exit_to_user_mode()
user_exit_irqoff()
This helps. Let me try this and i'll send a new version out as soon as we are done with testing.
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
Thanks for the review.
Regards,
Mukesh