Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143549
b: refs/heads/master
c: 7fccfc0
h: refs/heads/master
i:
  143547: 5362716
v: v3
  • Loading branch information
Aaro Koskinen authored and Russell King committed Apr 15, 2009
1 parent f83e3fe commit 6ba2a7d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 41609ff43005de11dadfb0ccadb344f0e2966829
refs/heads/master: 7fccfc00c003c855936970facdbb667bae9dbe9a
25 changes: 21 additions & 4 deletions trunk/arch/arm/include/asm/tlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
struct mmu_gather {
struct mm_struct *mm;
unsigned int fullmm;
unsigned long range_start;
unsigned long range_end;
};

DECLARE_PER_CPU(struct mmu_gather, mmu_gathers);
Expand Down Expand Up @@ -63,7 +65,19 @@ tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
put_cpu_var(mmu_gathers);
}

#define tlb_remove_tlb_entry(tlb,ptep,address) do { } while (0)
/*
* Memorize the range for the TLB flush.
*/
static inline void
tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep, unsigned long addr)
{
if (!tlb->fullmm) {
if (addr < tlb->range_start)
tlb->range_start = addr;
if (addr + PAGE_SIZE > tlb->range_end)
tlb->range_end = addr + PAGE_SIZE;
}
}

/*
* In the case of tlb vma handling, we can optimise these away in the
Expand All @@ -73,15 +87,18 @@ tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
static inline void
tlb_start_vma(struct mmu_gather *tlb, struct vm_area_struct *vma)
{
if (!tlb->fullmm)
if (!tlb->fullmm) {
flush_cache_range(vma, vma->vm_start, vma->vm_end);
tlb->range_start = TASK_SIZE;
tlb->range_end = 0;
}
}

static inline void
tlb_end_vma(struct mmu_gather *tlb, struct vm_area_struct *vma)
{
if (!tlb->fullmm)
flush_tlb_range(vma, vma->vm_start, vma->vm_end);
if (!tlb->fullmm && tlb->range_end > 0)
flush_tlb_range(vma, tlb->range_start, tlb->range_end);
}

#define tlb_remove_page(tlb,page) free_page_and_swap_cache(page)
Expand Down

0 comments on commit 6ba2a7d

Please sign in to comment.