diff options
Diffstat (limited to 'arch/sparc/mm/srmmu.c')
-rw-r--r-- | arch/sparc/mm/srmmu.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index c664b962987c..58c65cc8d0d3 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
@@ -1302,7 +1302,12 @@ void __init srmmu_paging_init(void) | |||
1302 | 1302 | ||
1303 | flush_cache_all(); | 1303 | flush_cache_all(); |
1304 | srmmu_set_ctable_ptr((unsigned long)srmmu_ctx_table_phys); | 1304 | srmmu_set_ctable_ptr((unsigned long)srmmu_ctx_table_phys); |
1305 | #ifdef CONFIG_SMP | ||
1306 | /* Stop from hanging here... */ | ||
1307 | local_flush_tlb_all(); | ||
1308 | #else | ||
1305 | flush_tlb_all(); | 1309 | flush_tlb_all(); |
1310 | #endif | ||
1306 | poke_srmmu(); | 1311 | poke_srmmu(); |
1307 | 1312 | ||
1308 | #ifdef CONFIG_SUN_IO | 1313 | #ifdef CONFIG_SUN_IO |
@@ -1419,6 +1424,7 @@ static void __init init_vac_layout(void) | |||
1419 | max_size = vac_cache_size; | 1424 | max_size = vac_cache_size; |
1420 | if(vac_line_size < min_line_size) | 1425 | if(vac_line_size < min_line_size) |
1421 | min_line_size = vac_line_size; | 1426 | min_line_size = vac_line_size; |
1427 | //FIXME: cpus not contiguous!! | ||
1422 | cpu++; | 1428 | cpu++; |
1423 | if (cpu >= NR_CPUS || !cpu_online(cpu)) | 1429 | if (cpu >= NR_CPUS || !cpu_online(cpu)) |
1424 | break; | 1430 | break; |
@@ -2130,6 +2136,13 @@ static unsigned long srmmu_pte_to_pgoff(pte_t pte) | |||
2130 | return pte_val(pte) >> SRMMU_PTE_FILE_SHIFT; | 2136 | return pte_val(pte) >> SRMMU_PTE_FILE_SHIFT; |
2131 | } | 2137 | } |
2132 | 2138 | ||
2139 | static pgprot_t srmmu_pgprot_noncached(pgprot_t prot) | ||
2140 | { | ||
2141 | prot &= ~__pgprot(SRMMU_CACHE); | ||
2142 | |||
2143 | return prot; | ||
2144 | } | ||
2145 | |||
2133 | /* Load up routines and constants for sun4m and sun4d mmu */ | 2146 | /* Load up routines and constants for sun4m and sun4d mmu */ |
2134 | void __init ld_mmu_srmmu(void) | 2147 | void __init ld_mmu_srmmu(void) |
2135 | { | 2148 | { |
@@ -2150,9 +2163,9 @@ void __init ld_mmu_srmmu(void) | |||
2150 | BTFIXUPSET_INT(page_readonly, pgprot_val(SRMMU_PAGE_RDONLY)); | 2163 | BTFIXUPSET_INT(page_readonly, pgprot_val(SRMMU_PAGE_RDONLY)); |
2151 | BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL)); | 2164 | BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL)); |
2152 | page_kernel = pgprot_val(SRMMU_PAGE_KERNEL); | 2165 | page_kernel = pgprot_val(SRMMU_PAGE_KERNEL); |
2153 | pg_iobits = SRMMU_VALID | SRMMU_WRITE | SRMMU_REF; | ||
2154 | 2166 | ||
2155 | /* Functions */ | 2167 | /* Functions */ |
2168 | BTFIXUPSET_CALL(pgprot_noncached, srmmu_pgprot_noncached, BTFIXUPCALL_NORM); | ||
2156 | #ifndef CONFIG_SMP | 2169 | #ifndef CONFIG_SMP |
2157 | BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4md, BTFIXUPCALL_SWAPG1G2); | 2170 | BTFIXUPSET_CALL(___xchg32, ___xchg32_sun4md, BTFIXUPCALL_SWAPG1G2); |
2158 | #endif | 2171 | #endif |