sbi_fwft_set_cpumask(9)
β¨ 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 aconst 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. au32. it's giving "which one, bestie?" π―valueβ the feature value to be set. anunsigned long. this is what you're actually settingfeatureto πflagsβ the FWFT feature set flags. anunsigned long. the fine-tuning knobs, iykyk π§
π RETURN π
0on 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:
sbi_console_putchar(9)sbi_console_getchar(9)sbi_shutdown(9)__sbi_set_timer_v01(9)sbi_fwft_set(9)sbi_set_timer(9)sbi_send_ipi(9)sbi_remote_fence_i(9)sbi_remote_sfence_vma_asid(9)sbi_remote_hfence_gvma(9)sbi_remote_hfence_gvma_vmid(9)sbi_remote_hfence_vvma(9)sbi_remote_hfence_vvma_asid(9)sbi_probe_extension(9)
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
- 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