aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/mm/tlb.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-09-27 21:45:45 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-28 07:46:42 -0700
commit0f9578b70a9f112bfb541e1d5ab486a376e64503 (patch)
tree00e93df9f9920c43ace34e28298255dc8a0f9263 /arch/ppc64/mm/tlb.c
parent[PATCH] device-mapper: Fix queue_if_no_path initialisation (diff)
downloadlinux-dev-0f9578b70a9f112bfb541e1d5ab486a376e64503.tar.xz
linux-dev-0f9578b70a9f112bfb541e1d5ab486a376e64503.zip
[PATCH] ppc64: More hugepage fixes
My previous patch fixing invalidation of huge PTEs wasn't good enough, we still had an issue if a PTE invalidation batch contained both small and large pages. This patch fixes this by making sure the batch is flushed if the page size fed to it changes. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to '')
-rw-r--r--arch/ppc64/mm/tlb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/ppc64/mm/tlb.c b/arch/ppc64/mm/tlb.c
index d8a6593a13f0..21fbffb23a43 100644
--- a/arch/ppc64/mm/tlb.c
+++ b/arch/ppc64/mm/tlb.c
@@ -143,7 +143,8 @@ void hpte_update(struct mm_struct *mm, unsigned long addr,
* up scanning and resetting referenced bits then our batch context
* will change mid stream.
*/
- if (unlikely(i != 0 && context != batch->context)) {
+ if (i != 0 && (context != batch->context ||
+ batch->large != pte_huge(pte))) {
flush_tlb_pending();
i = 0;
}
@@ -151,6 +152,7 @@ void hpte_update(struct mm_struct *mm, unsigned long addr,
if (i == 0) {
batch->context = context;
batch->mm = mm;
+ batch->large = pte_huge(pte);
}
batch->pte[i] = __pte(pte);
batch->addr[i] = addr;