diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-12 17:17:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-12 17:17:12 -0400 |
commit | 4aabab2181f20560948c2045ce1faaa9ac1507a8 (patch) | |
tree | 6556e126687c9cbb4b4a35a8ad8c327df30ac256 /include/asm-arm/ptrace.h | |
parent | bb50cbbd4beacd5ceda76c32fcb116c67fe8c66c (diff) | |
parent | ca9ced7f6798868f9d2c81a59b49f8c2136685d8 (diff) |
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (50 commits)
[ARM] sa1100: remove boot time RTC initialisation
[ARM] sa1100: stop doing our own rtc management over suspend
[ARM] 4474/1: Do not check the PSR_F_BIT in valid_user_regs
[ARM] 4473/2: Take the HWCAP definitions out of the elf.h file
[ARM] pxa: move platform devices to separate header file
[ARM] pxa: move device registration into CPU-specific file
[ARM] pxa: remove boot time RTC initialisation
[ARM] pxa: stop doing our own rtc management over suspend
[ARM] 4451/1: pxa: make dma.c generic and remove cpu specific dma code
[ARM] 4450/1: pxa: add pxa25x_init_irq() and pxa27x_init_irq()
[ARM] 4440/1: PXA: enable the checking of ICIP2 for IRQs
[ARM] 4438/1: PXA: remove #ifdef .. #endif from pxa_gpio_demux_handler()
[ARM] 4437/1: PXA: move the GPIO IRQ initialization code to pxa_init_irq_gpio()
[ARM] 4436/1: PXA: move low IRQ initialization code to pxa_init_irq_low()
[ARM] 4435/1: PXA: remove PXA_INTERNAL_IRQS
[ARM] 4434/1: PXA: remove PXA_IRQ_SKIP
[ARM] pxa: Fix PXA27x suspend type validation, remove pxa_pm_prepare()
[ARM] pxa: move pm_ops structure into CPU specific files
[ARM] pxa: introduce cpu_is_pxaXXX macros
[ARM] pxa: remove MMC register defines from pxa-regs.h
...
Diffstat (limited to 'include/asm-arm/ptrace.h')
-rw-r--r-- | include/asm-arm/ptrace.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/asm-arm/ptrace.h b/include/asm-arm/ptrace.h index ee3d93c281d8..7aaa206cb54e 100644 --- a/include/asm-arm/ptrace.h +++ b/include/asm-arm/ptrace.h | |||
@@ -10,6 +10,8 @@ | |||
10 | #ifndef __ASM_ARM_PTRACE_H | 10 | #ifndef __ASM_ARM_PTRACE_H |
11 | #define __ASM_ARM_PTRACE_H | 11 | #define __ASM_ARM_PTRACE_H |
12 | 12 | ||
13 | #include <asm/hwcap.h> | ||
14 | |||
13 | #define PTRACE_GETREGS 12 | 15 | #define PTRACE_GETREGS 12 |
14 | #define PTRACE_SETREGS 13 | 16 | #define PTRACE_SETREGS 13 |
15 | #define PTRACE_GETFPREGS 14 | 17 | #define PTRACE_GETFPREGS 14 |
@@ -45,6 +47,7 @@ | |||
45 | #define PSR_T_BIT 0x00000020 | 47 | #define PSR_T_BIT 0x00000020 |
46 | #define PSR_F_BIT 0x00000040 | 48 | #define PSR_F_BIT 0x00000040 |
47 | #define PSR_I_BIT 0x00000080 | 49 | #define PSR_I_BIT 0x00000080 |
50 | #define PSR_A_BIT 0x00000100 | ||
48 | #define PSR_J_BIT 0x01000000 | 51 | #define PSR_J_BIT 0x01000000 |
49 | #define PSR_Q_BIT 0x08000000 | 52 | #define PSR_Q_BIT 0x08000000 |
50 | #define PSR_V_BIT 0x10000000 | 53 | #define PSR_V_BIT 0x10000000 |
@@ -103,6 +106,10 @@ struct pt_regs { | |||
103 | #define thumb_mode(regs) (0) | 106 | #define thumb_mode(regs) (0) |
104 | #endif | 107 | #endif |
105 | 108 | ||
109 | #define isa_mode(regs) \ | ||
110 | ((((regs)->ARM_cpsr & PSR_J_BIT) >> 23) | \ | ||
111 | (((regs)->ARM_cpsr & PSR_T_BIT) >> 5)) | ||
112 | |||
106 | #define processor_mode(regs) \ | 113 | #define processor_mode(regs) \ |
107 | ((regs)->ARM_cpsr & MODE_MASK) | 114 | ((regs)->ARM_cpsr & MODE_MASK) |
108 | 115 | ||
@@ -117,14 +124,17 @@ struct pt_regs { | |||
117 | */ | 124 | */ |
118 | static inline int valid_user_regs(struct pt_regs *regs) | 125 | static inline int valid_user_regs(struct pt_regs *regs) |
119 | { | 126 | { |
120 | if (user_mode(regs) && | 127 | if (user_mode(regs) && (regs->ARM_cpsr & PSR_I_BIT) == 0) { |
121 | (regs->ARM_cpsr & (PSR_F_BIT|PSR_I_BIT)) == 0) | 128 | regs->ARM_cpsr &= ~(PSR_F_BIT | PSR_A_BIT); |
122 | return 1; | 129 | return 1; |
130 | } | ||
123 | 131 | ||
124 | /* | 132 | /* |
125 | * Force CPSR to something logical... | 133 | * Force CPSR to something logical... |
126 | */ | 134 | */ |
127 | regs->ARM_cpsr &= PSR_f | PSR_s | PSR_x | PSR_T_BIT | MODE32_BIT; | 135 | regs->ARM_cpsr &= PSR_f | PSR_s | (PSR_x & ~PSR_A_BIT) | PSR_T_BIT | MODE32_BIT; |
136 | if (!(elf_hwcap & HWCAP_26BIT)) | ||
137 | regs->ARM_cpsr |= USR_MODE; | ||
128 | 138 | ||
129 | return 0; | 139 | return 0; |
130 | } | 140 | } |