diff options
Diffstat (limited to 'arch/arm/include/asm/ptrace.h')
-rw-r--r-- | arch/arm/include/asm/ptrace.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h index 04c99f36ff7f..c877654fe3bf 100644 --- a/arch/arm/include/asm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h | |||
@@ -27,9 +27,13 @@ struct pt_regs { | |||
27 | #define thumb_mode(regs) (0) | 27 | #define thumb_mode(regs) (0) |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #ifndef CONFIG_CPU_V7M | ||
30 | #define isa_mode(regs) \ | 31 | #define isa_mode(regs) \ |
31 | ((((regs)->ARM_cpsr & PSR_J_BIT) >> 23) | \ | 32 | ((((regs)->ARM_cpsr & PSR_J_BIT) >> (__ffs(PSR_J_BIT) - 1)) | \ |
32 | (((regs)->ARM_cpsr & PSR_T_BIT) >> 5)) | 33 | (((regs)->ARM_cpsr & PSR_T_BIT) >> (__ffs(PSR_T_BIT)))) |
34 | #else | ||
35 | #define isa_mode(regs) 1 /* Thumb */ | ||
36 | #endif | ||
33 | 37 | ||
34 | #define processor_mode(regs) \ | 38 | #define processor_mode(regs) \ |
35 | ((regs)->ARM_cpsr & MODE_MASK) | 39 | ((regs)->ARM_cpsr & MODE_MASK) |
@@ -80,6 +84,12 @@ static inline long regs_return_value(struct pt_regs *regs) | |||
80 | 84 | ||
81 | #define instruction_pointer(regs) (regs)->ARM_pc | 85 | #define instruction_pointer(regs) (regs)->ARM_pc |
82 | 86 | ||
87 | static inline void instruction_pointer_set(struct pt_regs *regs, | ||
88 | unsigned long val) | ||
89 | { | ||
90 | instruction_pointer(regs) = val; | ||
91 | } | ||
92 | |||
83 | #ifdef CONFIG_SMP | 93 | #ifdef CONFIG_SMP |
84 | extern unsigned long profile_pc(struct pt_regs *regs); | 94 | extern unsigned long profile_pc(struct pt_regs *regs); |
85 | #else | 95 | #else |