]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
sh: Fix up the secondary CPU entry point for 32bit mode.
authorPaul Mundt <lethal@linux-sh.org>
Fri, 15 Jan 2010 06:13:48 +0000 (15:13 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 15 Jan 2010 06:13:48 +0000 (15:13 +0900)
Presently the secondary CPU entry point is only aimed at 29bit phys mode,
causing it to point to a stray virtual address in 32bit mode. Fix it up
after consulting with our shiny new __in_29bit_mode().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/cpu/sh4a/smp-shx3.c

index 5863e0c4d02f03e9d4993bc4197736410cd00401..11bf4c1e25c0ae9a562972ff0f80d8d0f7df7b0c 100644 (file)
@@ -78,7 +78,10 @@ void __init plat_prepare_cpus(unsigned int max_cpus)
 
 void plat_start_cpu(unsigned int cpu, unsigned long entry_point)
 {
-       __raw_writel(entry_point, RESET_REG(cpu));
+       if (__in_29bit_mode())
+               __raw_writel(entry_point, RESET_REG(cpu));
+       else
+               __raw_writel(virt_to_phys(entry_point), RESET_REG(cpu));
 
        if (!(__raw_readl(STBCR_REG(cpu)) & STBCR_MSTP))
                __raw_writel(STBCR_MSTP, STBCR_REG(cpu));