arm_iommu_detach_device(9)
π arm_iommu_detach_device(9) β from the Kernel API Manual, bestie
okay so. welcome to the Kernel API Manual, the section 9 of it, and today's main character is arm_iommu_detach_device. it's giving "the breakup function" and honestly? it ate. let's get into it π«Ά
β¨ NAME β¨
arm_iommu_detach_device β that's literally it, that's the name. the original page doesn't give it a one-line summary, so we're not inventing one, no cap. it does exactly what it says on the tin and the tin has no subtitle. π
πΈ SYNOPSIS πΈ
void arm_iommu_detach_device (struct device *dev );
that's the whole thing. void going in, void coming out, one argument, zero drama. iconic behaviour. β¨
π ARGUMENTS π
devβ a validstruct devicepointer. like, it has to be valid, okay? this is not the place to be passing around random garbage pointers, bestie. valid. struct device. pointer. periodt. π¦
π DESCRIPTION π
so what does it actually do? okay so picture this: your device was previously attached to a map. it was living its best life, all IOMMU'd up. this function detaches it from that previously attached map. the map and the device are no longer together. it's a soft launch breakup. π
and here's the little detail that matters: it overwrites the dma_ops pointer with the appropriate non-IOMMU ops. so the device gets handed back to the non-IOMMU crew and goes on with its life. slay. π₯
ngl, that dma_ops overwrite is the whole point of the function β if you skim past it, you missed the assignment. π
π¦ SEE ALSO π¦
the kernel file is ./arch/arm/mm/dma-mapping.c, and it wants you to go read its friends too:
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_attach_device(9)
(that last one is literally this function's counterpart β attach vs detach, they're giving sibling energy π)
π§ cute little sign-off π§
and that's the page, bestie!! π this masterpiece lives under ./arch/arm/mm (that's the source), from October 2026 (that's the date, and yes it's future-coded, don't @ me), and the whole thing is filed under arm_iommu_detach_device(9) in the Kernel API Manual. go forth and detach 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