2018-02-13 19:14:03

by Matt Turner

[permalink] [raw]
Subject: [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")
Signed-off-by: Matt Turner <[email protected]>
---
tools/power/x86/turbostat/turbostat.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index bd9c6b31a504..e55dc2e626c4 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -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);

--
2.13.6



2018-02-13 19:14:47

by Matt Turner

[permalink] [raw]
Subject: [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")
Signed-off-by: Matt Turner <[email protected]>
---
arch/x86/include/asm/msr-index.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index c9084dedfcfa..5c6aa44568c4 100644
--- a/arch/x86/include/asm/msr-index.h
+++ b/arch/x86/include/asm/msr-index.h
@@ -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

--
2.13.6


2018-02-14 08:14:26

by Ingo Molnar

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


* Matt Turner <[email protected]> wrote:

> 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")
> Signed-off-by: Matt Turner <[email protected]>

Acked-by: Ingo Molnar <[email protected]>

Thanks,

Ingo

2018-04-07 22:28:50

by Matt Turner

[permalink] [raw]
Subject: Re: [PATCH 1/2] tools/power turbostat: Correct SNB_C1/C3_AUTO_UNDEMOTE defines

On Tue, Feb 13, 2018 at 11:12 AM, Matt Turner <[email protected]> wrote:
> 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")
> Signed-off-by: Matt Turner <[email protected]>

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

2018-04-07 23:50:44

by Brown, Len

[permalink] [raw]
Subject: RE: [PATCH 1/2] tools/power turbostat: Correct SNB_C1/C3_AUTO_UNDEMOTE defines

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

On Tue, Feb 13, 2018 at 11:12 AM, Matt Turner <[email protected]> wrote:
> 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")
> Signed-off-by: Matt Turner <[email protected]>

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