STRUCT MACHINE_DESC(9)
π struct machine_desc(9) π
Kernel API Manual bestie β okay so this is the page for struct machine_desc, and it's giving board-specific callback central. These are the board-specific callbacks, called from ARC common code. Each ARC board provides one using MACHINE_START()/MACHINE_END(), so a multi-platform kernel builds with an array of such descriptors. We extend the early DT scan to also match the DT's "compatible" string against the @dt_compat of all such descriptors, and the one with the highest "DT score" is selected as the global @machine_desc. periodt. π
β¨ NAME β¨
struct machine_desc β board-specific callbacks, called from ARC common code. Each ARC board provides one using MACHINE_START()/MACHINE_END(), so a multi-platform kernel builds with an array of such descriptors. We extend the early DT scan to also match the DT's "compatible" string against the @dt_compat of all such descriptors, and the one with the highest "DT score" is selected as the global @machine_desc. iykyk, that's the whole vibe. π¦
π¦ SYNOPSIS π¦
here's the whole struct, no cap:
struct machine_desc {
const char *name;
const char **dt_compat;
void (*init_early)(void);
void (*init_per_cpu)(unsigned int);
void (*init_machine)(void);
void (*init_late)(void);
};
π Members π
nameβ Board/SoC name. literally the board or SoC's name, slay.dt_compatβ Array of device tree'compatible'strings.
β οΈ XXX: although only 1st entry is looked at.
init_earlyβ Very early callback[called from setup_arch]. early early, bestie.init_per_cpuβ for each CPU as it is coming up (SMP as well as UP)[(M):init_IRQ, (o):start_kernel_secondary].init_machineβ arch initcall level callback (e.g. populate static platform devices or parse Devicetree).init_lateβ Late initcall level callback. late but never forgotten.
π₯ SEE ALSO π₯
- Kernel file
./arch/arc/include/asm/mach_desc.hβ go read it, bestie.
mwah π this one was served from ./arch/arc/include/asm, dated October 2026, and it's the struct machine_desc(9) page in the Kernel API Manual β periodt, stay slay, and may your DT score be the highest. π«Άβ¨
π¦ 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