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 &lt;<a href="mailto:[email protected]" target="_blank">[email protected]</a>&gt;<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">&lt;<a href="mailto:[email protected]" target="_blank">[email protected]</a>&gt;</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>
&gt; Date: Sun, 13 Oct 2013 12:45:05 +0200<br>
&gt; From: David Rosca &lt;<a href="mailto:[email protected]">[email protected]</a>&gt;<br>
&gt; To: <a href="mailto:[email protected]">[email protected]</a><br>
&gt; Subject: [Powertop] [PATCH] Fixed cpu_core::has_c1_res initialization.<br>
<div class="im">&gt;<br>
&gt;    This is regression from 8d6e716<br>
&gt;<br>
&gt;    cpu_core::has_c1_res is left uninitialized for anything other than BYT-M,<br>
&gt;    resulting in error at startup:<br>
&gt;<br>
&gt;      unknown op &#39;{&#39;<br>
&gt;                    read_msr cpu0 0x660 : Argument list too long.<br>
&gt;<br>
</div>&gt;    Signed-off-by: David Rosca &lt;[1]<a href="mailto:[email protected]">[email protected]</a>&gt;<br>
<div class="im">&gt;<br>
&gt;    ---<br>
&gt;     src/cpu/intel_cpus.cpp | 4 +++-<br>
&gt;     1 file changed, 3 insertions(+), 1 deletion(-)<br>
&gt;<br>
&gt;    diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp<br>
&gt;    index 3348dba..6330b6f 100644<br>
&gt;    --- a/src/cpu/intel_cpus.cpp<br>
&gt;    +++ b/src/cpu/intel_cpus.cpp<br>
&gt;    @@ -101,8 +101,10 @@ nhm_core::nhm_core(int model)<br>
&gt;         if (model == 0x37) {<br>
&gt;             has_c3_res = 0;<br>
&gt;             has_c1_res = 1;<br>
&gt;    -    } else<br>
&gt;    +    } else {<br>
&gt;             has_c3_res = 1;<br>
&gt;    +                has_c1_res = 0;<br>
</div>        ^^^^^^^^^^^^^^^^<br>
<br>
&gt;    +        }<br>
        ^^^^^^<br>
&gt;     }<br>
<br>
good catch.<br>
<br>
could you please use original code indentation?<br>
<br>
        -ss<br>
<div class="im"><br>
&gt;     <br>
&gt;     void nhm_core::measurement_start(void)<br>
&gt;    --<br>
&gt;    1.8.4.rc3<br>
&gt;<br>
</div>&gt; References<br>
&gt;<br>
&gt;    Visible links<br>
&gt;    1. mailto:<a href="mailto:[email protected]">[email protected]</a><br>
<br>
&gt; _______________________________________________<br>
&gt; PowerTop mailing list<br>
&gt; <a href="mailto:[email protected]">[email protected]</a><br>
&gt; <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>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.