dma_sb_map_area_linear(9)
β¨ dma_sb_map_area_linear(9) β¨
okay so bestie, we're in the Kernel API Manual, section 9 β yes, the kernel-functions-for-grown-ups section π
β and today's main character is dma_sb_map_area_linear. Buckle up, it's short but it's iconic.
π NAME π
dma_sb_map_area_linear β Map an area of memory into a device dma region.
π¦ SYNOPSIS π¦
int dma_sb_map_area_linear (struct ps3_dma_region *r , unsigned long
virt_addr , unsigned long len , dma_addr_t *bus_addr , u64 iopte_flag );
that's the whole signature, no cap π«Ά
π ARGUMENTS π
rβ Pointer to astruct ps3_dma_region. like, the region in question, yeah.virt_addrβ Starting virtual address of the area to map.lenβ Length in bytes of the area to map. bytes, bestie. bytes.bus_addrβ A pointer to return the starting ioc bus address of the area to map. so you hand it a pointer, it fills in the address for you πiopte_flagβ honestly?-- undescribed --. the manpage literally gives us nothing here π not me being left on read by the documentation. I'm not gonna make something up about it either β that's not the vibe.
πΈ DESCRIPTION πΈ
okay so here's the tea: this routine just returns the corresponding bus address. That is literally all it does. It does not do the mapping itself β no ma'am, the actual mapping occurs in dma_region_create_linear.
so likeβ¦ this function is the friend who tells you where the party is but doesn't drive you there πβ¨ still useful! just, you know. manage your expectations.
β οΈ heads up: since this returns an existing correspondence rather than creating one, don't go expecting it to set anything up for you. That's dma_region_create_linear's job, periodt.
π₯ SEE ALSO π₯
- Kernel file
./arch/powerpc/platforms/ps3/mm.c struct mem_region(9)struct map(9)ps3_mm_phys_to_lpar(9)ps3_mm_vas_create(9)ps3_mm_vas_destroy(9)ps3_mm_region_create(9)ps3_mm_region_destroy(9)dma_sb_lpar_to_bus(9)dma_sb_map_pages(9)dma_sb_region_create(9)dma_sb_map_area(9)dma_sb_unmap_area(9)dma_sb_region_create_linear(9)dma_sb_region_free_linear(9)ps3_mm_init(9)ps3_mm_shutdown(9)
and that's the whole page, bestie β go read the rest of the PS3 mm crew, they're all linked above and they all ate π
shoutout to the source, ./arch/powerpc/platforms/ps3, dated October 2026 β that's the version + date, mwah, mwah π«Άβ¨ bye!!
π¦ 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