dma_iova_destroy(9)
dma_iova_destroy(9) π β Kernel API Manual edition
okay so bestie, welcome to the Finish a DMA mapping transaction era. This is the Kernel API Manual page for dma_iova_destroy(9), and it's lowkey the cleanup main character. π§Ήβ¨
π NAME π
dma_iova_destroy β Finish a DMA mapping transaction. That's it, that's the name, and it's giving "wrap it up, we're done here" energy. π
β¨ SYNOPSIS β¨
the signature, no cap:
void dma_iova_destroy (struct device *dev , struct dma_iova_state *state
, size_t mapped_len , enum dma_data_direction dir , unsigned long attrs
);
π«Ά ARGUMENTS π«Ά
devβ DMA device. like, the device doing the DMA thing. π»stateβ IOVA state. this is the state bestie, keep up. πΈmapped_lenβ number of bytes to unmap. literal bytes, bestie. π’dirβ DMA direction. the direction vibe. π§attrsβ attributes of mapping properties. the property-attrs situation. π
π DESCRIPTION π
Okay so here's the actual tea: this function unlinks the IOVA range up to mapped_len and frees the entire IOVA space. π
π₯
The range of IOVA from dma_addr to mapped_len must all be linked, and it must be the only linked IOVA in state. Not "mostly linked", not "kinda linked with a side quest" β all linked, and the only linked IOVA in state. Periodt. πβ¨
π¦ SEE ALSO π¦
Kernel file: ./drivers/iommu/dma-iommu.c β go read the source, iykyk. π
iommu_get_dma_cookie(9)iommu_get_msi_cookie(9)iommu_put_dma_cookie(9)iommu_put_msi_cookie(9)iommu_dma_get_resv_regions(9)iommu_dma_init_options(9)iommu_dma_init_domain(9)dma_info_to_prot(9)dma_iova_try_alloc(9)dma_iova_free(9)dma_iova_link(9)dma_iova_sync(9)dma_iova_unlink(9)
xoxo bestie π β source ./drivers/iommu, version dma_iova_destroy(9), dated October 2026. now go slay that cleanup, mwah. π
π¦ 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