提交 5021282c 编写于 作者: S Seiichi Ikarashi 提交者: Rafael J. Wysocki

powercap / RAPL: disable the 2nd power limit properly

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: NSeiichi Ikarashi <s.ikarashi@jp.fujitsu.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 4e0bec9e
...@@ -1147,9 +1147,11 @@ static int rapl_unregister_powercap(void) ...@@ -1147,9 +1147,11 @@ static int rapl_unregister_powercap(void)
pr_debug("remove package, undo power limit on %d: %s\n", pr_debug("remove package, undo power limit on %d: %s\n",
rp->id, rd->name); rp->id, rd->name);
rapl_write_data_raw(rd, PL1_ENABLE, 0); 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, 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) { if (rd->id == RAPL_DOMAIN_PACKAGE) {
rd_package = rd; rd_package = rd;
continue; continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册