summaryrefslogtreecommitdiff
path: root/arch/ppc64/mm/tlb.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc64/mm/tlb.c')
-rw-r--r--arch/ppc64/mm/tlb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/ppc64/mm/tlb.c b/arch/ppc64/mm/tlb.c
index 31afd95bf870..09ab81a10f4f 100644
--- a/arch/ppc64/mm/tlb.c
+++ b/arch/ppc64/mm/tlb.c
@@ -141,12 +141,14 @@ 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 && mm != batch->mm)) {
+ if (i != 0 && (mm != batch->mm || batch->large != pte_huge(pte))) {
flush_tlb_pending();
i = 0;
}
- if (i == 0)
+ if (i == 0) {
batch->mm = mm;
+ batch->large = pte_huge(pte);
+ }
if (addr < KERNELBASE) {
vsid = get_vsid(mm->context.id, addr);
WARN_ON(vsid == 0);