Skip to content

Commit

Permalink
ARM: mach-shmobile: sh73a0 twd_base fix
Browse files Browse the repository at this point in the history
Fix the case of too late twd_base initialization for SMP
on sh73a0 which bas been broken because sh73a0 specific
smp_prepare_cpu() and percpu_timer_setup() changed order
in the commits:

05c74a6
c413521

Without this fix the sh73a0 SMP kernel panics on boot.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Magnus Damm authored and Paul Mundt committed May 24, 2011
1 parent 34154f3 commit 60116a7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions arch/arm/mach-shmobile/smp-sh73a0.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ unsigned int __init sh73a0_get_core_count(void)
{
void __iomem *scu_base = scu_base_addr();

#ifdef CONFIG_HAVE_ARM_TWD
/* twd_base needs to be initialized before percpu_timer_setup() */
twd_base = (void __iomem *)0xf0000600;
#endif

return scu_get_core_count(scu_base);
}

Expand All @@ -82,10 +87,6 @@ int __cpuinit sh73a0_boot_secondary(unsigned int cpu)

void __init sh73a0_smp_prepare_cpus(void)
{
#ifdef CONFIG_HAVE_ARM_TWD
twd_base = (void __iomem *)0xf0000600;
#endif

scu_enable(scu_base_addr());

/* Map the reset vector (in headsmp.S) */
Expand Down

0 comments on commit 60116a7

Please sign in to comment.