diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-05-08 02:27:28 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-09 02:35:00 -0400 |
commit | 16c2d476232523260c495eafbf9cdc1be984b7df (patch) | |
tree | fb6614b9752b51864e121317478088978823792c /arch/powerpc/mm/tlb_64.c | |
parent | d0f13e3c20b6fb73ccb467bdca97fa7cf5a574cd (diff) |
[POWERPC] Add ability to 4K kernel to hash in 64K pages
This adds the ability for a kernel compiled with 4K page size
to have special slices containing 64K pages and hash the right type
of hash PTEs.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/mm/tlb_64.c')
-rw-r--r-- | arch/powerpc/mm/tlb_64.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/powerpc/mm/tlb_64.c b/arch/powerpc/mm/tlb_64.c index fd8d08c325eb..2bfc4d7e1aa2 100644 --- a/arch/powerpc/mm/tlb_64.c +++ b/arch/powerpc/mm/tlb_64.c | |||
@@ -143,16 +143,22 @@ void hpte_need_flush(struct mm_struct *mm, unsigned long addr, | |||
143 | */ | 143 | */ |
144 | addr &= PAGE_MASK; | 144 | addr &= PAGE_MASK; |
145 | 145 | ||
146 | /* Get page size (maybe move back to caller) */ | 146 | /* Get page size (maybe move back to caller). |
147 | * | ||
148 | * NOTE: when using special 64K mappings in 4K environment like | ||
149 | * for SPEs, we obtain the page size from the slice, which thus | ||
150 | * must still exist (and thus the VMA not reused) at the time | ||
151 | * of this call | ||
152 | */ | ||
147 | if (huge) { | 153 | if (huge) { |
148 | #ifdef CONFIG_HUGETLB_PAGE | 154 | #ifdef CONFIG_HUGETLB_PAGE |
149 | psize = mmu_huge_psize; | 155 | psize = mmu_huge_psize; |
150 | #else | 156 | #else |
151 | BUG(); | 157 | BUG(); |
152 | psize = pte_pagesize_index(pte); /* shutup gcc */ | 158 | psize = pte_pagesize_index(mm, addr, pte); /* shutup gcc */ |
153 | #endif | 159 | #endif |
154 | } else | 160 | } else |
155 | psize = pte_pagesize_index(pte); | 161 | psize = pte_pagesize_index(mm, addr, pte); |
156 | 162 | ||
157 | /* Build full vaddr */ | 163 | /* Build full vaddr */ |
158 | if (!is_kernel_addr(addr)) { | 164 | if (!is_kernel_addr(addr)) { |