summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary King <gking@nvidia.com>2010-04-09 15:54:10 -0700
committerGary King <gking@nvidia.com>2010-04-12 18:22:46 -0700
commitfb32b775fd431c658942102a8e6b77c0cba28829 (patch)
tree3675166d26912072c693b18305583082948b3bdd
parentefb9475cf714c332b2b565a61e76e817f92d677a (diff)
[ARM] clean slave processor bootup page tables from L2
by the time that the slave processors' page table pointers are written to memory, the L1 and L2 caches may already be enabled on the master, so the writes need to be forcefully cleaned to memory to ensure that the slave will be able to read it. patch originally submitted to 2.6.34 by RMK Change-Id: Id9952149ce17c693775ec2b21e9a0425465fb770 Reviewed-on: http://git-master/r/1067 Reviewed-by: Trivikram Kasivajhula <tkasivajhula@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com> Tested-by: Gary King <gking@nvidia.com>
-rw-r--r--arch/arm/kernel/smp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 40eff61d6d8e..9fe6d44b1188 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -101,6 +101,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
*pmd = __pmd((PHYS_OFFSET & PGDIR_MASK) |
PMD_TYPE_SECT | PMD_SECT_AP_WRITE);
flush_pmd_entry(pmd);
+ outer_clean_range(__pa(pmd), __pa(pmd + 1));
/*
* We need to tell the secondary core where to find
@@ -108,7 +109,8 @@ int __cpuinit __cpu_up(unsigned int cpu)
*/
secondary_data.stack = task_stack_page(idle) + THREAD_START_SP;
secondary_data.pgdir = virt_to_phys(pgd);
- wmb();
+ __cpuc_coherent_kern_range(&secondary_data, &secondary_data+1);
+ outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1));
/*
* Now bring the CPU into our world.