diff mbox

cpupower: Fix turbo frequency reporting for pre-Sandy Bridge cores

Message ID 20170410232944.GA4152@decadent.org.uk (mailing list archive)
State Mainlined
Delegated to: Rafael Wysocki
Headers show

Commit Message

Ben Hutchings April 10, 2017, 11:29 p.m. UTC
The switch that conditionally sets CPUPOWER_CAP_HAS_TURBO_RATIO and
CPUPOWER_CAP_IS_SNB flags is missing a break, so all cores get both
flags set and an assumed base clock of 100 MHz for turbo values.

Reported-by: GSR <gsr.bugs@infernal-iceberg.com>
Tested-by: GSR <gsr.bugs@infernal-iceberg.com>
References: https://bugs.debian.org/859978
Fixes: 8fb2e440b223 ("cpupower: Show Intel turbo ratio support via ...")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 tools/power/cpupower/utils/helpers/cpuid.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Renninger April 11, 2017, 12:36 p.m. UTC | #1
Hi Ben,

good catch, thanks!
Could you resubmit adding my Signed-off-by, please.
Rafael could directly pick it up then?

> Reported-by: GSR <gsr.bugs@infernal-iceberg.com>
> Tested-by: GSR <gsr.bugs@infernal-iceberg.com>

These seem not to make much sense, at least not in the kernel changelog?
Ben Hutchings April 11, 2017, 2:17 p.m. UTC | #2
On Tue, 2017-04-11 at 14:36 +0200, Thomas Renninger wrote:
> Hi Ben,
> 
> good catch, thanks!
> Could you resubmit adding my Signed-off-by, please.
> Rafael could directly pick it up then?

That doesn't make sense.  You should add a Signed-off-by if *you* send
it on.  Otherwise Rafael or I can add an Acked-by.

> > Reported-by: GSR <gsr.bugs@infernal-iceberg.com>
> > Tested-by: GSR <gsr.bugs@infernal-iceberg.com>
> 
> These seem not to make much sense, at least not in the kernel
> changelog?

I don't see why not.

Ben.
diff mbox

Patch

diff --git a/tools/power/cpupower/utils/helpers/cpuid.c b/tools/power/cpupower/utils/helpers/cpuid.c
index 93b0aa74ca03..39c2c7d067bb 100644
--- a/tools/power/cpupower/utils/helpers/cpuid.c
+++ b/tools/power/cpupower/utils/helpers/cpuid.c
@@ -156,6 +156,7 @@  int get_cpu_info(unsigned int cpu, struct cpupower_cpu_info *cpu_info)
 					 */
 			case 0x2C:	/* Westmere EP - Gulftown */
 				cpu_info->caps |= CPUPOWER_CAP_HAS_TURBO_RATIO;
+				break;
 			case 0x2A:	/* SNB */
 			case 0x2D:	/* SNB Xeon */
 			case 0x3A:	/* IVB */