Re: [Powertop] [PATCH] Fixed cpu_core::has_c1_res initialization.
David Rosca <nowrep at gmail.com>
| Newsgroups | dev.linux.lists.powertop |
|---|---|
| Message-ID | <CAM7PDojA73CEVeR39a6ndkXYcc1G_ypVe4+nHbOd8_EjYYkopg@mail.gmail.com> |
Oops, gmail screw it ...
Hope it will be ok this time:
PS: Sorry, I sent the first reply only to Sergey.
Signed-off-by: David Rosca <nowrep(a)gmail.com>
---
src/cpu/intel_cpus.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp
index 3348dba..6330b6f 100644
--- a/src/cpu/intel_cpus.cpp
+++ b/src/cpu/intel_cpus.cpp
@@ -101,8 +101,10 @@ nhm_core::nhm_core(int model)
if (model == 0x37) {
has_c3_res = 0;
has_c1_res = 1;
- } else
+ } else {
has_c3_res = 1;
+ has_c1_res = 0;
+ }
}
void nhm_core::measurement_start(
void)
--
1.8.4.rc3
2013/10/13 Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>
> On (10/13/13 12:45), David Rosca wrote:
> > Date: Sun, 13 Oct 2013 12:45:05 +0200
> > From: David Rosca <nowrep(a)gmail.com>
> > To: powertop(a)lists.01.org
> > Subject: [Powertop] [PATCH] Fixed cpu_core::has_c1_res initialization.
> >
> > This is regression from 8d6e716
> >
> > cpu_core::has_c1_res is left uninitialized for anything other than
> BYT-M,
> > resulting in error at startup:
> >
> > unknown op '{'
> > read_msr cpu0 0x660 : Argument list too long.
> >
> > Signed-off-by: David Rosca <[1]nowrep(a)gmail.com>
> >
> > ---
> > src/cpu/intel_cpus.cpp | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp
> > index 3348dba..6330b6f 100644
> > --- a/src/cpu/intel_cpus.cpp
> > +++ b/src/cpu/intel_cpus.cpp
> > @@ -101,8 +101,10 @@ nhm_core::nhm_core(int model)
> > if (model == 0x37) {
> > has_c3_res = 0;
> > has_c1_res = 1;
> > - } else
> > + } else {
> > has_c3_res = 1;
> > + has_c1_res = 0;
> ^^^^^^^^^^^^^^^^
>
> > + }
> ^^^^^^
> > }
>
> good catch.
>
> could you please use original code indentation?
>
> -ss
>
> >
> > void nhm_core::measurement_start(void)
> > --
> > 1.8.4.rc3
> >
> > References
> >
> > Visible links
> > 1. mailto:nowrep(a)gmail.com
>
> > _______________________________________________
> > PowerTop mailing list
> > PowerTop(a)lists.01.org
> > https://lists.01.org/mailman/listinfo/powertop
>
>
attachment.html
(text/html, 3.5 KB)
<div dir="ltr"><div><div>Oops, gmail screw it ...<br></div>Hope it will be ok this time:<br><br></div>PS: Sorry, I sent the first reply only to Sergey.<br><div><br>Signed-off-by: David Rosca <<a href="mailto:[email protected]" target="_blank">[email protected]</a>><div class="im"> <br><br>---<br> src/cpu/intel_cpus.cpp | 4 +++-<br> 1 file changed, 3 insertions(+), 1 deletion(-)<br><br>diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp<br> index 3348dba..6330b6f 100644<br>--- a/src/cpu/intel_cpus.cpp<br>+++ b/src/cpu/intel_cpus.cpp<br>@@ -101,8 +101,10 @@ nhm_core::nhm_core(int model)<br> if (model == 0x37) {<br> has_c3_res = 0;<br> has_c1_res = 1;<br> - } else<br>+ } else {<br> has_c3_res = 1;<br>+ has_c1_res = 0;<br></div>+ }<br> }<br> <br> void nhm_core::measurement_start(<div dir="ltr">void)<br>--<br>1.8.4.rc3</div></div></div><div class="gmail_extra"> <br><br><div class="gmail_quote">2013/10/13 Sergey Senozhatsky <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> On (10/13/13 12:45), David Rosca wrote:<br> > Date: Sun, 13 Oct 2013 12:45:05 +0200<br> > From: David Rosca <<a href="mailto:[email protected]">[email protected]</a>><br> > To: <a href="mailto:[email protected]">[email protected]</a><br> > Subject: [Powertop] [PATCH] Fixed cpu_core::has_c1_res initialization.<br> <div class="im">><br> > This is regression from 8d6e716<br> ><br> > cpu_core::has_c1_res is left uninitialized for anything other than BYT-M,<br> > resulting in error at startup:<br> ><br> > unknown op '{'<br> > read_msr cpu0 0x660 : Argument list too long.<br> ><br> </div>> Signed-off-by: David Rosca <[1]<a href="mailto:[email protected]">[email protected]</a>><br> <div class="im">><br> > ---<br> > src/cpu/intel_cpus.cpp | 4 +++-<br> > 1 file changed, 3 insertions(+), 1 deletion(-)<br> ><br> > diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp<br> > index 3348dba..6330b6f 100644<br> > --- a/src/cpu/intel_cpus.cpp<br> > +++ b/src/cpu/intel_cpus.cpp<br> > @@ -101,8 +101,10 @@ nhm_core::nhm_core(int model)<br> > if (model == 0x37) {<br> > has_c3_res = 0;<br> > has_c1_res = 1;<br> > - } else<br> > + } else {<br> > has_c3_res = 1;<br> > + has_c1_res = 0;<br> </div> ^^^^^^^^^^^^^^^^<br> <br> > + }<br> ^^^^^^<br> > }<br> <br> good catch.<br> <br> could you please use original code indentation?<br> <br> -ss<br> <div class="im"><br> > <br> > void nhm_core::measurement_start(void)<br> > --<br> > 1.8.4.rc3<br> ><br> </div>> References<br> ><br> > Visible links<br> > 1. mailto:<a href="mailto:[email protected]">[email protected]</a><br> <br> > _______________________________________________<br> > PowerTop mailing list<br> > <a href="mailto:[email protected]">[email protected]</a><br> > <a href="https://lists.01.org/mailman/listinfo/powertop" target="_blank">https://lists.01.org/mailman/listinfo/powertop</a><br> <br> </blockquote></div><br></div>