]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
powerpc: Add optional smp_ops->prepare_cpu SMP callback
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 29 May 2017 14:54:35 +0000 (11:54 -0300)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 20 Jun 2017 08:49:48 +0000 (10:49 +0200)
commit7fca9518f12801c66c2ae012ded3600764120718
tree5032ea2e87d20a44cdfc685fcdc79957f678e3a8
parentcd450c6ddc7432284d4195993b1dbebc4f2ac91a
powerpc: Add optional smp_ops->prepare_cpu SMP callback

BugLink: http://bugs.launchpad.net/bugs/1691973
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>
(cherry picked from commit 14d4ae5c4cb89c05262fe41cb7a26f6ba949d8df)
Signed-off-by: Gustavo Walbon <gwalbon@linux.vnet.ibm.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/powerpc/include/asm/smp.h
arch/powerpc/kernel/smp.c