STRUCT DEVFREQ_CPU_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so welcome to the <pink>Kernel API Manual</pink>, bestie, because today we're reading up on struct devfreq_cpu_data(9) β€” and what it does is literally just hold the per-cpu data. that's it. that's the whole vibe. πŸ’…


✨ SYNOPSIS ✨

here's the whole struct, copy-pasted exactly because we do not freestyle signatures in this house:

struct devfreq_cpu_data {
    struct list_head node;
    struct device *dev;
    unsigned int first_cpu;
    struct opp_table *opp_table;
    unsigned int cur_freq;
    unsigned int min_freq;
    unsigned int max_freq;
 };

like, look at her. seven members. no notes. πŸŽ€

πŸ¦‹ Members πŸ¦‹

every field, no skipping, i promise:

  • node β€” the list node, aka her little hookup into the list. that's the whole job.
  • dev β€” a reference to the cpu device, fr fr.
  • first_cpu β€” the cpumask of the first cpu of a policy. yes, the first one. the main character of that policy, if you will. πŸ‘‘
  • opp_table β€” a reference to the cpu opp table.
  • cur_freq β€” the current frequency of the cpu. the now. the present moment. live laugh love. ✨
  • min_freq β€” the min frequency of the cpu.
  • max_freq β€” the max frequency of the cpu. she goes all the way up. πŸ”₯

πŸ’– Description πŸ’–

so this structure stores the required cpu_data of a cpu β€” that's the whole thing, that's the tea. β˜•

and the cutest part? it's auto-populated by the governor. not you, bestie. you don't have to touch it. the governor handles it, it's giving very much "someone else already did the group project" energy and honestly? slay. 🫢


🌈 SEE ALSO 🌈

  • Kernel file ./drivers/devfreq/governor_passive.c β€” go read it, iykyk πŸ‘€

and that's the page!! tysm for reading, mwah πŸ’œ this was brought to you by the <lavender>./drivers/devfreq</lavender> source tree, dated October 2026, and yes the header at the top and the footer at the bottom of the original both said struct devfreq_cpu_data(9) β€” periodt. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from