From 6803f6e5950d42d03a738bd693acda348f61769f Mon Sep 17 00:00:00 2001 From: Alex Shi Date: Thu, 28 Jun 2012 09:02:21 +0800 Subject: [PATCH] --- yaml --- r: 318430 b: refs/heads/master c: 597e1c3580b7cfd95bb0f3167e2b297bf8a5a3ae h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/asm-generic/tlb.h | 2 ++ trunk/mm/memory.c | 9 +++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 9b09818da691..01e1ceffe9c2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3df3212f9722c7e45c723b9ea231a04ba4dbc47c +refs/heads/master: 597e1c3580b7cfd95bb0f3167e2b297bf8a5a3ae diff --git a/trunk/include/asm-generic/tlb.h b/trunk/include/asm-generic/tlb.h index 75e888b3cfd2..ed6642ad03e0 100644 --- a/trunk/include/asm-generic/tlb.h +++ b/trunk/include/asm-generic/tlb.h @@ -86,6 +86,8 @@ struct mmu_gather { #ifdef CONFIG_HAVE_RCU_TABLE_FREE struct mmu_table_batch *batch; #endif + unsigned long start; + unsigned long end; unsigned int need_flush : 1, /* Did free PTEs */ fast_mode : 1; /* No batching */ diff --git a/trunk/mm/memory.c b/trunk/mm/memory.c index 1b7dc662bf9f..32c99433cfdf 100644 --- a/trunk/mm/memory.c +++ b/trunk/mm/memory.c @@ -206,6 +206,8 @@ void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, bool fullmm) tlb->mm = mm; tlb->fullmm = fullmm; + tlb->start = -1UL; + tlb->end = 0; tlb->need_flush = 0; tlb->fast_mode = (num_possible_cpus() == 1); tlb->local.next = NULL; @@ -248,6 +250,8 @@ void tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long e { struct mmu_gather_batch *batch, *next; + tlb->start = start; + tlb->end = end; tlb_flush_mmu(tlb); /* keep the page table cache within bounds */ @@ -1204,6 +1208,11 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb, */ if (force_flush) { force_flush = 0; + +#ifdef HAVE_GENERIC_MMU_GATHER + tlb->start = addr; + tlb->end = end; +#endif tlb_flush_mmu(tlb); if (addr != end) goto again;