STRUCT MLXBF_PMC_BLOCK_INFO(9)
π struct mlxbf_pmc_block_info(9)
okay so this is a page from the Kernel API Manual (yes, the actual kernel docs, we're fancy now β¨) and it's all about struct mlxbf_pmc_block_info β literally the little data home where all the info for each HW block lives. bestie, it's giving "one struct to hold them all" π
πΈ NAME πΈ
struct mlxbf_pmc_block_info β the Structure to hold info for each HW block π
β¨ SYNOPSIS β¨
struct mlxbf_pmc_block_info {
void __iomem *mmio_base;
size_t blk_size;
size_t counters;
unsigned int type;
struct mlxbf_pmc_attribute *attr_counter;
struct mlxbf_pmc_attribute *attr_event;
struct mlxbf_pmc_attribute attr_event_list;
struct mlxbf_pmc_attribute attr_enable;
struct mlxbf_pmc_attribute attr_count_clock;
struct attribute *block_attr[MLXBF_PMC_MAX_ATTRS];
struct attribute_group block_attr_grp;
};
like, that's the whole vibe right there π«Ά copy it exactly, don't be cute with it.
π¦ Members π¦
okay let's go member by member, no skipping, periodt π
mmio_baseβ The VA at which the PMC block is mapped. that's the virtual address where this block lives, iconic β¨blk_sizeβ Size of each mapped region. how much room it takes, ngl pretty self-explanatory πcountersβ Number of counters in the block. count 'em up π’typeβ Type of counters in the block. this block's whole personality, fr frattr_counterβ Attributes for"counter"sysfs files. yup, the sysfs files, in quotes, exactly like that πattr_eventβ Attributes for"event"sysfs files. same energy, different file πattr_event_listβ Attributes for"event_list"sysfs files. it's the list version, she's special πattr_enableβ Attributes for"enable"sysfs files. turn it on βattr_count_clockβ Attributes for"count_clock"sysfs files. clock girlies rise πblock_attrβ All attributes needed for the block. every single one, main character energy πblock_attr_grpβ Attribute group for the block. she groups them all together, mother π§
lowkey obsessed with how tidy this struct is. every attribute has a home and nothing is orphaned, we love a structured queen π
π₯ SEE ALSO π₯
- Kernel file
./drivers/platform/mellanox/mlxbf-pmc.cstruct struct mlxbf_pmc_attribute(9)struct mlxbf_pmc_context(9)struct mlxbf_pmc_events(9)
iykyk β go read those next, bestie π
and that's the whole page!! π mwah π this came out of ./drivers/platform/mellanox and it's dated October 2026, published as struct mlxbf_pmc_block_info(9) β slay, you're officially a struct expert now π
π¦ 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