[PATCH] x86/cpu: Explain Intel model naming convention

From: Tony Luck
Date: Thu Aug 15 2019 - 14:16:24 EST


Dave Hansen spelled out the rules in an e-mail:

https://lkml.kernel.org/r/91eefbe4-e32b-d762-be4d-672ff915db47@xxxxxxxxx

Copy those right into the <asm/intel-family.h> file to
make it easy for people to find them.

Suggested-by: Borislav Petkov <bp@xxxxxxxxx>
Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>
---
arch/x86/include/asm/intel-family.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)

diff --git a/arch/x86/include/asm/intel-family.h b/arch/x86/include/asm/intel-family.h
index 0278aa66ef62..87443df77eee 100644
--- a/arch/x86/include/asm/intel-family.h
+++ b/arch/x86/include/asm/intel-family.h
@@ -11,6 +11,21 @@
* While adding a new CPUID for a new microarchitecture, add a new
* group to keep logically sorted out in chronological order. Within
* that group keep the CPUID for the variants sorted by model number.
+ *
+ * HOWTO Build an INTEL_FAM6_ definition:
+ *
+ * 1. Start with INTEL_FAM6_
+ * 2. If not Core-family, add a note about it, like "ATOM". There are only
+ * two options for this (Xeon Phi and Atom). It is exceedingly unlikely
+ * that you are adding a cpu which needs a new option here.
+ * 3. Add the processor microarchitecture, not the platform name
+ * 4. Add a short differentiator if necessary. Add an _X to differentiate
+ * Server from Client.
+ * 5. Add an optional comment with the platform name(s)
+ *
+ * It should end up looking like this:
+ *
+ * INTEL_FAM6_<ATOM?>_<MICROARCH>_<SHORT...> // Platform Name(s)
*/

#define INTEL_FAM6_CORE_YONAH 0x0E
--
2.20.1