arm_iommu_detach_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 valid struct device pointer. 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:

(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