* [PATCH] x86: fix cpu MHz reporting for AMD family 0x11
@ 2008-01-25 12:28 Andreas Herrmann3
2008-01-25 12:41 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Herrmann3 @ 2008-01-25 12:28 UTC (permalink / raw)
To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner; +Cc: linux-kernel
Fix cpu MHz reporting for AMD family 0x11 when powernow-k8 is
disabled.
Just adhere to the CONSTANT_TSC feature bit for AMD CPUs when deciding
whether cpu_khz needs calibration. The additional check for CPU family
is not needed and prevents calibration for future CPUs.
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
---
diff --git a/arch/x86/kernel/time_64.c b/arch/x86/kernel/time_64.c
index 61b17f5..0380795 100644
--- a/arch/x86/kernel/time_64.c
+++ b/arch/x86/kernel/time_64.c
@@ -120,8 +120,7 @@ void __init time_init(void)
cpu_khz = tsc_khz;
if (cpu_has(&boot_cpu_data, X86_FEATURE_CONSTANT_TSC) &&
- boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
- boot_cpu_data.x86 == 16)
+ (boot_cpu_data.x86_vendor == X86_VENDOR_AMD))
cpu_khz = calculate_cpu_khz();
if (unsynchronized_tsc())
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86: fix cpu MHz reporting for AMD family 0x11
2008-01-25 12:28 [PATCH] x86: fix cpu MHz reporting for AMD family 0x11 Andreas Herrmann3
@ 2008-01-25 12:41 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-01-25 12:41 UTC (permalink / raw)
To: Andreas Herrmann3; +Cc: H. Peter Anvin, Thomas Gleixner, linux-kernel
* Andreas Herrmann3 <andreas.herrmann3@amd.com> wrote:
> Fix cpu MHz reporting for AMD family 0x11 when powernow-k8 is
> disabled.
>
> Just adhere to the CONSTANT_TSC feature bit for AMD CPUs when deciding
> whether cpu_khz needs calibration. The additional check for CPU family
> is not needed and prevents calibration for future CPUs.
> cpu_khz = tsc_khz;
> if (cpu_has(&boot_cpu_data, X86_FEATURE_CONSTANT_TSC) &&
> - boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
> - boot_cpu_data.x86 == 16)
> + (boot_cpu_data.x86_vendor == X86_VENDOR_AMD))
> cpu_khz = calculate_cpu_khz();
thanks Andreas, applied!
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-25 12:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-25 12:28 [PATCH] x86: fix cpu MHz reporting for AMD family 0x11 Andreas Herrmann3
2008-01-25 12:41 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox