Re: [PATCH 1/3] powerpc/8xx: Enhance readability of trap types

From: Xiongwei Song
Date: Mon Apr 19 2021 - 22:36:13 EST


On Mon, Apr 19, 2021 at 11:48 PM Christophe Leroy
<christophe.leroy@xxxxxxxxxx> wrote:
>
> This patch makes use of trap types in head_8xx.S
>
> Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
> ---
> arch/powerpc/include/asm/interrupt.h | 29 ++++++++++++----
> arch/powerpc/kernel/head_8xx.S | 49 ++++++++++++++--------------
> 2 files changed, 47 insertions(+), 31 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/interrupt.h b/arch/powerpc/include/asm/interrupt.h
> index ed2c4042c3d1..cf2c5c3ae716 100644
> --- a/arch/powerpc/include/asm/interrupt.h
> +++ b/arch/powerpc/include/asm/interrupt.h
> @@ -2,13 +2,6 @@
> #ifndef _ASM_POWERPC_INTERRUPT_H
> #define _ASM_POWERPC_INTERRUPT_H
>
> -#include <linux/context_tracking.h>
> -#include <linux/hardirq.h>
> -#include <asm/cputime.h>
> -#include <asm/ftrace.h>
> -#include <asm/kprobes.h>
> -#include <asm/runlatch.h>
> -
> /* BookE/4xx */
> #define INTERRUPT_CRITICAL_INPUT 0x100
>
> @@ -39,9 +32,11 @@
> /* BookE/BookS/4xx/8xx */
> #define INTERRUPT_DATA_STORAGE 0x300
> #define INTERRUPT_INST_STORAGE 0x400
> +#define INTERRUPT_EXTERNAL 0x500
> #define INTERRUPT_ALIGNMENT 0x600
> #define INTERRUPT_PROGRAM 0x700
> #define INTERRUPT_SYSCALL 0xc00
> +#define INTERRUPT_TRACE 0xd00

The INTERRUPT_TRACE macro is defined in BookS section.
In BookE, 0xd00 stands for debug interrupt, so I defined it as
INTERRUPT_DEBUG. I understand they are similar things,
but the terminologies are different in reference manuals.

Regards,
Xiongwei