Skip to contentSkip to conversation

tools/power turbostat: Correct SNB_C1/C3_AUTO_UNDEMOTE defines

PATCH In review Matt Turner 3 participants 5 messages Feb 13, 2018 – Apr 7, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 tools/power turbostat: Correct SNB_C1/C3_AUTO_UNDEMOTE defines

According to the Intel Software Developers' Manual, Vol. 4, Order No. 335592, these macros have been reversed since they were added.

Fixes 889facbee3e6 ("tools/power turbostat: v3.0: monitor Watts and Temperature")
---
 tools/power/x86/turbostat/turbostat.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/power/x86/turbostat/turbostat.c +2 -2
index bd9c6b31a504..e55dc2e626c4 100644
@@ -2071,8 +2071,8 @@ dump_nhm_cst_cfg(void)
 
 	get_msr(base_cpu, MSR_PKG_CST_CONFIG_CONTROL, &msr);
 
-#define SNB_C1_AUTO_UNDEMOTE              (1UL << 27)
-#define SNB_C3_AUTO_UNDEMOTE              (1UL << 28)
+#define SNB_C3_AUTO_UNDEMOTE              (1UL << 27)
+#define SNB_C1_AUTO_UNDEMOTE              (1UL << 28)
 
 	fprintf(outf, "cpu%d: MSR_PKG_CST_CONFIG_CONTROL: 0x%08llx", base_cpu, msr);
 
Signature · 1 line
2.13.6
#1 lore raw

PATCH 2/2 x86: msr-index.h: Correct SNB_C1/C3_AUTO_UNDEMOTE defines

According to the Intel Software Developers' Manual, Vol. 4, Order No. 335592, these macros have been reversed since they were added in the initial turbostat commit. The reversed definitions were presumably copied from turbostat.c to this file.

Fixes 9c63a650bb10 ("tools/power/x86/turbostat: share kernel MSR #defines")
---
 arch/x86/include/asm/msr-index.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/include/asm/msr-index.h +2 -2
index c9084dedfcfa..5c6aa44568c4 100644
@@ -60,8 +60,8 @@
 #define NHM_C3_AUTO_DEMOTE		(1UL << 25)
 #define NHM_C1_AUTO_DEMOTE		(1UL << 26)
 #define ATM_LNC_C6_AUTO_DEMOTE		(1UL << 25)
-#define SNB_C1_AUTO_UNDEMOTE		(1UL << 27)
-#define SNB_C3_AUTO_UNDEMOTE		(1UL << 28)
+#define SNB_C3_AUTO_UNDEMOTE		(1UL << 27)
+#define SNB_C1_AUTO_UNDEMOTE		(1UL << 28)
 
 #define MSR_MTRRcap			0x000000fe
 
Signature · 1 line
2.13.6
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] x86: msr-index.h: Correct SNB_C1/C3_AUTO_UNDEMOTE defines

Quoted 7 lines · Matt Turner

According to the Intel Software Developers' Manual, Vol. 4, Order No. 335592, these macros have been reversed since they were added in the initial turbostat commit. The reversed definitions were presumably copied from turbostat.c to this file.

Fixes 9c63a650bb10 ("tools/power/x86/turbostat: share kernel MSR #defines")

Thanks,

Ingo

#3 lore raw
In reply to Matt Turner
Quoted 5 lines · Matt Turner

According to the Intel Software Developers' Manual, Vol. 4, Order No. 335592, these macros have been reversed since they were added.

Fixes 889facbee3e6 ("tools/power turbostat: v3.0: monitor Watts and Temperature")

Is there something I need to do to ensure these two trivial patches get picked up?

#4 lore raw

You just did it:-)

-----Original Message-----
From: Matt Turner [mailto:[email protected]]
Sent: Saturday, April 07, 2018 6:25 PM
To: Brown, Len <[email protected]>
Cc: Thomas Gleixner <[email protected]>; Ingo Molnar <[email protected]>; H. Peter Anvin <[email protected]>; Borislav Petkov <[email protected]>; LKML <[email protected]>; [email protected]; Matt Turner <[email protected]>
Subject: Re: [PATCH 1/2] tools/power turbostat: Correct SNB_C1/C3_AUTO_UNDEMOTE defines

Quoted 6 lines · Matt Turner

According to the Intel Software Developers' Manual, Vol. 4, Order No. 335592, these macros have been reversed since they were added.

Fixes 889facbee3e6 ("tools/power turbostat: v3.0: monitor Watts and

Temperature")

Is there something I need to do to ensure these two trivial patches get picked up?