[Skiboot] [PATCH v6 08/11] imc: Use pir_to_core_id() rather than cpu_get_core_index()

Vaidyanathan Srinivasan svaidy at linux.ibm.com
Wed Aug 5 03:32:20 AEST 2020


From: Benjamin Herrenschmidt <benh at kernel.crashing.org>

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

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Signed-off-by: Michael Neuling <mikey at neuling.org>
Signed-off-by: Vaidyanathan Srinivasan <svaidy at linux.ibm.com>
---
 hw/imc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/imc.c b/hw/imc.c
index 927fba0b..63488b9b 100644
--- a/hw/imc.c
+++ b/hw/imc.c
@@ -685,7 +685,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)
@@ -762,7 +762,7 @@ static int64_t opal_imc_counters_init(uint32_t type, uint64_t addr, uint64_t cpu
 		if (!c)
 			return OPAL_PARAMETER;
 
-		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)
@@ -840,7 +840,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)
@@ -902,7 +902,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)
-- 
2.26.2



More information about the Skiboot mailing list