sba_unmap_phys(9)
β¨ sba_unmap_phys(9) β¨
okay so bestie, we're in the Kernel API Manual today and this page is literally about sba_unmap_phys β it's giving "cleanup era" and honestly? we love a function that knows how to let go. π¦
π NAME π
sba_unmap_phys β unmap one IOVA and free resources
like yes, that's the whole vibe: one IOVA, unmap it, free the resources, go home. periodt. β¨
πΈ SYNOPSIS πΈ
void sba_unmap_phys (struct device *dev , dma_addr_t iova , size_t size
, enum dma_data_direction direction , unsigned long attrs );
no cap, that's the exact signature β copy it exactly, don't be weird about it π
π ARGUMENTS π
devβ instance of PCI owned by the driver that's asking. iykyk, it's the driver's own device, bestie, nobody else's πiovaβ the IOVA of a driver buffer that was previously mapped. like, you gotta have mapped it first, we're not out here unmapping random stuff πsizeβ number of bytes mapped in the driver buffer. yes, the byte count, keep it accurate fr frdirectionβ R/W or both. that's it, that's the whole description, she's concise πattrsβ attributes π«Ά
π DESCRIPTION π
See Documentation/core-api/dma-api-howto.rst
that's genuinely it, the docs said "go read the howto" and honestly? iconic. the lore is in the rst file, bestie, go read it πβ¨
π SEE ALSO π
Kernel file ./drivers/parisc/sba_iommu.c, plus the whole friend group of sba functions β a full roster, no one left out:
sba_dump_ranges(9)sba_dump_tlb(9)sba_dump_pdir_entry(9)sba_check_pdir(9)sba_dump_sg(9)sba_search_bitmap(9)sba_alloc_range(9)sba_free_range(9)sba_io_pdir_entry(9)sba_mark_invalid(9)sba_dma_supported(9)sba_map_single(9)sba_alloc(9)sba_free(9)sba_map_sg(9)sba_unmap_sg(9)sba_get_iommu(9)sba_directed_lmmio(9)sba_distributed_lmmio(9)
π reminder bestie: this frees resources. it's a real unmap, not a decorative one. don't go calling it on stuff that was never mapped, ok? π«Ά
and that's the page!! mwah π this one lives in ./drivers/parisc, dated October 2026, and it's sba_unmap_phys(9) all the way down β take care of her, she's a legend πΈπβ¨
π¦ 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