aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-11-29 15:37:06 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-12-03 22:10:56 -0600
commitd0e44ad2a9633c9d49504f4a0c69ac730cdc0561 (patch)
tree54f8a0a0484cb64cbd8239f411c5eca79a13c132 /hw
parent6d033ce35dc1071949d3be79a62d8964465b4b4f (diff)
downloadskiboot-d0e44ad2a9633c9d49504f4a0c69ac730cdc0561.zip
skiboot-d0e44ad2a9633c9d49504f4a0c69ac730cdc0561.tar.gz
skiboot-d0e44ad2a9633c9d49504f4a0c69ac730cdc0561.tar.bz2
fast-reboot: bare bones fast reboot implementation for POWER9
This is an initial fast reboot implementation for p9 which has only been tested on the Witherspoon platform, and without the use of NPUs, NX/VAS, etc. This has worked reasonably well so far, with no failures in about 100 reboots. It is hidden behind the traditional fast-reboot experimental nvram option, until more platforms and configurations are tested. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/xive.c32
1 files changed, 27 insertions, 5 deletions
diff --git a/hw/xive.c b/hw/xive.c
index e81fe49..c7d6e62 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -4608,14 +4608,20 @@ static void xive_reset_mask_source_cb(struct irq_source *is,
}
}
-static int64_t opal_xive_reset(uint64_t version)
+void reset_cpu_xive(void)
{
- struct proc_chip *chip;
+ struct cpu_thread *c = this_cpu();
+ struct xive_cpu_state *xs = c->xstate;
- prlog(PR_DEBUG, "XIVE reset, version: %d...\n", (int)version);
+ xs->cppr = 0;
+ out_8(xs->tm_ring1 + TM_QW3_HV_PHYS + TM_CPPR, 0);
- if (version > 1)
- return OPAL_PARAMETER;
+ in_be64(xs->tm_ring1 + TM_SPC_PULL_POOL_CTX);
+}
+
+static int64_t __xive_reset(uint64_t version)
+{
+ struct proc_chip *chip;
xive_mode = version;
@@ -4651,6 +4657,22 @@ static int64_t opal_xive_reset(uint64_t version)
return OPAL_SUCCESS;
}
+/* Called by fast reboot */
+int64_t xive_reset(void)
+{
+ return __xive_reset(XIVE_MODE_EMU);
+}
+
+static int64_t opal_xive_reset(uint64_t version)
+{
+ prlog(PR_DEBUG, "XIVE reset, version: %d...\n", (int)version);
+
+ if (version > 1)
+ return OPAL_PARAMETER;
+
+ return __xive_reset(version);
+}
+
static int64_t opal_xive_free_vp_block(uint64_t vp_base)
{
uint32_t blk, idx, i, j, count;