X86_MATCH_CPU(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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, like INTEL, AMD, HYGON, ..., ANY. lowkey the cool part: the name gets expanded to X86_VENDOR__vendor πŸͺ„
  • _family β€” the family number, or X86_FAMILY_ANY if you're in your "idc, any family" era πŸ™ˆ
  • _model β€” the model number, a model constant, or X86_MODEL_ANY (again: picky or not picky, your call) πŸ’β€β™€οΈ
  • _steppings β€” a bitmask for steppings, a stepping constant, or X86_STEPPING_ANY ⭐
  • _feature β€” an X86_FEATURE bit, or X86_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 or NULL. the internal storage format is unsigned long, and whatever value, pointer, etc. you supply gets casted to unsigned long internally. 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 πŸ’œ


bestie this page came from ./arch/x86/include/asm and it's dated October 2026, and the page itself is X86_MATCH_CPU(9) β€” that's the whole sign-off, mwah πŸ’‹πŸŒŸ
πŸ“¦ where this page comes from