diff options
author | Becky Bruce <beckyb@kernel.crashing.org> | 2011-10-10 06:50:37 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-12-07 00:26:21 -0500 |
commit | 97632e6fbea5b996669ffee21d869ed09848e1ec (patch) | |
tree | 5a13ad6c037e2122861c081f62bad921088575cc /arch/powerpc/include/asm | |
parent | 765129594494994e3de91182857bc2586dbe21c9 (diff) |
powerpc: hugetlb: fix huge_ptep_set_access_flags return value
There was an unconditional return of "1" in the original code
from David Gibson, and I dropped it because it wasn't needed
for FSL BOOKE 32-bit. However, not all systems (including 64-bit
FSL BOOKE) do loading of the hpte from the fault handler asm
and depend on this function returning 1, which causes a call
to update_mmu_cache() that writes an entry into the tlb.
Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r-- | arch/powerpc/include/asm/hugetlb.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h index 86004930a78..70f9885f5c0 100644 --- a/arch/powerpc/include/asm/hugetlb.h +++ b/arch/powerpc/include/asm/hugetlb.h | |||
@@ -124,7 +124,18 @@ 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) && \ | ||
128 | !(defined(CONFIG_PPC_FSL_BOOK3E) && defined(CONFIG_PPC32)) | ||
129 | /* | ||
130 | * 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 | ||
132 | * entry in the TLB miss handler asm will fault ad infinitum. | ||
133 | */ | ||
134 | ptep_set_access_flags(vma, addr, ptep, pte, dirty); | ||
135 | return 1; | ||
136 | #else | ||
127 | return ptep_set_access_flags(vma, addr, ptep, pte, dirty); | 137 | return ptep_set_access_flags(vma, addr, ptep, pte, dirty); |
138 | #endif | ||
128 | } | 139 | } |
129 | 140 | ||
130 | static inline pte_t huge_ptep_get(pte_t *ptep) | 141 | static inline pte_t huge_ptep_get(pte_t *ptep) |