linux-stable/include
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
..
acpi IOMMU Updates for Linux v6.8 2024-01-18 15:16:57 -08:00
asm-generic RISC-V Patches for the 6.8 Merge Window, Part 4 2024-01-20 11:06:04 -08:00
clocksource
crypto
drm drm/bridge: aux-hpd: separate allocation and registration 2024-02-23 17:00:56 +02:00
dt-bindings dmaengine fixes for v6.8-rc1 2024-01-20 15:03:25 -08:00
keys
kunit Networking changes for 6.8. 2024-01-11 10:07:29 -08:00
kvm
linux lib/bitmap: Introduce bitmap_scatter() and bitmap_gather() helpers 2024-03-11 09:36:11 +00:00
math-emu
media
memory
misc
net bluetooth-next pull request for net-next: 2024-03-08 20:37:32 -08:00
pcmcia
ras
rdma
rv
scsi scsi: core: Consult supported VPD page list prior to fetching page 2024-02-15 14:41:26 -05:00
soc - New Device Support 2024-01-17 15:21:21 -08:00
sound ASoC: soc-card: Fix missing locking in snd_soc_card_get_kcontrol() 2024-02-23 13:40:06 +00:00
target
trace tcp: Add skb addr and sock addr to arguments of tracepoint tcp_probe. 2024-03-08 10:25:47 +00:00
uapi Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 2024-03-11 09:33:01 +00:00
ufs
vdso
video video/sticore: Remove info field from STI struct 2024-01-12 12:38:37 +01:00
xen