Thread (38 messages) 38 messages, 6 authors, 2026-01-04

Re: [PATCH v2 6/8] powerpc: Prepare for IRQ entry exit

From: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
Date: 2025-12-16 22:41:04
Also in: lkml


Le 16/12/2025 à 16:00, Mukesh Kumar Chaurasiya a écrit :
On Tue, Dec 16, 2025 at 10:58:16AM +0100, Christophe Leroy (CS GROUP) wrote:
quoted

Le 14/12/2025 à 14:02, Mukesh Kumar Chaurasiya a écrit :
quoted
From: Mukesh Kumar Chaurasiya <redacted>

Move interrupt entry and exit helper routines from interrupt.h into the
PowerPC-specific entry-common.h header as a preparatory step for enabling
the generic entry/exit framework.

This consolidation places all PowerPC interrupt entry/exit handling in a
single common header, aligning with the generic entry infrastructure.
The helpers provide architecture-specific handling for interrupt and NMI
entry/exit sequences, including:

   - arch_interrupt_enter/exit_prepare()
   - arch_interrupt_async_enter/exit_prepare()
   - arch_interrupt_nmi_enter/exit_prepare()
   - Supporting helpers such as nap_adjust_return(), check_return_regs_valid(),
     debug register maintenance, and soft mask handling.

The functions are copied verbatim from interrupt.h to avoid functional
changes at this stage. Subsequent patches will integrate these routines
into the generic entry/exit flow.
Can we move them instead of duplicating them ?
Till we enable the Generic framework i didn't want to touch the already
used code path. Once we enable the code all the unused code should be
removed. This helps us in bisecting future issues caused due to this.
I can't see who it can help bisecting. What did I miss ?

If you copy the code, you don't know whether what you have copied is 
correct or not until you use it. So when you start using it you don't 
know if the problem is in the copied code or the code using it.

If instead of copying the code you move it and continue to use the moved 
code from the only implementation, they when you start using it with the 
new code you are sure it works and then if you have a problem you know 
it is not the moved code but the new code using it.

Christophe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help