tools/power turbostat: Fix AMD RAPL regression

turbostat.c:8688: rapl_perf_init: Assertion `next_domain < num_domains' failed.

Two recent cleanup patches that were not supposed to change anything
broke the core_id code needed for AMD RAPL initialization:

commit 070e92361eec ("tools/power turbostat: Enhance HT enumeration")
commit ddf60e38ca04 ("tools/power turbostat: Simplify global core_id calculation")

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>

+1 -2
+1 -2
tools/power/x86/turbostat/turbostat.c
··· 5164 5164 if (!platform->has_per_core_rapl) 5165 5165 return cpus[cpu].package_id; 5166 5166 5167 - return GLOBAL_CORE_ID(cpu, cpus[cpu].package_id); 5167 + return GLOBAL_CORE_ID(cpus[cpu].core_id, cpus[cpu].package_id); 5168 5168 } 5169 5169 5170 5170 /* ··· 9633 9633 } 9634 9634 topo.max_core_id = max_core_id; /* within a package */ 9635 9635 topo.max_package_id = max_package_id; 9636 - topo.num_cores = (max_core_id + 1) * topo.num_packages; /* per system */ 9637 9636 9638 9637 topo.cores_per_node = max_core_id + 1; 9639 9638 if (debug > 1)