summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2014-10-29 12:50:31 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-11-03 13:29:47 +0100
commitf318a1229bd8d377282ddb37158812073701a22b (patch)
tree219bafc41a398e6286d4cf5c99e3ca448439e1f6 /arch/s390/kernel
parentfcbe08d66f57c368e77ca729dd01e6b539ffb3ff (diff)
downloadop-kernel-dev-f318a1229bd8d377282ddb37158812073701a22b.zip
op-kernel-dev-f318a1229bd8d377282ddb37158812073701a22b.tar.gz
s390/cmpxchg: use compiler builtins
The kernel build for s390 fails for gcc compilers with version 3.x, set the minimum required version of gcc to version 4.3. As the atomic builtins are available with all gcc 4.x compilers, use the __sync_val_compare_and_swap and __sync_bool_compare_and_swap functions to replace the complex macro and inline assembler magic in include/asm/cmpxchg.h. The compiler can just-do-it and generates better code with the builtins. While we are at it use __sync_bool_compare_and_swap for the _raw_compare_and_swap function in the spinlock code as well. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/asm-offsets.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c
index f3a7833..e07e9160 100644
--- a/arch/s390/kernel/asm-offsets.c
+++ b/arch/s390/kernel/asm-offsets.c
@@ -17,8 +17,8 @@
* Make sure that the compiler is new enough. We want a compiler that
* is known to work with the "Q" assembler constraint.
*/
-#if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
-#error Your compiler is too old; please use version 3.3.3 or newer
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
+#error Your compiler is too old; please use version 4.3 or newer
#endif
int main(void)
OpenPOWER on IntegriCloud