aboutsummaryrefslogtreecommitdiff
path: root/include/chip.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2020-08-04 23:02:19 +0530
committerOliver O'Halloran <oohall@gmail.com>2020-08-07 16:00:20 +1000
commit6b403d06b7a72590648fe4f791214c13caacc674 (patch)
treef9290e663ad36b0e578a3b1531c97e64460d965d /include/chip.h
parent1629c851c57e5f86ce92516de778afa8aa12f712 (diff)
downloadskiboot-6b403d06b7a72590648fe4f791214c13caacc674.zip
skiboot-6b403d06b7a72590648fe4f791214c13caacc674.tar.gz
skiboot-6b403d06b7a72590648fe4f791214c13caacc674.tar.bz2
cpu: Make cpu_get_core_index() return the fused core number
cpu_get_core_index() currently uses pir_to_core_id() which returns an EC number always (ie, a normal core number) even in fused core mode. This is inconsistent with cpu_get_thread_index() which returns a thread within a fused core (0...7) on P9. So let's make things consistent and document it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'include/chip.h')
-rw-r--r--include/chip.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/chip.h b/include/chip.h
index 2063cd2..4deb961 100644
--- a/include/chip.h
+++ b/include/chip.h
@@ -239,6 +239,11 @@ extern uint32_t pir_to_chip_id(uint32_t pir);
extern uint32_t pir_to_core_id(uint32_t pir);
extern uint32_t pir_to_thread_id(uint32_t pir);
+/* In P9 fused core mode, this is the "fused" core ID, in
+ * normal core mode or P8, this is the same as pir_to_core_id
+ */
+extern uint32_t pir_to_fused_core_id(uint32_t pir);
+
extern struct proc_chip *next_chip(struct proc_chip *chip);
#define for_each_chip(__c) for (__c=next_chip(NULL); __c; __c=next_chip(__c))