Skip to contentSkip to conversation

perf/x86/intel/uncore: Use boot_cpu_data.logical_proc_id as the pkg id

PATCH In review Masayoshi Mizuma 2 participants 2 messages Sep 21, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 perf/x86/intel/uncore: Use boot_cpu_data.logical_proc_id as the pkg id

From: Masayoshi Mizuma <[email protected]>

Physical package id 0 is not always exists. We should use boot_cpu_data.logical_proc_id directly as the pkg id here.

---
 arch/x86/events/intel/uncore_snbep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/events/intel/uncore_snbep.c +1 -1
index 51d7c11..edaadac 100644
@@ -3061,7 +3061,7 @@ static struct event_constraint bdx_uncore_pcu_constraints[] = {
 
 void bdx_uncore_cpu_init(void)
 {
-	int pkg = topology_phys_to_logical_pkg(0);
+	int pkg = boot_cpu_data.logical_proc_id;
 
 	if (bdx_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores)
 		bdx_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores;
Signature · 1 line
2.19.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 6 lines · Masayoshi Mizuma

From: Masayoshi Mizuma <[email protected]>

Physical package id 0 is not always exists. We should use boot_cpu_data.logical_proc_id directly as the pkg id here.

Thanks,
Kan

Quoted 18 lines
---
  arch/x86/events/intel/uncore_snbep.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/events/intel/uncore_snbep.c +1 -1
index 51d7c11..edaadac 100644
@@ -3061,7 +3061,7 @@ static struct event_constraint bdx_uncore_pcu_constraints[] = {
 
  void bdx_uncore_cpu_init(void)
  {
-	int pkg = topology_phys_to_logical_pkg(0);
+	int pkg = boot_cpu_data.logical_proc_id;
 
  	if (bdx_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores)
  		bdx_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores;