STRUCT TTM_KMAP_ITER_IOMAP(9)
π struct ttm_kmap_iter_iomap(9) π
okay bestie, welcome to the Kernel API Manual β¨ β we're about to talk about struct ttm_kmap_iter_iomap, which is literally the special-est little specialization for a struct io_mapping + struct sg_table backed struct ttm_resource. no cap, this one's a whole vibe π¦
πΈ NAME πΈ
struct ttm_kmap_iter_iomap β Specialization for a struct io_mapping + struct sg_table backed struct ttm_resource. it's giving "i'm a kmap iterator but make it iomap-flavored" π
β¨ SYNOPSIS β¨
struct ttm_kmap_iter_iomap {
struct ttm_kmap_iter base;
struct io_mapping *iomap;
struct sg_table *st;
resource_size_t start;
struct {
struct scatterlist *sg;
pgoff_t i;
pgoff_t end;
pgoff_t offs;
} cache;
};
like, look at her. she's got a base, she's got an iomap, she's got the whole cache situation going on. main character energy fr fr π
π Members π
baseβ the embeddedstruct ttm_kmap_iterthat provides the usage interface. she's the personality, the public face, the way you actually talk to this struct π«Άiomapβ astruct io_mappingrepresenting the underlying linear io_memory. iconic, honestly.stβ thesg_tableintoiomap, representing the memory of thestruct ttm_resource. it's literally the whole point of the operation.startβ the offset that needs to be subtracted fromstto makesg_dma_address(st->sgl) - start == 0for iomap start. it's a little math, but we love her for it πcacheβ the scatterlist traversal cache for fast lookups. because bestie, nobody wants to walk the whole sg list every single time πcache.sgβ pointer to the currently cached scatterlist segment. the segment of the moment, the one we're emotionally attached to rn.cache.iβ first index ofsg, atPAGE_SIZEgranularity. first index behavior only, no cap.cache.endβ last index + 1 ofsg, atPAGE_SIZEgranularity. yes, + 1. that's not a typo, that's the API, slay.cache.offsβ first offset intoiomapofsg, atPAGE_SIZEgranularity. the offs girlies rise πΈ
π SEE ALSO π
y'all gotta check the Kernel file ./include/drm/ttm/ttm_resource.h and honestly the whole friend group:
TTM_NUM_MOVE_FENCES(9)enum ttm_lru_item_type(9)struct ttm_lru_item(9)ttm_lru_item_init(9)struct ttm_resource_manager(9)struct ttm_bus_placement(9)struct ttm_resource(9)ttm_lru_item_to_res(9)struct ttm_lru_bulk_move_pos(9)struct ttm_lru_bulk_move(9)struct ttm_resource_cursor(9)struct ttm_kmap_iter_linear_io(9)ttm_resource_manager_set_used(9)ttm_resource_manager_used(9)ttm_resource_manager_cleanup(9)ttm_resource_manager_for_each_res(9)
so many references, so many icons π§π iykyk.
okay that's the whole page bestie. every member, every field, every SEE ALSO β we kept it exactly as it is, no inventing, no skipping. periodt. π
and that's a wrap, babe π this page lives in ./include/drm/ttm and it's dated October 2026, courtesy of struct ttm_kmap_iter_iomap(9) β go forth and kmap responsibly, bestie πβ
π¦ 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