dma_iova_link(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so this is a page straight out of the Kernel API Manual, and honestly? it's giving "small function, big responsibilities" energy. bestie, let's get into it 🫢


✨ NAME ✨

dma_iova_link β€” link a range of IOVA space πŸ”—


🌸 SYNOPSIS 🌸

int dma_iova_link (struct device *dev , struct dma_iova_state *state ,
phys_addr_t phys , size_t offset , size_t size , enum dma_data_direction
dir , unsigned long attrs );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the DMA device. the main character of this whole situation πŸ’«
  • state β€” the IOVA state. she's holding the vibe together.
  • phys β€” the physical address you're linking. literally the address. no cap.
  • offset β€” the offset into the IOVA state that you're mapping into 🎯
  • size β€” how big the buffer is. size matters, bestie.
  • dir β€” the DMA direction. pick one, be decisive πŸ’…
  • attrs β€” the attributes of the mapping properties ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically: this function links a range of IOVA space for the given IOVA state, and it does it without IOTLB sync. none. zero. nada. πŸ™ˆ

the whole point? you use this to link multiple physical addresses into contiguous IOVA space without doing the costly IOTLB sync every single time. it's the batch-it-and-save-yourself-the-pain move πŸ”₯

⚠️ ok but listen β€” the caller is responsible for calling dma_iova_sync to sync the IOTLB at the end of the linkage. don't just walk away after linking, that's not the vibe. fr fr. 😭

πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/iommu/dma-iommu.c, plus the whole squad:


that's the whole page, bestie 🌈 this one lives over in ./drivers/iommu and it's dated October 2026 β€” so mark your calendar, remember where you found her, and go sync that IOTLB. mwah πŸ’–πŸŽ€

πŸ“¦ where this page comes from