]> git.neil.brown.name Git - history.git/commitdiff
Move VPTE_BASE_foo definitions to common
authorKanoj Sarcar <kanojsarcar@yahoo.com>
Tue, 19 Mar 2002 15:26:06 +0000 (07:26 -0800)
committerDavid S. Miller <davem@nuts.ninka.net>
Tue, 19 Mar 2002 15:26:06 +0000 (07:26 -0800)
header instead of scattered all over assembly files.

arch/sparc64/kernel/head.S
arch/sparc64/kernel/trampoline.S
include/asm-sparc64/pgalloc.h
include/asm-sparc64/processor.h

index d7962d774f04556b22fac724411942d78338cd95..6ada27709a5aaf5a45ba2680d9d620f7a2ef8509 100644 (file)
@@ -565,13 +565,6 @@ setup_tba: /* i0 = is_starfire */
 #define KERN_HIGHBITS          ((_PAGE_VALID|_PAGE_SZ4MB)^0xfffff80000000000)
 #define KERN_LOWBITS           (_PAGE_CP | _PAGE_CV | _PAGE_P | _PAGE_W)
 
-#define VPTE_BASE_SPITFIRE     0xfffffffe00000000
-#if 1
-#define VPTE_BASE_CHEETAH      VPTE_BASE_SPITFIRE
-#else
-#define VPTE_BASE_CHEETAH      0xffe0000000000000
-#endif
-
        mov     TSB_REG, %g1
        stxa    %g0, [%g1] ASI_DMMU
        membar  #Sync
@@ -602,8 +595,6 @@ setup_tba:  /* i0 = is_starfire */
        clr     %g7
 #undef KERN_HIGHBITS
 #undef KERN_LOWBITS
-#undef VPTE_BASE_SPITFIRE
-#undef VPTE_BASE_CHEETAH
 
        /* Setup Interrupt globals */
        wrpr    %o1, (PSTATE_IG|PSTATE_IE), %pstate
index acd6d0a67722f235a79462a07a49896507c13528..5c90fbe30a61e18e67eac225c21456bde7860fa7 100644 (file)
@@ -215,13 +215,6 @@ startup_continue:
 #define KERN_HIGHBITS          ((_PAGE_VALID|_PAGE_SZ4MB)^0xfffff80000000000)
 #define KERN_LOWBITS           (_PAGE_CP | _PAGE_CV | _PAGE_P | _PAGE_W)
 
-#define VPTE_BASE_SPITFIRE     0xfffffffe00000000
-#if 1
-#define VPTE_BASE_CHEETAH      VPTE_BASE_SPITFIRE
-#else
-#define VPTE_BASE_CHEETAH      0xffe0000000000000
-#endif
-
        mov             TSB_REG, %g1
        stxa            %g0, [%g1] ASI_DMMU
        membar          #Sync
@@ -252,8 +245,6 @@ startup_continue:
        clr     %g7
 #undef KERN_HIGHBITS
 #undef KERN_LOWBITS
-#undef VPTE_BASE_SPITFIRE
-#undef VPTE_BASE_CHEETAH
 
        wrpr            %o1, 0x0, %pstate
        ldx             [%g6 + TI_TASK], %g4
index d2909390fc6d2e6055f2ac09fb2766b57fcd04cf..7f3f59461552c827a73e4e12d0a82ec13a753095 100644 (file)
 #include <asm/spitfire.h>
 #include <asm/pgtable.h>
 
-#define VPTE_BASE_SPITFIRE     0xfffffffe00000000
-#if 1
-#define VPTE_BASE_CHEETAH      VPTE_BASE_SPITFIRE
-#else
-#define VPTE_BASE_CHEETAH      0xffe0000000000000
-#endif
-
 static __inline__ void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start,
                                          unsigned long end)
 {
@@ -42,8 +35,6 @@ static __inline__ void flush_tlb_pgtables(struct mm_struct *mm, unsigned long st
                                vpte_base + (e >> (PAGE_SHIFT - 3)));
        }
 }
-#undef VPTE_BASE_SPITFIRE
-#undef VPTE_BASE_CHEETAH
 
 /* Page table allocation/freeing. */
 #ifdef CONFIG_SMP
index 1815502bf7003e6e79a20ba850af1fa99322f3f8..2f9061f38856d1af01239ee50eadc2a628a6a46d 100644 (file)
  * address that the kernel will allocate out.
  */
 #define VA_BITS                44
+#ifndef __ASSEMBLY__
 #define VPTE_SIZE      (1UL << (VA_BITS - PAGE_SHIFT + 3))
+#else
+#define VPTE_SIZE      (1 << (VA_BITS - PAGE_SHIFT + 3))
+#endif
 #define TASK_SIZE      ((unsigned long)-VPTE_SIZE)
 
+/*
+ * The vpte base must be able to hold the entire vpte, half
+ * of which lives above, and half below, the base. And it
+ * is placed as close to the highest address range as possible.
+ */
+#define VPTE_BASE_SPITFIRE     (-(VPTE_SIZE/2))
+#if 1
+#define VPTE_BASE_CHEETAH      VPTE_BASE_SPITFIRE
+#else
+#define VPTE_BASE_CHEETAH      0xffe0000000000000
+#endif
+
 #ifndef __ASSEMBLY__
 
 typedef struct {