kfifo_dma_in_prepare_mapped(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« kfifo_dma_in_prepare_mapped(9) πŸ’«

okay so first of all, welcome to the Kernel API Manual, bestie 🫢 β€” this is where the kernel nerds keep the receipts, and today's main character is kfifo_dma_in_prepare_mapped. it sets up a scatterlist for DMA input, and honestly? iconic behavior.


✨ NAME ✨

kfifo_dma_in_prepare_mapped β€” setup a scatterlist for DMA input πŸ’…


🌸 SYNOPSIS 🌸

kfifo_dma_in_prepare_mapped (fifo , sgl , nents , len , dma );

like, that's the whole vibe. five args, no drama.


πŸŽ€ ARGUMENTS πŸŽ€

  • fifo β€” address of the fifo to be used. yes, the fifo. the one and only. give it the address and it'll do its thing πŸ¦‹
  • sgl β€” pointer to the scatterlist array. this is the glow-up list we're filling in ✨
  • nents β€” number of entries in the scatterlist array. count 'em, don't guess 🧚
  • len β€” number of elements to transfer. how much we're actually moving, no cap πŸ’œ
  • dma β€” mapped dma address to fill into sgl. it goes straight into the scatterlist, periodt πŸ”₯

πŸ‘‘ DESCRIPTION πŸ‘‘

this macro fills a scatterlist for DMA input. that's it, that's the whole job, and it ate πŸ’…

it returns the number entries in the scatterlist array β€” so like, that's your return value, bestie, don't sleep on it. ⭐

note that with only one concurrent reader and one concurrent writer, you don't need extra locking to use these macros. one reader, one writer, no locks needed β€” iykyk 🀝

🌈 SEE ALSO 🌈

all the siblings, cousins, and adjacent icons 🫢 β€” starting with the source of truth:

Kernel file ./include/linux/kfifo.h


and that's the whole page, bestie πŸ’– it lives in ./include/linux, it's stamped October 2026, and it's part of the Kernel API Manual β€” go forth and slay your scatterlists πŸŒΈβœ¨πŸŽ€

πŸ“¦ where this page comes from