All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky at gmail.com>
To: powertop@lists.01.org
Subject: [Powertop] [PATCH -next] intel cpus: add proper C-states init
Date: Thu, 17 Oct 2013 23:37:51 +0300	[thread overview]
Message-ID: <20131017203751.GA2280@swordfish> (raw)

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

add missing has_c2c7_res init to nhm_core() .ctor and
has_c8c9c10_res/has_c2c7_res init to nhm_package() .ctor.

uninitialised has_c2c7_res/has_c8c9c10_res/has_c2c7_res
may be used in core/package measurement_start()/measurement_end().

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>

---

src/cpu/intel_cpus.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp
index 194dc75..ad80337 100644
--- a/src/cpu/intel_cpus.cpp
+++ b/src/cpu/intel_cpus.cpp
@@ -87,6 +87,8 @@ static uint64_t get_msr(int cpu, uint64_t offset)
 
 nhm_core::nhm_core(int model)
 {
+	has_c2c7_res = 0;
+
 	switch(model) {
 		case 0x2A:	/* SNB */
 		case 0x2D:	/* SNB Xeon */
@@ -252,6 +254,9 @@ char * nhm_core::fill_pstate_line(int line_nr, char *buffer)
 
 nhm_package::nhm_package(int model)
 {
+	has_c8c9c10_res = 0;
+	has_c2c7_res = 0;
+
 	switch(model) {
 		case 0x2A:	/* SNB */
 		case 0x2D:	/* SNB Xeon */
@@ -269,7 +274,6 @@ nhm_package::nhm_package(int model)
 	else
 		has_c3_res = 1;
 
-
 	/* Haswell-ULT has C8/9/10*/
 	if (model == 0x45)
 		has_c8c9c10_res = 1;


             reply	other threads:[~2013-10-17 20:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-17 20:37 Sergey Senozhatsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-10-18 18:07 [Powertop] [PATCH -next] intel cpus: add proper C-states init Kristen Carlson Accardi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131017203751.GA2280@swordfish \
    --to=powertop@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.