STRUCT TTM_BO_KMAP_OBJ(9)
π struct ttm_bo_kmap_obj(9) π
okay so this is a page from the Kernel API Manual β yes, the kernel has manuals, and yes, this one is about a struct. a struct, bestie. but she's kind of iconic so stay with me π«Ά
β¨ NAME β¨
struct ttm_bo_kmap_obj β (the name line is literally empty in the original, which is so her: no explanation, just vibes. it's the object that describes a kernel mapping of a TTM buffer object, but the manpage refuses to say it in the NAME section. we respect the mystery π
)
πΈ SYNOPSIS πΈ
like, the whole shape of her. no cap, here it is exactly:
struct ttm_bo_kmap_obj {
void *virtual;
struct page *page;
enum {
ttm_bo_map_iomap = 1 | TTM_BO_MAP_IOMEM_MASK,
ttm_bo_map_vmap = 2,
ttm_bo_map_kmap = 3,
ttm_bo_map_premapped = 4 | TTM_BO_MAP_IOMEM_MASK,
} bo_kmap_type;
struct ttm_buffer_object *bo;
};
π¦ Members π¦
breaking down the cast of characters, main-character style:
virtualβ the current kernel virtual address. that's it, that's the whole description. she's current, she's virtual, she's addressed. β¨pageβ the page when kmap'ing a single page. one (1) page. single-page energy πbo_kmap_typeβ type ofbo_kmap, iykyk. and the options are the enum up in the synopsis:ttm_bo_map_iomap,ttm_bo_map_vmap,ttm_bo_map_kmap,ttm_bo_map_premappedπboβ the TTM BO. short, sweet, to the point. π₯
π Description π
so here's the lore: this thing is an object describing a kernel mapping. and the reason it has to be flexible is that a TTM bo may live in various memory types with various caching policies β so the mapping can be any one of these four:
- an
ioremap - a
vmap - a
kmap - or part of a premapped region
that's the whole deal. four possible mapping situations, one struct carrying them all. lowkey elegant ngl π§
β SEE ALSO β
go read these next, bestie, the whole friend group:
- Kernel file
./include/drm/ttm/ttm_bo.h enum ttm_bo_type(9)struct ttm_buffer_object(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)ttm_kmap_obj_virtual(9)struct ttm_bo_lru_cursor(9)ttm_bo_lru_for_each_reserved_guarded(9)
ngl ttm_bo_lru_for_each_reserved_guarded(9) is giving "I have a long name because I do a lot" and honestly? respect. π
and that's the page!! mwah π this one came from ./include/drm/ttm, dated October 2026, and it's filed under struct ttm_bo_kmap_obj(9) β go off, king πππ
π¦ 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