mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-03 12:35:02 +00:00
Optimize zero_page for book-e mmu.
Instead of indirectly calling bzero() through mmu_booke_zero_page_area, zero the full page the same way as the AIM pmap logic does: using dcbz.
This commit is contained in:
parent
459021cc7d
commit
eabf894627
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=292901
@ -2235,8 +2235,17 @@ mmu_booke_zero_page_area(mmu_t mmu, vm_page_t m, int off, int size)
|
||||
static void
|
||||
mmu_booke_zero_page(mmu_t mmu, vm_page_t m)
|
||||
{
|
||||
vm_offset_t off, va;
|
||||
|
||||
mmu_booke_zero_page_area(mmu, m, 0, PAGE_SIZE);
|
||||
mtx_lock(&zero_page_mutex);
|
||||
va = zero_page_va;
|
||||
|
||||
mmu_booke_kenter(mmu, va, VM_PAGE_TO_PHYS(m));
|
||||
for (off = 0; off < PAGE_SIZE; off += cacheline_size)
|
||||
__asm __volatile("dcbzl 0,%0" :: "r"(va + off));
|
||||
mmu_booke_kremove(mmu, va);
|
||||
|
||||
mtx_unlock(&zero_page_mutex);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user