vserver 1.9.5.x5
[linux-2.6.git] / include / asm-ppc64 / mmu.h
index 616389d..188987e 100644 (file)
@@ -24,6 +24,7 @@ typedef unsigned long mm_context_id_t;
 typedef struct {
        mm_context_id_t id;
 #ifdef CONFIG_HUGETLB_PAGE
+       pgd_t *huge_pgdir;
        u16 htlb_segs; /* bitmask */
 #endif
 } mm_context_t;
@@ -97,15 +98,8 @@ typedef struct {
 #define PP_RXRX 3      /* Supervisor read,       User read */
 
 
-typedef struct {
-       HPTE *          htab;
-       unsigned long   htab_num_ptegs;
-       unsigned long   htab_hash_mask;
-       unsigned long   next_round_robin;
-       unsigned long   last_kernel_address;
-} HTAB;
-
-extern HTAB htab_data;
+extern HPTE *          htab_address;
+extern unsigned long   htab_hash_mask;
 
 static inline unsigned long hpt_hash(unsigned long vpn, int large)
 {
@@ -128,10 +122,13 @@ static inline void __tlbie(unsigned long va, int large)
        /* clear top 16 bits, non SLS segment */
        va &= ~(0xffffULL << 48);
 
-       if (large)
+       if (large) {
+               va &= HPAGE_MASK;
                asm volatile("tlbie %0,1" : : "r"(va) : "memory");
-       else
+       } else {
+               va &= PAGE_MASK;
                asm volatile("tlbie %0,0" : : "r"(va) : "memory");
+       }
 }
 
 static inline void tlbie(unsigned long va, int large)
@@ -145,6 +142,7 @@ static inline void __tlbiel(unsigned long va)
 {
        /* clear top 16 bits, non SLS segment */
        va &= ~(0xffffULL << 48);
+       va &= PAGE_MASK;
 
        /* 
         * Thanks to Alan Modra we are now able to use machine specific