arm_iommu_unmap_sg(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« 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 valid struct device pointer. 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 to dma_map_sg, okay? no matching game πŸ’€
  • dir β€” the DMA transfer direction. again, same as what was passed to dma_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:

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