From ae4dd354e3366b76e4d95d16013cdd7544334b51a566aeb2d1e87ec51e392bf1 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Tue, 13 Nov 2012 11:27:12 +0000 Subject: [PATCH] - Rename SandyBridge monitor to IvyBridge if CPU is an IvyBridge OBS-URL: https://build.opensuse.org/package/show/hardware/cpupower?expand=0&rev=19 --- cpupower-ivy_bridge_support.patch | 26 +++++++++++++++++--------- cpupower.changes | 5 +++++ cpupower.spec | 1 - 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/cpupower-ivy_bridge_support.patch b/cpupower-ivy_bridge_support.patch index af16156..99abf29 100644 --- a/cpupower-ivy_bridge_support.patch +++ b/cpupower-ivy_bridge_support.patch @@ -7,10 +7,15 @@ Git-repo: gitolite@ra.kernel.org:/pub/scm/linux/kernel/git/trenn/cpupower Signed-off-by: Thomas Renninger -diff --git a/utils/helpers/cpuid.c b/utils/helpers/cpuid.c -index 906895d..93b0aa7 100644 ---- a/utils/helpers/cpuid.c -+++ b/utils/helpers/cpuid.c +--- + 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 @@ -158,6 +158,8 @@ out: cpu_info->caps |= CPUPOWER_CAP_HAS_TURBO_RATIO; case 0x2A: /* SNB */ @@ -20,11 +25,11 @@ index 906895d..93b0aa7 100644 cpu_info->caps |= CPUPOWER_CAP_HAS_TURBO_RATIO; cpu_info->caps |= CPUPOWER_CAP_IS_SNB; break; -diff --git a/utils/idle_monitor/snb_idle.c b/utils/idle_monitor/snb_idle.c -index a1bc07c..a99b43b 100644 ---- a/utils/idle_monitor/snb_idle.c -+++ b/utils/idle_monitor/snb_idle.c -@@ -150,9 +150,15 @@ static struct cpuidle_monitor *snb_register(void) +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 || cpupower_cpu_info.family != 6) return NULL; @@ -33,8 +38,11 @@ index a1bc07c..a99b43b 100644 + switch (cpupower_cpu_info.model) { + case 0x2A: /* SNB */ + case 0x2D: /* SNB Xeon */ ++ /* Monitor named SandyBridge by default */ ++ break; + case 0x3A: /* IVB */ + case 0x3E: /* IVB Xeon */ ++ strcpy(intel_snb_monitor.name, "IvyBridge"); + break; + default: return NULL; diff --git a/cpupower.changes b/cpupower.changes index da66190..aa49979 100644 --- a/cpupower.changes +++ b/cpupower.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 13 11:26:27 UTC 2012 - trenn@suse.de + +- Rename SandyBridge monitor to IvyBridge if CPU is an IvyBridge + ------------------------------------------------------------------- Tue Nov 13 11:08:12 UTC 2012 - trenn@suse.de diff --git a/cpupower.spec b/cpupower.spec index 9ad4d0d..5cf5eb6 100644 --- a/cpupower.spec +++ b/cpupower.spec @@ -17,7 +17,6 @@ # - Name: cpupower Url: http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html # Use this as version when things are in mainline kernel