12 #include <linux/sched.h>
17 #include <asm/bootinfo.h>
18 #include <asm/mmu_context.h>
19 #include <asm/pgtable.h>
23 #define TFP_TLB_SIZE 384
24 #define TFP_TLB_SET_SHIFT 7
27 #define BARRIER __asm__ __volatile__(".set noreorder\n\t" \
28 "nop; nop; nop; nop; nop; nop;\n\t" \
34 unsigned long old_ctx;
59 drop_mmu_context(mm, cpu);
68 int oldpid, newpid,
size;
74 size = (size + 1) >> 1;
79 drop_mmu_context(mm, cpu);
94 write_c0_vaddr(start);
98 idx = read_c0_tlbset();
117 size = (size + 1) >> 1;
131 while (start < end) {
134 write_c0_vaddr(start);
138 idx = read_c0_tlbset();
163 write_c0_vaddr(page);
166 idx = read_c0_tlbset();
202 write_c0_vaddr(address);
209 write_c0_entrylo(
pte_val(*ptep++) >> 6);
231 status &= ~(ST0_UPS | ST0_KPS);
232 #ifdef CONFIG_PAGE_SIZE_4KB
233 status |= (TFP_PAGESIZE_4K << 32) | (TFP_PAGESIZE_4K << 36);
234 #elif defined(CONFIG_PAGE_SIZE_8KB)
235 status |= (TFP_PAGESIZE_8K << 32) | (TFP_PAGESIZE_8K << 36);
236 #elif defined(CONFIG_PAGE_SIZE_16KB)
237 status |= (TFP_PAGESIZE_16K << 32) | (TFP_PAGESIZE_16K << 36);
238 #elif defined(CONFIG_PAGE_SIZE_64KB)
239 status |= (TFP_PAGESIZE_64K << 32) | (TFP_PAGESIZE_64K << 36);