dma_buf_map...ent_unlocked(9)
π dma_buf_map_attachment_unlocked(9) β from the Kernel API Manual, bestie β¨
okay so picture this: it's a kernel API manual page, the vibe is immaculate, and the function is dma_buf_map_attachment_unlocked. yes that's a mouthful, no we're not changing it, it's iconic and it's staying. π
πΈ NAME πΈ
dma_buf_map_attachment_unlocked β Returns the scatterlist table of the attachment; mapped into _device_ address space. Is a wrapper for map_dma_buf() of the dma_buf_ops.
like literally, that's the whole job. it hands you the scatterlist table, mapped into _device_ address space, and under the hood it's just wrapping map_dma_buf() from the dma_buf_ops. slay. π
β¨ SYNOPSIS β¨
struct sg_table * dma_buf_map_attachment_unlocked (struct
dma_buf_attachment *attach , enum dma_data_direction direction );
look at her go. returns a struct sg_table *, takes a struct dma_buf_attachment *attach and an enum dma_data_direction direction. copy it exactly, don't freestyle, i'm begging π«Ά
π¦ ARGUMENTS π¦
attachβ[in]attachment whose scatterlist is to be returned πdirectionβ[in]direction of DMA transfer πΈ
two args, both [in], both doing their little part. main character energy from both of them honestly.
π DESCRIPTION π
Unlocked variant of dma_buf_map_attachment.
that's it. that's the description. it's the unlocked version, periodt. π₯
π SEE ALSO π
okay the friend group is LARGE and honestly every one of them is a baddie, let's do the roll call π
Kernel file ./drivers/dma-buf/dma-buf.c β the source file, the mothership π
dma_buf_iter_begin(9)dma_buf_iter_next(9)implicit fence polling(9)dma_buf_set_name(9)dma buf device access(9)β yes, that one's spelled with a space, not an underscore, don't come for me, that's literally how it's written πdma_buf_export(9)dma_buf_fd(9)dma_buf_fd_install(9)dma_buf_get(9)dma_buf_put(9)locking convention(9)dma_buf_dynamic_attach(9)dma_buf_attach(9)dma_buf_detach(9)dma_buf_pin(9)dma_buf_unpin(9)dma_buf_map_attachment(9)dma_buf_unmap_attachment(9)dma_buf_unmap_attachment_unlocked(9)dma_buf_attach_revocable(9)dma_buf_invalidate_mappings(9)cpu access(9)dma_buf_begin_cpu_access(9)dma_buf_end_cpu_access(9)dma_buf_mmap(9)dma_buf_vmap(9)dma_buf_vmap_unlocked(9)dma_buf_vunmap(9)dma_buf_vunmap_unlocked(9)
that's the whole squad, no cap. go read them, they ate. β
and that's the page!! π§ this absolute gem lives in ./drivers/dma-buf, dated October 2026 β so yeah, she's from the future, lowkey. bye bestie, go map some attachments (the unlocked way) πβ¨π
π¦ 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