Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318430
b: refs/heads/master
c: 597e1c3
h: refs/heads/master
v: v3
  • Loading branch information
Alex Shi authored and H. Peter Anvin committed Jun 28, 2012
1 parent 4227866 commit 6803f6e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3df3212f9722c7e45c723b9ea231a04ba4dbc47c
refs/heads/master: 597e1c3580b7cfd95bb0f3167e2b297bf8a5a3ae
2 changes: 2 additions & 0 deletions trunk/include/asm-generic/tlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
9 changes: 9 additions & 0 deletions trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6803f6e

Please sign in to comment.