for_each_pt_level_entry(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… for_each_pt_level_entry β€” kernel API manual, bestie edition ✨

okay so real quick: this is a page from the kernel API manual, and the star of the show is for_each_pt_level_entry. she's a macro, she's a loop, she's lowkey carrying the whole iteration situation. let's get into it 🫢


🌸 NAME 🌸

for_each_pt_level_entry β€” literally just a for-loop wrapper over the entries in the range. that's her whole job. iconic of her honestly πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

for_each_pt_level_entry (pts );

one argument, no drama, we love a low-maintenance signature πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • pts β€” the iteration state. she holds the vibes (and the state) for the walk. main character energy fr fr.

✨ DESCRIPTION ✨

so this is the basic iteration primitive β€” the moment the whole thing kicks off. it iterates over all the entries in pts->range that fall within the pts's current table level (like, only the ones on this level, not the whole tree, know what i mean?).

and every single step? it does pt_load_entry(pts). no cap. each one. that's the whole loop body vibe check βœ…

ngl she's small but she's the foundation β€” every fancier walker downstream is basically her with extra steps πŸ’…

πŸ’œ SEE ALSO πŸ’œ

kernel file ./drivers/iommu/generic_pt/pt_iter.h β€” go read the source, iykyk πŸ“–

and the whole friend group, in alphabetical-ish order of how the page lists them:

like a whole squad of pt_* besties and not one of them skipped πŸ’€πŸ’–


that's the page!! this came out of ./drivers/iommu/generic_pt, dated October 2026 β€” so yeah, mark your calendars, screenshot it, send it to the group chat, mwah 😘🌟

πŸ“¦ where this page comes from