From 0974f8487d1c09680d30d9ac208d1974f40318b8 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Wed, 8 Feb 2006 21:19:37 +0000 Subject: [PATCH] --- yaml --- r: 20127 b: refs/heads/master c: 49bca4c2815feafd5f999bf43baf87e0dd8d1d08 h: refs/heads/master i: 20125: 42aee7bd4abc653211a80d0ad7d12ac963b72e55 20123: 0b86e4ec96777539987476d15d82ed3f5fe219f0 20119: db716fc2cce874263a9880bd515eb66cdcebd371 20111: 2867e30c075f55fc7b0b6d750604e326f13e3e49 20095: a6c425eb6568095bd8a1986de7d7d399c15824f7 v: v3 --- [refs] | 2 +- trunk/arch/arm/kernel/entry-armv.S | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 4703b9da5227..0796bd64b8c1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 99595d0237926b5aba1fe4c844a011a1ba1ee1f8 +refs/heads/master: 49bca4c2815feafd5f999bf43baf87e0dd8d1d08 diff --git a/trunk/arch/arm/kernel/entry-armv.S b/trunk/arch/arm/kernel/entry-armv.S index d401d908c463..f248bbfe745f 100644 --- a/trunk/arch/arm/kernel/entry-armv.S +++ b/trunk/arch/arm/kernel/entry-armv.S @@ -333,9 +333,13 @@ __pabt_svc: @ from the exception stack #if __LINUX_ARM_ARCH__ < 6 && !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG) +#ifndef CONFIG_MMU +#warning "NPTL on non MMU needs fixing" +#else @ make sure our user space atomic helper is aborted cmp r2, #TASK_SIZE bichs r3, r3, #PSR_Z_BIT +#endif #endif @ @@ -756,12 +760,18 @@ __kuser_cmpxchg: @ 0xffff0fc0 * exception happening just after the str instruction which would * clear the Z flag although the exchange was done. */ +#ifdef CONFIG_MMU teq ip, ip @ set Z flag ldr ip, [r2] @ load current val add r3, r2, #1 @ prepare store ptr teqeq ip, r0 @ compare with oldval if still allowed streq r1, [r3, #-1]! @ store newval if still allowed subs r0, r2, r3 @ if r2 == r3 the str occured +#else +#warning "NPTL on non MMU needs fixing" + mov r0, #-1 + adds r0, r0, #0 +#endif mov pc, lr #else