tlb.c (e5451c8f8330e03ad3cfa16048b4daf961af434f) | tlb.c (195568a10a264a733ec7151a657ab054a0af768f) |
---|---|
1/* 2 * Nios2 TLB handling 3 * 4 * Copyright (C) 2009, Wind River Systems Inc 5 * Implemented by fredrik.markstrom@gmail.com and ivarholmqvist@gmail.com 6 * 7 * This file is subject to the terms and conditions of the GNU General Public 8 * License. See the file "COPYING" in the main directory of this archive --- 88 unchanged lines hidden (view full) --- 97 unsigned long mmu_pid = get_pid_from_context(&vma->vm_mm->context); 98 99 while (start < end) { 100 flush_tlb_one_pid(start, mmu_pid); 101 start += PAGE_SIZE; 102 } 103} 104 | 1/* 2 * Nios2 TLB handling 3 * 4 * Copyright (C) 2009, Wind River Systems Inc 5 * Implemented by fredrik.markstrom@gmail.com and ivarholmqvist@gmail.com 6 * 7 * This file is subject to the terms and conditions of the GNU General Public 8 * License. See the file "COPYING" in the main directory of this archive --- 88 unchanged lines hidden (view full) --- 97 unsigned long mmu_pid = get_pid_from_context(&vma->vm_mm->context); 98 99 while (start < end) { 100 flush_tlb_one_pid(start, mmu_pid); 101 start += PAGE_SIZE; 102 } 103} 104 |
105void flush_tlb_kernel_range(unsigned long start, unsigned long end) 106{ 107 while (start < end) { 108 flush_tlb_one(start); 109 start += PAGE_SIZE; 110 } 111} 112 | |
113/* 114 * This one is only used for pages with the global bit set so we don't care 115 * much about the ASID. 116 */ | 105/* 106 * This one is only used for pages with the global bit set so we don't care 107 * much about the ASID. 108 */ |
117void flush_tlb_one(unsigned long addr) | 109static void flush_tlb_one(unsigned long addr) |
118{ 119 unsigned int way; 120 unsigned long org_misc, pid_misc; 121 122 pr_debug("Flush tlb-entry for vaddr=%#lx\n", addr); 123 124 /* remember pid/way until we return. */ 125 get_misc_and_pid(&org_misc, &pid_misc); --- 23 unchanged lines hidden (view full) --- 149 WRCTL(CTL_TLBMISC, tlbmisc); 150 WRCTL(CTL_TLBACC, (MAX_PHYS_ADDR >> PAGE_SHIFT)); 151 } 152 } 153 154 WRCTL(CTL_TLBMISC, org_misc); 155} 156 | 110{ 111 unsigned int way; 112 unsigned long org_misc, pid_misc; 113 114 pr_debug("Flush tlb-entry for vaddr=%#lx\n", addr); 115 116 /* remember pid/way until we return. */ 117 get_misc_and_pid(&org_misc, &pid_misc); --- 23 unchanged lines hidden (view full) --- 141 WRCTL(CTL_TLBMISC, tlbmisc); 142 WRCTL(CTL_TLBACC, (MAX_PHYS_ADDR >> PAGE_SHIFT)); 143 } 144 } 145 146 WRCTL(CTL_TLBMISC, org_misc); 147} 148 |
149void flush_tlb_kernel_range(unsigned long start, unsigned long end) 150{ 151 while (start < end) { 152 flush_tlb_one(start); 153 start += PAGE_SIZE; 154 } 155} 156 |
|
157void dump_tlb_line(unsigned long line) 158{ 159 unsigned int way; 160 unsigned long org_misc; 161 162 pr_debug("dump tlb-entries for line=%#lx (addr %08lx)\n", line, 163 line << (PAGE_SHIFT + cpuinfo.tlb_num_ways_log2)); 164 --- 111 unchanged lines hidden --- | 157void dump_tlb_line(unsigned long line) 158{ 159 unsigned int way; 160 unsigned long org_misc; 161 162 pr_debug("dump tlb-entries for line=%#lx (addr %08lx)\n", line, 163 line << (PAGE_SHIFT + cpuinfo.tlb_num_ways_log2)); 164 --- 111 unchanged lines hidden --- |