diff mbox series

[v3,8/8] imc: Use pir_to_core_id() rather than cpu_get_core_index()

Message ID 20190324172543.12625-9-svaidy@linux.vnet.ibm.com
State Changes Requested
Headers show
Series Initial fused-core support for POWER9 | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (b392d785eb49630b9f00fef8d17944ed82b2c1fe)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Vaidyanathan Srinivasan March 24, 2019, 5:25 p.m. UTC
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>

The IMC HW targets HW ECs, not fused cores on P9

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
---
 hw/imc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/hw/imc.c b/hw/imc.c
index 354a5454..cf10701e 100644
--- a/hw/imc.c
+++ b/hw/imc.c
@@ -630,7 +630,7 @@  static int64_t opal_imc_counters_init(uint32_t type, uint64_t addr, uint64_t cpu
 		 * pdbar in specific scom ports. port_id are in
 		 * pdbar_scom_index[] and htm_scom_index[].
 		 */
-		phys_core_id = cpu_get_core_index(c);
+		phys_core_id = pir_to_core_id(c->pir);
 		port_id = phys_core_id % 4;
 
 		if (proc_chip_quirks & QUIRK_MAMBO_CALLOUTS)
@@ -750,7 +750,7 @@  static int64_t opal_imc_counters_start(uint32_t type, uint64_t cpu_pir)
 		 * Core IMC hardware mandates setting of htm_mode in specific
 		 * scom ports (port_id are in htm_scom_index[])
 		 */
-		phys_core_id = cpu_get_core_index(c);
+		phys_core_id = pir_to_core_id(c->pir);
 		port_id = phys_core_id % 4;
 
 		if (proc_chip_quirks & QUIRK_MAMBO_CALLOUTS)
@@ -811,7 +811,7 @@  static int64_t opal_imc_counters_stop(uint32_t type, uint64_t cpu_pir)
 		 * Core IMC hardware mandates setting of htm_mode in specific
 		 * scom ports (port_id are in htm_scom_index[])
 		 */
-		phys_core_id = cpu_get_core_index(c);
+		phys_core_id = pir_to_core_id(c->pir);
 		port_id = phys_core_id % 4;
 
 		if (proc_chip_quirks & QUIRK_MAMBO_CALLOUTS)