mips_machine_is_compatible(9)
π mips_machine_is_compatible(9) β the Kernel API Manual cut π
okay bestie, so this one lives in the Kernel API Manual, and it's called mips_machine_is_compatible(9) β say that five times fast, i literally dare you. it's a little function that does the "do u two even go here together" vibe check between a machine and a device tree πΈ
β¨ NAME β¨
mips_machine_is_compatible β check if a machine is compatible with an FDT π«Ά
like, genuinely just checking compatibility. no cap.
π SYNOPSIS π
const struct of_device_id * mips_machine_is_compatible (const struct mips_machine *mach , const void *fdt );
that's the whole signature, she's not long but she IS iconic β¨
π¦ ARGUMENTS π¦
machβ the machine struct to check. like, the machine in question πfdtβ the FDT to check for compatibility with. the other half of the situationship π
π DESCRIPTION π
so what it does is: it checks whether the given machine mach is compatible with the given flattened device tree fdt, and it bases that whole judgement call on the compatibility property of the root node. that's it, that's the bit. lowkey elegant, highkey important π§
π RETURN π
it gives you back the device id that matched, if there was any β else NULL. so like, NULL is the "it's giving nothing, they're not compatible" answer π
fr fr, check for NULL before you go using the result, bestie. that's just self-care π
π SEE ALSO π
- Kernel file
./arch/mips/include/asm/machine.h - struct
mips_fdt_fixup(9) apply_mips_fdt_fixups(9)
and that's the tea π this page is brought to you by ./arch/mips/include/asm, dated October 2026, and it's literally the mips_machine_is_compatible(9) page β go forth and be compatible, queen ππ
π¦ 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