aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBecky Bruce <beckyb@kernel.crashing.org>2011-11-29 10:10:39 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-12-07 00:26:24 -0500
commit1f6820b4c1d09b017625ce32ba23fa39ebfdb27a (patch)
treeb3c1f88fa415d5d8bbb4ca90063467aeaead68f1
parentd93e4d7d72037d8c9405e8d404ecb2ee162adc25 (diff)
powerpc: Define/use HUGETLB_NEED_PRELOAD insead of complicated #if
Define HUGETLB_NEED_PRELOAD in mmu-book3e.h for CONFIG_PPC64 instead of having a much more complicated #if block. This is easier to read and maintain. Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/include/asm/hugetlb.h3
-rw-r--r--arch/powerpc/include/asm/mmu-book3e.h7
2 files changed, 8 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h
index 863f49d5ea35..dfdb95bc59a5 100644
--- a/arch/powerpc/include/asm/hugetlb.h
+++ b/arch/powerpc/include/asm/hugetlb.h
@@ -124,8 +124,7 @@ static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma,
124 unsigned long addr, pte_t *ptep, 124 unsigned long addr, pte_t *ptep,
125 pte_t pte, int dirty) 125 pte_t pte, int dirty)
126{ 126{
127#if defined(CONFIG_PPC_MMU_NOHASH) && \ 127#ifdef HUGETLB_NEED_PRELOAD
128 !(defined(CONFIG_PPC_FSL_BOOK3E) && defined(CONFIG_PPC32))
129 /* 128 /*
130 * The "return 1" forces a call of update_mmu_cache, which will write a 129 * The "return 1" forces a call of update_mmu_cache, which will write a
131 * TLB entry. Without this, platforms that don't do a write of the TLB 130 * TLB entry. Without this, platforms that don't do a write of the TLB
diff --git a/arch/powerpc/include/asm/mmu-book3e.h b/arch/powerpc/include/asm/mmu-book3e.h
index 50210b9b0147..f5f89cafebd0 100644
--- a/arch/powerpc/include/asm/mmu-book3e.h
+++ b/arch/powerpc/include/asm/mmu-book3e.h
@@ -258,6 +258,13 @@ extern int mmu_vmemmap_psize;
258 258
259#ifdef CONFIG_PPC64 259#ifdef CONFIG_PPC64
260extern unsigned long linear_map_top; 260extern unsigned long linear_map_top;
261
262/*
263 * 64-bit booke platforms don't load the tlb in the tlb miss handler code.
264 * HUGETLB_NEED_PRELOAD handles this - it causes huge_ptep_set_access_flags to
265 * return 1, indicating that the tlb requires preloading.
266 */
267#define HUGETLB_NEED_PRELOAD
261#endif 268#endif
262 269
263#endif /* !__ASSEMBLY__ */ 270#endif /* !__ASSEMBLY__ */