diff options
Diffstat (limited to 'arch/mips/mm/tlb-r4k.c')
-rw-r--r-- | arch/mips/mm/tlb-r4k.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index 21d04dfa11db..c618eed933a1 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c | |||
@@ -303,7 +303,7 @@ void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte) | |||
303 | unsigned long lo; | 303 | unsigned long lo; |
304 | write_c0_pagemask(PM_HUGE_MASK); | 304 | write_c0_pagemask(PM_HUGE_MASK); |
305 | ptep = (pte_t *)pmdp; | 305 | ptep = (pte_t *)pmdp; |
306 | lo = pte_val(*ptep) >> 6; | 306 | lo = pte_to_entrylo(pte_val(*ptep)); |
307 | write_c0_entrylo0(lo); | 307 | write_c0_entrylo0(lo); |
308 | write_c0_entrylo1(lo + (HPAGE_SIZE >> 7)); | 308 | write_c0_entrylo1(lo + (HPAGE_SIZE >> 7)); |
309 | 309 | ||
@@ -323,8 +323,8 @@ void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte) | |||
323 | ptep++; | 323 | ptep++; |
324 | write_c0_entrylo1(ptep->pte_high); | 324 | write_c0_entrylo1(ptep->pte_high); |
325 | #else | 325 | #else |
326 | write_c0_entrylo0(pte_val(*ptep++) >> 6); | 326 | write_c0_entrylo0(pte_to_entrylo(pte_val(*ptep++))); |
327 | write_c0_entrylo1(pte_val(*ptep) >> 6); | 327 | write_c0_entrylo1(pte_to_entrylo(pte_val(*ptep))); |
328 | #endif | 328 | #endif |
329 | mtc0_tlbw_hazard(); | 329 | mtc0_tlbw_hazard(); |
330 | if (idx < 0) | 330 | if (idx < 0) |
@@ -437,6 +437,19 @@ void __cpuinit tlb_init(void) | |||
437 | current_cpu_type() == CPU_R12000 || | 437 | current_cpu_type() == CPU_R12000 || |
438 | current_cpu_type() == CPU_R14000) | 438 | current_cpu_type() == CPU_R14000) |
439 | write_c0_framemask(0); | 439 | write_c0_framemask(0); |
440 | |||
441 | if (kernel_uses_smartmips_rixi) { | ||
442 | /* | ||
443 | * Enable the no read, no exec bits, and enable large virtual | ||
444 | * address. | ||
445 | */ | ||
446 | u32 pg = PG_RIE | PG_XIE; | ||
447 | #ifdef CONFIG_64BIT | ||
448 | pg |= PG_ELPA; | ||
449 | #endif | ||
450 | write_c0_pagegrain(pg); | ||
451 | } | ||
452 | |||
440 | temp_tlb_entry = current_cpu_data.tlbsize - 1; | 453 | temp_tlb_entry = current_cpu_data.tlbsize - 1; |
441 | 454 | ||
442 | /* From this point on the ARC firmware is dead. */ | 455 | /* From this point on the ARC firmware is dead. */ |