From 0d61f0b3e222b588480e2ad1e85bb2ea57561c4b Mon Sep 17 00:00:00 2001 From: Scott Wood Date: Sat, 18 Jul 2015 14:24:57 -0500 Subject: powerpc/booke64: Move mb() to __set_pte_at() with kernel-addr test map_kernel() doesn't catch all places that create kernel PTEs. In particular, vmalloc() calls set_pte_at() directly. This causes a crash when booting a non-SMP kernel on e6500. Move the sync to __set_pte(), to be executed only for kernel addresses. Signed-off-by: Scott Wood --- arch/powerpc/mm/pgtable_64.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'arch/powerpc/mm/pgtable_64.c') diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c index 876232d64126..e92cb2146b18 100644 --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c @@ -149,17 +149,7 @@ int map_kernel_page(unsigned long ea, unsigned long pa, int flags) #endif /* !CONFIG_PPC_MMU_NOHASH */ } -#ifdef CONFIG_PPC_BOOK3E_64 - /* - * With hardware tablewalk, a sync is needed to ensure that - * subsequent accesses see the PTE we just wrote. Unlike userspace - * mappings, we can't tolerate spurious faults, so make sure - * the new PTE will be seen the first time. - */ - mb(); -#else smp_wmb(); -#endif return 0; } -- cgit v1.2.3-59-g8ed1b