sba_map_single(9)
π sba_map_single(9) β like, the Kernel API Manual page, bestie π
okay so picture this: you're a driver, you've got one (1) buffer, and you need it to be DMA-able. that's the whole plot. this is sba_map_single, and it maps one buffer and hands you back the IOVA for DMA. one. single. buffer. main character energy, no ensemble cast π
β¨ SYNOPSIS β¨
dma_addr_t sba_map_single (struct device *dev , phys_addr_t addr ,
size_t size , enum dma_data_direction direction );
like literally that's the whole signature, copy it exactly please, we don't freestyle function signatures in this house π«Ά
πΈ ARGUMENTS πΈ
devβ the instance of PCI owned by the driver that's asking. like, whose driver is this? this one's. πaddrβ the driver buffer to map. the buffer in question. the one. the only.sizeβ number of bytes to map in that driver buffer. count 'em π’directionβ R/W or both. that's it, that's the option set, we contain multitudes π
π DESCRIPTION π
ngl the entire description is a redirect, and honestly? iconic. go read:
Documentation/core-api/dma-api-howto.rst
that's the whole vibe check. it's giving "see attached" but make it kernel docs π
π¦ SEE ALSO π¦
okay bestie, buckle up, because this list is long and we are NOT skipping a single one of these. every single one. periodt.
the kernel file is ./drivers/parisc/sba_iommu.c, and then, in this exact order:
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_unmap_phys(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)
that's nineteen besties and we love every one of them, no cap π
ok and before you go β huge shoutout to ./drivers/parisc, dropping this masterpiece in October 2026 π the whole sba family ate and left absolutely no crumbs, fr fr π§β¨
π¦ 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