diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-17 21:11:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-17 21:11:49 -0400 |
commit | 2a6a432a9ce55876b92f9ea860d7baa05538de16 (patch) | |
tree | f64431e3f5f105ee350831aef6810281d93e10b1 /arch/arm/include/asm | |
parent | a7c8962bfbc730a9acc0a635bad0f9628b6e816a (diff) | |
parent | 99c796df94afca5256860dd4760017f1dbb3480c (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
VIDEO: amba clcd: don't disable an already disabled clock
ARM: Tighten check for allowable CPSR values
ARM: 6329/1: wire up sys_accept4() on ARM
ARM: 6328/1: Build with -fno-dwarf2-cfi-asm
ARM: 6326/1: kgdb: fix GDB_MAX_REGS no longer used
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r-- | arch/arm/include/asm/ptrace.h | 17 | ||||
-rw-r--r-- | arch/arm/include/asm/unistd.h | 1 |
2 files changed, 14 insertions, 4 deletions
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h index c974be8913a7..7ce15eb15f72 100644 --- a/arch/arm/include/asm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h | |||
@@ -158,15 +158,24 @@ struct pt_regs { | |||
158 | */ | 158 | */ |
159 | static inline int valid_user_regs(struct pt_regs *regs) | 159 | static inline int valid_user_regs(struct pt_regs *regs) |
160 | { | 160 | { |
161 | if (user_mode(regs) && (regs->ARM_cpsr & PSR_I_BIT) == 0) { | 161 | unsigned long mode = regs->ARM_cpsr & MODE_MASK; |
162 | regs->ARM_cpsr &= ~(PSR_F_BIT | PSR_A_BIT); | 162 | |
163 | return 1; | 163 | /* |
164 | * Always clear the F (FIQ) and A (delayed abort) bits | ||
165 | */ | ||
166 | regs->ARM_cpsr &= ~(PSR_F_BIT | PSR_A_BIT); | ||
167 | |||
168 | if ((regs->ARM_cpsr & PSR_I_BIT) == 0) { | ||
169 | if (mode == USR_MODE) | ||
170 | return 1; | ||
171 | if (elf_hwcap & HWCAP_26BIT && mode == USR26_MODE) | ||
172 | return 1; | ||
164 | } | 173 | } |
165 | 174 | ||
166 | /* | 175 | /* |
167 | * Force CPSR to something logical... | 176 | * Force CPSR to something logical... |
168 | */ | 177 | */ |
169 | regs->ARM_cpsr &= PSR_f | PSR_s | (PSR_x & ~PSR_A_BIT) | PSR_T_BIT | MODE32_BIT; | 178 | regs->ARM_cpsr &= PSR_f | PSR_s | PSR_x | PSR_T_BIT | MODE32_BIT; |
170 | if (!(elf_hwcap & HWCAP_26BIT)) | 179 | if (!(elf_hwcap & HWCAP_26BIT)) |
171 | regs->ARM_cpsr |= USR_MODE; | 180 | regs->ARM_cpsr |= USR_MODE; |
172 | 181 | ||
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index dd2bf53000fe..d02cfb683487 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
@@ -392,6 +392,7 @@ | |||
392 | #define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363) | 392 | #define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363) |
393 | #define __NR_perf_event_open (__NR_SYSCALL_BASE+364) | 393 | #define __NR_perf_event_open (__NR_SYSCALL_BASE+364) |
394 | #define __NR_recvmmsg (__NR_SYSCALL_BASE+365) | 394 | #define __NR_recvmmsg (__NR_SYSCALL_BASE+365) |
395 | #define __NR_accept4 (__NR_SYSCALL_BASE+366) | ||
395 | 396 | ||
396 | /* | 397 | /* |
397 | * The following SWIs are ARM private. | 398 | * The following SWIs are ARM private. |