aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-05-12 15:02:02 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-12 15:02:02 -0400
commit3d386c0ef60cf4810f6d5c62b637a8fb55ec9b2e (patch)
tree0e72d3205ead9b7d4c2deee90c553dc3b0477b13 /arch
parent6066fc3dc40009b2d386b99dde223150055127ca (diff)
sparc32: Un-btfixup PGDIR_{SHIFT,SIZE,MASK} {USER_,}PTRS_PER_{PGD,PMD}
Only one set of values exist, the SRMMU ones. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/include/asm/pgtable_32.h20
-rw-r--r--arch/sparc/mm/srmmu.c9
2 files changed, 6 insertions, 23 deletions
diff --git a/arch/sparc/include/asm/pgtable_32.h b/arch/sparc/include/asm/pgtable_32.h
index 4a29b050d744..227118577a94 100644
--- a/arch/sparc/include/asm/pgtable_32.h
+++ b/arch/sparc/include/asm/pgtable_32.h
@@ -28,14 +28,6 @@ struct page;
28extern void load_mmu(void); 28extern void load_mmu(void);
29extern unsigned long calc_highpages(void); 29extern unsigned long calc_highpages(void);
30 30
31BTFIXUPDEF_SIMM13(pgdir_shift)
32BTFIXUPDEF_SETHI(pgdir_size)
33BTFIXUPDEF_SETHI(pgdir_mask)
34
35BTFIXUPDEF_SIMM13(ptrs_per_pmd)
36BTFIXUPDEF_SIMM13(ptrs_per_pgd)
37BTFIXUPDEF_SIMM13(user_ptrs_per_pgd)
38
39#define pte_ERROR(e) __builtin_trap() 31#define pte_ERROR(e) __builtin_trap()
40#define pmd_ERROR(e) __builtin_trap() 32#define pmd_ERROR(e) __builtin_trap()
41#define pgd_ERROR(e) __builtin_trap() 33#define pgd_ERROR(e) __builtin_trap()
@@ -49,13 +41,13 @@ BTFIXUPDEF_INT(page_kernel)
49#define PMD_SIZE (1UL << PMD_SHIFT) 41#define PMD_SIZE (1UL << PMD_SHIFT)
50#define PMD_MASK (~(PMD_SIZE-1)) 42#define PMD_MASK (~(PMD_SIZE-1))
51#define PMD_ALIGN(__addr) (((__addr) + ~PMD_MASK) & PMD_MASK) 43#define PMD_ALIGN(__addr) (((__addr) + ~PMD_MASK) & PMD_MASK)
52#define PGDIR_SHIFT BTFIXUP_SIMM13(pgdir_shift) 44#define PGDIR_SHIFT SRMMU_PGDIR_SHIFT
53#define PGDIR_SIZE BTFIXUP_SETHI(pgdir_size) 45#define PGDIR_SIZE SRMMU_PGDIR_SIZE
54#define PGDIR_MASK BTFIXUP_SETHI(pgdir_mask) 46#define PGDIR_MASK SRMMU_PGDIR_MASK
55#define PTRS_PER_PTE 1024 47#define PTRS_PER_PTE 1024
56#define PTRS_PER_PMD BTFIXUP_SIMM13(ptrs_per_pmd) 48#define PTRS_PER_PMD SRMMU_PTRS_PER_PMD
57#define PTRS_PER_PGD BTFIXUP_SIMM13(ptrs_per_pgd) 49#define PTRS_PER_PGD SRMMU_PTRS_PER_PGD
58#define USER_PTRS_PER_PGD BTFIXUP_SIMM13(user_ptrs_per_pgd) 50#define USER_PTRS_PER_PGD PAGE_OFFSET / SRMMU_PGDIR_SIZE
59#define FIRST_USER_ADDRESS 0 51#define FIRST_USER_ADDRESS 0
60#define PTE_SIZE (PTRS_PER_PTE*4) 52#define PTE_SIZE (PTRS_PER_PTE*4)
61 53
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index cb18fa80b19c..38fcb83aaae9 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -1248,8 +1248,6 @@ static inline void map_kernel(void)
1248 for (i = 0; sp_banks[i].num_bytes != 0; i++) { 1248 for (i = 0; sp_banks[i].num_bytes != 0; i++) {
1249 map_spbank((unsigned long)__va(sp_banks[i].base_addr), i); 1249 map_spbank((unsigned long)__va(sp_banks[i].base_addr), i);
1250 } 1250 }
1251
1252 BTFIXUPSET_SIMM13(user_ptrs_per_pgd, PAGE_OFFSET / SRMMU_PGDIR_SIZE);
1253} 1251}
1254 1252
1255/* Paging initialization on the Sparc Reference MMU. */ 1253/* Paging initialization on the Sparc Reference MMU. */
@@ -2145,13 +2143,6 @@ void __init ld_mmu_srmmu(void)
2145 extern void ld_mmu_iounit(void); 2143 extern void ld_mmu_iounit(void);
2146 extern void ___xchg32_sun4md(void); 2144 extern void ___xchg32_sun4md(void);
2147 2145
2148 BTFIXUPSET_SIMM13(pgdir_shift, SRMMU_PGDIR_SHIFT);
2149 BTFIXUPSET_SETHI(pgdir_size, SRMMU_PGDIR_SIZE);
2150 BTFIXUPSET_SETHI(pgdir_mask, SRMMU_PGDIR_MASK);
2151
2152 BTFIXUPSET_SIMM13(ptrs_per_pmd, SRMMU_PTRS_PER_PMD);
2153 BTFIXUPSET_SIMM13(ptrs_per_pgd, SRMMU_PTRS_PER_PGD);
2154
2155 BTFIXUPSET_INT(page_none, pgprot_val(SRMMU_PAGE_NONE)); 2146 BTFIXUPSET_INT(page_none, pgprot_val(SRMMU_PAGE_NONE));
2156 PAGE_SHARED = pgprot_val(SRMMU_PAGE_SHARED); 2147 PAGE_SHARED = pgprot_val(SRMMU_PAGE_SHARED);
2157 BTFIXUPSET_INT(page_copy, pgprot_val(SRMMU_PAGE_COPY)); 2148 BTFIXUPSET_INT(page_copy, pgprot_val(SRMMU_PAGE_COPY));