Lines Matching +full:2 +full:- +full:way
22 ((((1UL << (cpuinfo.tlb_ptr_sz - cpuinfo.tlb_num_ways_log2))) - 1) \
38 return ((addr | 0xC0000000UL) >> PAGE_SHIFT) << 2; in pteaddr_invalid()
47 unsigned int way; in replace_tlb_one_pid() local
50 /* remember pid/way until we return. */ in replace_tlb_one_pid()
53 WRCTL(CTL_PTEADDR, (addr >> PAGE_SHIFT) << 2); in replace_tlb_one_pid()
55 for (way = 0; way < cpuinfo.tlb_num_ways; way++) { in replace_tlb_one_pid()
60 tlbmisc = TLBMISC_RD | (way << TLBMISC_WAY_SHIFT); in replace_tlb_one_pid()
64 if (((pteaddr >> 2) & 0xfffff) != (addr >> PAGE_SHIFT)) in replace_tlb_one_pid()
73 (way << TLBMISC_WAY_SHIFT); in replace_tlb_one_pid()
90 pr_debug("Flush tlb-entry for vaddr=%#lx\n", addr); in flush_tlb_one_pid()
97 pr_debug("Reload tlb-entry for vaddr=%#lx\n", addr); in reload_tlb_one_pid()
105 unsigned long mmu_pid = get_pid_from_context(&vma->vm_mm->context); in flush_tlb_range()
115 unsigned long mmu_pid = get_pid_from_context(&vma->vm_mm->context); in reload_tlb_page()
126 unsigned int way; in flush_tlb_one() local
129 pr_debug("Flush tlb-entry for vaddr=%#lx\n", addr); in flush_tlb_one()
131 /* remember pid/way until we return. */ in flush_tlb_one()
134 WRCTL(CTL_PTEADDR, (addr >> PAGE_SHIFT) << 2); in flush_tlb_one()
136 for (way = 0; way < cpuinfo.tlb_num_ways; way++) { in flush_tlb_one()
140 tlbmisc = TLBMISC_RD | (way << TLBMISC_WAY_SHIFT); in flush_tlb_one()
144 if (((pteaddr >> 2) & 0xfffff) != (addr >> PAGE_SHIFT)) in flush_tlb_one()
147 pr_debug("Flush entry by writing way=%dl pid=%ld\n", in flush_tlb_one()
148 way, (pid_misc >> TLBMISC_PID_SHIFT)); in flush_tlb_one()
150 tlbmisc = TLBMISC_WE | (way << TLBMISC_WAY_SHIFT); in flush_tlb_one()
169 unsigned int way; in dump_tlb_line() local
172 pr_debug("dump tlb-entries for line=%#lx (addr %08lx)\n", line, in dump_tlb_line()
175 /* remember pid/way until we return */ in dump_tlb_line()
178 WRCTL(CTL_PTEADDR, line << 2); in dump_tlb_line()
180 for (way = 0; way < cpuinfo.tlb_num_ways; way++) { in dump_tlb_line()
185 WRCTL(CTL_TLBMISC, TLBMISC_RD | (way << TLBMISC_WAY_SHIFT)); in dump_tlb_line()
191 pr_debug("-- way:%02x vpn:0x%08lx phys:0x%08lx pid:0x%02lx flags:%c%c%c%c%c\n", in dump_tlb_line()
192 way, in dump_tlb_line()
193 (pteaddr << (PAGE_SHIFT-2)), in dump_tlb_line()
197 (tlbacc & _PAGE_READ ? 'r' : '-'), in dump_tlb_line()
198 (tlbacc & _PAGE_WRITE ? 'w' : '-'), in dump_tlb_line()
199 (tlbacc & _PAGE_EXEC ? 'x' : '-'), in dump_tlb_line()
200 (tlbacc & _PAGE_GLOBAL ? 'g' : '-'), in dump_tlb_line()
201 (tlbacc & _PAGE_CACHED ? 'c' : '-')); in dump_tlb_line()
220 unsigned int way; in flush_tlb_pid() local
223 /* remember pid/way until we return */ in flush_tlb_pid()
229 for (way = 0; way < cpuinfo.tlb_num_ways; way++) { in flush_tlb_pid()
233 tlbmisc = TLBMISC_RD | (way << TLBMISC_WAY_SHIFT); in flush_tlb_pid()
240 tlbmisc = TLBMISC_WE | (way << TLBMISC_WAY_SHIFT); in flush_tlb_pid()
257 if (current->mm == mm) { in flush_tlb_mm()
258 unsigned long mmu_pid = get_pid_from_context(&mm->context); in flush_tlb_mm()
261 memset(&mm->context, 0, sizeof(mm_context_t)); in flush_tlb_mm()
269 unsigned int way; in flush_tlb_all() local
272 /* remember pid/way until we return */ in flush_tlb_all()
275 /* Start at way 0, way is auto-incremented after each TLBACC write */ in flush_tlb_all()
278 /* Map each TLB entry to physcal address 0 with no-access and a in flush_tlb_all()
282 for (way = 0; way < cpuinfo.tlb_num_ways; way++) in flush_tlb_all()
288 /* restore pid/way */ in flush_tlb_all()