Skip to content

Commit db85eae

Browse files
heicarstMartin Schwidefsky
authored andcommitted
s390/bitops: fix comment
Fix some numbers in the comments describing the layout of the bit maps. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent deedabb commit db85eae

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎arch/s390/include/asm/bitops.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
*
1414
* The bitop functions are defined to work on unsigned longs, so for an
1515
* s390x system the bits end up numbered:
16-
* |63..............0|127............64|191...........128|255...........196|
16+
* |63..............0|127............64|191...........128|255...........192|
1717
* and on s390:
18-
* |31.....0|63....31|95....64|127...96|159..128|191..160|223..192|255..224|
18+
* |31.....0|63....32|95....64|127...96|159..128|191..160|223..192|255..224|
1919
*
2020
* There are a few little-endian macros used mostly for filesystem
2121
* bitmaps, these work on similar bit arrays layouts, but
@@ -30,7 +30,7 @@
3030
* on an s390x system the bits are numbered:
3131
* |0..............63|64............127|128...........191|192...........255|
3232
* and on s390:
33-
* |0.....31|31....63|64....95|96...127|128..159|160..191|192..223|224..255|
33+
* |0.....31|32....63|64....95|96...127|128..159|160..191|192..223|224..255|
3434
*
3535
* The main difference is that bit 0-63 (64b) or 0-31 (32b) in the bit
3636
* number field needs to be reversed compared to the LSB0 encoded bit
@@ -304,7 +304,7 @@ static inline int test_bit(unsigned long nr, const volatile unsigned long *ptr)
304304
* On an s390x system the bits are numbered:
305305
* |0..............63|64............127|128...........191|192...........255|
306306
* and on s390:
307-
* |0.....31|31....63|64....95|96...127|128..159|160..191|192..223|224..255|
307+
* |0.....31|32....63|64....95|96...127|128..159|160..191|192..223|224..255|
308308
*/
309309
unsigned long find_first_bit_inv(const unsigned long *addr, unsigned long size);
310310
unsigned long find_next_bit_inv(const unsigned long *addr, unsigned long size,

‎arch/s390/lib/find.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* On s390x the bits are numbered:
55
* |0..............63|64............127|128...........191|192...........255|
66
* and on s390:
7-
* |0.....31|31....63|64....95|96...127|128..159|160..191|192..223|224..255|
7+
* |0.....31|32....63|64....95|96...127|128..159|160..191|192..223|224..255|
88
*
99
* The reason for this bit numbering is the fact that the hardware sets bits
1010
* in a bitmap starting at bit 0 (MSB) and we don't want to scan the bitmap

0 commit comments

Comments
 (0)