Commit 7d1a0d87 authored by Pete Zaitcev's avatar Pete Zaitcev Committed by David S. Miller

[sparc]: pte_file with constant number of bits.

parent b4917940
...@@ -2199,8 +2199,6 @@ void __init ld_mmu_srmmu(void) ...@@ -2199,8 +2199,6 @@ void __init ld_mmu_srmmu(void)
page_kernel = pgprot_val(SRMMU_PAGE_KERNEL); page_kernel = pgprot_val(SRMMU_PAGE_KERNEL);
pg_iobits = SRMMU_VALID | SRMMU_WRITE | SRMMU_REF; pg_iobits = SRMMU_VALID | SRMMU_WRITE | SRMMU_REF;
BTFIXUPSET_SIMM13(pte_file_max_bits, SRMMU_PTE_FILE_MAX_BITS);
/* Functions */ /* Functions */
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4md, BTFIXUPCALL_SWAPG1G2); BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4md, BTFIXUPCALL_SWAPG1G2);
......
...@@ -1808,7 +1808,7 @@ static pte_t sun4c_pgoff_to_pte(unsigned long pgoff) ...@@ -1808,7 +1808,7 @@ static pte_t sun4c_pgoff_to_pte(unsigned long pgoff)
static unsigned long sun4c_pte_to_pgoff(pte_t pte) 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) ...@@ -2127,8 +2127,6 @@ void __init ld_mmu_sun4c(void)
pg_iobits = _SUN4C_PAGE_PRESENT | _SUN4C_READABLE | _SUN4C_WRITEABLE | pg_iobits = _SUN4C_PAGE_PRESENT | _SUN4C_READABLE | _SUN4C_WRITEABLE |
_SUN4C_PAGE_IO | _SUN4C_PAGE_NOCACHE; _SUN4C_PAGE_IO | _SUN4C_PAGE_NOCACHE;
BTFIXUPSET_SIMM13(pte_file_max_bits, SUN4C_PTE_FILE_MAX_BITS);
/* Functions */ /* Functions */
BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4c, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4c, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(do_check_pgt_cache, sun4c_check_pgt_cache, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(do_check_pgt_cache, sun4c_check_pgt_cache, BTFIXUPCALL_NORM);
......
...@@ -263,6 +263,8 @@ extern __inline__ int pte_file(pte_t pte) ...@@ -263,6 +263,8 @@ extern __inline__ int pte_file(pte_t pte)
return pte_val(pte) & BTFIXUP_HALF(pte_filei); return pte_val(pte) & BTFIXUP_HALF(pte_filei);
} }
/*
*/
BTFIXUPDEF_HALF(pte_wrprotecti) BTFIXUPDEF_HALF(pte_wrprotecti)
BTFIXUPDEF_HALF(pte_mkcleani) BTFIXUPDEF_HALF(pte_mkcleani)
BTFIXUPDEF_HALF(pte_mkoldi) BTFIXUPDEF_HALF(pte_mkoldi)
...@@ -387,11 +389,15 @@ extern int invalid_segment; ...@@ -387,11 +389,15 @@ extern int invalid_segment;
/* file-offset-in-pte helpers */ /* file-offset-in-pte helpers */
BTFIXUPDEF_CALL(unsigned long, pte_to_pgoff, pte_t pte); BTFIXUPDEF_CALL(unsigned long, pte_to_pgoff, pte_t pte);
BTFIXUPDEF_CALL(pte_t, pgoff_to_pte, unsigned long pgoff); 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 pte_to_pgoff(pte) BTFIXUP_CALL(pte_to_pgoff)(pte)
#define pgoff_to_pte(off) BTFIXUP_CALL(pgoff_to_pte)(off) #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
/* /*
*/ */
......
...@@ -64,8 +64,7 @@ ...@@ -64,8 +64,7 @@
#define SRMMU_FILE 0x40 /* Implemented in software */ #define SRMMU_FILE 0x40 /* Implemented in software */
#define SRMMU_PTE_FILE_MAX_BITS 24 #define SRMMU_PTE_FILE_SHIFT 8 /* == 32-PTE_FILE_MAX_BITS */
#define SRMMU_PTE_FILE_SHIFT 8
#define SRMMU_CHG_MASK (0xffffff00 | SRMMU_REF | SRMMU_DIRTY) #define SRMMU_CHG_MASK (0xffffff00 | SRMMU_REF | SRMMU_DIRTY)
......
...@@ -74,12 +74,6 @@ ...@@ -74,12 +74,6 @@
#define SUN4C_PAGE_KERNEL __pgprot(_SUN4C_READABLE|_SUN4C_WRITEABLE|\ #define SUN4C_PAGE_KERNEL __pgprot(_SUN4C_READABLE|_SUN4C_WRITEABLE|\
_SUN4C_PAGE_DIRTY|_SUN4C_PAGE_PRIV) _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__ #ifndef __ASSEMBLY__
extern __inline__ unsigned long sun4c_get_synchronous_error(void) extern __inline__ unsigned long sun4c_get_synchronous_error(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment