xtensa: optimize local_flush_tlb_kernel_range
Don't flush whole TLB if only a small kernel range is requested. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
@@ -149,6 +149,21 @@ void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
|
||||
{
|
||||
if (end > start && start >= TASK_SIZE && end <= PAGE_OFFSET &&
|
||||
end - start < _TLB_ENTRIES << PAGE_SHIFT) {
|
||||
start &= PAGE_MASK;
|
||||
while (start < end) {
|
||||
invalidate_itlb_mapping(start);
|
||||
invalidate_dtlb_mapping(start);
|
||||
start += PAGE_SIZE;
|
||||
}
|
||||
} else {
|
||||
local_flush_tlb_all();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_TLB_SANITY
|
||||
|
||||
static unsigned get_pte_for_vaddr(unsigned vaddr)
|
||||
|
Reference in New Issue
Block a user