sba_free(9)
π sba_free(9) β free/unmap shared mem for DMA
okay so bestie, welcome to the Kernel API Manual π β this page is literally all about sba_free, and by the end you're gonna know it like the back of your hand. no cap.
β¨ NAME β¨
sba_free β free/unmap shared mem for DMA π¦
πΈ SYNOPSIS πΈ
void sba_free (struct device *hwdev , size_t size , void *vaddr ,
dma_addr_t dma_handle , unsigned long attrs );
that's the whole signature, copy it exactly, do not freestyle it π
π ARGUMENTS π
hwdevβ an instance of PCI owned by the driver that's asking. it's giving "whose buffer is this anyway" energy πsizeβ the number of bytes mapped in the driver buffer. yes, actual bytes, count them π₯vaddrβ the virtual address IOVA of the "consistent" buffer. quote-unquote consistent, they said it not me πdma_handleβ the IO virtual address of the "consistent" buffer. don't mix it up withvaddr, they're different besties πattrsβ attributes. that's it, that's the description. iconic minimalism β¨
π¦ DESCRIPTION π¦
for the full lore, go read Documentation/core-api/dma-api-howto.rst β that's literally where the details live, told you exactly where to look π
β SEE ALSO β
kernel file ./drivers/parisc/sba_iommu.c plus this whole friend group, like a group chat of its own π«Ά
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_unmap_phys(9)sba_alloc(9)sba_map_sg(9)sba_unmap_sg(9)sba_get_iommu(9)sba_directed_lmmio(9)sba_distributed_lmmio(9)
ngl, the description here is short on purpose β this page is a pointer to the docs, not the docs themselves. no invented tips, i would never π
and that's the whole thing bestie, mwah π this page lives in ./drivers/parisc, dated October 2026, and it's sba_free(9) through and through β go forth and free that DMA memory π
β¨π
π¦ 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