[Skiboot] [PATCH v3 1/8] Add basic P9 fused core support

Stewart Smith stewart at linux.ibm.com
Mon May 20 17:00:57 AEST 2019


Vaidyanathan Srinivasan <svaidy at linux.vnet.ibm.com> writes:
> From: Ryan Grimm <grimm at linux.vnet.ibm.com>
>
> 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 at linux.vnet.ibm.com>
> Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> Signed-off-by: Michael Neuling <mikey at neuling.org>
> ---
>  asm/head.S               | 24 +++++++++++++++++++++---
>  core/chip.c              | 15 +++++++++++----
>  core/cpu.c               | 39 ++++++++++++++++++++++++++++++++++-----
>  core/fast-reboot.c       |  2 +-
>  hdata/test/hdata_to_dt.c |  9 ++++++++-
>  hw/xive.c                |  2 +-
>  include/chip.h           | 31 +++++++++++++++++++++++++++++++
>  include/cpu.h            |  6 ++++++
>  include/xscom.h          |  3 +++
>  9 files changed, 116 insertions(+), 15 deletions(-)

So, I'm finding a bit of a strange issue when I apply this patch.

Firstly, it seems that we've not been really enabling SMT4 mode with
Mambo and instead been running without the "normal core mode" bit set in
SIM_CTRL1

--- a/external/mambo/skiboot.tcl
+++ b/external/mambo/skiboot.tcl
@@ -110,7 +110,7 @@ if { $default_config == "PEGASUS" } {
 if { $default_config == "P9" } {
     # PVR configured for POWER9 DD2.0 Scale out 24 Core (ie SMT4)
     myconf config processor/initial/PVR 0x4e1200
-    myconf config processor/initial/SIM_CTRL1 0xc228100400000000
+    myconf config processor/initial/SIM_CTRL1 0xc268100400000000
 
     if { $mconf(numa) } {
         myconf config memory_region_id_shift 45

and then things work again and we don't assume in all our Mambo running
tests that we're big core mode.

However, with that bit flipped, in the SMT tests, threads!=0 think the
PVR is 0x000, which works about as well as you'd expect.

I'm asking internally if there's anything I'm missing in the Mambo
config and what could be wrong. Any chance you have some insight?

I can't really merge until 'make check' still passes.

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list