All of lore.kernel.org
 help / color / mirror / Atom feed
* [Powertop] [PATCH] Fixed cpu_core::has_c1_res initialization.
@ 2013-10-13 10:45 David Rosca
  0 siblings, 0 replies; 4+ messages in thread
From: David Rosca @ 2013-10-13 10:45 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 816 bytes --]

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 <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

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 1006 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Powertop] [PATCH] Fixed cpu_core::has_c1_res initialization.
@ 2013-10-13 18:14 Sergey Senozhatsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sergey Senozhatsky @ 2013-10-13 18:14 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 3607 bytes --]

On (10/13/13 19:41), David Rosca wrote:
>    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 <[1]nowrep(a)gmail.com>

thanks. will add to -next tree.

	-ss

>    ---
>     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 <[2]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 <[3]nowrep(a)gmail.com>
>      > To: [4]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][5]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:[6]nowrep(a)gmail.com
> 
>      > _______________________________________________
>      > PowerTop mailing list
>      > [7]PowerTop(a)lists.01.org
>      > [8]https://lists.01.org/mailman/listinfo/powertop
> 
> References
> 
>    Visible links
>    1. mailto:nowrep(a)gmail.com
>    2. mailto:sergey.senozhatsky(a)gmail.com
>    3. mailto:nowrep(a)gmail.com
>    4. mailto:powertop(a)lists.01.org
>    5. mailto:nowrep(a)gmail.com
>    6. mailto:nowrep(a)gmail.com
>    7. mailto:PowerTop(a)lists.01.org
>    8. https://lists.01.org/mailman/listinfo/powertop

> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Powertop] [PATCH] Fixed cpu_core::has_c1_res initialization.
@ 2013-10-13 17:41 David Rosca
  0 siblings, 0 replies; 4+ messages in thread
From: David Rosca @ 2013-10-13 17:41 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 2422 bytes --]

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 #2: attachment.html --]
[-- Type: text/html, Size: 3622 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Powertop] [PATCH] Fixed cpu_core::has_c1_res initialization.
@ 2013-10-13 14:30 Sergey Senozhatsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sergey Senozhatsky @ 2013-10-13 14:30 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-13 18:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-13 10:45 [Powertop] [PATCH] Fixed cpu_core::has_c1_res initialization David Rosca
2013-10-13 14:30 Sergey Senozhatsky
2013-10-13 17:41 David Rosca
2013-10-13 18:14 Sergey Senozhatsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.