diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-03 06:09:48 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-20 10:09:08 -0500 |
commit | 05c74a6cbcfb416286a947668ba32f63d99fe74a (patch) | |
tree | 96f4dd3d5cbc67b14b93e9630f4f02becaa1a66a /arch/arm/mach-omap2/omap-smp.c | |
parent | aec66ba1f75c2030cf66f5a21d1c81aa83aa5d95 (diff) |
ARM: SMP: consolidate the common parts of smp_prepare_cpus()
There is a certain amount of smp_prepare_cpus() which doesn't belong
in the platform support code - that is, code which is invariant to the
SMP implementation. Move this code into arch/arm/kernel/smp.c, and
add a platform_ prefix to the original function.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-omap2/omap-smp.c')
-rw-r--r-- | arch/arm/mach-omap2/omap-smp.c | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c index 405a8fc53308..3c3d6796c97c 100644 --- a/arch/arm/mach-omap2/omap-smp.c +++ b/arch/arm/mach-omap2/omap-smp.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | 22 | ||
23 | #include <asm/cacheflush.h> | 23 | #include <asm/cacheflush.h> |
24 | #include <asm/localtimer.h> | ||
25 | #include <asm/smp_scu.h> | 24 | #include <asm/smp_scu.h> |
26 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
27 | #include <mach/omap4-common.h> | 26 | #include <mach/omap4-common.h> |
@@ -123,20 +122,10 @@ void __init smp_init_cpus(void) | |||
123 | set_cpu_possible(i, true); | 122 | set_cpu_possible(i, true); |
124 | } | 123 | } |
125 | 124 | ||
126 | void __init smp_prepare_cpus(unsigned int max_cpus) | 125 | void __init platform_smp_prepare_cpus(unsigned int max_cpus) |
127 | { | 126 | { |
128 | unsigned int ncores = num_possible_cpus(); | ||
129 | unsigned int cpu = smp_processor_id(); | ||
130 | int i; | 127 | int i; |
131 | 128 | ||
132 | smp_store_cpu_info(cpu); | ||
133 | |||
134 | /* | ||
135 | * are we trying to boot more cores than exist? | ||
136 | */ | ||
137 | if (max_cpus > ncores) | ||
138 | max_cpus = ncores; | ||
139 | |||
140 | /* | 129 | /* |
141 | * Initialise the present map, which describes the set of CPUs | 130 | * Initialise the present map, which describes the set of CPUs |
142 | * actually populated at the present time. | 131 | * actually populated at the present time. |
@@ -144,18 +133,10 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
144 | for (i = 0; i < max_cpus; i++) | 133 | for (i = 0; i < max_cpus; i++) |
145 | set_cpu_present(i, true); | 134 | set_cpu_present(i, true); |
146 | 135 | ||
147 | if (max_cpus > 1) { | 136 | /* |
148 | /* | 137 | * Initialise the SCU and wake up the secondary core using |
149 | * Enable the local timer or broadcast device for the | 138 | * wakeup_secondary(). |
150 | * boot CPU, but only if we have more than one CPU. | 139 | */ |
151 | */ | 140 | scu_enable(scu_base); |
152 | percpu_timer_setup(); | 141 | wakeup_secondary(); |
153 | |||
154 | /* | ||
155 | * Initialise the SCU and wake up the secondary core using | ||
156 | * wakeup_secondary(). | ||
157 | */ | ||
158 | scu_enable(scu_base); | ||
159 | wakeup_secondary(); | ||
160 | } | ||
161 | } | 142 | } |