[PATCH v3 7/8] powerpc: Enable IRQ generic entry/exit path.
Shrikanth Hegde
sshegde at linux.ibm.com
Fri Jan 2 04:31:08 AEDT 2026
On 12/29/25 10:24 AM, Mukesh Kumar Chaurasiya wrote:
> From: Mukesh Kumar Chaurasiya <mchauras at linux.ibm.com>
>
> Enable the generic IRQ entry/exit infrastructure on PowerPC by selecting
> GENERIC_IRQ_ENTRY and integrating the architecture-specific interrupt
> handlers with the generic entry/exit APIs.
>
> This change replaces PowerPC’s local interrupt entry/exit handling with
> calls to the generic irqentry_* helpers, aligning the architecture with
> the common kernel entry model. The macros that define interrupt, async,
> and NMI handlers are updated to use irqentry_enter()/irqentry_exit()
> and irqentry_nmi_enter()/irqentry_nmi_exit() where applicable.
>
> Key updates include:
> - Select GENERIC_IRQ_ENTRY in Kconfig.
> - Replace interrupt_enter/exit_prepare() with arch_interrupt_* helpers.
> - Integrate irqentry_enter()/exit() in standard and async interrupt paths.
> - Integrate irqentry_nmi_enter()/exit() in NMI handlers.
> - Remove redundant irq_enter()/irq_exit() calls now handled generically.
> - Use irqentry_exit_cond_resched() for preemption checks.
> - Remove unused code.
>
> This change establishes the necessary wiring for PowerPC to use the
> generic IRQ entry/exit framework while maintaining existing semantics.
>
> Signed-off-by: Mukesh Kumar Chaurasiya <mchauras at linux.ibm.com>
> ---
> arch/powerpc/Kconfig | 1 +
> arch/powerpc/include/asm/entry-common.h | 61 +--
> arch/powerpc/include/asm/interrupt.h | 484 +++---------------------
> arch/powerpc/kernel/interrupt.c | 15 +-
> 4 files changed, 72 insertions(+), 489 deletions(-)
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 9537a61ebae0..398cef868c14 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -207,6 +207,7 @@ config PPC
> select GENERIC_GETTIMEOFDAY
> select GENERIC_IDLE_POLL_SETUP
> select GENERIC_IOREMAP
> + select GENERIC_IRQ_ENTRY
> select GENERIC_IRQ_SHOW
> select GENERIC_IRQ_SHOW_LEVEL
> select GENERIC_PCI_IOMAP if PCI
There is no need for GENERIC_IRQ_ENTRY. I don't see a reason why
we need to have both.
Enabling GENERIC_ENTRY which is done in next patch will enable this.
It does the same thing and one less kconfig to worry about.
This would allow some easier code refactoring IMO.
- You can keep adding code to asm/entry-common.h. This will help avoid
moving to interrupt.h in between.
- You can add another patch as cleanup post GENERIC_ENTRY for
easier review for seccomp/ptrace.
...
- Some more ct_warning in arch/powerpc are probably not necessary
(can be done post the series too)
- Some more cleanups can be done w.r.t to lockdep and tracing hardirq etc.
For example in next_interrupt. I think replay soft interrupts will end
up making irqentry_enter/exit calls which does same or similar thing.
(can be done post the series too)
- can we move syscall_exit_prepare/ into kernel/syscall.c?
(can be done post the series too)
More information about the Linuxppc-dev
mailing list