|
@@ -57,6 +57,7 @@ void local_flush_tlb_all(void)
|
|
local_irq_save(flags);
|
|
local_irq_save(flags);
|
|
/* Save old context and create impossible VPN2 value */
|
|
/* Save old context and create impossible VPN2 value */
|
|
old_ctx = read_c0_entryhi();
|
|
old_ctx = read_c0_entryhi();
|
|
|
|
+ htw_stop();
|
|
write_c0_entrylo0(0);
|
|
write_c0_entrylo0(0);
|
|
write_c0_entrylo1(0);
|
|
write_c0_entrylo1(0);
|
|
|
|
|
|
@@ -90,6 +91,7 @@ void local_flush_tlb_all(void)
|
|
}
|
|
}
|
|
tlbw_use_hazard();
|
|
tlbw_use_hazard();
|
|
write_c0_entryhi(old_ctx);
|
|
write_c0_entryhi(old_ctx);
|
|
|
|
+ htw_start();
|
|
flush_itlb();
|
|
flush_itlb();
|
|
local_irq_restore(flags);
|
|
local_irq_restore(flags);
|
|
}
|
|
}
|
|
@@ -131,6 +133,7 @@ void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
|
|
int oldpid = read_c0_entryhi();
|
|
int oldpid = read_c0_entryhi();
|
|
int newpid = cpu_asid(cpu, mm);
|
|
int newpid = cpu_asid(cpu, mm);
|
|
|
|
|
|
|
|
+ htw_stop();
|
|
while (start < end) {
|
|
while (start < end) {
|
|
int idx;
|
|
int idx;
|
|
|
|
|
|
@@ -151,6 +154,7 @@ void local_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
|
|
}
|
|
}
|
|
tlbw_use_hazard();
|
|
tlbw_use_hazard();
|
|
write_c0_entryhi(oldpid);
|
|
write_c0_entryhi(oldpid);
|
|
|
|
+ htw_start();
|
|
} else {
|
|
} else {
|
|
drop_mmu_context(mm, cpu);
|
|
drop_mmu_context(mm, cpu);
|
|
}
|
|
}
|
|
@@ -174,6 +178,7 @@ void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
|
|
start &= (PAGE_MASK << 1);
|
|
start &= (PAGE_MASK << 1);
|
|
end += ((PAGE_SIZE << 1) - 1);
|
|
end += ((PAGE_SIZE << 1) - 1);
|
|
end &= (PAGE_MASK << 1);
|
|
end &= (PAGE_MASK << 1);
|
|
|
|
+ htw_stop();
|
|
|
|
|
|
while (start < end) {
|
|
while (start < end) {
|
|
int idx;
|
|
int idx;
|
|
@@ -195,6 +200,7 @@ void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
|
|
}
|
|
}
|
|
tlbw_use_hazard();
|
|
tlbw_use_hazard();
|
|
write_c0_entryhi(pid);
|
|
write_c0_entryhi(pid);
|
|
|
|
+ htw_start();
|
|
} else {
|
|
} else {
|
|
local_flush_tlb_all();
|
|
local_flush_tlb_all();
|
|
}
|
|
}
|
|
@@ -214,6 +220,7 @@ void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
|
|
page &= (PAGE_MASK << 1);
|
|
page &= (PAGE_MASK << 1);
|
|
local_irq_save(flags);
|
|
local_irq_save(flags);
|
|
oldpid = read_c0_entryhi();
|
|
oldpid = read_c0_entryhi();
|
|
|
|
+ htw_stop();
|
|
write_c0_entryhi(page | newpid);
|
|
write_c0_entryhi(page | newpid);
|
|
mtc0_tlbw_hazard();
|
|
mtc0_tlbw_hazard();
|
|
tlb_probe();
|
|
tlb_probe();
|
|
@@ -231,6 +238,7 @@ void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
|
|
|
|
|
|
finish:
|
|
finish:
|
|
write_c0_entryhi(oldpid);
|
|
write_c0_entryhi(oldpid);
|
|
|
|
+ htw_start();
|
|
flush_itlb_vm(vma);
|
|
flush_itlb_vm(vma);
|
|
local_irq_restore(flags);
|
|
local_irq_restore(flags);
|
|
}
|
|
}
|
|
@@ -247,6 +255,7 @@ void local_flush_tlb_one(unsigned long page)
|
|
|
|
|
|
local_irq_save(flags);
|
|
local_irq_save(flags);
|
|
oldpid = read_c0_entryhi();
|
|
oldpid = read_c0_entryhi();
|
|
|
|
+ htw_stop();
|
|
page &= (PAGE_MASK << 1);
|
|
page &= (PAGE_MASK << 1);
|
|
write_c0_entryhi(page);
|
|
write_c0_entryhi(page);
|
|
mtc0_tlbw_hazard();
|
|
mtc0_tlbw_hazard();
|
|
@@ -263,6 +272,7 @@ void local_flush_tlb_one(unsigned long page)
|
|
tlbw_use_hazard();
|
|
tlbw_use_hazard();
|
|
}
|
|
}
|
|
write_c0_entryhi(oldpid);
|
|
write_c0_entryhi(oldpid);
|
|
|
|
+ htw_start();
|
|
flush_itlb();
|
|
flush_itlb();
|
|
local_irq_restore(flags);
|
|
local_irq_restore(flags);
|
|
}
|
|
}
|
|
@@ -351,6 +361,7 @@ void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
|
|
local_irq_save(flags);
|
|
local_irq_save(flags);
|
|
/* Save old context and create impossible VPN2 value */
|
|
/* Save old context and create impossible VPN2 value */
|
|
old_ctx = read_c0_entryhi();
|
|
old_ctx = read_c0_entryhi();
|
|
|
|
+ htw_stop();
|
|
old_pagemask = read_c0_pagemask();
|
|
old_pagemask = read_c0_pagemask();
|
|
wired = read_c0_wired();
|
|
wired = read_c0_wired();
|
|
write_c0_wired(wired + 1);
|
|
write_c0_wired(wired + 1);
|
|
@@ -366,6 +377,7 @@ void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
|
|
|
|
|
|
write_c0_entryhi(old_ctx);
|
|
write_c0_entryhi(old_ctx);
|
|
tlbw_use_hazard(); /* What is the hazard here? */
|
|
tlbw_use_hazard(); /* What is the hazard here? */
|
|
|
|
+ htw_start();
|
|
write_c0_pagemask(old_pagemask);
|
|
write_c0_pagemask(old_pagemask);
|
|
local_flush_tlb_all();
|
|
local_flush_tlb_all();
|
|
local_irq_restore(flags);
|
|
local_irq_restore(flags);
|