From: Len Brown Date: Wed, 6 Apr 2016 21:15:57 +0000 (-0400) Subject: tools/power turbostat: decode BXT TSC frequency via CPUID X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e8efbc80db5e824ce2382d5e65429b6b493e71e2;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git tools/power turbostat: decode BXT TSC frequency via CPUID Hard-code BXT ART to 19200MHz, so turbostat --debug can fully enumerate TSC: CPUID(0x15): eax_crystal: 3 ebx_tsc: 186 ecx_crystal_hz: 0 TSC: 1190 MHz (19200000 Hz * 186 / 3 / 1000000) Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki --- diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 96d8eafdd380..b15c84323b73 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -3278,7 +3278,10 @@ void process_cpuid() switch(model) { case 0x4E: /* SKL */ case 0x5E: /* SKL */ - crystal_hz = 24000000; /* 24 MHz */ + crystal_hz = 24000000; /* 24.0 MHz */ + break; + case 0x5C: /* BXT */ + crystal_hz = 19200000; /* 19.2 MHz */ break; default: crystal_hz = 0;