pt_descend(9)
π pt_descend(9) β the Kernel API Manual page you actually want to read
Okay so bestie, gather round, because today we're talking about pt_descend from the Kernel API Manual, and honestly? She's a tiny little function with main character energy. β¨
πΈ NAME πΈ
pt_descend β she recursively invokes the walker for the lower level. That's it, that's the whole vibe. Recursive queen. π
π SYNOPSIS π
int pt_descend (struct pt_state *pts , void *arg , pt_level_fn_t fn );
Like, look at her. Three little args, one int coming back at you. Iconic. π
π¦ ARGUMENTS π¦
ptsβ the Iteration State. This is the state bestie, the moment, the whole situation. π«Άargβ the value you're gonna pass to the function. Just hand it over, no cap. πfnβ the walker function to call. She's the one doing the actual walking, we're just hyping her up. πΆββοΈβ¨
π₯ DESCRIPTION π₯
Okay so here's the tea: pts must point to a table item. Not vibes, not a maybe, an actual table item. Then you invoke fn as a walker on the table that pts points to. That's literally the whole job and she does it flawlessly. π
Fr fr, pts has to point to a table item β that's the requirement, don't come at her with anything else. π
π SEE ALSO π
Kernel file ./drivers/iommu/generic_pt/pt_iter.h β plus the whole friend group, because nobody walks alone:
pt_check_range(9)pt_index_to_va(9)pt_entry_fully_covered(9)pt_range_to_index(9)pt_range_to_end_index(9)pt_next_entry(9)for_each_pt_level_entry(9)pt_load_single_entry(9)pt_top_range(9)pt_all_range(9)pt_upper_range(9)pt_make_range(9)pt_init(9)pt_init_top(9)pt_walk_range(9)pt_range_slice(9)pt_top_memsize_lg2(9)pt_compute_best_pgsize(9)PT_MAKE_LEVELS(9)
Squad goals honestly. π
Mwah, that's the page! π This lil beauty lives in ./drivers/iommu/generic_pt and the version we're all reading dropped in October 2026, under the name pt_descend(9). Go forth and recurse 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