Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250887
b: refs/heads/master
c: 1e56a56
h: refs/heads/master
i:
  250885: 21882db
  250883: 00843c3
  250879: 8f06f45
v: v3
  • Loading branch information
Peter Zijlstra authored and Linus Torvalds committed May 25, 2011
1 parent 5418010 commit b70c556
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 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: 9e14f6741062b6e6a71de75b4375e14c3e92c213
refs/heads/master: 1e56a56410bb64bce62d44563e35a143fc2d515f
28 changes: 17 additions & 11 deletions trunk/arch/sh/include/asm/tlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ struct mmu_gather {
unsigned long start, end;
};

DECLARE_PER_CPU(struct mmu_gather, mmu_gathers);

static inline void init_tlb_gather(struct mmu_gather *tlb)
{
tlb->start = TASK_SIZE;
Expand All @@ -36,17 +34,13 @@ static inline void init_tlb_gather(struct mmu_gather *tlb)
}
}

static inline struct mmu_gather *
tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush)
static inline void
tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned int full_mm_flush)
{
struct mmu_gather *tlb = &get_cpu_var(mmu_gathers);

tlb->mm = mm;
tlb->fullmm = full_mm_flush;

init_tlb_gather(tlb);

return tlb;
}

static inline void
Expand All @@ -57,8 +51,6 @@ tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)

/* keep the page table cache within bounds */
check_pgt_cache();

put_cpu_var(mmu_gathers);
}

static inline void
Expand Down Expand Up @@ -91,7 +83,21 @@ tlb_end_vma(struct mmu_gather *tlb, struct vm_area_struct *vma)
}
}

#define tlb_remove_page(tlb,page) free_page_and_swap_cache(page)
static inline void tlb_flush_mmu(struct mmu_gather *tlb)
{
}

static inline int __tlb_remove_page(struct mmu_gather *tlb, struct page *page)
{
free_page_and_swap_cache(page);
return 1; /* avoid calling tlb_flush_mmu */
}

static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
{
__tlb_remove_page(tlb, page);
}

#define pte_free_tlb(tlb, ptep, addr) pte_free((tlb)->mm, ptep)
#define pmd_free_tlb(tlb, pmdp, addr) pmd_free((tlb)->mm, pmdp)
#define pud_free_tlb(tlb, pudp, addr) pud_free((tlb)->mm, pudp)
Expand Down

0 comments on commit b70c556

Please sign in to comment.