powercap: intel_rapl: Use topology interface in rapl_init_domains()
It's not a good idea to access the phys_proc_id of cpuinfo directly. Use topology_physical_package_id(cpu) instead. Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com> [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
88ffce9576
commit
65348ba259
drivers/powercap
|
@ -547,7 +547,7 @@ static void rapl_init_domains(struct rapl_package *rp)
|
|||
|
||||
if (i == RAPL_DOMAIN_PLATFORM && rp->id > 0) {
|
||||
snprintf(rd->name, RAPL_DOMAIN_NAME_LENGTH, "psys-%d",
|
||||
cpu_data(rp->lead_cpu).phys_proc_id);
|
||||
topology_physical_package_id(rp->lead_cpu));
|
||||
} else
|
||||
snprintf(rd->name, RAPL_DOMAIN_NAME_LENGTH, "%s",
|
||||
rapl_domain_names[i]);
|
||||
|
|
Loading…
Reference in New Issue