sbi_fwft_set_cpumask(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ sbi_fwft_set_cpumask(9) ✨

okay so this is a page from the Kernel API Manual and honestly? it's a lil niche but it's kind of iconic for what it does. like it's the "hey bestie, turn this feature ON for exactly these CPUs" function, and if you're poking at RISC-V SBI stuff you're gonna want to know her πŸ’…


🌸 NAME 🌸

sbi_fwft_set_cpumask β€” set a feature for the specified cpumask ✨

like literally that's it, that's the whole vibe: a feature, a mask of CPUs, and a job to do 🫢


πŸŽ€ SYNOPSIS πŸŽ€

int sbi_fwft_set_cpumask (const cpumask_t *mask , u32 feature , unsigned long value , unsigned long flags );

no cap, that's the exact signature, so copy it character-for-character if you're typing it out β€” don't go "fixing" the spacing, she's perfect as she is πŸ¦‹


πŸ’– ARGUMENTS πŸ’–

okay bestie let's go through the whole cast of characters here, one by one, nobody gets left out:

  • mask β€” the CPU mask, i.e. the list of cpus that actually need this feature to be set. it's a const cpumask_t *, so it's a pointer and it's const β€” you're just reading who's in the club, not editing the guestlist πŸ’…
  • feature β€” the feature ID that you wanna set. a u32. it's giving "which one, bestie?" 🎯
  • value β€” the feature value to be set. an unsigned long. this is what you're actually setting feature to πŸ“
  • flags β€” the FWFT feature set flags. an unsigned long. the fine-tuning knobs, iykyk πŸ”§

🌈 RETURN 🌈

  • 0 on success β€” slay, the feature got set, we love a happy ending πŸ‘‘
  • an appropriate linux error code otherwise β€” so like, if it flops, it tells you why in proper errno manners 😭

🧚 SEE ALSO 🧚

this is the part where she introduces you to all her friends, and there are so many of them:

Kernel file ./arch/riscv/kernel/sbi.c, plus:

all of them ate, fr fr πŸ”₯


okay that's the whole page, bestie πŸ’œ this cutie lives in ./arch/riscv/kernel and the page itself is dated October 2026 β€” so mark your calendars, screenshot the docs, and go set some features on that cpumask. periodt. 🌟

πŸ“¦ where this page comes from