arm_iommu_map_sg(9)
β¨ arm_iommu_map_sg(9) β¨
okay so bestie, welcome to the Kernel API Manual entry for arm_iommu_map_sg β yes the whole name, we're not abbreviating, she's got main character energy and she's not shrinking herself for anyone π
π NAME π
arm_iommu_map_sg β maps a whole set of SG buffers for streaming mode DMA. that's it, that's the job, and she does it slayfully π¦
πΈ SYNOPSIS πΈ
int arm_iommu_map_sg (struct device *dev , struct scatterlist *sg , int
nents , enum dma_data_direction dir , unsigned long attrs );
no cap, that's the exact signature, copy it character for character if you're writing it down π
π ARGUMENTS π
devβ a validstruct devicepointer. like, it has to be valid, bestie, don't be sending her a bogus pointer, that's not the vibe π₯sgβ the list of buffers. your scatterlist, your little roster of chunks πnentsβ how many buffers you want mapped. the count. the headcount. the guest list πdirβ the DMA transfer direction. which way the data's flowing, iykyk πattrsβ literally-- undescribed --. that's what the page says, that's what I'm telling you. we do not know, and honestly? we're not gonna pretend we do π
β DESCRIPTION β
so here's the tea π: this maps a set of buffers that are described by a scatterlist, and it does it in streaming mode for DMA. the scatter gather list elements get merged together β but only if possible, don't come for her if they can't be β and then they're tagged with the appropriate dma address and length.
and where do you get those address and length values, you ask? adorable of you. you get them via sg_dma_{address,length} π
π§ SEE ALSO π§
the kernel file ./arch/arm/mm/dma-mapping.c (yes, that's the one, go look, she's iconic) plus her whole friend group:
arm_iommu_unmap_sg(9)arm_iommu_sync_sg_for_cpu(9)arm_iommu_sync_sg_for_device(9)arm_iommu_map_phys(9)arm_iommu_create_mapping(9)arm_iommu_attach_device(9)arm_iommu_detach_device(9)
they all live in ./arch/arm/mm and they're all invited to the group chat π«Ά
ngl there's nothing dangerous flagged on this page, but the <italic>if possible</italic> on the merging is doing a lot of heavy lifting β that's a real conditional, not decorative, so respect it π
kisses, this has been arm_iommu_map_sg(9) from the fine folks at ./arch/arm/mm, dated October 2026 β go map some buffers, bestie, and remember: streaming mode, always πβ¨π
π¦ 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