diff options
-rw-r--r-- | arch/arm64/include/asm/ptrace.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h index b04d3404f0d1..de68a5aa60c3 100644 --- a/arch/arm64/include/asm/ptrace.h +++ b/arch/arm64/include/asm/ptrace.h | |||
@@ -44,10 +44,27 @@ | |||
44 | 44 | ||
45 | /* sizeof(struct user) for AArch32 */ | 45 | /* sizeof(struct user) for AArch32 */ |
46 | #define COMPAT_USER_SZ 296 | 46 | #define COMPAT_USER_SZ 296 |
47 | /* AArch32 uses x13 as the stack pointer... */ | 47 | |
48 | /* Architecturally defined mapping between AArch32 and AArch64 registers */ | ||
49 | #define compat_usr(x) regs[(x)] | ||
48 | #define compat_sp regs[13] | 50 | #define compat_sp regs[13] |
49 | /* ... and x14 as the link register. */ | ||
50 | #define compat_lr regs[14] | 51 | #define compat_lr regs[14] |
52 | #define compat_sp_hyp regs[15] | ||
53 | #define compat_sp_irq regs[16] | ||
54 | #define compat_lr_irq regs[17] | ||
55 | #define compat_sp_svc regs[18] | ||
56 | #define compat_lr_svc regs[19] | ||
57 | #define compat_sp_abt regs[20] | ||
58 | #define compat_lr_abt regs[21] | ||
59 | #define compat_sp_und regs[22] | ||
60 | #define compat_lr_und regs[23] | ||
61 | #define compat_r8_fiq regs[24] | ||
62 | #define compat_r9_fiq regs[25] | ||
63 | #define compat_r10_fiq regs[26] | ||
64 | #define compat_r11_fiq regs[27] | ||
65 | #define compat_r12_fiq regs[28] | ||
66 | #define compat_sp_fiq regs[29] | ||
67 | #define compat_lr_fiq regs[30] | ||
51 | 68 | ||
52 | /* | 69 | /* |
53 | * This struct defines the way the registers are stored on the stack during an | 70 | * This struct defines the way the registers are stored on the stack during an |