X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-arm26%2Ftlb.h;h=324941bef723d9777678f2806f6aae1af79f446f;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=214185e68a694e0f53b02bb7a61dfaf51fde7fb4;hpb=a8e794ca871505c8ea96cc102f4ad555c5231d7f;p=linux-2.6.git diff --git a/include/asm-arm26/tlb.h b/include/asm-arm26/tlb.h index 214185e68..324941bef 100644 --- a/include/asm-arm26/tlb.h +++ b/include/asm-arm26/tlb.h @@ -1,7 +1,9 @@ #ifndef __ASMARM_TLB_H #define __ASMARM_TLB_H +#include #include +#include /* * TLB handling. This allows us to remove pages from the page @@ -10,6 +12,7 @@ struct mmu_gather { struct mm_struct *mm; unsigned int freed; + unsigned int fullmm; unsigned int flushes; unsigned int avoided_flushes; @@ -25,6 +28,7 @@ tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush) tlb->mm = mm; tlb->freed = 0; + tlb->fullmm = full_mm_flush; return tlb; } @@ -38,7 +42,7 @@ tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) if (rss < freed) freed = rss; - // mm->rss = rss - freed; + // mm->rss = rss - freed; vx_rsspages_sub(mm, freed); if (freed) { @@ -52,8 +56,21 @@ tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) check_pgt_cache(); } + +static inline unsigned int +tlb_is_full_mm(struct mmu_gather *tlb) +{ + return tlb->fullmm; +} + #define tlb_remove_tlb_entry(tlb,ptep,address) do { } while (0) -#define tlb_start_vma(tlb,vma) do { } while (0) +//#define tlb_start_vma(tlb,vma) do { } while (0) +//FIXME - ARM32 uses this now that things changed in the kernel. seems like it may be pointless on arm26, however to get things compiling... +#define tlb_start_vma(tlb,vma) \ + do { \ + if (!tlb->fullmm) \ + flush_cache_range(vma, vma->vm_start, vma->vm_end); \ + } while (0) #define tlb_end_vma(tlb,vma) do { } while (0) #define tlb_remove_page(tlb,page) free_page_and_swap_cache(page)