Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168512
b: refs/heads/master
c: cc20d42
h: refs/heads/master
v: v3
  • Loading branch information
Russell King committed Nov 10, 2009
1 parent 0e89899 commit 8b34e5e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bfd2e29f04e5f048ea62677811d1244badd6661e
refs/heads/master: cc20d42986d5807cbe4f5c7c8e3dab2e59ea0db3
9 changes: 9 additions & 0 deletions trunk/arch/arm/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,15 @@
#define __ARM_NR_usr32 (__ARM_NR_BASE+4)
#define __ARM_NR_set_tls (__ARM_NR_BASE+5)

/*
* *NOTE*: This is a ghost syscall private to the kernel. Only the
* __kuser_cmpxchg code in entry-armv.S should be aware of its
* existence. Don't ever use this from user code.
*/
#ifdef __KERNEL__
#define __ARM_NR_cmpxchg (__ARM_NR_BASE+0x00fff0)
#endif

/*
* The following syscalls are obsolete and no longer available for EABI.
*/
Expand Down
7 changes: 4 additions & 3 deletions trunk/arch/arm/kernel/entry-armv.S
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <mach/entry-macro.S>
#include <asm/thread_notify.h>
#include <asm/unwind.h>
#include <asm/unistd.h>

#include "entry-header.S"

Expand Down Expand Up @@ -908,10 +909,10 @@ __kuser_cmpxchg: @ 0xffff0fc0
* A special ghost syscall is used for that (see traps.c).
*/
stmfd sp!, {r7, lr}
mov r7, #0xff00 @ 0xfff0 into r7 for EABI
orr r7, r7, #0xf0
swi #0x9ffff0
ldr r7, =1f @ it's 20 bits
swi __ARM_NR_cmpxchg
ldmfd sp!, {r7, pc}
1: .word __ARM_NR_cmpxchg

#elif __LINUX_ARM_ARCH__ < 6

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs)
* __kuser_cmpxchg code in entry-armv.S should be aware of its
* existence. Don't ever use this from user code.
*/
case 0xfff0:
case NR(cmpxchg):
for (;;) {
extern void do_DataAbort(unsigned long addr, unsigned int fsr,
struct pt_regs *regs);
Expand Down

0 comments on commit 8b34e5e

Please sign in to comment.