diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2013-09-16 16:22:05 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-10-24 17:16:52 +0200 |
commit | 370b0b5f7744d62a9ba6c25fd6b0dcba84419443 (patch) | |
tree | 110ea22f87f28cf95f11e83e5312169f62e29b0d /arch/s390/kernel | |
parent | 9a70a42835d2be9bd1862d839f2debaaea79ba32 (diff) | |
download | linux-370b0b5f7744d62a9ba6c25fd6b0dcba84419443.tar.gz linux-370b0b5f7744d62a9ba6c25fd6b0dcba84419443.tar.bz2 linux-370b0b5f7744d62a9ba6c25fd6b0dcba84419443.zip |
s390/bitops: remove CONFIG_SMP / simplify non-atomic bitops
Remove CONFIG_SMP from bitops code. This reduces the C code significantly
but also generates better code for the SMP case.
This means that for !CONFIG_SMP set_bit() and friends now also have
compare and swap semantics (read: more code). However nobody really cares
for !CONFIG_SMP and this is the trade-off to simplify the SMP code which we
do care about.
The non-atomic bitops like __set_bit() now generate also better code
because the old code did not have a __builtin_contant_p() check for the
CONFIG_SMP case and therefore always generated the inline assembly variant.
However the inline assemblies for the non-atomic case now got completely
removed since gcc can produce better code, which accesses less memory
operands.
test_bit() got also a bit simplified since it did have a
__builtin_constant_p() check, however two identical code pathes for each
case (written differently).
In result this mainly reduces the to be maintained code but is not very
relevant for code generation, since there are not many non-atomic bitops
usages that we care about.
(code reduction defconfig kernel image before/after: 560 bytes).
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/bitmap.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/s390/kernel/bitmap.c b/arch/s390/kernel/bitmap.c index 102da5e23037..5cdb813fd77f 100644 --- a/arch/s390/kernel/bitmap.c +++ b/arch/s390/kernel/bitmap.c @@ -9,12 +9,6 @@ #include <linux/bitops.h> #include <linux/module.h> -const char _oi_bitmap[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; -EXPORT_SYMBOL(_oi_bitmap); - -const char _ni_bitmap[] = { 0xfe, 0xfd, 0xfb, 0xf7, 0xef, 0xdf, 0xbf, 0x7f }; -EXPORT_SYMBOL(_ni_bitmap); - const char _zb_findmap[] = { 0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4, 0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5, |