ttm_kmap_obj_virtual(9)
πΈ ttm_kmap_obj_virtual(9) πΈ
okay so real talk, bestie β you're reading a page from the Kernel API Manual and it's literally called ttm_kmap_obj_virtual(9). Yes, that's the whole title. We're in the big leagues now. π
β¨ NAME β¨
ttm_kmap_obj_virtual β
...and that's it. That's the description. Nothing after the dash. She said "my name is enough" and honestly? Main character energy. π No cap, the original page gives you zero words here, so I'm not gonna invent any for you either. We move.
π¦ SYNOPSIS π¦
void * ttm_kmap_obj_virtual (struct ttm_bo_kmap_obj *map , bool
*is_iomem );
That's the whole signature, copied exactly, don't come for me about the spacing β that's how the page prints it. π«Ά
π ARGUMENTS π
mapβ astruct ttm_bo_kmap_objthat you got handed back fromttm_bo_kmap. Not a fresh one you made up yourself, babe. It comes from that function. πis_iomemβ a pointer to an integer, and it's an out kinda situation: on return it tells you1if the virtual map is io memory, or0if it's normal memory. Think of it as the vibe check for your memory region. β
π DESCRIPTION π
So what does this actually do? It returns the virtual address of a buffer object area that was mapped by ttm_bo_kmap. That's the whole job. Very demure, very mindful. πΈ
But here's the part you cannot skip, and I mean cannot β if *is_iomem is 1 on return, then that virtual address points to an io memory area. And io memory has rules, bestie. It should strictly be accessed by the iowriteXX and similar functions.
π¨ the way that "strictly" is doing a LOT of heavy lifting in that sentence β please respect it. Don't just dereference io memory like it's regular RAM, that's not the move. π
π§ SEE ALSO π§
Kernel file ./include/drm/ttm/ttm_bo.h β and then the whole friend group, in this exact order:
enum ttm_bo_type(9)struct ttm_buffer_object(9)struct ttm_bo_kmap_obj(9)struct ttm_operation_ctx(9)struct ttm_lru_walk_arg(9)struct ttm_lru_walk(9)struct ttm_bo_shrink_flags(9)ttm_bo_reserve(9)ttm_bo_reserve_slowpath(9)ttm_bo_move_null(9)ttm_bo_unreserve(9)struct ttm_bo_lru_cursor(9)ttm_bo_lru_for_each_reserved_guarded(9)
like okay ttm_bo_lru_for_each_reserved_guarded(9) β say it five times fast, I dare you. π iconic name tho.
that's the whole page, bestie, you ate that πβ¨ this lil masterpiece lives in ./include/drm/ttm and it's dated October 2026 β go off, calendar. mwah, study safe, and remember: check *is_iomem before you touch anything πππ¦
π¦ 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