summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/platsmp.c
diff options
context:
space:
mode:
authorScott Williams <scwilliams@nvidia.com>2011-07-27 20:10:06 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:46:58 -0800
commit55f6760f18bf54a4292c5955a80612e929ded894 (patch)
tree76f2406c2a8ac503c2fba5b0e35f6384901754e4 /arch/arm/mach-tegra/platsmp.c
parentdca48c8c55d480bf7c806474bf47b42c3a080d4b (diff)
ARM: tegra: Fix uniprocessor reset handler initialization
- For CONFIG_SMP kernels on systems that only report one CPU available, there is never a call to platform_smp_prepare_cpus() which means the reset handler would not get initialized. Invoke the reset handler initialization from smp_init_cpus() if there is only one CPU. - For non-CONFIG_SMP kernels, the call to initialize the reset handler got accidentally dropped in the port to Linux 2.6.39. Invoke the reset handler initiazation from tegra_init_early() in this case. Change-Id: I782faf84c89d4285aac26bfccb829f27878029de Signed-off-by: Scott Williams <scwilliams@nvidia.com> Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: R9b35221571885a1620e0d7e19880b05a18c97233
Diffstat (limited to 'arch/arm/mach-tegra/platsmp.c')
-rw-r--r--arch/arm/mach-tegra/platsmp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
index 6cd9c61b68e9..ac33ef5c4254 100644
--- a/arch/arm/mach-tegra/platsmp.c
+++ b/arch/arm/mach-tegra/platsmp.c
@@ -256,6 +256,14 @@ void __init smp_init_cpus(void)
for (i = 0; i < ncores; i++)
set_cpu_possible(i, true);
+ /* If only one CPU is possible, platform_smp_prepare_cpus() will
+ never get called. We must therefore initialize the reset handler
+ here. If there is more than one CPU, we must wait until after
+ the cpu_present_mask has been updated with all present CPUs in
+ platform_smp_prepare_cpus() before initializing the reset handler. */
+ if (ncores == 1)
+ tegra_cpu_reset_handler_init();
+
set_smp_cross_call(gic_raise_softirq);
}
@@ -268,6 +276,9 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)
if (max_cpus == 1)
tegra_all_cpus_booted = true;
+ /* If we're here, it means that more than one CPU was found by
+ smp_init_cpus() which also means that it did not initialize the
+ reset handler. Do it now before the secondary CPUs are started. */
tegra_cpu_reset_handler_init();
scu_enable(scu_base);
}