* [PATCH] Add additional Intel CPU models to crystal_khz whitelist
@ 2016-09-09 15:18 Prarit Bhargava
2016-09-10 6:35 ` Thomas Gleixner
0 siblings, 1 reply; 2+ messages in thread
From: Prarit Bhargava @ 2016-09-09 15:18 UTC (permalink / raw)
To: linux-kernel
Cc: Prarit Bhargava, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
x86, Rafael Aquini, Peter Zijlstra (Intel),
Andy Lutomirski, Len Brown, lenb
In commit aa297292d708 ("x86/tsc: Enumerate SKL cpu_khz and tsc_khz via
CPUID"), the kernel added support for Intel processors which had
a different CPU base-frequency and TSC frequency.
The turbostat utility has been updated with KBL and SKX processors,
and they should also be added to the crystal_khz white list.
For example, on KBL (0x8E) native_calibrate_tsc() returns 0 MHz for
tsc_khz and after this patch native_calibrate_tsc() returns 1608 MHz.
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Cc: Rafael Aquini <aquini@redhat.com>
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Len Brown <len.brown@intel.com>
Cc: lenb@kernel.org
---
arch/x86/kernel/tsc.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 78b9cb5a26af..421ddbbf3fc8 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -688,11 +688,19 @@ unsigned long native_calibrate_tsc(void)
switch (boot_cpu_data.x86_model) {
case 0x4E: /* SKL */
case 0x5E: /* SKL */
+ case 0x8E: /* KBL */
+ case 0x9E: /* KBL */
crystal_khz = 24000; /* 24.0 MHz */
break;
+ case 0x55: /* SKX */
+ crystal_khz = 25000; /* 25.0 MHz */
+ break;
case 0x5C: /* BXT */
crystal_khz = 19200; /* 19.2 MHz */
break;
+ default:
+ crystal_khz = 0;
+
}
}
--
1.7.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Add additional Intel CPU models to crystal_khz whitelist
2016-09-09 15:18 [PATCH] Add additional Intel CPU models to crystal_khz whitelist Prarit Bhargava
@ 2016-09-10 6:35 ` Thomas Gleixner
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Gleixner @ 2016-09-10 6:35 UTC (permalink / raw)
To: Prarit Bhargava
Cc: linux-kernel, Ingo Molnar, H. Peter Anvin, x86, Rafael Aquini,
Peter Zijlstra (Intel),
Andy Lutomirski, Len Brown, lenb
On Fri, 9 Sep 2016, Prarit Bhargava wrote:
> In commit aa297292d708 ("x86/tsc: Enumerate SKL cpu_khz and tsc_khz via
You cite a commit here, which is nice. If you look at the commit message
then you will notice that _before_ the sentence describing the commit there
is a prefix, which denotes the subsystem to which this patch applies. But
you insist on sending patches w/o a prefix.
Can you please stop this? It's annoying because I have to figure out where
the patch belongs to and have to edit the subject line before applying the
patch.
> @@ -688,11 +688,19 @@ unsigned long native_calibrate_tsc(void)
> switch (boot_cpu_data.x86_model) {
> case 0x4E: /* SKL */
> case 0x5E: /* SKL */
> + case 0x8E: /* KBL */
> + case 0x9E: /* KBL */
asm/intel-family.h provides proper defines for this. And before you add
those, please make a seperate patch which converts the existing hex
constants to the defines.
Thanks,
tglx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-10 6:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-09 15:18 [PATCH] Add additional Intel CPU models to crystal_khz whitelist Prarit Bhargava
2016-09-10 6:35 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).