]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-ia64/tlb.h
avr32: use kbuild.h macros instead of defining macros in asm-offsets.c
[linux-2.6-omap-h63xx.git] / include / asm-ia64 / tlb.h
index 1b82299d7c1eade77099401b77f4956e06a51771..20d8a39680c212af2e455327fb5782680af8c772 100644 (file)
@@ -37,7 +37,6 @@
  *     }
  *     tlb_finish_mmu(tlb, start, end);        // finish unmap for address space MM
  */
-#include <linux/config.h>
 #include <linux/mm.h>
 #include <linux/pagemap.h>
 #include <linux/swap.h>
@@ -60,12 +59,37 @@ struct mmu_gather {
        unsigned int            nr;             /* == ~0U => fast mode */
        unsigned char           fullmm;         /* non-zero means full mm flush */
        unsigned char           need_flush;     /* really unmapped some PTEs? */
-       unsigned long           freed;          /* number of pages freed */
        unsigned long           start_addr;
        unsigned long           end_addr;
        struct page             *pages[FREE_PTE_NR];
 };
 
+struct ia64_tr_entry {
+       u64 ifa;
+       u64 itir;
+       u64 pte;
+       u64 rr;
+}; /*Record for tr entry!*/
+
+extern int ia64_itr_entry(u64 target_mask, u64 va, u64 pte, u64 log_size);
+extern void ia64_ptr_entry(u64 target_mask, int slot);
+
+extern struct ia64_tr_entry __per_cpu_idtrs[NR_CPUS][2][IA64_TR_ALLOC_MAX];
+
+/*
+ region register macros
+*/
+#define RR_TO_VE(val)   (((val) >> 0) & 0x0000000000000001)
+#define RR_VE(val)     (((val) & 0x0000000000000001) << 0)
+#define RR_VE_MASK     0x0000000000000001L
+#define RR_VE_SHIFT    0
+#define RR_TO_PS(val)  (((val) >> 2) & 0x000000000000003f)
+#define RR_PS(val)     (((val) & 0x000000000000003f) << 2)
+#define RR_PS_MASK     0x00000000000000fcL
+#define RR_PS_SHIFT    2
+#define RR_RID_MASK    0x00000000ffffff00L
+#define RR_TO_RID(val)         ((val >> 8) & 0xffffff)
+
 /* Users of the generic TLB shootdown code must declare this storage space. */
 DECLARE_PER_CPU(struct mmu_gather, mmu_gathers);
 
@@ -147,7 +171,6 @@ tlb_gather_mmu (struct mm_struct *mm, unsigned int full_mm_flush)
         */
        tlb->nr = (num_online_cpus() == 1) ? ~0U : 0;
        tlb->fullmm = full_mm_flush;
-       tlb->freed = 0;
        tlb->start_addr = ~0UL;
        return tlb;
 }
@@ -159,13 +182,6 @@ tlb_gather_mmu (struct mm_struct *mm, unsigned int full_mm_flush)
 static inline void
 tlb_finish_mmu (struct mmu_gather *tlb, unsigned long start, unsigned long end)
 {
-       unsigned long freed = tlb->freed;
-       struct mm_struct *mm = tlb->mm;
-       unsigned long rss = get_mm_counter(mm, rss);
-
-       if (rss < freed)
-               freed = rss;
-       add_mm_counter(mm, rss, -freed);
        /*
         * Note: tlb->nr may be 0 at this point, so we can't rely on tlb->start_addr and
         * tlb->end_addr.
@@ -178,12 +194,6 @@ tlb_finish_mmu (struct mmu_gather *tlb, unsigned long start, unsigned long end)
        put_cpu_var(mmu_gathers);
 }
 
-static inline unsigned int
-tlb_is_full_mm(struct mmu_gather *tlb)
-{
-     return tlb->fullmm;
-}
-
 /*
  * Logically, this routine frees PAGE.  On MP machines, the actual freeing of the page
  * must be delayed until after the TLB has been flushed (see comments at the beginning of