kfifo_dma_in_prepare_mapped(9)
π« 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 intosgl. 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
DECLARE_KFIFO_PTR(9)DECLARE_KFIFO(9)INIT_KFIFO(9)DEFINE_KFIFO(9)kfifo_initialized(9)kfifo_esize(9)kfifo_recsize(9)kfifo_size(9)kfifo_reset(9)kfifo_reset_out(9)kfifo_len(9)kfifo_is_empty(9)kfifo_is_empty_spinlocked(9)kfifo_is_empty_spinlocked_noirqsave(9)kfifo_is_full(9)kfifo_avail(9)kfifo_skip_count(9)kfifo_skip(9)kfifo_peek_len(9)kfifo_alloc(9)kfifo_alloc_node(9)kfifo_free(9)kfifo_init(9)kfifo_put(9)kfifo_get(9)kfifo_peek(9)kfifo_in(9)kfifo_in_spinlocked(9)kfifo_in_spinlocked_noirqsave(9)kfifo_out(9)kfifo_out_spinlocked(9)kfifo_out_spinlocked_noirqsave(9)kfifo_from_user(9)kfifo_to_user(9)kfifo_dma_in_finish(9)kfifo_dma_out_prepare_mapped(9)kfifo_dma_out_finish(9)kfifo_out_peek(9)kfifo_out_linear(9)kfifo_out_linear_ptr(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms