From: "Luck, Tony" <tony.luck@intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Dave Hansen <dave.hansen@intel.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MAINTAINERS, x86/CPU: Tony Luck will maintain asm/intel-family.h
Date: Thu, 15 Aug 2019 10:21:59 -0700 [thread overview]
Message-ID: <20190815172159.GA4935@agluck-desk2.amr.corp.intel.com> (raw)
In-Reply-To: <20190815075822.GC15313@zn.tnic>
On Thu, Aug 15, 2019 at 09:58:22AM +0200, Borislav Petkov wrote:
> On Wed, Aug 14, 2019 at 04:40:30PM -0700, Tony Luck wrote:
> > There are a few different subsystems in the kernel that depend on
> > model specific behaviour (perf, EDAC, power, ...). Easier for just
> > one person to have the task to get new model numbers included instead
> > of having these groups trip over each other to do it.
> >
> > Signed-off-by: Tony Luck <tony.luck@intel.com>
> > ---
> > MAINTAINERS | 6 ++++++
> > 1 file changed, 6 insertions(+)
>
> Applied, thanks.
>
> As a first order of business, pls sum up the naming scheme convention
> you guys are going to adhere to so that it is clear to everybody:
>
> https://lkml.kernel.org/r/91eefbe4-e32b-d762-be4d-672ff915db47@intel.com
>
> in a patch form. :)
Like this?
From 364e337ec2008442a8a77cf919fbf499b297b3f4 Mon Sep 17 00:00:00 2001
From: Tony Luck <tony.luck@intel.com>
Date: Thu, 15 Aug 2019 10:04:18 -0700
Subject: [PATCH] Documentation: x86: Explain Intel model naming convention
This was written in an e-mail by Dave Hansen, but not everybody
reads the entire LKML archive before posting a patch.
https://lkml.kernel.org/r/91eefbe4-e32b-d762-be4d-672ff915db47@intel.com
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
Documentation/x86/index.rst | 1 +
Documentation/x86/intel-cpu-models.rst | 37 ++++++++++++++++++++++++++
2 files changed, 38 insertions(+)
create mode 100644 Documentation/x86/intel-cpu-models.rst
diff --git a/Documentation/x86/index.rst b/Documentation/x86/index.rst
index af64c4bb4447..6ba9e9cc5938 100644
--- a/Documentation/x86/index.rst
+++ b/Documentation/x86/index.rst
@@ -19,6 +19,7 @@ x86-specific Documentation
tlb
mtrr
pat
+ intel-cpu-models
intel_mpx
intel-iommu
intel_txt
diff --git a/Documentation/x86/intel-cpu-models.rst b/Documentation/x86/intel-cpu-models.rst
new file mode 100644
index 000000000000..75b5267a5354
--- /dev/null
+++ b/Documentation/x86/intel-cpu-models.rst
@@ -0,0 +1,37 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+=======================
+Intel CPU model numbers
+=======================
+
+The CPU model number on a running system can be found by executing
+the CPUID(EAX=0) instruction to find the vendor, family, model
+and stepping. The model number is found by concatenating two bit
+fields from the EAX return value. Bits 19:16 (extended model number)
+and 7:4 (model number).
+
+Inside the Linux kernel the vendor, family, model and stepping are
+stored in the cpuinfo_x86 structure. Model specific code typically
+uses x86_match_cpu() to determine if it is running on any of some
+list of CPU models.
+
+There are several subsystems that need model specific handling on
+Intel CPUs. For code legibility it is better to assign names for
+the various model numbers in the include file <asm/intel-family.h>
+
+Currently all interesting Intel CPU models are in family 6.
+
+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 */
--
2.20.1
next prev parent reply other threads:[~2019-08-15 17:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-14 23:40 Tony Luck
2019-08-15 7:58 ` Borislav Petkov
2019-08-15 17:21 ` Luck, Tony [this message]
2019-08-15 17:54 ` Borislav Petkov
2019-08-15 18:30 ` Luck, Tony
2019-08-15 18:35 ` Borislav Petkov
2019-08-15 20:22 ` Thomas Gleixner
2019-08-15 22:47 ` Luck, Tony
2019-08-16 6:46 ` Borislav Petkov
2019-08-16 16:29 ` Luck, Tony
2019-08-16 16:33 ` David Laight
2019-08-16 19:03 ` Borislav Petkov
2019-08-16 7:01 ` Thomas Gleixner
2019-08-17 8:19 ` [tip:x86/urgent] x86/cpu: Explain Intel model naming convention tip-bot for Tony Luck
2019-08-20 15:30 ` [PATCH] MAINTAINERS, x86/CPU: Tony Luck will maintain asm/intel-family.h Peter Zijlstra
2019-08-20 15:40 ` Peter Zijlstra
2019-08-20 15:49 ` Peter Zijlstra
2019-08-20 15:53 ` Peter Zijlstra
2019-08-21 16:45 ` Luck, Tony
2019-08-20 16:10 ` Peter Zijlstra
2019-08-15 8:01 ` [tip:x86/urgent] " tip-bot for Tony Luck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190815172159.GA4935@agluck-desk2.amr.corp.intel.com \
--to=tony.luck@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®