for_each_sgt_page(9)
β¨ for_each_sgt_page π«
okay so bestie, this is a page from the Kernel API Manual (yes, the (9) section, we love a kernel-adjacent moment) and it's all about for_each_sgt_page β literally just iterate over the pages of the given sg_table. that's the whole vibe. π¦
πΈ NAME πΈ
for_each_sgt_page β iterate over the pages of the given sg_table
like, you give it an sg_table and it walks the pages for you. no cap, that's it. π
β SYNOPSIS β
for_each_sgt_page (__pp , __iter , __sgt );
three args, in that exact order, spaces and all. write it down, don't freestyle it. π
π ARGUMENTS π
__ppβ the page pointer, and heads up: it's an output π«Ά so this is where the page you're currently looking at lands.__iterβ bestieβ¦ the page genuinely does not say what this one does. it's just sitting there with no description. i'm not gonna make something up, so: mysterious. iconic. leave it as-is. π__sgtβ the sg_table you're iterating over, and it's input (you're reading from it, not writing to it). π₯
π¦ SEE ALSO π¦
all the sibling lore lives in the kernel file ./drivers/gpu/drm/i915/i915_scatterlist.h, and the related entries are:
__sg_next(9)__for_each_sgt_daddr(9)__for_each_daddr_next(9)i915_sg_dma_sizes(9)struct i915_refct_sgt_ops(9)struct i915_refct_sgt(9)i915_refct_sgt_put(9)i915_refct_sgt_get(9)__i915_refct_sgt_init(9)
go read those next, bestie, the whole friend group is there. π
lowkey a tiny page, highkey useful. the way that it justβ¦ iterates. periodt. π
and that's the whole page, fr fr π β brought to you by ./drivers/gpu/drm/i915, dated October 2026. go forth and iterate those pages, you main character. ππ
π¦ 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