eeh_pe_traverse(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ eeh_pe_traverse(9) ✨

okay so real talk, this is a page straight out of the Kernel API Manual and it's all about eeh_pe_traverse β€” the function that goes on a little stroll through your PEs. bestie, it's giving tour guide energy and honestly? iconic. πŸŽ€


🌸 NAME 🌸

eeh_pe_traverse β€” Traverse PEs in the specified PHB


πŸ¦‹ SYNOPSIS πŸ¦‹

void * eeh_pe_traverse (struct eeh_pe *root , eeh_pe_traverse_func fn ,
void *flag );

πŸ’… ARGUMENTS πŸ’…

  • root β€” the root PE, aka where the whole little journey kicks off πŸ’–
  • fn β€” the callback, your main character function that gets called as we go 🫢
  • flag β€” extra parameter to callback, the little care package you hand over to fn ✨

πŸ”₯ DESCRIPTION πŸ”₯

so here's the vibe: this function is used to traverse the specified PE and its child PEs. like, it walks the whole family tree, no cap. 🌈

the traversing is to be terminated once the callback returns something other than NULL, or when there are no more PEs to be traversed. so basically: fn hits you back with literally anything that isn't NULL and the whole thing shuts down politely. otherwise we keep going till we run out of PEs. periodt. πŸ’€

ngl the early-exit thing is the whole point β€” if your callback is returning non-NULL, that's your sign to stop the walk. don't fight it. βœ‹

πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./arch/powerpc/kernel/eeh_pe.c, plus the whole squad:

eeh_set_pe_aux_size(9), eeh_pe_alloc(9), eeh_phb_pe_create(9), eeh_wait_state(9), eeh_phb_pe_get(9), eeh_pe_next(9), eeh_pe_dev_traverse(9), __eeh_pe_get(9), eeh_pe_get(9), eeh_pe_tree_insert(9), eeh_pe_tree_remove(9), eeh_pe_update_time_stamp(9), eeh_pe_state_mark(9), eeh_pe_mark_isolated(9), eeh_pe_state_clear(9), eeh_restore_one_device_bars(9), eeh_pe_restore_bars(9), eeh_pe_loc_get(9), eeh_pe_loc_get_bus(9), _eeh_pe_bus_get(9), eeh_pe_bus_get(9), eeh_pe_bus_get_nolock(9)


that's the whole page, bestie, and it's a wrap from ./arch/powerpc/kernel β€” October 2026 edition. go traverse something cute πŸ§šπŸ’œ

πŸ“¦ where this page comes from