diff options
author | jhibbits <jhibbits@FreeBSD.org> | 2014-03-02 15:53:39 +0000 |
---|---|---|
committer | jhibbits <jhibbits@FreeBSD.org> | 2014-03-02 15:53:39 +0000 |
commit | a95a014852d6390c812b8cb5677bacdce3c6bc82 (patch) | |
tree | 8a0e08fd823de275b1eaf29c5abec0d550c468f2 /sys/powerpc/aim | |
parent | ba86c492432dadd23ec1d08ac0d1a14b9b0a904b (diff) | |
download | FreeBSD-src-a95a014852d6390c812b8cb5677bacdce3c6bc82.zip FreeBSD-src-a95a014852d6390c812b8cb5677bacdce3c6bc82.tar.gz |
MFC r261258
Use a loop of dcbz, instead of calling bzero() to zero a page. This matches
what is done in mmu_oea64.c.
Diffstat (limited to 'sys/powerpc/aim')
-rw-r--r-- | sys/powerpc/aim/mmu_oea.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c index ac3e9fe..5451bc3 100644 --- a/sys/powerpc/aim/mmu_oea.c +++ b/sys/powerpc/aim/mmu_oea.c @@ -1084,10 +1084,10 @@ moea_copy_pages(mmu_t mmu, vm_page_t *ma, vm_offset_t a_offset, void moea_zero_page(mmu_t mmu, vm_page_t m) { - vm_offset_t pa = VM_PAGE_TO_PHYS(m); - void *va = (void *)pa; + vm_offset_t off, pa = VM_PAGE_TO_PHYS(m); - bzero(va, PAGE_SIZE); + for (off = 0; off < PAGE_SIZE; off += cacheline_size) + __asm __volatile("dcbz 0,%0" :: "r"(pa + off)); } void @@ -1102,10 +1102,8 @@ moea_zero_page_area(mmu_t mmu, vm_page_t m, int off, int size) void moea_zero_page_idle(mmu_t mmu, vm_page_t m) { - vm_offset_t pa = VM_PAGE_TO_PHYS(m); - void *va = (void *)pa; - bzero(va, PAGE_SIZE); + moea_zero_page(mmu, m); } /* |