mips_cdmm_setup(9)
π mips_cdmm_setup(9)
okay so bestie, welcome to the Kernel API Manual β¨ β this one's a lil function called mips_cdmm_setup, and honestly? it's giving "just make sure the bus is up and running before you do anything cute." ππ
πΈ NAME πΈ
mips_cdmm_setup β bestie's whole job is to ensure the CDMM bus is initialised and usable. that's it. that's the vibe check. no cap. π«Ά
β¨ SYNOPSIS β¨
int mips_cdmm_setup (struct mips_cdmm_bus *bus );
like, it takes one thing, and returns an int. iconic, minimal, efficient. we love a main character who doesn't overcomplicate. π
π ARGUMENTS π
busβ a pointer to the bus information for the current CPU. π§ and here's the cute part:IS_ERR(bus)is already checked inside, so the caller doesn't need to check it themselves. like, it's handled. don't worry about it. you're welcome. π
π DESCRIPTION π
okay so the one thing you actually have to do yourself, bestie β and do not skip this β is prevent migration to another CPU. π there are two ways to slay this:
- disable pre-emption, or
- run from a pinned kernel thread.
that's the whole rule. no migrating mid-call. periodt. π«π¦
and then the returns, which are literally:
0on success π-errnoon failure π
fr fr, that's it. keep your CPU pinned and you're golden. π
π SEE ALSO π
the whole friend group, assembled:
- Kernel file
./drivers/bus/mips_cdmm.c struct mips_cdmm_work_dev(9)mips_cdmm_void_work(9)mips_cdmm_int_work(9)BUILD_PERCPU_HELPER(9)mips_cdmm_driver_register(9)mips_cdmm_driver_unregister(9)struct mips_cdmm_bus(9)mips_cdmm_get_bus(9)mips_cdmm_cur_base(9)mips_cdmm_phys_base(9)mips_cdmm_early_probe(9)mips_cdmm_release(9)mips_cdmm_bus_discover(9)BUILD_PERDEV_HELPER(9)mips_cdmm_cpu_down_prep(9)mips_cdmm_cpu_online(9)mips_cdmm_init(9)
go read them all, iykyk πβ¨
aaand that's the page!! π this lil gem lives in ./drivers/bus, stamped October 2026, and it's filed under mips_cdmm_setup(9) β mwah, go off bestie ππ₯π
π¦ 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