clocksource_khz2mult(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… clocksource_khz2mult(9)

okay so bestie, welcome to the Kernel API Manual β€” yes, that's the whole vibe, and honestly? We're slaying in the kernel today ✨ This one's a tiny little helper in ./include/linux/clocksource.h-land and it's literally the glow-up your khz frequency never knew it needed πŸŽ€


🌸 NAME 🌸

clocksource_khz2mult β€” calculates mult from khz and shift πŸ’–

Like, that's it. That's the whole job. It takes your frequency in kHz and your shift factor and hands you back a multiplier. No cap ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

u32 clocksource_khz2mult (u32 khz , u32 shift_constant );

πŸ’… ARGUMENTS πŸ’…

  • khz β€” your Clocksource frequency in KHz, bestie 🌈 This is the actual number we're mathing on.
  • shift_constant β€” the Clocksource shift factor ✨ the how-much-are-we-shifting-by of it all.

πŸ‘‘ DESCRIPTION πŸ‘‘

So the way this works: these are helper functions that convert a khz counter frequency into a clocksource multiplier πŸ’– And you don't just do that in the void β€” nah, you do it given the clocksource shift value πŸ‘‘ So like, khz + shift_constant in, mult out. Iconic behaviour, truly 🧚

it's a helper function, so it's not out here being a main character β€” it's the supportive bestie to the bigger clocksource machinery 🫢

πŸ’€ SEE ALSO πŸ’€


and that's the whole page, bestie!! πŸ’œ

cute lil sign-off: this came from the source at ./include/linux and it's dated October 2026 🌸 mwah, go convert some frequencies responsibly πŸŽ€πŸ’…

πŸ“¦ where this page comes from