]> err.no Git - linux-2.6/blobdiff - include/asm-ppc64/mmu.h
[PATCH] flattened device tree changes
[linux-2.6] / include / asm-ppc64 / mmu.h
index 8891180368031d6586680635f49992c0e316ad03..959a4bfdcd6a64820e0b0fa9c1181e545c4123d1 100644 (file)
@@ -259,8 +259,10 @@ extern void stabs_alloc(void);
 #define VSID_BITS      36
 #define VSID_MODULUS   ((1UL<<VSID_BITS)-1)
 
-#define CONTEXT_BITS   20
-#define USER_ESID_BITS 15
+#define CONTEXT_BITS   19
+#define USER_ESID_BITS 16
+
+#define USER_VSID_RANGE        (1UL << (USER_ESID_BITS + SID_SHIFT))
 
 /*
  * This macro generates asm code to compute the VSID scramble
@@ -302,7 +304,6 @@ 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;
@@ -338,6 +339,9 @@ static inline unsigned long get_vsid(unsigned long context, unsigned long ea)
                             | (ea >> SID_SHIFT));
 }
 
+#define VSID_SCRAMBLE(pvsid)   (((pvsid) * VSID_MULTIPLIER) % VSID_MODULUS)
+#define KERNEL_VSID(ea)                VSID_SCRAMBLE(GET_ESID(ea))
+
 #endif /* __ASSEMBLY */
 
 #endif /* _PPC64_MMU_H_ */