diff options
Diffstat (limited to 'arch/sh/include/asm/tlb.h')
| -rw-r--r-- | arch/sh/include/asm/tlb.h | 43 | 
1 files changed, 30 insertions, 13 deletions
diff --git a/arch/sh/include/asm/tlb.h b/arch/sh/include/asm/tlb.h index 75abb38dffd..62f80d2a9df 100644 --- a/arch/sh/include/asm/tlb.h +++ b/arch/sh/include/asm/tlb.h @@ -2,13 +2,14 @@  #define __ASM_SH_TLB_H  #ifdef CONFIG_SUPERH64 -# include "tlb_64.h" +# include <asm/tlb_64.h>  #endif  #ifndef __ASSEMBLY__  #include <linux/pagemap.h>  #ifdef CONFIG_MMU +#include <linux/swap.h>  #include <asm/pgalloc.h>  #include <asm/tlbflush.h>  #include <asm/mmu_context.h> @@ -23,8 +24,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; @@ -36,17 +35,15 @@ 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 long start, unsigned long end)  { -	struct mmu_gather *tlb = &get_cpu_var(mmu_gathers); -  	tlb->mm = mm; -	tlb->fullmm = full_mm_flush; +	tlb->start = start; +	tlb->end = end; +	tlb->fullmm = !(start | (end+1));  	init_tlb_gather(tlb); - -	return tlb;  }  static inline void @@ -57,8 +54,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 @@ -91,7 +86,29 @@ 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_tlbonly(struct mmu_gather *tlb) +{ +} + +static inline void tlb_flush_mmu_free(struct mmu_gather *tlb) +{ +} + +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)  | 
