for_each_sgt_page(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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:

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