diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2015-02-14 05:10:14 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-03-25 06:49:36 -0400 |
commit | 26f15caaf993bbb6f246a30aad3c96a349564528 (patch) | |
tree | 3dc7f4d680d254776ac3882e49807d4d7fbf39b7 /arch/s390 | |
parent | a876cb3f6b2d3eb9e857d06caa9ed4c911ea0bd3 (diff) |
s390/cmpxchg: simplify cmpxchg_double
Since sizeof(long) == 4 is always false now, simplify cmpxchg_double a bit.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/include/asm/cmpxchg.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/s390/include/asm/cmpxchg.h b/arch/s390/include/asm/cmpxchg.h index 6259895fcd97..4eadec466b8c 100644 --- a/arch/s390/include/asm/cmpxchg.h +++ b/arch/s390/include/asm/cmpxchg.h | |||
@@ -80,15 +80,10 @@ extern void __cmpxchg_double_called_with_bad_pointer(void); | |||
80 | ({ \ | 80 | ({ \ |
81 | __typeof__(p1) __p1 = (p1); \ | 81 | __typeof__(p1) __p1 = (p1); \ |
82 | __typeof__(p2) __p2 = (p2); \ | 82 | __typeof__(p2) __p2 = (p2); \ |
83 | int __ret; \ | ||
84 | BUILD_BUG_ON(sizeof(*(p1)) != sizeof(long)); \ | 83 | BUILD_BUG_ON(sizeof(*(p1)) != sizeof(long)); \ |
85 | BUILD_BUG_ON(sizeof(*(p2)) != sizeof(long)); \ | 84 | BUILD_BUG_ON(sizeof(*(p2)) != sizeof(long)); \ |
86 | VM_BUG_ON((unsigned long)((__p1) + 1) != (unsigned long)(__p2));\ | 85 | VM_BUG_ON((unsigned long)((__p1) + 1) != (unsigned long)(__p2));\ |
87 | if (sizeof(long) == 4) \ | 86 | __cmpxchg_double_8(__p1, __p2, o1, o2, n1, n2); \ |
88 | __ret = __cmpxchg_double_4(__p1, __p2, o1, o2, n1, n2); \ | ||
89 | else \ | ||
90 | __ret = __cmpxchg_double_8(__p1, __p2, o1, o2, n1, n2); \ | ||
91 | __ret; \ | ||
92 | }) | 87 | }) |
93 | 88 | ||
94 | #define system_has_cmpxchg_double() 1 | 89 | #define system_has_cmpxchg_double() 1 |