diff options
Diffstat (limited to 'arch/x86/kernel/tsc.c')
| -rw-r--r-- | arch/x86/kernel/tsc.c | 9 | 
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 8ea117f8142e..e169e85db434 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -602,7 +602,6 @@ unsigned long native_calibrate_tsc(void)  		case INTEL_FAM6_KABYLAKE_DESKTOP:  			crystal_khz = 24000;	/* 24.0 MHz */  			break; -		case INTEL_FAM6_SKYLAKE_X:  		case INTEL_FAM6_ATOM_DENVERTON:  			crystal_khz = 25000;	/* 25.0 MHz */  			break; @@ -612,6 +611,8 @@ unsigned long native_calibrate_tsc(void)  		}  	} +	if (crystal_khz == 0) +		return 0;  	/*  	 * TSC frequency determined by CPUID is a "hardware reported"  	 * frequency and is the most accurate one so far we have. This @@ -1315,6 +1316,12 @@ void __init tsc_init(void)  		(unsigned long)cpu_khz / 1000,  		(unsigned long)cpu_khz % 1000); +	if (cpu_khz != tsc_khz) { +		pr_info("Detected %lu.%03lu MHz TSC", +			(unsigned long)tsc_khz / 1000, +			(unsigned long)tsc_khz % 1000); +	} +  	/* Sanitize TSC ADJUST before cyc2ns gets initialized */  	tsc_store_and_check_tsc_adjust(true);  | 
