From: Dominik Brodowski <linux@dominikbrodowski.net>
To: cpufreq@vger.kernel.org
Cc: Thomas Renninger <trenn@suse.de>,
Andreas Herrmann <herrmann.der.user@googlemail.com>,
Dominik Brodowski <linux@dominikbrodowski.net>
Subject: [PATCH 02/13] cpupower: AMD fam14h/Ontario monitor can also be used by fam12h cpus
Date: Sun, 25 Mar 2012 20:38:43 +0200 [thread overview]
Message-ID: <1332700734-26435-2-git-send-email-linux@dominikbrodowski.net> (raw)
In-Reply-To: <1332700734-26435-1-git-send-email-linux@dominikbrodowski.net>
From: Thomas Renninger <trenn@suse.de>
The name of the monitor is updated at runtime to the name of the
CPU type.
Signed-off-by: Thomas Renninger <trenn@suse.de>
CC: Andreas Herrmann <herrmann.der.user@googlemail.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
---
tools/power/cpupower/man/cpupower-monitor.1 | 2 +-
.../cpupower/utils/idle_monitor/amd_fam14h_idle.c | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/tools/power/cpupower/man/cpupower-monitor.1 b/tools/power/cpupower/man/cpupower-monitor.1
index d5cfa26..1141c20 100644
--- a/tools/power/cpupower/man/cpupower-monitor.1
+++ b/tools/power/cpupower/man/cpupower-monitor.1
@@ -107,7 +107,7 @@ Deepest package sleep states may in reality show up as machine/platform wide
sleep states and can only be entered if all cores are idle. Look up Intel
manuals (some are provided in the References section) for further details.
-.SS "Ontario" "Liano"
+.SS "Fam_12h" "Fam_14h"
AMD laptop and desktop processor (family 12h and 14h) sleep state counters.
The registers are accessed via PCI and therefore can still be read out while
cores have been offlined.
diff --git a/tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c b/tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c
index 108108d..2116df9 100644
--- a/tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c
+++ b/tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c
@@ -281,13 +281,13 @@ struct cpuidle_monitor *amd_fam14h_register(void)
if (cpupower_cpu_info.vendor != X86_VENDOR_AMD)
return NULL;
- if (cpupower_cpu_info.family == 0x14) {
- if (cpu_count <= 0 || cpu_count > 2) {
- fprintf(stderr, "AMD fam14h: Invalid cpu count: %d\n",
- cpu_count);
- return NULL;
- }
- } else
+ if (cpupower_cpu_info.family == 0x14)
+ strncpy(amd_fam14h_monitor.name, "Fam_14h",
+ MONITOR_NAME_LEN - 1);
+ else if (cpupower_cpu_info.family == 0x12)
+ strncpy(amd_fam14h_monitor.name, "Fam_12h",
+ MONITOR_NAME_LEN - 1);
+ else
return NULL;
/* We do not alloc for nbp1 machine wide counter */
@@ -322,7 +322,7 @@ static void amd_fam14h_unregister(void)
}
struct cpuidle_monitor amd_fam14h_monitor = {
- .name = "Ontario",
+ .name = "",
.hw_states = amd_fam14h_cstates,
.hw_states_num = AMD_FAM14H_STATE_NUM,
.start = amd_fam14h_start,
--
1.7.5.4
next prev parent reply other threads:[~2012-03-25 18:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-25 18:38 [git pull] cpupowerutils updates for 3.4 Dominik Brodowski
2012-03-25 18:38 ` [PATCH 01/13] cpupower: Better interface for accessing AMD pci registers Dominik Brodowski
2012-03-25 18:38 ` Dominik Brodowski [this message]
2012-03-25 18:38 ` [PATCH 03/13] cpupower: Add cpupower-idle-info manpage Dominik Brodowski
2012-03-25 18:38 ` [PATCH 04/13] cpupower: Unify cpupower-frequency-* manpages Dominik Brodowski
2012-03-25 18:38 ` [PATCH 05/13] cpupower: Fix number of idle states Dominik Brodowski
2012-03-25 18:38 ` [PATCH 06/13] cpupower: Remove unneeded code and by that fix a memleak Dominik Brodowski
2012-03-25 18:38 ` [PATCH 07/13] cpupower: Fix linking with --as-needed Dominik Brodowski
2012-03-25 18:38 ` [PATCH 08/13] cpupower tool: remove use of undefined variables from the clean target of the top makefile Dominik Brodowski
2012-03-25 18:38 ` [PATCH 09/13] cpupower tool: makefile: simplify the recipe used to generate cpupower.pot target Dominik Brodowski
2012-03-25 18:38 ` [PATCH 10/13] cpupower tool: allow to build in a separate directory Dominik Brodowski
2012-03-25 18:38 ` [PATCH 11/13] cpupower: Fix broken mask values Dominik Brodowski
2012-03-25 18:38 ` [PATCH 12/13] cpupower tools: allow to build debug tools in a separate directory too Dominik Brodowski
2012-03-25 18:38 ` [PATCH 13/13] cpupower tools: add install target to the debug tools' makefiles Dominik Brodowski
2012-03-29 5:23 ` [git pull] cpupowerutils updates for 3.4 Dominik Brodowski
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=1332700734-26435-2-git-send-email-linux@dominikbrodowski.net \
--to=linux@dominikbrodowski.net \
--cc=cpufreq@vger.kernel.org \
--cc=herrmann.der.user@googlemail.com \
--cc=trenn@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).