]> Pileus Git - ~andy/linux/commitdiff
powerpc/85xx: Fix writing to spin table 'cpu-release-addr' on ppc64e
authorKumar Gala <galak@kernel.crashing.org>
Tue, 15 Feb 2011 04:45:48 +0000 (22:45 -0600)
committerKumar Gala <galak@kernel.crashing.org>
Tue, 15 Mar 2011 14:29:56 +0000 (09:29 -0500)
If the spin table is located in the linear mapping (which can happen if
we have 4G or more of memory) we need to access the spin table via a
cacheable coherent mapping like we do on ppc32 (and do explicit cache
flush).

See the following commit for the ppc32 version of this issue:

commit d1d47ec6e62ab08d2ebb925fd9203abfad3adfbf
Author: Peter Tyser <ptyser@xes-inc.com>
Date:   Fri Dec 18 16:50:37 2009 -0600

    powerpc/85xx: Fix SMP when "cpu-release-addr" is in lowmem

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/platforms/85xx/smp.c

index 5c91a992f02b82049a6dbdaf21dc2974501f8b22..0d00ff9d05a0b01f57bd260aac08cb3e6bd6820e 100644 (file)
@@ -91,10 +91,14 @@ smp_85xx_kick_cpu(int nr)
        while ((__secondary_hold_acknowledge != nr) && (++n < 1000))
                mdelay(1);
 #else
+       smp_generic_kick_cpu(nr);
+
        out_be64((u64 *)(bptr_vaddr + BOOT_ENTRY_ADDR_UPPER),
                __pa((u64)*((unsigned long long *) generic_secondary_smp_init)));
 
-       smp_generic_kick_cpu(nr);
+       if (!ioremappable)
+               flush_dcache_range((ulong)bptr_vaddr,
+                               (ulong)(bptr_vaddr + SIZE_BOOT_ENTRY));
 #endif
 
        local_irq_restore(flags);