STRUCT MACHINE_DESC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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