summaryrefslogtreecommitdiff
path: root/tools/power/cpupower/utils/helpers/cpuid.c
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2011-07-21 13:54:53 +0400
committerDominik Brodowski <linux@dominikbrodowski.net>2011-07-29 21:37:25 +0400
commit8fb2e440b223b966f74a04a48f6f71f288fa671b (patch)
tree3a9f2c19c039072d0b2641385bf0e6897bed2361 /tools/power/cpupower/utils/helpers/cpuid.c
parent76b659a31df5174d71832b7882ef31b32e1f8d59 (diff)
downloadlinux-8fb2e440b223b966f74a04a48f6f71f288fa671b.tar.xz
cpupower: Show Intel turbo ratio support via ./cpupower frequency-info
This adds the last piece missing from turbostat (if called with -v). It shows on Intel machines supporting Turbo Boost how many cores have to be active/idle to enter which boost mode (frequency). Whether the HW really enters these boost modes can be verified via ./cpupower monitor. Signed-off-by: Thomas Renninger <trenn@suse.de> CC: lenb@kernel.org CC: linux@dominikbrodowski.net CC: cpufreq@vger.kernel.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'tools/power/cpupower/utils/helpers/cpuid.c')
-rw-r--r--tools/power/cpupower/utils/helpers/cpuid.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/tools/power/cpupower/utils/helpers/cpuid.c b/tools/power/cpupower/utils/helpers/cpuid.c
index 944b2c1659d8..a97f091fcf2b 100644
--- a/tools/power/cpupower/utils/helpers/cpuid.c
+++ b/tools/power/cpupower/utils/helpers/cpuid.c
@@ -130,10 +130,37 @@ out:
cpu_info->caps |= CPUPOWER_CAP_AMD_CBP;
}
- /* Intel's perf-bias MSR support */
if (cpu_info->vendor == X86_VENDOR_INTEL) {
+ /* Intel's perf-bias MSR support */
if (cpuid_level >= 6 && (cpuid_ecx(6) & (1 << 3)))
cpu_info->caps |= CPUPOWER_CAP_PERF_BIAS;
+
+ /* Intel's Turbo Ratio Limit support */
+ if (cpu_info->family == 6) {
+ switch (cpu_info->model) {
+ case 0x1A: /* Core i7, Xeon 5500 series
+ * Bloomfield, Gainstown NHM-EP
+ */
+ case 0x1E: /* Core i7 and i5 Processor
+ * Clarksfield, Lynnfield, Jasper Forest
+ */
+ case 0x1F: /* Core i7 and i5 Processor - Nehalem */
+ case 0x25: /* Westmere Client
+ * Clarkdale, Arrandale
+ */
+ case 0x2C: /* Westmere EP - Gulftown */
+ cpu_info->caps |= CPUPOWER_CAP_HAS_TURBO_RATIO;
+ case 0x2A: /* SNB */
+ case 0x2D: /* SNB Xeon */
+ cpu_info->caps |= CPUPOWER_CAP_HAS_TURBO_RATIO;
+ cpu_info->caps |= CPUPOWER_CAP_IS_SNB;
+ break;
+ case 0x2E: /* Nehalem-EX Xeon - Beckton */
+ case 0x2F: /* Westmere-EX Xeon - Eagleton */
+ default:
+ break;
+ }
+ }
}
/* printf("ID: %u - Extid: 0x%x - Caps: 0x%llx\n",