for_each_mem_range_rev(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… for_each_mem_range_rev(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual ✨ β€” this one's a lil macro from the memblock cinematic universe and honestly it's giving reverse main character energy. no cap.


🌸 NAME 🌸

for_each_mem_range_rev β€” reverse iterate through memblock areas from type_a and not included in type_b. Or just type_a if type_b is NULL. πŸ¦‹


✨ SYNOPSIS ✨

for_each_mem_range_rev (i , p_start , p_end );

like, that's it. that's the whole vibe. πŸŽ€


🫢 ARGUMENTS 🫢

  • i β€” a u64 used as the loop variable. it's the little counter bestie that keeps the party going πŸ”₯
  • p_start β€” ptr to phys_addr_t for the start address of the range. can be NULL, so don't stress if you don't have one πŸ’…
  • p_end β€” ptr to phys_addr_t for the end address of the range. also can be NULL, we're flexible like that πŸ’œ

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/memblock.h β€” and oml the whole friend group showed up, we love a supportive cast 🌈:


ok and before you go β€” this page lives in ./include/linux, dated October 2026, from the Kernel API Manual set (yes we're time-travelling a lil bit, slay πŸ’€). go read the memblock header fr fr, ily, bye bestie πŸ“πŸ§šπŸ’–
πŸ“¦ where this page comes from