X86_MATCH_CPU(9)
π X86_MATCH_CPU(9) β the Kernel API Manual, bestie edition π
okay so first things first, the manual name is X86_MATCH_CPU and this whole page lives in the Kernel API Manual β¨ β that's the vibe check, now let's get into it π¦
β¨ NAME β¨
X86_MATCH_CPU β the base macro for CPU matching, the mother of all matchers, the main character π
πΈ SYNOPSIS πΈ
X86_MATCH_CPU (_vendor , _family , _model , _steppings , _feature ,
_type , _data );
literally that's it, that's the whole signature, no cap π
π ARGUMENTS π
_vendorβ the vendor name, likeINTEL,AMD,HYGON, ...,ANY. lowkey the cool part: the name gets expanded toX86_VENDOR__vendorπͺ_familyβ the family number, orX86_FAMILY_ANYif you're in your "idc, any family" era π_modelβ the model number, a model constant, orX86_MODEL_ANY(again: picky or not picky, your call) πββοΈ_steppingsβ a bitmask for steppings, a stepping constant, orX86_STEPPING_ANYβ_featureβ anX86_FEATUREbit, orX86_FEATURE_ANYπ₯_typeβ honestly?-- undescribed --π the manpage literally says nothing about this one. it's giving mystery, it's giving cryptic, i cannot make up lore that isn't there, so: undescribed, bestie, that's canon π_dataβ driver specific data orNULL. the internal storage format isunsigned long, and whatever value, pointer, etc. you supply gets casted tounsigned longinternally. yup, casted. slay π«Ά
π¦ DESCRIPTION π¦
use this one only if you need all the selectors. that's the whole deal β it's the full-set macro, the all-inclusive package π
otherwise? use one of the shorter macros of the X86_MATCH_* family. they're right there, they're cute, they're less typing π
and if there's no matching shorthand macro for what you need, consider adding one β like, be the change you want to see in the kernel, periodt β¨
and if you really need to wrap one of these macros into another macro at the usage site for good reasons, then please start that local macro with X86_MATCH so it's easy to grep. yes, this is a real request, respect the naming convention, it's literally for everyone's sanity ππ«Ά
π SEE ALSO π
- Kernel file
./arch/x86/include/asm/cpu_device_id.hβ go read it, iykyk π X86_MATCH_VENDOR_FAM_FEATURE(9)X86_MATCH_VENDOR_FEATURE(9)X86_MATCH_FEATURE(9)X86_MATCH_VENDOR_FAM_MODEL(9)X86_MATCH_VENDOR_FAM(9)X86_MATCH_VFM(9)X86_MATCH_VFM_STEPS(9)X86_MATCH_VFM_FEATURE(9)X86_MATCH_VFM_CPU_TYPE(9)
bestie this page came from./arch/x86/include/asmand it's dated October 2026, and the page itself isX86_MATCH_CPU(9)β that's the whole sign-off, mwah ππ
π¦ 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