arm_iommu_map_sg(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 valid struct device pointer. 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:

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