aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2015-10-08 07:51:44 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-10-14 08:32:15 -0400
commit48002bd5af37c3f6ac4a1484427ac52f7f184950 (patch)
tree3923e6c81dbee73803fce5319e48186e94ef2003
parente4165dcbc087eaf0fa892c6eee7fce8ac0482742 (diff)
s390/bitops: remove 31 bit related comments
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/include/asm/bitops.h31
-rw-r--r--arch/s390/lib/find.c4
2 files changed, 13 insertions, 22 deletions
diff --git a/arch/s390/include/asm/bitops.h b/arch/s390/include/asm/bitops.h
index 47bd0878a006..8043f10da6b5 100644
--- a/arch/s390/include/asm/bitops.h
+++ b/arch/s390/include/asm/bitops.h
@@ -11,30 +11,25 @@
11 * big-endian system because, unlike little endian, the number of each 11 * big-endian system because, unlike little endian, the number of each
12 * bit depends on the word size. 12 * bit depends on the word size.
13 * 13 *
14 * The bitop functions are defined to work on unsigned longs, so for an 14 * The bitop functions are defined to work on unsigned longs, so the bits
15 * s390x system the bits end up numbered: 15 * end up numbered:
16 * |63..............0|127............64|191...........128|255...........192| 16 * |63..............0|127............64|191...........128|255...........192|
17 * and on s390:
18 * |31.....0|63....32|95....64|127...96|159..128|191..160|223..192|255..224|
19 * 17 *
20 * There are a few little-endian macros used mostly for filesystem 18 * There are a few little-endian macros used mostly for filesystem
21 * bitmaps, these work on similar bit arrays layouts, but 19 * bitmaps, these work on similar bit array layouts, but byte-oriented:
22 * byte-oriented:
23 * |7...0|15...8|23...16|31...24|39...32|47...40|55...48|63...56| 20 * |7...0|15...8|23...16|31...24|39...32|47...40|55...48|63...56|
24 * 21 *
25 * The main difference is that bit 3-5 (64b) or 3-4 (32b) in the bit 22 * The main difference is that bit 3-5 in the bit number field needs to be
26 * number field needs to be reversed compared to the big-endian bit 23 * reversed compared to the big-endian bit fields. This can be achieved by
27 * fields. This can be achieved by XOR with 0x38 (64b) or 0x18 (32b). 24 * XOR with 0x38.
28 * 25 *
29 * We also have special functions which work with an MSB0 encoding: 26 * We also have special functions which work with an MSB0 encoding.
30 * on an s390x system the bits are numbered: 27 * The bits are numbered:
31 * |0..............63|64............127|128...........191|192...........255| 28 * |0..............63|64............127|128...........191|192...........255|
32 * and on s390:
33 * |0.....31|32....63|64....95|96...127|128..159|160..191|192..223|224..255|
34 * 29 *
35 * The main difference is that bit 0-63 (64b) or 0-31 (32b) in the bit 30 * The main difference is that bit 0-63 in the bit number field needs to be
36 * number field needs to be reversed compared to the LSB0 encoded bit 31 * reversed compared to the LSB0 encoded bit fields. This can be achieved by
37 * fields. This can be achieved by XOR with 0x3f (64b) or 0x1f (32b). 32 * XOR with 0x3f.
38 * 33 *
39 */ 34 */
40 35
@@ -299,10 +294,8 @@ static inline void __clear_bit_unlock(unsigned long nr,
299 294
300/* 295/*
301 * Functions which use MSB0 bit numbering. 296 * Functions which use MSB0 bit numbering.
302 * On an s390x system the bits are numbered: 297 * The bits are numbered:
303 * |0..............63|64............127|128...........191|192...........255| 298 * |0..............63|64............127|128...........191|192...........255|
304 * and on s390:
305 * |0.....31|32....63|64....95|96...127|128..159|160..191|192..223|224..255|
306 */ 299 */
307unsigned long find_first_bit_inv(const unsigned long *addr, unsigned long size); 300unsigned long find_first_bit_inv(const unsigned long *addr, unsigned long size);
308unsigned long find_next_bit_inv(const unsigned long *addr, unsigned long size, 301unsigned long find_next_bit_inv(const unsigned long *addr, unsigned long size,
diff --git a/arch/s390/lib/find.c b/arch/s390/lib/find.c
index 922003c1b90d..d90b9245ea41 100644
--- a/arch/s390/lib/find.c
+++ b/arch/s390/lib/find.c
@@ -1,10 +1,8 @@
1/* 1/*
2 * MSB0 numbered special bitops handling. 2 * MSB0 numbered special bitops handling.
3 * 3 *
4 * On s390x the bits are numbered: 4 * The bits are numbered:
5 * |0..............63|64............127|128...........191|192...........255| 5 * |0..............63|64............127|128...........191|192...........255|
6 * and on s390:
7 * |0.....31|32....63|64....95|96...127|128..159|160..191|192..223|224..255|
8 * 6 *
9 * The reason for this bit numbering is the fact that the hardware sets bits 7 * The reason for this bit numbering is the fact that the hardware sets bits
10 * in a bitmap starting at bit 0 (MSB) and we don't want to scan the bitmap 8 * in a bitmap starting at bit 0 (MSB) and we don't want to scan the bitmap