summaryrefslogtreecommitdiff
path: root/arch/arm/mach-vexpress/platsmp.c
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2011-09-08 13:15:22 +0100
committerArnd Bergmann <arnd@arndb.de>2012-09-13 15:34:50 +0200
commit3695adc2fdaf3ad1881e0dd3e3422e5e141abd7d (patch)
treeb8bef89c2d2f7527a78b2241e7729c6858927012 /arch/arm/mach-vexpress/platsmp.c
parentabcee5fb0dfbb248d883a2f6bdb4820abe3ac524 (diff)
ARM: SoC: convert VExpress/RealView to SMP operations
Convert both Realview and VExpress to use struct smp_operations to provide their SMP and CPU hotplug operation. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-vexpress/platsmp.c')
-rw-r--r--arch/arm/mach-vexpress/platsmp.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-vexpress/platsmp.c
index 14ba1128ae8d..7db27c8c05cc 100644
--- a/arch/arm/mach-vexpress/platsmp.c
+++ b/arch/arm/mach-vexpress/platsmp.c
@@ -20,9 +20,9 @@
#include <mach/motherboard.h>
-#include "core.h"
+#include <plat/platsmp.h>
-extern void versatile_secondary_startup(void);
+#include "core.h"
#if defined(CONFIG_OF)
@@ -167,7 +167,7 @@ void __init vexpress_dt_smp_prepare_cpus(unsigned int max_cpus)
* Initialise the CPU possible map early - this describes the CPUs
* which may be present or become present in the system.
*/
-void __init smp_init_cpus(void)
+static void __init vexpress_smp_init_cpus(void)
{
if (ct_desc)
ct_desc->init_cpu_map();
@@ -176,7 +176,7 @@ void __init smp_init_cpus(void)
}
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init vexpress_smp_prepare_cpus(unsigned int max_cpus)
{
/*
* Initialise the present map, which describes the set of CPUs
@@ -195,3 +195,13 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)
*/
v2m_flags_set(virt_to_phys(versatile_secondary_startup));
}
+
+struct smp_operations __initdata vexpress_smp_ops = {
+ .smp_init_cpus = vexpress_smp_init_cpus,
+ .smp_prepare_cpus = vexpress_smp_prepare_cpus,
+ .smp_secondary_init = versatile_secondary_init,
+ .smp_boot_secondary = versatile_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+ .cpu_die = vexpress_cpu_die,
+#endif
+};