aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/platsmp.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-12-03 06:09:48 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-12-20 10:09:08 -0500
commit05c74a6cbcfb416286a947668ba32f63d99fe74a (patch)
tree96f4dd3d5cbc67b14b93e9630f4f02becaa1a66a /arch/arm/mach-tegra/platsmp.c
parentaec66ba1f75c2030cf66f5a21d1c81aa83aa5d95 (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-tegra/platsmp.c')
-rw-r--r--arch/arm/mach-tegra/platsmp.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
index 66d0634e7a96..b66a0c2d990d 100644
--- a/arch/arm/mach-tegra/platsmp.c
+++ b/arch/arm/mach-tegra/platsmp.c
@@ -22,7 +22,6 @@
22#include <asm/cacheflush.h> 22#include <asm/cacheflush.h>
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/localtimer.h>
26#include <asm/smp_scu.h> 25#include <asm/smp_scu.h>
27 26
28#include <mach/iomap.h> 27#include <mach/iomap.h>
@@ -127,20 +126,10 @@ void __init smp_init_cpus(void)
127 cpu_set(i, cpu_possible_map); 126 cpu_set(i, cpu_possible_map);
128} 127}
129 128
130void __init smp_prepare_cpus(unsigned int max_cpus) 129void __init platform_smp_prepare_cpus(unsigned int max_cpus)
131{ 130{
132 unsigned int ncores = scu_get_core_count(scu_base);
133 unsigned int cpu = smp_processor_id();
134 int i; 131 int i;
135 132
136 smp_store_cpu_info(cpu);
137
138 /*
139 * are we trying to boot more cores than exist?
140 */
141 if (max_cpus > ncores)
142 max_cpus = ncores;
143
144 /* 133 /*
145 * Initialise the present map, which describes the set of CPUs 134 * Initialise the present map, which describes the set of CPUs
146 * actually populated at the present time. 135 * actually populated at the present time.
@@ -148,8 +137,5 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
148 for (i = 0; i < max_cpus; i++) 137 for (i = 0; i < max_cpus; i++)
149 set_cpu_present(i, true); 138 set_cpu_present(i, true);
150 139
151 if (max_cpus > 1) { 140 scu_enable(scu_base);
152 percpu_timer_setup();
153 scu_enable(scu_base);
154 }
155} 141}