diff options
author | Ryan Grimm <grimm@linux.vnet.ibm.com> | 2020-08-04 23:02:13 +0530 |
---|---|---|
committer | Oliver O'Halloran <oohall@gmail.com> | 2020-08-07 16:00:20 +1000 |
commit | 2d065e249f78e11ddeca0c84920b28a7ca4f8ee1 (patch) | |
tree | 0dcbaee1a6b13760e63b911cb58e61061d47e440 /hdata | |
parent | 043725d49d3b2c0b6ea3c37395aa5d6e38d5e73a (diff) | |
download | skiboot-2d065e249f78e11ddeca0c84920b28a7ca4f8ee1.zip skiboot-2d065e249f78e11ddeca0c84920b28a7ca4f8ee1.tar.gz skiboot-2d065e249f78e11ddeca0c84920b28a7ca4f8ee1.tar.bz2 |
Add basic P9 fused core support
P9 cores can be configured into fused core mode where two core chiplets
function as an 8-threaded, single core. So, bump four to eight in boot_entry
when in fused core mode and cpu_thread_count in init_boot_cpu.
The HID, AMOR, TSCR, RPR require the first active thread on that core chiplet
to load the copy for that core chiplet. So, send thread 1 of a fused core to
init_shared_sprs in boot_entry.
The code checks for fused core mode in the core thead state register and puts a
field in struct cpu_thread. This flag is checked when updating the HID and in
XIVE code when setting the special bar.
For XSCOM, the core ID is the non-fused EX. So, create macros to arrange the
bits. It's fairly verbose but somewhat readable.
This was tested on a P9 ZZ with 16 fused cores and ran HTX for over 24 hours.
Signed-off-by: Ryan Grimm <grimm@linux.vnet.ibm.com>
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 'hdata')
-rw-r--r-- | hdata/test/hdata_to_dt.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/hdata/test/hdata_to_dt.c b/hdata/test/hdata_to_dt.c index 49357cd..90d83f9 100644 --- a/hdata/test/hdata_to_dt.c +++ b/hdata/test/hdata_to_dt.c @@ -38,7 +38,11 @@ struct spira_ntuple; static void *ntuple_addr(const struct spira_ntuple *n); /* Stuff which core expects. */ -#define __this_cpu ((struct cpu_thread *)NULL) +struct cpu_thread *my_fake_cpu; +static struct cpu_thread *this_cpu(void) +{ + return my_fake_cpu; +} unsigned long tb_hz = 512000000; @@ -74,6 +78,7 @@ unsigned long tb_hz = 512000000; struct cpu_thread { uint32_t pir; uint32_t chip_id; + bool is_fused_core; }; struct cpu_job *__cpu_queue_job(struct cpu_thread *cpu, const char *name, @@ -95,6 +100,8 @@ static inline struct cpu_job *cpu_queue_job(struct cpu_thread *cpu, struct cpu_thread __boot_cpu, *boot_cpu = &__boot_cpu; static unsigned long fake_pvr = PVR_P8; +unsigned int cpu_thread_count = 8; + static inline unsigned long mfspr(unsigned int spr) { assert(spr == SPR_PVR); |