diff options
Diffstat (limited to 'hw/xive.c')
-rw-r--r-- | hw/xive.c | 32 |
1 files changed, 27 insertions, 5 deletions
@@ -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; |