2012-11-13 12:08:56 +01:00
|
|
|
From: Thomas Renninger <trenn@suse.de>
|
|
|
|
Subject: cpupower: IvyBridge (0x3a and 0x3e models) support
|
|
|
|
References: fate#313856
|
|
|
|
Patch-Mainline: Queued in subsystem tree (see Git-Repo:)
|
|
|
|
Git-commit: 7f163b1bd6e3f7bfa648069770acf2c8fe3d9097
|
|
|
|
Git-repo: gitolite@ra.kernel.org:/pub/scm/linux/kernel/git/trenn/cpupower
|
|
|
|
|
|
|
|
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
|
|
|
|
2012-11-13 12:27:12 +01:00
|
|
|
---
|
|
|
|
utils/helpers/cpuid.c | 2 ++
|
|
|
|
utils/idle_monitor/snb_idle.c | 13 +++++++++++--
|
|
|
|
2 files changed, 13 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
Index: cpupower-3.4.rc6/utils/helpers/cpuid.c
|
|
|
|
===================================================================
|
|
|
|
--- cpupower-3.4.rc6.orig/utils/helpers/cpuid.c
|
|
|
|
+++ cpupower-3.4.rc6/utils/helpers/cpuid.c
|
2012-11-13 12:08:56 +01:00
|
|
|
@@ -158,6 +158,8 @@ out:
|
|
|
|
cpu_info->caps |= CPUPOWER_CAP_HAS_TURBO_RATIO;
|
|
|
|
case 0x2A: /* SNB */
|
|
|
|
case 0x2D: /* SNB Xeon */
|
|
|
|
+ case 0x3A: /* IVB */
|
|
|
|
+ case 0x3E: /* IVB Xeon */
|
|
|
|
cpu_info->caps |= CPUPOWER_CAP_HAS_TURBO_RATIO;
|
|
|
|
cpu_info->caps |= CPUPOWER_CAP_IS_SNB;
|
|
|
|
break;
|
2012-11-13 12:27:12 +01:00
|
|
|
Index: cpupower-3.4.rc6/utils/idle_monitor/snb_idle.c
|
|
|
|
===================================================================
|
|
|
|
--- cpupower-3.4.rc6.orig/utils/idle_monitor/snb_idle.c
|
|
|
|
+++ cpupower-3.4.rc6/utils/idle_monitor/snb_idle.c
|
|
|
|
@@ -150,9 +150,18 @@ static struct cpuidle_monitor *snb_regis
|
2012-11-13 12:08:56 +01:00
|
|
|
|| cpupower_cpu_info.family != 6)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
- if (cpupower_cpu_info.model != 0x2A
|
|
|
|
- && cpupower_cpu_info.model != 0x2D)
|
|
|
|
+ switch (cpupower_cpu_info.model) {
|
|
|
|
+ case 0x2A: /* SNB */
|
|
|
|
+ case 0x2D: /* SNB Xeon */
|
2012-11-13 12:27:12 +01:00
|
|
|
+ /* Monitor named SandyBridge by default */
|
|
|
|
+ break;
|
2012-11-13 12:08:56 +01:00
|
|
|
+ case 0x3A: /* IVB */
|
|
|
|
+ case 0x3E: /* IVB Xeon */
|
2012-11-13 12:27:12 +01:00
|
|
|
+ strcpy(intel_snb_monitor.name, "IvyBridge");
|
2012-11-13 12:08:56 +01:00
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
return NULL;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
is_valid = calloc(cpu_count, sizeof(int));
|
|
|
|
for (num = 0; num < SNB_CSTATE_COUNT; num++) {
|