# Re: \[PATCH v7 28/42\] powerpc: convert interrupt handlers to use wrappers

- From: Christophe Leroy \<hidden\>
- Date: 2021-02-05 08:11:28 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2021/02/9520817
- Thread: https://ratatoskr.run/linuxppc-dev/2021/01/9520622/t.md

```text


Le 30/01/2021 à 14:08, Nicholas Piggin a écrit :
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---

> diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
> index f70d3f6174c8..7ff915aae8ec 100644
> --- a/arch/powerpc/kernel/traps.c
> +++ b/arch/powerpc/kernel/traps.c

> @@ -1462,7 +1474,7 @@ static int emulate_math(struct pt_regs *regs)
>   static inline int emulate_math(struct pt_regs *regs) { return -1; }
>   #endif
>   
> -void program_check_exception(struct pt_regs *regs)
> +DEFINE_INTERRUPT_HANDLER(program_check_exception)
>   {
>   	enum ctx_state prev_state = exception_enter();
>   	unsigned int reason = get_reason(regs);
> @@ -1587,14 +1599,14 @@ NOKPROBE_SYMBOL(program_check_exception);
>    * This occurs when running in hypervisor mode on POWER6 or later
>    * and an illegal instruction is encountered.
>    */
> -void emulation_assist_interrupt(struct pt_regs *regs)
> +DEFINE_INTERRUPT_HANDLER(emulation_assist_interrupt)
>   {
>   	regs->msr |= REASON_ILLEGAL;
>   	program_check_exception(regs);

Is it correct that an INTERRUPT_HANDLER calls another INTERRUPT_HANDLER ?

>   }
>   NOKPROBE_SYMBOL(emulation_assist_interrupt);
>   
```
