arm_iommu_attach_device(9)
π arm_iommu_attach_device(9) π
okay so this is a page from the Kernel API Manual β yes, the kernel manual, we're doing Big Kernel Energy today bestie, buckle up π
β¨ NAME β¨
arm_iommu_attach_device β ngl the original page leaves the description blank, so there's literally no one-liner here. The name is the whole vibe. It's the attach function, and the deets are all down in DESCRIPTION π«Ά
πΈ SYNOPSIS πΈ
int arm_iommu_attach_device (struct device *dev , struct
dma_iommu_mapping *mapping );
π¦ ARGUMENTS π¦
devβ a validstruct devicepointer, okurrr. Must be valid, that's the whole requirement, don't come at it with garbage πmappingβ the io address space mapping structure. And where do you get one of those? It's the thing returned fromarm_iommu_create_mapping, so go make one first, bestie, no shortcuts π
π DESCRIPTION π
So what does it actually do? It attaches the specified io address space mapping to the device you handed it. Simple, iconic, main character energy β¨
The way it works: it replaces the dma operations (that's the dma_map_ops pointer, iykyk) with the IOMMU aware version. So your device stops doing plain dma and starts doing IOMMU-flavoured dma. A total glow-up π₯
π And here's the cute part β more than one client might be attached to the same io address space mapping. Sharing is caring, fr fr.
β SEE ALSO β
- Kernel file
./arch/arm/mm/dma-mapping.cπ arm_iommu_map_sg(9)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_detach_device(9)
and that's the page, bestie π this lil gem lives over in ./arch/arm/mm and it's dated October 2026 β yeah, we're reading from the future, don't question it πβ¨ go forth and attach responsibly π§π
π¦ 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