diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2011-09-08 08:15:22 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-09-13 09:34:50 -0400 |
commit | 3695adc2fdaf3ad1881e0dd3e3422e5e141abd7d (patch) | |
tree | b8bef89c2d2f7527a78b2241e7729c6858927012 /arch/arm/mach-realview/platsmp.c | |
parent | abcee5fb0dfbb248d883a2f6bdb4820abe3ac524 (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-realview/platsmp.c')
-rw-r--r-- | arch/arm/mach-realview/platsmp.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c index 17c878ddbc70..300f7064465d 100644 --- a/arch/arm/mach-realview/platsmp.c +++ b/arch/arm/mach-realview/platsmp.c | |||
@@ -22,9 +22,9 @@ | |||
22 | #include <mach/board-pb11mp.h> | 22 | #include <mach/board-pb11mp.h> |
23 | #include <mach/board-pbx.h> | 23 | #include <mach/board-pbx.h> |
24 | 24 | ||
25 | #include "core.h" | 25 | #include <plat/platsmp.h> |
26 | 26 | ||
27 | extern void versatile_secondary_startup(void); | 27 | #include "core.h" |
28 | 28 | ||
29 | static void __iomem *scu_base_addr(void) | 29 | static void __iomem *scu_base_addr(void) |
30 | { | 30 | { |
@@ -43,7 +43,7 @@ static void __iomem *scu_base_addr(void) | |||
43 | * Initialise the CPU possible map early - this describes the CPUs | 43 | * Initialise the CPU possible map early - this describes the CPUs |
44 | * which may be present or become present in the system. | 44 | * which may be present or become present in the system. |
45 | */ | 45 | */ |
46 | void __init smp_init_cpus(void) | 46 | static void __init realview_smp_init_cpus(void) |
47 | { | 47 | { |
48 | void __iomem *scu_base = scu_base_addr(); | 48 | void __iomem *scu_base = scu_base_addr(); |
49 | unsigned int i, ncores; | 49 | unsigned int i, ncores; |
@@ -63,7 +63,7 @@ void __init smp_init_cpus(void) | |||
63 | set_smp_cross_call(gic_raise_softirq); | 63 | set_smp_cross_call(gic_raise_softirq); |
64 | } | 64 | } |
65 | 65 | ||
66 | void __init platform_smp_prepare_cpus(unsigned int max_cpus) | 66 | static void __init realview_smp_prepare_cpus(unsigned int max_cpus) |
67 | { | 67 | { |
68 | 68 | ||
69 | scu_enable(scu_base_addr()); | 69 | scu_enable(scu_base_addr()); |
@@ -77,3 +77,13 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus) | |||
77 | __raw_writel(virt_to_phys(versatile_secondary_startup), | 77 | __raw_writel(virt_to_phys(versatile_secondary_startup), |
78 | __io_address(REALVIEW_SYS_FLAGSSET)); | 78 | __io_address(REALVIEW_SYS_FLAGSSET)); |
79 | } | 79 | } |
80 | |||
81 | struct smp_operations realview_smp_ops __initdata = { | ||
82 | .smp_init_cpus = realview_smp_init_cpus, | ||
83 | .smp_prepare_cpus = realview_smp_prepare_cpus, | ||
84 | .smp_secondary_init = versatile_secondary_init, | ||
85 | .smp_boot_secondary = versatile_boot_secondary, | ||
86 | #ifdef CONFIG_HOTPLUG_CPU | ||
87 | .cpu_die = realview_cpu_die, | ||
88 | #endif | ||
89 | }; | ||