diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2017-10-23 10:05:07 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-11-10 12:00:54 +0100 |
commit | 339a3293f4e493a6c40f71e4faab0c8389174313 (patch) | |
tree | c9e8e9457c3057d4ea731eeb12c9715b961d26ac /arch/powerpc/kernel/setup_64.c | |
parent | powerpc/64s/radix: Improve TLB flushing for page table freeing (diff) | |
download | linux-339a3293f4e493a6c40f71e4faab0c8389174313.tar.xz linux-339a3293f4e493a6c40f71e4faab0c8389174313.zip |
powerpc/powernv: Avoid waiting for secondary hold spinloop with OPAL
OPAL boot does not insert secondaries at 0x60 to wait at the secondary
hold spinloop. Instead they are started later, and inserted at
generic_secondary_smp_init(), which is after the secondary hold
spinloop.
Avoid waiting on this spinloop when booting with OPAL firmware. This
wait always times out that case.
This saves 100ms boot time on powernv, and 10s of seconds of real time
when booting on the simulator in SMP.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/setup_64.c')
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index b89c6aac48c9..87b4fe75fd45 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -360,8 +360,16 @@ void early_setup_secondary(void) #if defined(CONFIG_SMP) || defined(CONFIG_KEXEC_CORE) static bool use_spinloop(void) { - if (!IS_ENABLED(CONFIG_PPC_BOOK3E)) + if (IS_ENABLED(CONFIG_PPC_BOOK3S)) { + /* + * See comments in head_64.S -- not all platforms insert + * secondaries at __secondary_hold and wait at the spin + * loop. + */ + if (firmware_has_feature(FW_FEATURE_OPAL)) + return false; return true; + } /* * When book3e boots from kexec, the ePAPR spin table does |