Files
linux_media/include/linux
Yury Norov c1d2ba10f5 lib/bitmap: drop optimization of bitmap_{from,to}_arr64
bitmap_{from,to}_arr64() optimization is overly optimistic on 32-bit LE
architectures when it's wired to bitmap_copy_clear_tail().

bitmap_copy_clear_tail() takes care of unused bits in the bitmap up to
the next word boundary. But on 32-bit machines when copying bits from
bitmap to array of 64-bit words, it's expected that the unused part of
a recipient array must be cleared up to 64-bit boundary, so the last 4
bytes may stay untouched when nbits % 64 <= 32.

While the copying part of the optimization works correct, that clear-tail
trick makes corresponding tests reasonably fail:

test_bitmap: bitmap_to_arr64(nbits == 1): tail is not safely cleared: 0xa5a5a5a500000001 (must be 0x0000000000000001)

Fix it by removing bitmap_{from,to}_arr64() optimization for 32-bit LE
arches.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/lkml/20230225184702.GA3587246@roeck-us.net/
Fixes: 0a97953fd2 ("lib: add bitmap_{from,to}_arr64")
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
2023-06-22 13:57:41 -07:00
..
2023-03-29 12:26:32 +02:00
2023-03-06 12:33:02 +02:00
2023-04-21 14:37:03 +01:00
2023-05-20 05:38:01 -06:00
2023-04-16 08:51:24 -07:00
2023-03-05 10:49:37 -08:00
2023-05-25 09:26:19 +02:00
2023-03-23 16:02:27 -10:00
2023-04-17 18:01:23 +02:00
2023-04-20 18:20:04 +08:00
2023-03-06 15:49:07 -06:00
2023-05-25 09:26:19 +02:00
2023-03-29 16:00:23 +02:00
2023-03-19 10:02:04 -07:00
2023-03-06 12:33:02 +02:00
2023-03-07 22:04:45 +05:30
2023-03-29 12:26:32 +02:00
2023-05-24 18:08:49 +02:00
2023-03-15 14:58:52 +01:00
2023-05-17 21:29:09 -07:00
2023-04-03 11:16:56 +02:00
2023-03-06 09:57:07 +01:00
2023-03-17 15:00:40 +01:00
2023-03-16 13:08:39 -07:00
2023-03-23 17:25:46 +01:00
2023-03-29 08:19:38 +01:00
2023-04-05 20:03:01 -07:00
2023-04-21 03:02:34 -04:00
2023-03-06 09:57:11 +01:00