diff options
| -rw-r--r-- | arch/nios2/mm/tlb.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/nios2/mm/tlb.c b/arch/nios2/mm/tlb.c index 58c16d35f501..2469f88ef7f3 100644 --- a/arch/nios2/mm/tlb.c +++ b/arch/nios2/mm/tlb.c | |||
| @@ -242,21 +242,20 @@ void flush_tlb_all(void) | |||
| 242 | unsigned long addr = 0; | 242 | unsigned long addr = 0; |
| 243 | unsigned int line; | 243 | unsigned int line; |
| 244 | unsigned int way; | 244 | unsigned int way; |
| 245 | unsigned long org_misc, pid_misc, tlbmisc; | 245 | unsigned long org_misc, pid_misc; |
| 246 | 246 | ||
| 247 | /* remember pid/way until we return */ | 247 | /* remember pid/way until we return */ |
| 248 | get_misc_and_pid(&org_misc, &pid_misc); | 248 | get_misc_and_pid(&org_misc, &pid_misc); |
| 249 | 249 | ||
| 250 | /* Start at way 0, way is auto-incremented after each TLBACC write */ | ||
| 251 | WRCTL(CTL_TLBMISC, TLBMISC_WE); | ||
| 252 | |||
| 250 | /* Map each TLB entry to physcal address 0 with no-access and a | 253 | /* Map each TLB entry to physcal address 0 with no-access and a |
| 251 | bad ptbase */ | 254 | bad ptbase */ |
| 252 | for (line = 0; line < cpuinfo.tlb_num_lines; line++) { | 255 | for (line = 0; line < cpuinfo.tlb_num_lines; line++) { |
| 253 | WRCTL(CTL_PTEADDR, pteaddr_invalid(addr)); | 256 | WRCTL(CTL_PTEADDR, pteaddr_invalid(addr)); |
| 254 | 257 | for (way = 0; way < cpuinfo.tlb_num_ways; way++) | |
| 255 | for (way = 0; way < cpuinfo.tlb_num_ways; way++) { | ||
| 256 | tlbmisc = TLBMISC_WE | (way << TLBMISC_WAY_SHIFT); | ||
| 257 | WRCTL(CTL_TLBMISC, tlbmisc); | ||
| 258 | WRCTL(CTL_TLBACC, 0); | 258 | WRCTL(CTL_TLBACC, 0); |
| 259 | } | ||
| 260 | 259 | ||
| 261 | addr += PAGE_SIZE; | 260 | addr += PAGE_SIZE; |
| 262 | } | 261 | } |
