Date: Wed, 29 Jan 2014 05:58:08 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261258 - head/sys/powerpc/aim Message-ID: <201401290558.s0T5w8CF078978@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Wed Jan 29 05:58:08 2014 New Revision: 261258 URL: http://svnweb.freebsd.org/changeset/base/261258 Log: Use a loop of dcbz, instead of calling bzero() to zero a page. This matches what is done in mmu_oea64.c. MFC after: 1 month Modified: head/sys/powerpc/aim/mmu_oea.c Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Wed Jan 29 05:00:04 2014 (r261257) +++ head/sys/powerpc/aim/mmu_oea.c Wed Jan 29 05:58:08 2014 (r261258) @@ -1084,10 +1084,10 @@ moea_copy_pages(mmu_t mmu, vm_page_t *ma 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 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); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401290558.s0T5w8CF078978>