summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/setup.c
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2013-05-21 15:40:51 +0200
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2013-05-21 15:40:51 +0200
commitb382b940f821784107ca22de3455bb90e4512557 (patch)
tree4d4aa0747a13a27dcb7502b54e60ada6cc6d4b08 /arch/arm/kernel/setup.c
parentarm: introduce psci_smp_ops (diff)
downloadlinux-b382b940f821784107ca22de3455bb90e4512557.tar.xz
linux-b382b940f821784107ca22de3455bb90e4512557.zip
ARM: Enable selection of SMP operations at boot time
Add a new 'smp_init' hook to machine_desc so platforms can specify a function to be used to setup smp ops instead of having a statically defined value. The hook must return true when smp_ops are initialized. If false the static mdesc->smp_ops will be used by default. Add the definition of "bool" by including the linux/types.h file to asm/mach/arch.h and make it self-contained. Signed-off-by: Jon Medhurst <tixy@linaro.org> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Diffstat (limited to 'arch/arm/kernel/setup.c')
-rw-r--r--arch/arm/kernel/setup.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 8f7a6e9926a8..2b3ba15408bd 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -800,10 +800,12 @@ void __init setup_arch(char **cmdline_p)
psci_init();
#ifdef CONFIG_SMP
if (is_smp()) {
- if (psci_smp_available())
- smp_set_ops(&psci_smp_ops);
- else if (mdesc->smp)
- smp_set_ops(mdesc->smp);
+ if (!mdesc->smp_init || !mdesc->smp_init()) {
+ if (psci_smp_available())
+ smp_set_ops(&psci_smp_ops);
+ else if (mdesc->smp)
+ smp_set_ops(mdesc->smp);
+ }
smp_init_cpus();
}
#endif