* [PATCH] powercap / RAPL: disable the 2nd power limit properly
@ 2015-08-19 5:26 Seiichi Ikarashi
0 siblings, 0 replies; only message in thread
From: Seiichi Ikarashi @ 2015-08-19 5:26 UTC (permalink / raw)
To: Rafael J. Wysocki, Jacob Pan; +Cc: linux-pm
Let rapl_unregister_powercap() disable the second power limit
only if it exists.
Intel64 SDM Vol.3 14.9 says that the package domain has it
but neither the power plane domain nor the DRAM domain has it.
Signed-off-by: Seiichi Ikarashi <s.ikarashi@jp.fujitsu.com>
---
drivers/powercap/intel_rapl.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c
index 482b22d..314fb5c 100644
--- a/drivers/powercap/intel_rapl.c
+++ b/drivers/powercap/intel_rapl.c
@@ -1145,9 +1145,11 @@ static int rapl_unregister_powercap(void)
pr_debug("remove package, undo power limit on %d: %s\n",
rp->id, rd->name);
rapl_write_data_raw(rd, PL1_ENABLE, 0);
- rapl_write_data_raw(rd, PL2_ENABLE, 0);
rapl_write_data_raw(rd, PL1_CLAMP, 0);
- rapl_write_data_raw(rd, PL2_CLAMP, 0);
+ if (find_nr_power_limit(rd) > 1) {
+ rapl_write_data_raw(rd, PL2_ENABLE, 0);
+ rapl_write_data_raw(rd, PL2_CLAMP, 0);
+ }
if (rd->id == RAPL_DOMAIN_PACKAGE) {
rd_package = rd;
continue;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-19 5:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-19 5:26 [PATCH] powercap / RAPL: disable the 2nd power limit properly Seiichi Ikarashi
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.