pt_num_items_lg2(9)
π 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 π₯
- Kernel file
./drivers/iommu/generic_pt/pt_common.h pt_attr_from_entry(9)pt_can_have_leaf(9)pt_can_have_table(9)pt_clear_entries(9)pt_entry_make_write_dirty(9)pt_entry_make_write_clean(9)pt_entry_is_write_dirty(9)pt_dirty_supported(9)pt_entry_num_contig_lg2(9)pt_entry_oa(9)pt_entry_oa_lg2sz(9)pt_entry_oa_exact(9)pt_full_va_prefix(9)pt_has_system_page_size(9)pt_install_leaf_entry(9)pt_install_table(9)pt_item_oa(9)pt_load_entry_raw(9)pt_max_oa_lg2(9)pt_pgsz_lg2_to_level(9)pt_possible_sizes(9)pt_table_item_lg2sz(9)pt_table_oa_lg2sz(9)pt_table_pa(9)pt_table_ptr(9)pt_max_sw_bit(9)pt_test_sw_bit_acquire(9)pt_set_sw_bit_release(9)pt_load_entry(9)
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
- 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