Skip to content

Commit 32fb480

Browse files
zhang-ruiKAGA-KOKO
authored andcommitted
powercap/intel_rapl: Support multi-die/package
RAPL "package" domains are actually implemented in hardware per-die. Thus, the new multi-die/package systems have mulitple domains within each physical package. Update the intel_rapl driver to be "die aware" -- exporting multiple domains within a single package, when present. No change on single die/package systems. Signed-off-by: Zhang Rui <[email protected]> Signed-off-by: Len Brown <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Ingo Molnar <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/9fcb4719aeb7efccf3bc75ed8dd559e46121649f.1557769318.git.len.brown@intel.com
1 parent aadf7b3 commit 32fb480

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/powercap/intel_rapl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static struct rapl_domain *platform_rapl_domain; /* Platform (PSys) domain */
266266
/* caller to ensure CPU hotplug lock is held */
267267
static struct rapl_package *rapl_find_package_domain(int cpu)
268268
{
269-
int id = topology_physical_package_id(cpu);
269+
int id = topology_logical_die_id(cpu);
270270
struct rapl_package *rp;
271271

272272
list_for_each_entry(rp, &rapl_packages, plist) {
@@ -1459,7 +1459,7 @@ static void rapl_remove_package(struct rapl_package *rp)
14591459
/* called from CPU hotplug notifier, hotplug lock held */
14601460
static struct rapl_package *rapl_add_package(int cpu)
14611461
{
1462-
int id = topology_physical_package_id(cpu);
1462+
int id = topology_logical_die_id(cpu);
14631463
struct rapl_package *rp;
14641464
int ret;
14651465

0 commit comments

Comments
 (0)