]> git.hungrycats.org Git - linux/commitdiff
[sparc]: pte_file with constant number of bits.
authorPete Zaitcev <zaitcev@redhat.com>
Sun, 13 Apr 2003 15:32:35 +0000 (08:32 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Sun, 13 Apr 2003 15:32:35 +0000 (08:32 -0700)
arch/sparc/mm/srmmu.c
arch/sparc/mm/sun4c.c
include/asm-sparc/pgtable.h
include/asm-sparc/pgtsrmmu.h
include/asm-sparc/pgtsun4c.h

index a6ddaa35264b5cbefb88ea27288a96073b243943..ee0ae591e311b61a20f4c97603e346eec7f97852 100644 (file)
@@ -2199,8 +2199,6 @@ void __init ld_mmu_srmmu(void)
        page_kernel = pgprot_val(SRMMU_PAGE_KERNEL);
        pg_iobits = SRMMU_VALID | SRMMU_WRITE | SRMMU_REF;
 
-       BTFIXUPSET_SIMM13(pte_file_max_bits, SRMMU_PTE_FILE_MAX_BITS);
-
        /* Functions */
 #ifndef CONFIG_SMP     
        BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4md, BTFIXUPCALL_SWAPG1G2);
index caef830d43889971dc86e35023c601e1dd1bdd5d..9cda5ee63d9899bd06d34ff0aaf72a8e6ed29fcd 100644 (file)
@@ -1808,7 +1808,7 @@ static pte_t sun4c_pgoff_to_pte(unsigned long pgoff)
 
 static unsigned long sun4c_pte_to_pgoff(pte_t pte)
 {
-       return pte_val(pte) & ((1UL << SUN4C_PTE_FILE_MAX_BITS) - 1);
+       return pte_val(pte) & ((1UL << PTE_FILE_MAX_BITS) - 1);
 }
 
 
@@ -2127,8 +2127,6 @@ void __init ld_mmu_sun4c(void)
        pg_iobits = _SUN4C_PAGE_PRESENT | _SUN4C_READABLE | _SUN4C_WRITEABLE |
                    _SUN4C_PAGE_IO | _SUN4C_PAGE_NOCACHE;
 
-       BTFIXUPSET_SIMM13(pte_file_max_bits, SUN4C_PTE_FILE_MAX_BITS);
-
        /* Functions */
        BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4c, BTFIXUPCALL_NORM);
        BTFIXUPSET_CALL(do_check_pgt_cache, sun4c_check_pgt_cache, BTFIXUPCALL_NORM);
index 65fd1f63d1527b4d375748cf1346ee124594a8fc..c25c0d4f7461085dac52dd520f8c1c516ba0deb4 100644 (file)
@@ -263,6 +263,8 @@ extern __inline__ int pte_file(pte_t pte)
        return pte_val(pte) & BTFIXUP_HALF(pte_filei);
 }
 
+/*
+ */
 BTFIXUPDEF_HALF(pte_wrprotecti)
 BTFIXUPDEF_HALF(pte_mkcleani)
 BTFIXUPDEF_HALF(pte_mkoldi)
@@ -387,11 +389,15 @@ extern int invalid_segment;
 /* file-offset-in-pte helpers */
 BTFIXUPDEF_CALL(unsigned long, pte_to_pgoff, pte_t pte);
 BTFIXUPDEF_CALL(pte_t, pgoff_to_pte, unsigned long pgoff);
-BTFIXUPDEF_SIMM13(pte_file_max_bits);
 
 #define pte_to_pgoff(pte) BTFIXUP_CALL(pte_to_pgoff)(pte)
 #define pgoff_to_pte(off) BTFIXUP_CALL(pgoff_to_pte)(off)
-#define PTE_FILE_MAX_BITS BTFIXUP_SIMM13(pte_file_max_bits)
+
+/*
+ * This is made a constant because mm/fremap.c required a constant.
+ * Note that layout of these bits is different between sun4c.c and srmmu.c.
+ */
+#define PTE_FILE_MAX_BITS 24
 
 /*
  */
index 424ee0dc35224c23106b78f6f1818d96f3836383..0d90d4c018844beb422ea6afe9bb50e0a9a7beeb 100644 (file)
@@ -64,8 +64,7 @@
 
 #define SRMMU_FILE         0x40        /* Implemented in software */
 
-#define SRMMU_PTE_FILE_MAX_BITS        24
-#define SRMMU_PTE_FILE_SHIFT     8
+#define SRMMU_PTE_FILE_SHIFT     8     /* == 32-PTE_FILE_MAX_BITS */
 
 #define SRMMU_CHG_MASK    (0xffffff00 | SRMMU_REF | SRMMU_DIRTY)
 
index 3c70fc60a9e4d2d28202d35de67f253e82200e40..efc081004262bfba1cf02f7256c62359626e3e25 100644 (file)
 #define SUN4C_PAGE_KERNEL      __pgprot(_SUN4C_READABLE|_SUN4C_WRITEABLE|\
                                         _SUN4C_PAGE_DIRTY|_SUN4C_PAGE_PRIV)
 
-/*
- * We have a couple of free bits left, but it's probably not a big
- * deal, considering sizes of RAM and swap on sun4c.
- */
-#define SUN4C_PTE_FILE_MAX_BITS        20
-
 #ifndef __ASSEMBLY__
 
 extern __inline__ unsigned long sun4c_get_synchronous_error(void)