x86/cpu: Add new Airmont CPU model
Subsystems (9)
v2 cover x86/cpu: Add new Airmont CPU model
A forthcoming product uses a new variant of Atom Airmont CPU model. This series adds support for this new CPU model.
Patches are baselined upon Linux 5.3-rc4 at below Git tree:git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/core
v2:
* Address review concerns about incorrect patch prefixes & redundant comments.
* Improve summary in cover letter and commit messages.
Rahul Tanwar (3):
x86/cpu: Use constant definitions for CPU type x86/cpu: Add new Intel Atom CPU model name x86/cpu: Update init data for new Atom CPU model
arch/x86/include/asm/intel-family.h | 1 + arch/x86/kernel/cpu/common.c | 1 + arch/x86/kernel/cpu/intel.c | 7 ++++--- arch/x86/kernel/tsc_msr.c | 5 +++++ 4 files changed, 11 insertions(+), 3 deletions(-)
Signature · 1 line
2.11.0
PATCH v2 1/3 x86/cpu: Use constant definitions for CPU type
Replace direct values usage with constant definitions when access CPU models.
--- arch/x86/kernel/cpu/intel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/kernel/cpu/intel.c +3 -3
@@ -265,9 +265,9 @@ static void early_init_intel(struct cpuinfo_x86 *c)/* Penwell and Cloverview have the TSC which doesn't sleep on S3 */ if (c->x86 ==6 ) {switch (c->x86_model) { -case 0x27 :/* Penwell */ -case 0x35 :/* Cloverview */ -case 0x4a :/* Merrifield */ +case INTEL_FAM6_ATOM_SALTWELL_MID : +case INTEL_FAM6_ATOM_SALTWELL_TABLET : +case INTEL_FAM6_ATOM_SILVERMONT_MID :set_cpu_cap (c,X86_FEATURE_NONSTOP_TSC_S3 );break ;default :
Signature · 1 line
2.11.0
PATCH v2 3/3 x86/cpu: Update init data for new Atom CPU model
In reply to Rahul TanwarUpdate vulnerability init data for the newly added CPU model. Enable setting CPU feature applicable for newly added CPU model. Add TSC MSR freq_desc entry for newly added CPU model.
--- arch/x86/kernel/cpu/common.c | 1 + arch/x86/kernel/cpu/intel.c | 1 + arch/x86/kernel/tsc_msr.c | 5 +++++ 3 files changed, 7 insertions(+)
arch/x86/kernel/cpu/common.c +1 -0
@@ -1059,6 +1059,7 @@ static const __initconst struct x86_cpu_id cpu_vuln_whitelist[] = {VULNWL_INTEL (CORE_YONAH ,NO_SSB ),VULNWL_INTEL (ATOM_AIRMONT_MID ,NO_L1TF |MSBDS_ONLY |NO_SWAPGS ), +VULNWL_INTEL (ATOM_AIRMONT_NP ,NO_L1TF |NO_SWAPGS ),VULNWL_INTEL (ATOM_GOLDMONT ,NO_MDS |NO_L1TF |NO_SWAPGS ), VULNWL_INTEL(ATOM_GOLDMONT_X, NO_MDS | NO_L1TF | NO_SWAPGS),
arch/x86/kernel/cpu/intel.c +1 -0
@@ -268,6 +268,7 @@ static void early_init_intel(struct cpuinfo_x86 *c)case INTEL_FAM6_ATOM_SALTWELL_MID :case INTEL_FAM6_ATOM_SALTWELL_TABLET :case INTEL_FAM6_ATOM_SILVERMONT_MID : +case INTEL_FAM6_ATOM_AIRMONT_NP :set_cpu_cap (c,X86_FEATURE_NONSTOP_TSC_S3 );break ;default :
arch/x86/kernel/tsc_msr.c +5 -0
@@ -58,6 +58,10 @@ static const struct freq_desc freq_desc_ann = { 1, { 83300, 100000, 133300, 100000, 0, 0, 0, 0 } }; +static const struct freq_desc freq_desc_lgm = { +1 , {78000 ,78000 ,78000 ,78000 ,78000 ,78000 ,78000 ,78000 } +}; +static const struct x86_cpu_id tsc_msr_cpu_ids[] = {INTEL_CPU_FAM6 (ATOM_SALTWELL_MID , freq_desc_pnw), INTEL_CPU_FAM6(ATOM_SALTWELL_TABLET, freq_desc_clv),
@@ -65,6 +69,7 @@ static const struct x86_cpu_id tsc_msr_cpu_ids[] = {INTEL_CPU_FAM6 (ATOM_SILVERMONT_MID , freq_desc_tng),INTEL_CPU_FAM6 (ATOM_AIRMONT , freq_desc_cht),INTEL_CPU_FAM6 (ATOM_AIRMONT_MID , freq_desc_ann), + INTEL_CPU_FAM6(ATOM_AIRMONT_NP, freq_desc_lgm), {} };
Signature · 1 line
2.11.0
PATCH v2 2/3 x86/cpu: Add new Intel Atom CPU model name
In reply to Rahul TanwarAdd a new variant of Intel Atom Airmont CPU model.
--- arch/x86/include/asm/intel-family.h | 1 + 1 file changed, 1 insertion(+)
arch/x86/include/asm/intel-family.h +1 -0
@@ -73,6 +73,7 @@#define INTEL_FAM6_ATOM_AIRMONT 0x4C/* Cherry Trail, Braswell */ #define INTEL_FAM6_ATOM_AIRMONT_MID 0x5A/* Moorefield */ +#define INTEL_FAM6_ATOM_AIRMONT_NP 0x75/* Lightning Mountain */ #define INTEL_FAM6_ATOM_GOLDMONT 0x5C/* Apollo Lake */ #define INTEL_FAM6_ATOM_GOLDMONT_X 0x5F/* Denverton */
Signature · 1 line
2.11.0
tip-bot for Rahul Tanwar
merge bot[tip:x86/cleanups] x86/cpu: Use constant definitions for CPU models
In reply to Rahul Tanwarx86/cpu: Use constant definitions for CPU models
Commit-ID: bba10c5cab4ddd8725a7998e064fc72c9770c667 Gitweb: https://git.kernel.org/tip/bba10c5cab4ddd8725a7998e064fc72c9770c667 Author: Rahul Tanwar <[email protected]> AuthorDate: Fri, 16 Aug 2019 16:18:57 +0800 Committer: Borislav Petkov <[email protected]> CommitDate: Sat, 17 Aug 2019 10:34:09 +0200
x86/cpu: Use constant definitions for CPU models
Replace model numbers with their respective macro definitions when comparing CPU models.
--- arch/x86/kernel/cpu/intel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/kernel/cpu/intel.c +3 -3
@@ -265,9 +265,9 @@ static void early_init_intel(struct cpuinfo_x86 *c)/* Penwell and Cloverview have the TSC which doesn't sleep on S3 */ if (c->x86 ==6 ) {switch (c->x86_model) { -case 0x27 :/* Penwell */ -case 0x35 :/* Cloverview */ -case 0x4a :/* Merrifield */ +case INTEL_FAM6_ATOM_SALTWELL_MID : +case INTEL_FAM6_ATOM_SALTWELL_TABLET : +case INTEL_FAM6_ATOM_SILVERMONT_MID :set_cpu_cap (c,X86_FEATURE_NONSTOP_TSC_S3 );break ;default :
Peter Zijlstra
maintainerRe: [PATCH v2 2/3] x86/cpu: Add new Intel Atom CPU model name
In reply to Rahul TanwarQuoted 12 lines · Rahul Tanwar
Add a new variant of Intel Atom Airmont CPU model.
Signed-off-by Rahul Tanwar <[email protected]>--- arch/x86/include/asm/intel-family.h | 1 + 1 file changed, 1 insertion(+)arch/x86/include/asm/intel-family.h +0
-0
arch/x86/include/asm/intel-family.h line 76
Quoted 4 lines
arch/x86/include/asm/intel-family.h +1
-0@@ -73,6 +73,7 @@#define INTEL_FAM6_ATOM_AIRMONT 0x4C/* Cherry Trail, Braswell */ #define INTEL_FAM6_ATOM_AIRMONT_MID 0x5A/* Moorefield */ +#define INTEL_FAM6_ATOM_AIRMONT_NP 0x75/* Lightning Mountain */
What's _NP ?
Luck, Tony
maintainerRe: [PATCH v2 2/3] x86/cpu: Add new Intel Atom CPU model name
Quoted 4 lines
Quoted 2 lines
+#define
INTEL_FAM6_ATOM_AIRMONT_NP0x75/* Lightning Mountain */What's
_NP?
Network Processor. But that is too narrow a descriptor. This is going to be used in other areas besides networking.
I’m contemplating calling it AIRMONT2
-Tony
Re: [PATCH v2 2/3] x86/cpu: Add new Intel Atom CPU model name
In reply to Peter ZijlstraQuoted 14 lines · Peter Zijlstra
Quoted 13 lines · Rahul Tanwar
Add a new variant of Intel Atom Airmont CPU model.
Signed-off-by Rahul Tanwar <[email protected]>--- arch/x86/include/asm/intel-family.h | 1 + 1 file changed, 1 insertion(+)arch/x86/include/asm/intel-family.h +0
-0@@ -73,6 +73,7 @@
Quoted 5 lines
arch/x86/include/asm/intel-family.h line 76
Quoted 3 lines
arch/x86/include/asm/intel-family.h +1
-0#define INTEL_FAM6_ATOM_AIRMONT 0x4C/* Cherry Trail, Braswell */ #define INTEL_FAM6_ATOM_AIRMONT_MID 0x5A/* Moorefield */ +#define INTEL_FAM6_ATOM_AIRMONT_NP 0x75/* Lightning Mountain */ What's
_NP?
Nuked Product
Re: [PATCH v2 2/3] x86/cpu: Add new Intel Atom CPU model name
In reply to Luck, TonyQuoted 9 lines · Tony
Quoted 4 lines
Quoted 2 lines
+#define
INTEL_FAM6_ATOM_AIRMONT_NP0x75/* Lightning Mountain */What's
_NP?Network Processor. But that is too narrow a descriptor. This is going to be used in other areas besides networking.
I’m contemplating calling it AIRMONT2
We used to have something like that for Silvermont. It was confusing.
commit f2c4db1bd80720cd8cb2a5aa220d9bc9f374f04e
Author: Peter Zijlstra <[email protected]> Date: Tue Aug 7 10:17:27 2018 -0700
x86/cpu: Sanitize FAM6_ATOM naming
What 2 or 3 or other number means?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Luck, Tony
maintainerRe: [PATCH v2 2/3] x86/cpu: Add new Intel Atom CPU model name
Quoted 8 lines
Author: Peter Zijlstra <[email protected]> Date: Tue Aug 7 10:17:27 2018 -0700x86/cpu: Sanitize
FAM6_ATOMnamingWhat 2 or 3 or other number means?
In this case I want it to mean “This is an Airmont derived core. Mostly like original Airmont, so you might see some places where we have the same model specific actions. But enough different that it has a new model ID so places where it is different can do something else”.
-Tony
Peter Zijlstra
maintainerRe: [PATCH v2 2/3] x86/cpu: Add new Intel Atom CPU model name
In reply to Luck, TonyQuoted 9 lines · Tony
Quoted 4 lines
Quoted 2 lines
+#define
INTEL_FAM6_ATOM_AIRMONT_NP0x75/* Lightning Mountain */What's
_NP?Network Processor. But that is too narrow a descriptor. This is going to be used in other areas besides networking.
I’m contemplating calling it AIRMONT2
What would describe the special sause that warranted a new SOC? If this thing is marketed as 'Network Processor' then I suppose we can actually use it, esp. if we're going to see this more, like the MID thing -- that lived for a while over multiple uarchs.
Note that for the big cores we added the NNPI thing, which was for Neural Network Processing something.
Re: [PATCH v2 2/3] x86/cpu: Add new Intel Atom CPU model name
Quoted 6 lines · Peter Zijlstra
Quoted 5 lines · Tony
Quoted 2 lines
Quoted 1 line
+#define
INTEL_FAM6_ATOM_AIRMONT_NP0x75/* Lightning Mountain */What's
_NP?Network Processor. But that is too narrow a descriptor. This is going to be used in other areas besides networking.
Quoted 8 lines
Quoted 1 line
I’m contemplating calling it AIRMONT2
What would describe the special sause that warranted a new SOC? If this thing is marketed as 'Network Processor' then I suppose we can actually use it, esp. if we're going to see this more, like the MID thing -- that lived for a while over multiple uarchs.
Note that for the big cores we added the NNPI thing, which was for Neural Network Processing something.
INTEL_FAM6_ATOM_AIRMONT_NP was used keeping in mind the recommended
symbol naming form i.e. INTEL_FAM6{OPTFAMILY}_{MICROARCH}{OPTDIFF}
where OPTDIFF is supposed to be the market segment.
This SoC uses AMT (Admantium/Airmont) configuration which is supposed to be
a higher configuration. Looking at other existing examples, it seems that
INTEL_FAM6_ATOM_AIRMONT_PLUS is most appropriate. Would you have any
concerns with _PLUS name ? Thanks.
Peter Zijlstra
maintainerRe: [PATCH v2 2/3] x86/cpu: Add new Intel Atom CPU model name
Quoted 9 lines · Rahul
Quoted 4 lines · Peter Zijlstra
What would describe the special sause that warranted a new SOC? If this thing is marketed as 'Network Processor' then I suppose we can actually use it, esp. if we're going to see this more, like the MID thing -- that lived for a while over multiple uarchs.
This SoC uses AMT (Admantium/Airmont) configuration which is supposed to be a higher configuration.
That's just words without meaning on this end. What's an Adamantium ? Google doesn't seem to give any sort of clues..
And will we see more of these things, or is it a one off SOC?
Quoted 3 lines
Looking at other existing examples, it seems that
INTEL_FAM6_ATOM_AIRMONT_PLUSis most appropriate. Would you have any concerns with_PLUSname ? Thanks.
Yes, _PLUS is not an existing _OPTDIFF, the uarch is called "Goldmont Plus", it is the 14nm refresh of the 14nm Goldmont, and predecessor of Tremont.
Luck, Tony
maintainerRe: [PATCH v2 2/3] x86/cpu: Add new Intel Atom CPU model name
In reply to Peter ZijlstraQuoted 9 lines · Peter Zijlstra
Quoted 8 lines · Tony
Quoted 4 lines
Quoted 2 lines
+#define
INTEL_FAM6_ATOM_AIRMONT_NP0x75/* Lightning Mountain */What's
_NP?Network Processor. But that is too narrow a descriptor. This is going to be used in other areas besides networking.
Quoted 6 lines
Quoted 1 line
I’m contemplating calling it AIRMONT2
What would describe the special sause that warranted a new SOC? If this thing is marketed as 'Network Processor' then I suppose we can actually use it, esp. if we're going to see this more, like the MID thing -- that lived for a while over multiple uarchs.
The reasons for allocating a new model number are a mystery. I've seen cases where I thought we'd get a new numnber for sure, but then just bumped the stepping. I've also seen us allocate a new number when it didn't look needed (to me, from my OS perspective).
As I mentioned above, there are some folks internally that think NP == Network Processor is too narrow a pigeonhole for this CPU.
But _NPAOS (Network Processor And Other Stuff) doesn't sound helpful.
Quoted 2 lines
Note that for the big cores we added the NNPI thing, which was for Neural Network Processing something.
I'm sure that we will invent all sorts of strings for the "OPTDIFF" part of the name (many of which will only be used once or twice).
Rationale for "AIRMONT2" is that this is derived from Airmont. So you'd expect many model specific bits of code to do the same for this as they did for plain AIRMONT. But in a few corner cases there will be separate code.
Perhaps I need to update the rubric that I just added to the head on intel-family.h to say that the MICROARCH element may be followed by an optional number to differentiate SOCs that use essentially the same core, but have different model numbers because of SOC differences outside of the core.
-Tony
Re: [PATCH v2 2/3] x86/cpu: Add new Intel Atom CPU model name
Quoted 38 lines · Tony
Quoted 9 lines · Peter Zijlstra
Quoted 8 lines · Tony
Quoted 4 lines
Quoted 2 lines
+#define
INTEL_FAM6_ATOM_AIRMONT_NP0x75/* Lightning Mountain */What's
_NP?Network Processor. But that is too narrow a descriptor. This is going to be used in other areas besides networking.
Quoted 6 lines
Quoted 1 line
I’m contemplating calling it AIRMONT2
What would describe the special sause that warranted a new SOC? If this thing is marketed as 'Network Processor' then I suppose we can actually use it, esp. if we're going to see this more, like the MID thing -- that lived for a while over multiple uarchs.
The reasons for allocating a new model number are a mystery. I've seen cases where I thought we'd get a new numnber for sure, but then just bumped the stepping. I've also seen us allocate a new number when it didn't look needed (to me, from my OS perspective).
As I mentioned above, there are some folks internally that think NP == Network Processor is too narrow a pigeonhole for this CPU.
But
_NPAOS(Network Processor And Other Stuff) doesn't sound helpful.Quoted 2 lines
Note that for the big cores we added the NNPI thing, which was for Neural Network Processing something.
I'm sure that we will invent all sorts of strings for the "OPTDIFF" part of the name (many of which will only be used once or twice).
Rationale for "AIRMONT2" is that this is derived from Airmont. So you'd expect many model specific bits of code to do the same for this as they did for plain AIRMONT. But in a few corner cases there will be separate code.
Quoted 5 lines
Perhaps I need to update the rubric that I just added to the head on
intel-family.hto say that the MICROARCH element may be followed by an optional number to differentiate SOCs that use essentially the same core, but have different model numbers because of SOC differences outside of the core.
Well, that kinda defeats the idea that the MICROARCH element is about the micro architecture. If the uarch is the same and it's just the SOC which is different then it would be better to say AIRMONT_CLIENT_V2 or such
Thanks,
tglx
Peter Zijlstra
maintainerRe: [PATCH v2 2/3] x86/cpu: Add new Intel Atom CPU model name
In reply to Luck, TonyQuoted 6 lines · Tony
On Tue, Aug 20, 2019 at 04:57:35PM +0200, Peter Zijlstra wrote:
As I mentioned above, there are some folks internally that think NP == Network Processor is too narrow a pigeonhole for this CPU.
But
_NPAOS(Network Processor And Other Stuff) doesn't sound helpful.
So what is 'other stuff'; is there really no general term that describes well what's been done to this SoC; or is it secret and we're in a catch 22 here?
Quoted 5 lines
Quoted 2 lines
Note that for the big cores we added the NNPI thing, which was for Neural Network Processing something.
I'm sure that we will invent all sorts of strings for the "OPTDIFF" part of the name (many of which will only be used once or twice).
That's a bit sad; because as shown by the patches just send out; there really isn't _that_ much variation right now.
Anyway, lets just give the thing a name; _NP whatever, and we can rename it if needed.
Luck, Tony
maintainerRe: [PATCH v2 2/3] x86/cpu: Add new Intel Atom CPU model name
Quoted 11 lines · Peter Zijlstra
Quoted 6 lines · Tony
On Tue, Aug 20, 2019 at 04:57:35PM +0200, Peter Zijlstra wrote:
As I mentioned above, there are some folks internally that think NP == Network Processor is too narrow a pigeonhole for this CPU.
But
_NPAOS(Network Processor And Other Stuff) doesn't sound helpful.So what is 'other stuff'; is there really no general term that describes well what's been done to this SoC; or is it secret and we're in a catch 22 here?
Since CPU model number is one of the early bits of disclosure in order to get support upstream in time for launch, safe to assume that some products will not want to advertise everything that far ahead.
Quoted 11 lines
Quoted 5 lines
Quoted 2 lines
Note that for the big cores we added the NNPI thing, which was for Neural Network Processing something.
I'm sure that we will invent all sorts of strings for the "OPTDIFF" part of the name (many of which will only be used once or twice).
That's a bit sad; because as shown by the patches just send out; there really isn't _that_ much variation right now.
Anyway, lets just give the thing a name;
_NPwhatever, and we can rename it if needed.
Your other patch series shows that you aren't afraid of a little churn. So sure, we can go with _NP for now and fix it up later. It's not like some OEM is going to make a CPU selection based on the #define name that we gave it in Linux :-)
-Tony
Luck, Tony
maintainerPATCH 1/1 x86/cpu: Add new Airmont variant to Intel family
Quoted 27 lines · Tony
Quoted 11 lines · Peter Zijlstra
Quoted 6 lines · Tony
On Tue, Aug 20, 2019 at 04:57:35PM +0200, Peter Zijlstra wrote:
As I mentioned above, there are some folks internally that think NP == Network Processor is too narrow a pigeonhole for this CPU.
But
_NPAOS(Network Processor And Other Stuff) doesn't sound helpful.So what is 'other stuff'; is there really no general term that describes well what's been done to this SoC; or is it secret and we're in a catch 22 here?
Since CPU model number is one of the early bits of disclosure in order to get support upstream in time for launch, safe to assume that some products will not want to advertise everything that far ahead.
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
Note that for the big cores we added the NNPI thing, which was for Neural Network Processing something.
I'm sure that we will invent all sorts of strings for the "OPTDIFF" part of the name (many of which will only be used once or twice).
That's a bit sad; because as shown by the patches just send out; there really isn't _that_ much variation right now.
Quoted 8 lines
Quoted 2 lines
Anyway, lets just give the thing a name;
_NPwhatever, and we can rename it if needed.Your other patch series shows that you aren't afraid of a little churn. So sure, we can go with
_NPfor now and fix it up later. It's not like some OEM is going to make a CPU selection based on the #define name that we gave it in Linux :-)
From: Tony Luck <[email protected]>
One of the use cases for this processor is as a network processor. So give it an "_NP" tag for now. Could be changed later if it turns out to group with some other tag.
--- arch/x86/include/asm/intel-family.h | 1 + 1 file changed, 1 insertion(+)
arch/x86/include/asm/intel-family.h +1 -0
@@ -95,6 +95,7 @@#define INTEL_FAM6_ATOM_AIRMONT 0x4C/* Cherry Trail, Braswell */ #define INTEL_FAM6_ATOM_AIRMONT_MID 0x5A/* Moorefield */ +#define INTEL_FAM6_ATOM_AIRMONT_NP 0x75/* Lightning Mountain */ #define INTEL_FAM6_ATOM_GOLDMONT 0x5C/* Apollo Lake */ #define INTEL_FAM6_ATOM_GOLDMONT_D 0x5F/* Denverton */
Signature · 1 line
2.20.1
Peter Zijlstra
maintainerRe: [PATCH] x86/cpu: Add new Airmont variant to Intel family
Quoted 16 lines · Tony
From: Tony Luck <[email protected]>
One of the use cases for this processor is as a network processor. So give it an "
_NP" tag for now. Could be changed later if it turns out to group with some other tag.Signed-off-by Tony Luck <[email protected]>--- arch/x86/include/asm/intel-family.h | 1 + 1 file changed, 1 insertion(+)arch/x86/include/asm/intel-family.h +0
-0
arch/x86/include/asm/intel-family.h line 101
Quoted 7 lines
arch/x86/include/asm/intel-family.h +1
-0@@ -95,6 +95,7 @@#define INTEL_FAM6_ATOM_AIRMONT 0x4C/* Cherry Trail, Braswell */ #define INTEL_FAM6_ATOM_AIRMONT_MID 0x5A/* Moorefield */ +#define INTEL_FAM6_ATOM_AIRMONT_NP 0x75/* Lightning Mountain */ #define INTEL_FAM6_ATOM_GOLDMONT 0x5C/* Apollo Lake */ #define INTEL_FAM6_ATOM_GOLDMONT_D 0x5F/* Denverton */
Since it is 'just another airmont' with bits on, should we not then also add it to all ATOM_AIRMONT sites already present in the kernel?
something like the below; except there were a few sites I skipped because 'no clue'.
Also, while going over that, it looked like we missed AIRMONT_MID from a few sites.
I'm thinking we want to add as many of these sites as possible and correct when adding a new define; esp. for older microarchs that are already well supported.
---
arch/x86/events/intel/core.c +1 -0
@@ -4647,6 +4647,7 @@ __init int intel_pmu_init(void)case INTEL_FAM6_ATOM_SILVERMONT_MID :case INTEL_FAM6_ATOM_AIRMONT :case INTEL_FAM6_ATOM_AIRMONT_MID : +case INTEL_FAM6_ATOM_AIRMONT_NP :memcpy (hw_cache_event_ids, slm_hw_cache_event_ids,sizeof (hw_cache_event_ids)); memcpy(hw_cache_extra_regs, slm_hw_cache_extra_regs,
arch/x86/events/intel/cstate.c +1 -0
@@ -602,6 +602,7 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = {X86_CSTATES_MODEL (INTEL_FAM6_ATOM_SILVERMONT , slm_cstates),X86_CSTATES_MODEL (INTEL_FAM6_ATOM_SILVERMONT_X , slm_cstates),X86_CSTATES_MODEL (INTEL_FAM6_ATOM_AIRMONT , slm_cstates), +X86_CSTATES_MODEL (INTEL_FAM6_ATOM_AIRMONT_NP , slm_cstates),X86_CSTATES_MODEL (INTEL_FAM6_BROADWELL_CORE , snb_cstates), X86_CSTATES_MODEL(INTEL_FAM6_BROADWELL_XEON_D, snb_cstates),
arch/x86/events/msr.c +1 -0
@@ -72,6 +72,7 @@ static bool test_intel(int idx, void *data)case INTEL_FAM6_ATOM_SILVERMONT :case INTEL_FAM6_ATOM_SILVERMONT_X :case INTEL_FAM6_ATOM_AIRMONT : +case INTEL_FAM6_ATOM_AIRMONT_NP :case INTEL_FAM6_ATOM_GOLDMONT :case INTEL_FAM6_ATOM_GOLDMONT_X :
arch/x86/kernel/cpu/common.c +1 -0
@@ -1053,6 +1053,7 @@ static const __initconst struct x86_cpu_id cpu_vuln_whitelist[] = {VULNWL_INTEL (ATOM_SILVERMONT_X ,NO_SSB |NO_L1TF |MSBDS_ONLY |NO_SWAPGS ),VULNWL_INTEL (ATOM_SILVERMONT_MID ,NO_SSB |NO_L1TF |MSBDS_ONLY |NO_SWAPGS ),VULNWL_INTEL (ATOM_AIRMONT ,NO_SSB |NO_L1TF |MSBDS_ONLY |NO_SWAPGS ), +VULNWL_INTEL (ATOM_AIRMONT_NP ,NO_SSB |NO_L1TF |MSBDS_ONLY |NO_SWAPGS ),VULNWL_INTEL (XEON_PHI_KNL ,NO_SSB |NO_L1TF |MSBDS_ONLY |NO_SWAPGS ), VULNWL_INTEL(XEON_PHI_KNM, NO_SSB | NO_L1TF | MSBDS_ONLY | NO_SWAPGS),
arch/x86/kernel/tsc_msr.c +1 -0
@@ -64,6 +64,7 @@ static const struct x86_cpu_id tsc_msr_cpu_ids[] = {INTEL_CPU_FAM6 (ATOM_SILVERMONT , freq_desc_byt),INTEL_CPU_FAM6 (ATOM_SILVERMONT_MID , freq_desc_tng),INTEL_CPU_FAM6 (ATOM_AIRMONT , freq_desc_cht), +INTEL_CPU_FAM6 (ATOM_AIRMONT_NP , freq_desc_cht), INTEL_CPU_FAM6(ATOM_AIRMONT_MID, freq_desc_ann), {} };
arch/x86/platform/atom/punit_atom_debug.c +1 -0
@@ -125,6 +125,7 @@ static const struct x86_cpu_id intel_punit_cpu_ids[] = {ICPU (INTEL_FAM6_ATOM_SILVERMONT , punit_device_byt),ICPU (INTEL_FAM6_ATOM_SILVERMONT_MID , punit_device_tng),ICPU (INTEL_FAM6_ATOM_AIRMONT , punit_device_cht), + ICPU(INTEL_FAM6_ATOM_AIRMONT_NP, punit_device_cht), {} };
drivers/acpi/acpi_lpss.c +1 -0
@@ -313,6 +313,7 @@ static const struct lpss_device_desc bsw_spi_dev_desc = {static const struct x86_cpu_id lpss_cpu_ids[] = {ICPU (INTEL_FAM6_ATOM_SILVERMONT ),/* Valleyview, Bay Trail */ ICPU (INTEL_FAM6_ATOM_AIRMONT ),/* Braswell, Cherry Trail */ +ICPU (INTEL_FAM6_ATOM_AIRMONT_NP ),/* Braswell, Cherry Trail */ {} };
drivers/cpufreq/intel_pstate.c +1 -0
@@ -1879,6 +1879,7 @@ static const struct x86_cpu_id intel_pstate_cpu_ids[] = {ICPU (INTEL_FAM6_HASWELL_GT3E , core_funcs),ICPU (INTEL_FAM6_BROADWELL_GT3E , core_funcs),ICPU (INTEL_FAM6_ATOM_AIRMONT , airmont_funcs), +ICPU (INTEL_FAM6_ATOM_AIRMONT_NP , airmont_funcs),ICPU (INTEL_FAM6_SKYLAKE_MOBILE , core_funcs),ICPU (INTEL_FAM6_BROADWELL_X , core_funcs), ICPU(INTEL_FAM6_SKYLAKE_DESKTOP, core_funcs),
drivers/idle/intel_idle.c +1 -0
@@ -1070,6 +1070,7 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {INTEL_CPU_FAM6 (ATOM_SILVERMONT , idle_cpu_byt),INTEL_CPU_FAM6 (ATOM_SILVERMONT_MID , idle_cpu_tangier),INTEL_CPU_FAM6 (ATOM_AIRMONT , idle_cpu_cht), +INTEL_CPU_FAM6 (ATOM_AIRMONT_NP , idle_cpu_cht),INTEL_CPU_FAM6 (IVYBRIDGE , idle_cpu_ivb),INTEL_CPU_FAM6 (IVYBRIDGE_X , idle_cpu_ivt), INTEL_CPU_FAM6(HASWELL_CORE, idle_cpu_hsw),
drivers/powercap/intel_rapl_common.c +1 -0
@@ -981,6 +981,7 @@ static const struct x86_cpu_id rapl_ids[] __initconst = {INTEL_CPU_FAM6 (ATOM_SILVERMONT , rapl_defaults_byt),INTEL_CPU_FAM6 (ATOM_AIRMONT , rapl_defaults_cht), +INTEL_CPU_FAM6 (ATOM_AIRMONT_NP , rapl_defaults_cht),INTEL_CPU_FAM6 (ATOM_SILVERMONT_MID , rapl_defaults_tng),INTEL_CPU_FAM6 (ATOM_AIRMONT_MID , rapl_defaults_ann), INTEL_CPU_FAM6(ATOM_GOLDMONT, rapl_defaults_core),
tools/power/x86/turbostat/turbostat.c +1 -0
@@ -3228,6 +3228,7 @@ int probe_nhm_msrs(unsigned int family, unsigned int model) pkg_cstate_limits = slv_pkg_cstate_limits;break ;case INTEL_FAM6_ATOM_AIRMONT :/* AMT */ +case INTEL_FAM6_ATOM_AIRMONT_NP :/* AMT */ pkg_cstate_limits = amt_pkg_cstate_limits; no_MSR_MISC_PWR_MGMT =1 ;break ;
Re: [PATCH] x86/cpu: Add new Airmont variant to Intel family
Hi Peter,
Quoted 31 lines · Peter Zijlstra
Quoted 16 lines · Tony
From: Tony Luck <[email protected]>
One of the use cases for this processor is as a network processor. So give it an "
_NP" tag for now. Could be changed later if it turns out to group with some other tag.Signed-off-by Tony Luck <[email protected]>--- arch/x86/include/asm/intel-family.h | 1 + 1 file changed, 1 insertion(+)arch/x86/include/asm/intel-family.h +0
-0arch/x86/include/asm/intel-family.h line 101
Quoted 7 lines
arch/x86/include/asm/intel-family.h +1
-0@@ -95,6 +95,7 @@#define INTEL_FAM6_ATOM_AIRMONT 0x4C/* Cherry Trail, Braswell */ #define INTEL_FAM6_ATOM_AIRMONT_MID 0x5A/* Moorefield */ +#define INTEL_FAM6_ATOM_AIRMONT_NP 0x75/* Lightning Mountain */ #define INTEL_FAM6_ATOM_GOLDMONT 0x5C/* Apollo Lake */ #define INTEL_FAM6_ATOM_GOLDMONT_D 0x5F/* Denverton */ Since it is 'just another airmont' with bits on, should we not then also add it to all
ATOM_AIRMONTsites already present in the kernel?something like the below; except there were a few sites I skipped because 'no clue'.
Quoted 6 lines
Also, while going over that, it looked like we missed
AIRMONT_MIDfrom a few sites.I'm thinking we want to add as many of these sites as possible and correct when adding a new define; esp. for older microarchs that are already well supported.
[PATCH v2 3/3] that i had sent with this series adds these changes which
are applicable to _NP. Please see below link:
https://lkml.org/lkml/2019/8/16/170
Above patch might have missed few additional points which still apply.
Regards,
Rahul
Quoted 134 lines
---
arch/x86/events/intel/core.c +1
-0@@ -4647,6 +4647,7 @@ __init int intel_pmu_init(void)case INTEL_FAM6_ATOM_SILVERMONT_MID :case INTEL_FAM6_ATOM_AIRMONT :case INTEL_FAM6_ATOM_AIRMONT_MID : +case INTEL_FAM6_ATOM_AIRMONT_NP :memcpy (hw_cache_event_ids, slm_hw_cache_event_ids,sizeof (hw_cache_event_ids)); memcpy(hw_cache_extra_regs, slm_hw_cache_extra_regs,arch/x86/events/intel/cstate.c +1
-0@@ -602,6 +602,7 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = {X86_CSTATES_MODEL (INTEL_FAM6_ATOM_SILVERMONT , slm_cstates),X86_CSTATES_MODEL (INTEL_FAM6_ATOM_SILVERMONT_X , slm_cstates),X86_CSTATES_MODEL (INTEL_FAM6_ATOM_AIRMONT , slm_cstates), +X86_CSTATES_MODEL (INTEL_FAM6_ATOM_AIRMONT_NP , slm_cstates),X86_CSTATES_MODEL (INTEL_FAM6_BROADWELL_CORE , snb_cstates), X86_CSTATES_MODEL(INTEL_FAM6_BROADWELL_XEON_D, snb_cstates),arch/x86/events/msr.c +1
-0@@ -72,6 +72,7 @@ static bool test_intel(int idx, void *data)case INTEL_FAM6_ATOM_SILVERMONT :case INTEL_FAM6_ATOM_SILVERMONT_X :case INTEL_FAM6_ATOM_AIRMONT : +case INTEL_FAM6_ATOM_AIRMONT_NP :case INTEL_FAM6_ATOM_GOLDMONT :case INTEL_FAM6_ATOM_GOLDMONT_X :arch/x86/kernel/cpu/common.c +1
-0@@ -1053,6 +1053,7 @@ static const __initconst struct x86_cpu_id cpu_vuln_whitelist[] = {VULNWL_INTEL (ATOM_SILVERMONT_X ,NO_SSB |NO_L1TF |MSBDS_ONLY |NO_SWAPGS ),VULNWL_INTEL (ATOM_SILVERMONT_MID ,NO_SSB |NO_L1TF |MSBDS_ONLY |NO_SWAPGS ),VULNWL_INTEL (ATOM_AIRMONT ,NO_SSB |NO_L1TF |MSBDS_ONLY |NO_SWAPGS ), +VULNWL_INTEL (ATOM_AIRMONT_NP ,NO_SSB |NO_L1TF |MSBDS_ONLY |NO_SWAPGS ),VULNWL_INTEL (XEON_PHI_KNL ,NO_SSB |NO_L1TF |MSBDS_ONLY |NO_SWAPGS ), VULNWL_INTEL(XEON_PHI_KNM, NO_SSB | NO_L1TF | MSBDS_ONLY | NO_SWAPGS),arch/x86/kernel/tsc_msr.c +1
-0@@ -64,6 +64,7 @@ static const struct x86_cpu_id tsc_msr_cpu_ids[] = {INTEL_CPU_FAM6 (ATOM_SILVERMONT , freq_desc_byt),INTEL_CPU_FAM6 (ATOM_SILVERMONT_MID , freq_desc_tng),INTEL_CPU_FAM6 (ATOM_AIRMONT , freq_desc_cht), +INTEL_CPU_FAM6 (ATOM_AIRMONT_NP , freq_desc_cht), INTEL_CPU_FAM6(ATOM_AIRMONT_MID, freq_desc_ann), {} };arch/x86/platform/atom/punit_atom_debug.c +1
-0@@ -125,6 +125,7 @@ static const struct x86_cpu_id intel_punit_cpu_ids[] = {ICPU (INTEL_FAM6_ATOM_SILVERMONT , punit_device_byt),ICPU (INTEL_FAM6_ATOM_SILVERMONT_MID , punit_device_tng),ICPU (INTEL_FAM6_ATOM_AIRMONT , punit_device_cht), + ICPU(INTEL_FAM6_ATOM_AIRMONT_NP, punit_device_cht), {} };drivers/acpi/acpi_lpss.c +1
-0@@ -313,6 +313,7 @@ static const struct lpss_device_desc bsw_spi_dev_desc = {static const struct x86_cpu_id lpss_cpu_ids[] = {ICPU (INTEL_FAM6_ATOM_SILVERMONT ),/* Valleyview, Bay Trail */ ICPU (INTEL_FAM6_ATOM_AIRMONT ),/* Braswell, Cherry Trail */ +ICPU (INTEL_FAM6_ATOM_AIRMONT_NP ),/* Braswell, Cherry Trail */ {} };drivers/cpufreq/intel_pstate.c +1
-0@@ -1879,6 +1879,7 @@ static const struct x86_cpu_id intel_pstate_cpu_ids[] = {ICPU (INTEL_FAM6_HASWELL_GT3E , core_funcs),ICPU (INTEL_FAM6_BROADWELL_GT3E , core_funcs),ICPU (INTEL_FAM6_ATOM_AIRMONT , airmont_funcs), +ICPU (INTEL_FAM6_ATOM_AIRMONT_NP , airmont_funcs),ICPU (INTEL_FAM6_SKYLAKE_MOBILE , core_funcs),ICPU (INTEL_FAM6_BROADWELL_X , core_funcs), ICPU(INTEL_FAM6_SKYLAKE_DESKTOP, core_funcs),drivers/idle/intel_idle.c +1
-0@@ -1070,6 +1070,7 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {INTEL_CPU_FAM6 (ATOM_SILVERMONT , idle_cpu_byt),INTEL_CPU_FAM6 (ATOM_SILVERMONT_MID , idle_cpu_tangier),INTEL_CPU_FAM6 (ATOM_AIRMONT , idle_cpu_cht), +INTEL_CPU_FAM6 (ATOM_AIRMONT_NP , idle_cpu_cht),INTEL_CPU_FAM6 (IVYBRIDGE , idle_cpu_ivb),INTEL_CPU_FAM6 (IVYBRIDGE_X , idle_cpu_ivt), INTEL_CPU_FAM6(HASWELL_CORE, idle_cpu_hsw),drivers/powercap/intel_rapl_common.c +1
-0@@ -981,6 +981,7 @@ static const struct x86_cpu_id rapl_ids[] __initconst = {INTEL_CPU_FAM6 (ATOM_SILVERMONT , rapl_defaults_byt),INTEL_CPU_FAM6 (ATOM_AIRMONT , rapl_defaults_cht), +INTEL_CPU_FAM6 (ATOM_AIRMONT_NP , rapl_defaults_cht),INTEL_CPU_FAM6 (ATOM_SILVERMONT_MID , rapl_defaults_tng),INTEL_CPU_FAM6 (ATOM_AIRMONT_MID , rapl_defaults_ann), INTEL_CPU_FAM6(ATOM_GOLDMONT, rapl_defaults_core),tools/power/x86/turbostat/turbostat.c +1
-0@@ -3228,6 +3228,7 @@ int probe_nhm_msrs(unsigned int family, unsigned int model) pkg_cstate_limits = slv_pkg_cstate_limits;break ;case INTEL_FAM6_ATOM_AIRMONT :/* AMT */ +case INTEL_FAM6_ATOM_AIRMONT_NP :/* AMT */ pkg_cstate_limits = amt_pkg_cstate_limits; no_MSR_MISC_PWR_MGMT =1 ;break ;