* [PATCH] x86/cpu/intel: Drop stray FAM6 check with new Intel CPU model defines
@ 2024-05-29 18:36 Andrew Cooper
2024-05-29 18:39 ` Dave Hansen
2024-06-29 14:28 ` [tip: x86/cpu] " tip-bot2 for Andrew Cooper
0 siblings, 2 replies; 5+ messages in thread
From: Andrew Cooper @ 2024-05-29 18:36 UTC (permalink / raw)
To: LKML
Cc: Andrew Cooper, Tony Luck, Dave Hansen, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, x86, H. Peter Anvin, Ashok Raj,
Alison Schofield
The outer if () should have been dropped when switching to c->x86_vfm.
Fixes: 6568fc18c2f6 ("x86/cpu/intel: Switch to new Intel CPU model defines")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Tony Luck <tony.luck@intel.com>
CC: Dave Hansen <dave.hansen@linux.intel.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Ingo Molnar <mingo@redhat.com>
CC: Borislav Petkov <bp@alien8.de>
CC: x86@kernel.org
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: Ashok Raj <ashok.raj@intel.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Alison Schofield <alison.schofield@intel.com>
CC: linux-kernel@vger.kernel.org
---
arch/x86/kernel/cpu/intel.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index a813089ca408..a9ea0dba6f0c 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -294,17 +294,13 @@ 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_vfm) {
- case INTEL_ATOM_SALTWELL_MID:
- case INTEL_ATOM_SALTWELL_TABLET:
- case INTEL_ATOM_SILVERMONT_MID:
- case INTEL_ATOM_AIRMONT_NP:
- set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC_S3);
- break;
- default:
- break;
- }
+ switch (c->x86_vfm) {
+ case INTEL_ATOM_SALTWELL_MID:
+ case INTEL_ATOM_SALTWELL_TABLET:
+ case INTEL_ATOM_SILVERMONT_MID:
+ case INTEL_ATOM_AIRMONT_NP:
+ set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC_S3);
+ break;
}
/*
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] x86/cpu/intel: Drop stray FAM6 check with new Intel CPU model defines
2024-05-29 18:36 [PATCH] x86/cpu/intel: Drop stray FAM6 check with new Intel CPU model defines Andrew Cooper
@ 2024-05-29 18:39 ` Dave Hansen
2024-05-29 18:59 ` Luck, Tony
2024-06-29 14:28 ` [tip: x86/cpu] " tip-bot2 for Andrew Cooper
1 sibling, 1 reply; 5+ messages in thread
From: Dave Hansen @ 2024-05-29 18:39 UTC (permalink / raw)
To: Andrew Cooper, LKML
Cc: Tony Luck, Dave Hansen, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, x86, H. Peter Anvin, Ashok Raj, Alison Schofield
On 5/29/24 11:36, Andrew Cooper wrote:
> The outer if () should have been dropped when switching to c->x86_vfm.
FWIW, we are going to need to do a pass over all of arch/x86 looking for
these. I suspect many of the 'if (c->x86 == ...) ' checks can go away
like this one.
Thanks for finding this one, though!
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] x86/cpu/intel: Drop stray FAM6 check with new Intel CPU model defines
2024-05-29 18:39 ` Dave Hansen
@ 2024-05-29 18:59 ` Luck, Tony
2024-05-29 19:02 ` Andrew Cooper
0 siblings, 1 reply; 5+ messages in thread
From: Luck, Tony @ 2024-05-29 18:59 UTC (permalink / raw)
To: Hansen, Dave, andrew.cooper3@citrix.com, LKML
Cc: Dave Hansen, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
x86@kernel.org, H. Peter Anvin, Raj, Ashok, Schofield, Alison
>> The outer if () should have been dropped when switching to c->x86_vfm.
>
> FWIW, we are going to need to do a pass over all of arch/x86 looking for
> these. I suspect many of the 'if (c->x86 == ...) ' checks can go away
> like this one.
>
> Thanks for finding this one, though!
Yup.
Acked-by: Tony Luck <tony.luck@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] x86/cpu/intel: Drop stray FAM6 check with new Intel CPU model defines
2024-05-29 18:59 ` Luck, Tony
@ 2024-05-29 19:02 ` Andrew Cooper
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cooper @ 2024-05-29 19:02 UTC (permalink / raw)
To: Luck, Tony, Hansen, Dave, LKML
Cc: Dave Hansen, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
x86@kernel.org, H. Peter Anvin, Raj, Ashok, Schofield, Alison
On 29/05/2024 7:59 pm, Luck, Tony wrote:
>>> The outer if () should have been dropped when switching to c->x86_vfm.
>> FWIW, we are going to need to do a pass over all of arch/x86 looking for
>> these. I suspect many of the 'if (c->x86 == ...) ' checks can go away
>> like this one.
>>
>> Thanks for finding this one, though!
> Yup.
>
> Acked-by: Tony Luck <tony.luck@intel.com>
Thanks. FWIW, none of the other uses of c->x86 I looked at seem trivial
to convert.
This one I only happened to notice because it stood out in context.
~Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip: x86/cpu] x86/cpu/intel: Drop stray FAM6 check with new Intel CPU model defines
2024-05-29 18:36 [PATCH] x86/cpu/intel: Drop stray FAM6 check with new Intel CPU model defines Andrew Cooper
2024-05-29 18:39 ` Dave Hansen
@ 2024-06-29 14:28 ` tip-bot2 for Andrew Cooper
1 sibling, 0 replies; 5+ messages in thread
From: tip-bot2 for Andrew Cooper @ 2024-06-29 14:28 UTC (permalink / raw)
To: linux-tip-commits
Cc: Andrew Cooper, Borislav Petkov (AMD), Tony Luck, x86,
linux-kernel
The following commit has been merged into the x86/cpu branch of tip:
Commit-ID: 34b3fc558b537bdf99644dcde539e151716f6331
Gitweb: https://git.kernel.org/tip/34b3fc558b537bdf99644dcde539e151716f6331
Author: Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Wed, 29 May 2024 19:36:05 +01:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Sat, 29 Jun 2024 16:10:37 +02:00
x86/cpu/intel: Drop stray FAM6 check with new Intel CPU model defines
The outer if () should have been dropped when switching to c->x86_vfm.
Fixes: 6568fc18c2f6 ("x86/cpu/intel: Switch to new Intel CPU model defines")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/20240529183605.17520-1-andrew.cooper3@citrix.com
---
arch/x86/kernel/cpu/intel.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index a813089..a9ea0db 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -294,17 +294,13 @@ 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_vfm) {
- case INTEL_ATOM_SALTWELL_MID:
- case INTEL_ATOM_SALTWELL_TABLET:
- case INTEL_ATOM_SILVERMONT_MID:
- case INTEL_ATOM_AIRMONT_NP:
- set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC_S3);
- break;
- default:
- break;
- }
+ switch (c->x86_vfm) {
+ case INTEL_ATOM_SALTWELL_MID:
+ case INTEL_ATOM_SALTWELL_TABLET:
+ case INTEL_ATOM_SILVERMONT_MID:
+ case INTEL_ATOM_AIRMONT_NP:
+ set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC_S3);
+ break;
}
/*
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-06-29 14:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-29 18:36 [PATCH] x86/cpu/intel: Drop stray FAM6 check with new Intel CPU model defines Andrew Cooper
2024-05-29 18:39 ` Dave Hansen
2024-05-29 18:59 ` Luck, Tony
2024-05-29 19:02 ` Andrew Cooper
2024-06-29 14:28 ` [tip: x86/cpu] " tip-bot2 for Andrew Cooper
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.