diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2017-04-12 14:25:02 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-04-12 14:31:37 +0200 |
commit | 3c19d5ada1bec8b97119215298df7669d3ffb3db (patch) | |
tree | bbc728296e01ff7403164072e4f87ad01de2c6ea /arch/powerpc/platforms/powernv/setup.c | |
parent | powerpc/powernv: Recover correct PACA on wakeup from a stop on P9 DD1 (diff) | |
parent | powerpc: Fixup LPCR:PECE and HEIC setting on POWER9 (diff) | |
download | linux-3c19d5ada1bec8b97119215298df7669d3ffb3db.tar.xz linux-3c19d5ada1bec8b97119215298df7669d3ffb3db.zip |
Merge branch 'topic/xive' (early part) into next
This merges the arch part of the XIVE support, leaving the final commit
with the KVM specific pieces dangling on the branch for Paul to merge
via the kvm-ppc tree.
Diffstat (limited to 'arch/powerpc/platforms/powernv/setup.c')
-rw-r--r-- | arch/powerpc/platforms/powernv/setup.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c index 2d937f6d9260..2dc7e5fb86c3 100644 --- a/arch/powerpc/platforms/powernv/setup.c +++ b/arch/powerpc/platforms/powernv/setup.c @@ -32,6 +32,7 @@ #include <asm/machdep.h> #include <asm/firmware.h> #include <asm/xics.h> +#include <asm/xive.h> #include <asm/opal.h> #include <asm/kexec.h> #include <asm/smp.h> @@ -76,7 +77,9 @@ static void __init pnv_init(void) static void __init pnv_init_IRQ(void) { - xics_init(); + /* Try using a XIVE if available, otherwise use a XICS */ + if (!xive_native_init()) + xics_init(); WARN_ON(!ppc_md.get_irq); } @@ -222,10 +225,12 @@ static void pnv_kexec_wait_secondaries_down(void) static void pnv_kexec_cpu_down(int crash_shutdown, int secondary) { - xics_kexec_teardown_cpu(secondary); + if (xive_enabled()) + xive_kexec_teardown_cpu(secondary); + else + xics_kexec_teardown_cpu(secondary); /* On OPAL, we return all CPUs to firmware */ - if (!firmware_has_feature(FW_FEATURE_OPAL)) return; @@ -241,6 +246,10 @@ static void pnv_kexec_cpu_down(int crash_shutdown, int secondary) /* Primary waits for the secondaries to have reached OPAL */ pnv_kexec_wait_secondaries_down(); + /* Switch XIVE back to emulation mode */ + if (xive_enabled()) + xive_shutdown(); + /* * We might be running as little-endian - now that interrupts * are disabled, reset the HILE bit to big-endian so we don't |