Skip to content

Commit

Permalink
cpupower: IvyBridge (0x3a and 0x3e models) support
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Thomas Renninger authored and Rafael J. Wysocki committed Nov 27, 2012
1 parent c8cfc3c commit 8d219e3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tools/power/cpupower/utils/helpers/cpuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ int get_cpu_info(unsigned int cpu, struct cpupower_cpu_info *cpu_info)
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;
Expand Down
10 changes: 8 additions & 2 deletions tools/power/cpupower/utils/idle_monitor/snb_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,15 @@ static struct cpuidle_monitor *snb_register(void)
|| 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 */
case 0x3A: /* IVB */
case 0x3E: /* IVB Xeon */
break;
default:
return NULL;
}

is_valid = calloc(cpu_count, sizeof(int));
for (num = 0; num < SNB_CSTATE_COUNT; num++) {
Expand Down

0 comments on commit 8d219e3

Please sign in to comment.