#include <asm/pgalloc.h>
#include <asm/tlbflush.h>
+#include <linux/vs_memory.h>
/*
* TLB handling. This allows us to remove pages from the page
struct mmu_gather {
struct mm_struct *mm;
unsigned int freed;
+ unsigned int fullmm;
unsigned int flushes;
unsigned int avoided_flushes;
tlb->mm = mm;
tlb->freed = 0;
+ tlb->fullmm = full_mm_flush;
return tlb;
}
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)