pt_num_items_lg2(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– pt_num_items_lg2(9) πŸ’–

okay bestie, you're reading the Kernel API Manual page for pt_num_items_lg2(9) β€” grab a strawberry πŸ“ and let's get into it.

🌸 NAME 🌸

pt_num_items_lg2 β€” returns the number of items in this table level. that's the assignment, no cap.

✨ SYNOPSIS ✨

unsigned int pt_num_items_lg2 (const struct pt_state *pts );

πŸŽ€ ARGUMENTS πŸŽ€

  • pts β€” the current level. that's it, that's the argument 🫢

πŸ’… DESCRIPTION πŸ’…

okay so the number of items in a table level defines the number of bits this level decodes from the VA. literally the level's bit budget. πŸ’…

this function is not called for the top level, so it does not need to compute a special value for the top case β€” no top-level panic required, bestie. the result for the top is based on pt_common max_vasz_lg2.

the value is used as part of determining the table indexes via the equation:

log2_mod(log2_div(VA, pt_table_item_lg2sz), pt_num_items_lg2)

πŸ”₯ SEE ALSO πŸ”₯


mwah πŸ’‹ β€” source/version: ./drivers/iommu/generic_pt, date: October 2026, footer vibes: pt_num_items_lg2(9). slay and read the source, bestie 🌈✨

πŸ“¦ where this page comes from