x86: fix cpu MHz reporting for AMD family 0x11
PATCH 1/1 x86: fix cpu MHz reporting for AMD family 0x11
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 <[email protected]>
---
arch/x86/kernel/time_64.c +1 -2
@@ -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 ())
arch/x86/kernel/time_64.c void __init time_init(void) · line 124
Quoted 13 lines · * Andreas Herrmann3 <[email protected]> wrote:
Fix cpu MHz reporting for AMD family
0x11when powernow-k8 is disabled.Just adhere to the
CONSTANT_TSCfeature bit for AMD CPUs when deciding whethercpu_khzneeds calibration. The additional check for CPU family is not needed and prevents calibration for future CPUs.arch/x86/kernel/time_64.c +1
-2cpu_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