arm_iommu_unmap_sg(9)
π« arm_iommu_unmap_sg π«
okay bestie, welcome to the Kernel API Manual β this little page is all about arm_iommu_unmap_sg, and fr fr it's the cleanup queen of the scatter-gather world π§Ήβ¨
πΈ NAME πΈ
arm_iommu_unmap_sg β unmaps a whole set of SG buffers that were mapped by dma_map_sg π«Ά
β¨ SYNOPSIS β¨
void arm_iommu_unmap_sg (struct device *dev , struct scatterlist *sg ,
int nents , enum dma_data_direction dir , unsigned long attrs );
no cap, that's the whole signature β five params, one vibe π
π ARGUMENTS π
devβ a validstruct devicepointer. like, valid valid, don't be out here passing nonsense πsgβ the list of buffers. the whole little squad of them π¦nentsβ how many buffers to unmap. and bestie, it has to be the same number that was passed todma_map_sg, okay? no matching game πdirβ the DMA transfer direction. again, same as what was passed todma_map_sgβ it's giving "consistency is the moment" βattrsβ-- undescribed --π literally the manpage itself said nothing about this one, so I'm not gonna invent lore that isn't there. she's mysterious, she's undefined, we respect her privacy π
π₯ DESCRIPTION π₯
So what does she actually do? She unmaps a set of streaming mode DMA translations. that's the whole job, and she ate π
And again β the CPU access rules concerning calls here are the same as for dma_unmap_single. so if you already know how that one behaves around CPU access, you already know this one too. iykyk π
β οΈ quick vibe check: that "same rules as dma_unmap_single" thing is the real tea β treat the CPU access constraints here exactly like you would there, no shortcuts π
π SEE ALSO π
Kernel file ./arch/arm/mm/dma-mapping.c, plus the whole friend group:
arm_iommu_map_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)
go read them, they're iconic, each and every one π
and that's the page!! mwah π this little gem lives over in ./arch/arm/mm, dated October 2026, and it's filed right under arm_iommu_unmap_sg(9) in the Kernel API Manual β go unmap those buffers responsibly, bestie, ily π«Άπ
π¦ 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