mirror of https://gitee.com/openkylin/linux.git
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 <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Ingo Molnar <mingo@kernel.org> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: linux-pm@vger.kernel.org Link: https://lkml.kernel.org/r/9fcb4719aeb7efccf3bc75ed8dd559e46121649f.1557769318.git.len.brown@intel.com
This commit is contained in:
parent
aadf7b3833
commit
32fb480e0a
|
@ -266,7 +266,7 @@ static struct rapl_domain *platform_rapl_domain; /* Platform (PSys) domain */
|
|||
/* caller to ensure CPU hotplug lock is held */
|
||||
static struct rapl_package *rapl_find_package_domain(int cpu)
|
||||
{
|
||||
int id = topology_physical_package_id(cpu);
|
||||
int id = topology_logical_die_id(cpu);
|
||||
struct rapl_package *rp;
|
||||
|
||||
list_for_each_entry(rp, &rapl_packages, plist) {
|
||||
|
@ -1459,7 +1459,7 @@ static void rapl_remove_package(struct rapl_package *rp)
|
|||
/* called from CPU hotplug notifier, hotplug lock held */
|
||||
static struct rapl_package *rapl_add_package(int cpu)
|
||||
{
|
||||
int id = topology_physical_package_id(cpu);
|
||||
int id = topology_logical_die_id(cpu);
|
||||
struct rapl_package *rp;
|
||||
int ret;
|
||||
|
||||
|
|
Loading…
Reference in New Issue