diff options
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r-- | arch/sparc/mm/init_64.c | 9 | ||||
-rw-r--r-- | arch/sparc/mm/tsb.c | 17 |
2 files changed, 2 insertions, 24 deletions
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index 7a9b788c6ced..809eecf6c797 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -276,7 +276,6 @@ static inline void tsb_insert(struct tsb *ent, unsigned long tag, unsigned long | |||
276 | } | 276 | } |
277 | 277 | ||
278 | unsigned long _PAGE_ALL_SZ_BITS __read_mostly; | 278 | unsigned long _PAGE_ALL_SZ_BITS __read_mostly; |
279 | unsigned long _PAGE_SZBITS __read_mostly; | ||
280 | 279 | ||
281 | static void flush_dcache(unsigned long pfn) | 280 | static void flush_dcache(unsigned long pfn) |
282 | { | 281 | { |
@@ -2275,8 +2274,7 @@ static void __init sun4u_pgprot_init(void) | |||
2275 | __ACCESS_BITS_4U | _PAGE_E_4U); | 2274 | __ACCESS_BITS_4U | _PAGE_E_4U); |
2276 | 2275 | ||
2277 | #ifdef CONFIG_DEBUG_PAGEALLOC | 2276 | #ifdef CONFIG_DEBUG_PAGEALLOC |
2278 | kern_linear_pte_xor[0] = (_PAGE_VALID | _PAGE_SZBITS_4U) ^ | 2277 | kern_linear_pte_xor[0] = _PAGE_VALID ^ 0xfffff80000000000UL; |
2279 | 0xfffff80000000000UL; | ||
2280 | #else | 2278 | #else |
2281 | kern_linear_pte_xor[0] = (_PAGE_VALID | _PAGE_SZ4MB_4U) ^ | 2279 | kern_linear_pte_xor[0] = (_PAGE_VALID | _PAGE_SZ4MB_4U) ^ |
2282 | 0xfffff80000000000UL; | 2280 | 0xfffff80000000000UL; |
@@ -2287,7 +2285,6 @@ static void __init sun4u_pgprot_init(void) | |||
2287 | for (i = 1; i < 4; i++) | 2285 | for (i = 1; i < 4; i++) |
2288 | kern_linear_pte_xor[i] = kern_linear_pte_xor[0]; | 2286 | kern_linear_pte_xor[i] = kern_linear_pte_xor[0]; |
2289 | 2287 | ||
2290 | _PAGE_SZBITS = _PAGE_SZBITS_4U; | ||
2291 | _PAGE_ALL_SZ_BITS = (_PAGE_SZ4MB_4U | _PAGE_SZ512K_4U | | 2288 | _PAGE_ALL_SZ_BITS = (_PAGE_SZ4MB_4U | _PAGE_SZ512K_4U | |
2292 | _PAGE_SZ64K_4U | _PAGE_SZ8K_4U | | 2289 | _PAGE_SZ64K_4U | _PAGE_SZ8K_4U | |
2293 | _PAGE_SZ32MB_4U | _PAGE_SZ256MB_4U); | 2290 | _PAGE_SZ32MB_4U | _PAGE_SZ256MB_4U); |
@@ -2324,8 +2321,7 @@ static void __init sun4v_pgprot_init(void) | |||
2324 | _PAGE_CACHE = _PAGE_CACHE_4V; | 2321 | _PAGE_CACHE = _PAGE_CACHE_4V; |
2325 | 2322 | ||
2326 | #ifdef CONFIG_DEBUG_PAGEALLOC | 2323 | #ifdef CONFIG_DEBUG_PAGEALLOC |
2327 | kern_linear_pte_xor[0] = (_PAGE_VALID | _PAGE_SZBITS_4V) ^ | 2324 | kern_linear_pte_xor[0] = _PAGE_VALID ^ 0xfffff80000000000UL; |
2328 | 0xfffff80000000000UL; | ||
2329 | #else | 2325 | #else |
2330 | kern_linear_pte_xor[0] = (_PAGE_VALID | _PAGE_SZ4MB_4V) ^ | 2326 | kern_linear_pte_xor[0] = (_PAGE_VALID | _PAGE_SZ4MB_4V) ^ |
2331 | 0xfffff80000000000UL; | 2327 | 0xfffff80000000000UL; |
@@ -2339,7 +2335,6 @@ static void __init sun4v_pgprot_init(void) | |||
2339 | pg_iobits = (_PAGE_VALID | _PAGE_PRESENT_4V | __DIRTY_BITS_4V | | 2335 | pg_iobits = (_PAGE_VALID | _PAGE_PRESENT_4V | __DIRTY_BITS_4V | |
2340 | __ACCESS_BITS_4V | _PAGE_E_4V); | 2336 | __ACCESS_BITS_4V | _PAGE_E_4V); |
2341 | 2337 | ||
2342 | _PAGE_SZBITS = _PAGE_SZBITS_4V; | ||
2343 | _PAGE_ALL_SZ_BITS = (_PAGE_SZ16GB_4V | _PAGE_SZ2GB_4V | | 2338 | _PAGE_ALL_SZ_BITS = (_PAGE_SZ16GB_4V | _PAGE_SZ2GB_4V | |
2344 | _PAGE_SZ256MB_4V | _PAGE_SZ32MB_4V | | 2339 | _PAGE_SZ256MB_4V | _PAGE_SZ32MB_4V | |
2345 | _PAGE_SZ4MB_4V | _PAGE_SZ512K_4V | | 2340 | _PAGE_SZ4MB_4V | _PAGE_SZ512K_4V | |
diff --git a/arch/sparc/mm/tsb.c b/arch/sparc/mm/tsb.c index c52add79b83d..70e50ea2a5b6 100644 --- a/arch/sparc/mm/tsb.c +++ b/arch/sparc/mm/tsb.c | |||
@@ -90,29 +90,12 @@ void flush_tsb_user(struct tlb_batch *tb) | |||
90 | spin_unlock_irqrestore(&mm->context.lock, flags); | 90 | spin_unlock_irqrestore(&mm->context.lock, flags); |
91 | } | 91 | } |
92 | 92 | ||
93 | #if defined(CONFIG_SPARC64_PAGE_SIZE_8KB) | ||
94 | #define HV_PGSZ_IDX_BASE HV_PGSZ_IDX_8K | 93 | #define HV_PGSZ_IDX_BASE HV_PGSZ_IDX_8K |
95 | #define HV_PGSZ_MASK_BASE HV_PGSZ_MASK_8K | 94 | #define HV_PGSZ_MASK_BASE HV_PGSZ_MASK_8K |
96 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_64KB) | ||
97 | #define HV_PGSZ_IDX_BASE HV_PGSZ_IDX_64K | ||
98 | #define HV_PGSZ_MASK_BASE HV_PGSZ_MASK_64K | ||
99 | #else | ||
100 | #error Broken base page size setting... | ||
101 | #endif | ||
102 | 95 | ||
103 | #ifdef CONFIG_HUGETLB_PAGE | 96 | #ifdef CONFIG_HUGETLB_PAGE |
104 | #if defined(CONFIG_HUGETLB_PAGE_SIZE_64K) | ||
105 | #define HV_PGSZ_IDX_HUGE HV_PGSZ_IDX_64K | ||
106 | #define HV_PGSZ_MASK_HUGE HV_PGSZ_MASK_64K | ||
107 | #elif defined(CONFIG_HUGETLB_PAGE_SIZE_512K) | ||
108 | #define HV_PGSZ_IDX_HUGE HV_PGSZ_IDX_512K | ||
109 | #define HV_PGSZ_MASK_HUGE HV_PGSZ_MASK_512K | ||
110 | #elif defined(CONFIG_HUGETLB_PAGE_SIZE_4MB) | ||
111 | #define HV_PGSZ_IDX_HUGE HV_PGSZ_IDX_4MB | 97 | #define HV_PGSZ_IDX_HUGE HV_PGSZ_IDX_4MB |
112 | #define HV_PGSZ_MASK_HUGE HV_PGSZ_MASK_4MB | 98 | #define HV_PGSZ_MASK_HUGE HV_PGSZ_MASK_4MB |
113 | #else | ||
114 | #error Broken huge page size setting... | ||
115 | #endif | ||
116 | #endif | 99 | #endif |
117 | 100 | ||
118 | static void setup_tsb_params(struct mm_struct *mm, unsigned long tsb_idx, unsigned long tsb_bytes) | 101 | static void setup_tsb_params(struct mm_struct *mm, unsigned long tsb_idx, unsigned long tsb_bytes) |