diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2017-04-05 09:54:48 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-04-06 11:58:53 +0200 |
commit | 14d4ae5c4cb89c05262fe41cb7a26f6ba949d8df (patch) | |
tree | 5aad3d800484640eb9e90df5d0d6f6039c4e7a34 /arch/powerpc/include/asm/smp.h | |
parent | powerpc: Add more PPC bit conversion macros (diff) | |
download | linux-14d4ae5c4cb89c05262fe41cb7a26f6ba949d8df.tar.xz linux-14d4ae5c4cb89c05262fe41cb7a26f6ba949d8df.zip |
powerpc: Add optional smp_ops->prepare_cpu SMP callback
Some platforms (will) need to perform allocations before bringing
a new CPU online. Doing it from smp_ops->setup_cpu is the wrong
thing to do:
- It has no useful failure path (too late)
- Calling any allocator will enable interrupts prematurely
causing problems with large decrementer among others
Instead, add a new callback that is called from __cpu_up (so from
the context trying to online the new CPU) at a point where we
can safely allocate and handle failures.
This will be used by XIVE support.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/smp.h')
-rw-r--r-- | arch/powerpc/include/asm/smp.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h index 32db16d2e7ad..2f8e36f91acd 100644 --- a/arch/powerpc/include/asm/smp.h +++ b/arch/powerpc/include/asm/smp.h @@ -44,6 +44,7 @@ struct smp_ops_t { #endif void (*probe)(void); int (*kick_cpu)(int nr); + int (*prepare_cpu)(int nr); void (*setup_cpu)(int nr); void (*bringup_done)(void); void (*take_timebase)(void); |