powerpc/traps: Use SRR1 defines for program check reasons
Currently we open code the reason codes for program checks. Instead use the existing SRR1 defines. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
@@ -379,11 +379,11 @@ static inline int check_io_access(struct pt_regs *regs)
|
||||
/* On non-4xx, the reason for the machine check or program
|
||||
exception is in the MSR. */
|
||||
#define get_reason(regs) ((regs)->msr)
|
||||
#define REASON_TM 0x200000
|
||||
#define REASON_FP 0x100000
|
||||
#define REASON_ILLEGAL 0x80000
|
||||
#define REASON_PRIVILEGED 0x40000
|
||||
#define REASON_TRAP 0x20000
|
||||
#define REASON_TM SRR1_PROGTM
|
||||
#define REASON_FP SRR1_PROGFPE
|
||||
#define REASON_ILLEGAL SRR1_PROGILL
|
||||
#define REASON_PRIVILEGED SRR1_PROGPRIV
|
||||
#define REASON_TRAP SRR1_PROGTRAP
|
||||
|
||||
#define single_stepping(regs) ((regs)->msr & MSR_SE)
|
||||
#define clear_single_step(regs) ((regs)->msr &= ~MSR_SE)
|
||||
|
Reference in New Issue
Block a user