Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 519efbc0 authored by Andreas Herrmann3's avatar Andreas Herrmann3 Committed by Ingo Molnar
Browse files

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: default avatarAndreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent cd7d72bb
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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())