aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/unistd.h9
-rw-r--r--arch/arm/kernel/entry-armv.S7
-rw-r--r--arch/arm/kernel/traps.c2
3 files changed, 14 insertions, 4 deletions
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
index 7020217fc49f..4e506d09e5f9 100644
--- a/arch/arm/include/asm/unistd.h
+++ b/arch/arm/include/asm/unistd.h
@@ -403,6 +403,15 @@
403#define __ARM_NR_set_tls (__ARM_NR_BASE+5) 403#define __ARM_NR_set_tls (__ARM_NR_BASE+5)
404 404
405/* 405/*
406 * *NOTE*: This is a ghost syscall private to the kernel. Only the
407 * __kuser_cmpxchg code in entry-armv.S should be aware of its
408 * existence. Don't ever use this from user code.
409 */
410#ifdef __KERNEL__
411#define __ARM_NR_cmpxchg (__ARM_NR_BASE+0x00fff0)
412#endif
413
414/*
406 * The following syscalls are obsolete and no longer available for EABI. 415 * The following syscalls are obsolete and no longer available for EABI.
407 */ 416 */
408#if defined(__ARM_EABI__) && !defined(__KERNEL__) 417#if defined(__ARM_EABI__) && !defined(__KERNEL__)
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 0022b4d57f8b..d2903e3bc861 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -21,6 +21,7 @@
21#include <mach/entry-macro.S> 21#include <mach/entry-macro.S>
22#include <asm/thread_notify.h> 22#include <asm/thread_notify.h>
23#include <asm/unwind.h> 23#include <asm/unwind.h>
24#include <asm/unistd.h>
24 25
25#include "entry-header.S" 26#include "entry-header.S"
26 27
@@ -908,10 +909,10 @@ __kuser_cmpxchg: @ 0xffff0fc0
908 * A special ghost syscall is used for that (see traps.c). 909 * A special ghost syscall is used for that (see traps.c).
909 */ 910 */
910 stmfd sp!, {r7, lr} 911 stmfd sp!, {r7, lr}
911 mov r7, #0xff00 @ 0xfff0 into r7 for EABI 912 ldr r7, =1f @ it's 20 bits
912 orr r7, r7, #0xf0 913 swi __ARM_NR_cmpxchg
913 swi #0x9ffff0
914 ldmfd sp!, {r7, pc} 914 ldmfd sp!, {r7, pc}
9151: .word __ARM_NR_cmpxchg
915 916
916#elif __LINUX_ARM_ARCH__ < 6 917#elif __LINUX_ARM_ARCH__ < 6
917 918
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 1bbda04a5380..3f361a783f43 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -528,7 +528,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs)
528 * __kuser_cmpxchg code in entry-armv.S should be aware of its 528 * __kuser_cmpxchg code in entry-armv.S should be aware of its
529 * existence. Don't ever use this from user code. 529 * existence. Don't ever use this from user code.
530 */ 530 */
531 case 0xfff0: 531 case NR(cmpxchg):
532 for (;;) { 532 for (;;) {
533 extern void do_DataAbort(unsigned long addr, unsigned int fsr, 533 extern void do_DataAbort(unsigned long addr, unsigned int fsr,
534 struct pt_regs *regs); 534 struct pt_regs *regs);