Andy Shevchenko
de5f843389
lib/bitmap: Introduce bitmap_scatter() and bitmap_gather() helpers
...
These helpers scatters or gathers a bitmap with the help of the mask
position bits parameter.
bitmap_scatter() does the following:
src: 0000000001011010
||||||
+------+|||||
| +----+||||
| |+----+|||
| || +-+||
| || | ||
mask: ...v..vv...v..vv
...0..11...0..10
dst: 0000001100000010
and bitmap_gather() performs this one:
mask: ...v..vv...v..vv
src: 0000001100000010
^ ^^ ^ 0
| || | 10
| || > 010
| |+--> 1010
| +--> 11010
+----> 011010
dst: 0000000000011010
bitmap_gather() can the seen as the reverse bitmap_scatter() operation.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/lkml/20230926052007.3917389-3-andriy.shevchenko@linux.intel.com/
Co-developed-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Acked-by: Yury Norov <yury.norov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-03-11 09:36:11 +00:00
..
2020-08-10 01:32:59 +09:00
2023-12-22 12:30:19 +08:00
2023-05-09 11:06:45 +02:00
2023-10-01 23:09:02 +11:00
2024-02-06 17:07:37 -07:00
2022-06-15 10:29:10 +02:00
2022-07-17 17:31:39 -07:00
2022-07-29 18:12:34 -07:00
2023-07-09 22:47:50 +01:00
2023-04-13 13:13:53 -07:00
2023-12-11 14:33:07 +01:00
2022-11-18 02:15:15 +01:00
2024-01-19 11:59:11 -08:00
2023-03-21 21:15:34 +01:00
2023-09-11 08:13:17 +00:00
2023-02-27 17:00:14 -08:00
2023-02-02 22:50:10 -08:00
2023-02-02 22:50:09 -08:00
2023-11-14 17:12:52 -08:00
2022-04-26 17:58:51 -04:00
2023-09-19 13:21:33 -07:00
2020-11-18 14:15:17 -06:00
2022-01-20 08:52:55 +02:00
2022-06-01 18:29:06 -07:00
2021-12-13 10:56:09 +01:00
2021-10-01 16:52:48 -04:00
2022-08-02 17:14:47 -06:00
2023-08-18 10:18:58 -07:00
2020-10-16 13:25:14 -06:00
2023-10-14 20:25:22 -07:00
2024-02-01 13:06:40 +01:00
2022-04-26 17:58:51 -04:00
2022-04-26 17:58:51 -04:00
2023-04-13 13:13:54 -07:00
2023-01-31 15:01:45 +01:00
2023-04-08 13:45:37 -07:00
2022-09-01 16:55:35 +02:00
2024-02-29 09:16:02 -08:00
2020-08-20 15:45:14 -04:00
2023-11-24 00:29:58 -05:00
2023-08-25 13:22:10 -07:00
2022-10-11 17:42:58 -06:00
2022-09-11 21:55:06 -07:00
2021-10-01 16:52:48 -04:00
2023-06-07 21:25:00 -07:00
2023-03-05 14:30:34 -08:00
2023-11-03 07:08:36 -10:00
2021-01-21 14:06:00 -07:00
2021-05-06 19:24:12 -07:00
2022-01-31 11:21:43 +11:00
2022-01-31 11:21:43 +11:00
2022-03-07 12:48:35 -07:00
2022-03-07 12:48:35 -07:00
2023-12-29 12:22:26 -08:00
2022-06-07 10:27:38 +02:00
2021-08-19 09:02:55 +09:00
2021-06-22 13:56:43 +02:00
2023-11-22 10:41:46 +01:00
2023-01-31 20:37:18 +01:00
2021-07-01 11:06:05 -07:00
2023-06-09 17:44:17 -07:00
2021-07-01 11:06:06 -07:00
2021-05-06 19:24:12 -07:00
2021-07-01 11:06:06 -07:00
2023-09-11 08:13:17 +00:00
2023-06-09 17:44:17 -07:00
2023-06-09 17:44:15 -07:00
2023-06-23 17:04:04 -07:00
2023-07-08 09:29:32 -07:00
2023-02-02 22:50:01 -08:00
2023-03-23 17:18:35 -07:00
2023-02-02 22:50:01 -08:00
2020-11-20 14:45:33 +11:00
2022-04-22 21:30:57 +02:00
2023-08-04 15:28:41 +02:00
2024-03-08 10:23:26 +00:00
2022-09-11 21:55:10 -07:00
2023-11-25 09:43:18 +01:00
2023-08-18 10:18:55 -07:00
2020-12-15 22:46:15 -08:00
2021-01-03 20:05:18 -05:00
2020-10-16 11:11:22 -07:00
2023-04-13 07:38:54 -06:00
2022-11-18 02:15:15 +01:00
2023-03-19 10:02:04 -07:00
2022-09-19 14:35:08 +02:00
2023-12-18 13:28:08 -07:00
2024-01-18 16:22:43 -08:00
2022-03-07 12:48:35 -07:00
2023-08-30 17:04:28 -07:00
2023-10-19 14:47:33 -04:00
2022-04-29 14:38:01 -07:00
2023-12-06 16:12:46 -08:00
2023-02-08 14:28:17 -07:00
2022-04-27 10:57:33 -07:00
2023-12-21 10:02:28 -08:00
2022-11-29 16:34:15 -04:00
2022-10-03 14:03:21 -07:00
2024-03-06 10:52:12 +01:00
2022-04-13 21:32:21 +02:00
2022-11-19 00:56:15 +01:00
2021-08-19 09:02:55 +09:00
2023-12-10 16:51:44 -08:00
2024-02-20 14:20:48 -08:00
2024-01-09 11:18:47 -08:00
2023-02-25 13:02:20 -08:00
2023-12-05 11:14:40 +01:00
2022-10-11 12:01:24 +02:00
2023-12-05 11:14:40 +01:00
2023-07-17 16:05:19 -07:00
2021-07-08 11:48:20 -07:00
2023-09-22 09:50:56 -07:00
2024-02-08 16:39:25 +00:00
2023-08-21 13:46:25 -07:00
2021-05-19 15:05:11 +02:00
2023-09-09 15:11:49 -07:00
2023-04-17 18:01:23 +02:00
2021-08-13 18:37:38 +02:00
2023-08-15 14:57:25 -07:00
2021-07-08 11:48:20 -07:00
2023-03-31 09:21:35 -06:00
2023-10-16 12:44:06 -04:00
2023-07-26 12:29:13 +02:00
2023-01-13 14:35:38 -06:00
2022-03-11 10:42:56 +01:00
2023-08-24 16:20:18 -07:00
2022-11-22 19:38:39 -07:00
2023-10-16 12:44:06 -04:00
2023-11-04 16:20:36 -10:00
2023-12-20 14:48:14 -08:00
2023-07-26 13:29:28 -06:00
2020-09-26 10:33:57 -07:00
2023-06-06 13:18:32 +02:00
2024-02-22 19:01:55 -08:00
2023-08-18 10:19:00 -07:00
2023-08-18 10:18:55 -07:00
2021-12-24 14:54:29 -08:00
2023-12-01 14:53:55 +09:00
2022-11-18 13:55:06 -08:00
2022-10-03 17:34:32 -07:00
2023-12-18 13:28:08 -07:00
2023-03-09 23:08:04 -08:00
2021-04-16 16:10:37 -07:00
2023-03-02 21:54:22 -08:00
2021-09-19 17:13:35 -07:00
2023-10-18 14:34:14 -07:00
2022-11-30 13:16:40 -08:00
2022-05-22 11:32:30 -07:00
2023-08-21 13:07:22 -07:00
2023-06-12 11:31:50 -07:00
2022-10-11 17:42:58 -06:00
2022-08-24 13:46:57 +01:00
2023-04-18 16:39:33 -07:00
2023-10-10 10:14:27 +02:00
2023-06-05 15:28:42 -07:00
2021-07-08 11:48:20 -07:00
2022-12-09 10:42:56 +00:00
2024-01-15 07:23:50 -07:00
2023-09-19 13:21:33 -07:00
2024-02-15 12:17:28 -05:00
2022-09-23 16:46:19 +02:00
2022-11-01 10:04:52 -07:00
2022-06-03 10:34:34 -07:00
2022-12-12 16:42:57 -08:00
2022-07-17 17:31:41 -07:00
2022-03-17 20:17:18 -07:00
2024-02-23 17:27:12 -08:00
2023-02-10 17:32:37 -08:00
2023-05-16 14:08:02 -07:00
2023-09-11 23:59:47 -04:00
2024-01-19 11:59:11 -08:00
2022-04-19 21:58:47 +02:00
2022-04-19 21:58:47 +02:00
2022-11-01 10:04:52 -07:00
2021-06-18 11:43:09 +02:00
2024-03-11 09:36:11 +00:00
2021-07-08 11:48:20 -07:00
2020-08-12 10:58:00 -07:00
2024-02-05 12:30:54 +00:00
2023-12-09 21:27:54 -08:00
2022-09-07 17:04:49 +02:00
2023-11-24 18:09:19 -08:00
2023-06-06 21:39:55 +09:00
2021-01-18 11:03:26 +01:00
2022-07-17 17:14:36 -07:00
2022-01-20 08:52:54 +02:00
2022-11-18 02:18:02 +01:00
2022-10-12 18:51:50 -07:00
2023-08-18 10:18:50 -07:00
2024-01-09 11:46:20 -08:00
2023-01-25 14:07:21 -08:00
2023-02-21 08:52:42 +09:00
2022-11-16 13:32:32 +00:00
2022-11-18 02:15:15 +01:00
2022-02-25 09:36:06 +01:00
2023-12-12 10:56:59 -08:00
2024-01-08 15:27:15 -08:00
2022-10-11 17:42:58 -06:00
2022-10-11 17:42:58 -06:00
2023-11-10 19:59:04 +09:00
2023-08-21 13:46:24 -07:00
2023-06-05 15:28:42 -07:00
2023-12-27 11:50:20 -05:00
2023-08-16 11:47:29 +02:00
2021-09-08 11:50:26 -07:00
2022-04-29 14:38:00 -07:00
2023-12-28 04:57:57 -08:00
2022-01-20 08:52:55 +02:00
2023-06-12 11:31:51 -07:00
2022-03-28 19:25:11 -04:00
2023-04-08 13:45:39 -07:00
2021-02-17 14:08:01 +01:00
2023-12-29 12:22:29 -08:00
2023-07-27 13:45:51 +02:00
2020-11-18 14:15:17 -06:00
2023-12-20 14:48:14 -08:00
2023-05-30 16:42:01 -07:00
2023-09-13 10:18:42 -07:00
2023-02-21 14:45:22 -08:00
2022-10-11 17:42:58 -06:00
2023-12-06 11:06:59 +01:00
2023-01-11 16:14:21 -08:00
2023-09-05 19:01:38 -04:00
2020-08-12 10:58:00 -07:00