STRUCT MLXBF_PMC_BLOCK_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 fr
  • attr_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.c struct
  • 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