]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: remove __bad_xchg definition
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 19 May 2015 12:39:05 +0000 (13:39 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 2 Jun 2015 08:58:19 +0000 (09:58 +0100)
We want link errors if xchg() is called for a variable size we do not
support.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/cmpxchg.h
arch/arm/kernel/traps.c

index abb2c3769b014e33ad4a70f87a374b30911de4b3..f4d74ab3ec1f4ce0368c2d2749af4ddd8c0d6b52 100644 (file)
@@ -94,6 +94,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
                break;
 #endif
        default:
+               /* Cause a link-time error, the xchg() size is not supported */
                __bad_xchg(ptr, size), ret = 0;
                break;
        }
index 3dce1a342030d161b1a0ee5442c0c11c5ca06780..d358226236f2951e3b09cbc629799c963884ca49 100644 (file)
@@ -749,14 +749,6 @@ late_initcall(arm_mrc_hook_init);
 
 #endif
 
-void __bad_xchg(volatile void *ptr, int size)
-{
-       pr_err("xchg: bad data size: pc 0x%p, ptr 0x%p, size %d\n",
-              __builtin_return_address(0), ptr, size);
-       BUG();
-}
-EXPORT_SYMBOL(__bad_xchg);
-
 /*
  * A data abort trap was taken, but we did not handle the instruction.
  * Try to abort the user program, or panic if it was the kernel.