Date: Wed, 11 Apr 2012 22:23:51 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r234156 - in head/sys/powerpc: aim include Message-ID: <201204112223.q3BMNp6l098391@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Wed Apr 11 22:23:50 2012 New Revision: 234156 URL: http://svn.freebsd.org/changeset/base/234156 Log: We don't need kcopy() in any of the remaining places it is used, so remove it. MFC after: 2 weeks Modified: head/sys/powerpc/aim/machdep.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/include/cpu.h Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Wed Apr 11 21:56:55 2012 (r234155) +++ head/sys/powerpc/aim/machdep.c Wed Apr 11 22:23:50 2012 (r234156) @@ -738,36 +738,6 @@ spinlock_exit(void) intr_restore(msr); } -/* - * kcopy(const void *src, void *dst, size_t len); - * - * Copy len bytes from src to dst, aborting if we encounter a fatal - * page fault. - * - * kcopy() _must_ save and restore the old fault handler since it is - * called by uiomove(), which may be in the path of servicing a non-fatal - * page fault. - */ -int -kcopy(const void *src, void *dst, size_t len) -{ - struct thread *td; - faultbuf env, *oldfault; - int rv; - - td = curthread; - oldfault = td->td_pcb->pcb_onfault; - if ((rv = setfault(env)) != 0) { - td->td_pcb->pcb_onfault = oldfault; - return rv; - } - - memcpy(dst, src, len); - - td->td_pcb->pcb_onfault = oldfault; - return (0); -} - int db_trap_glue(struct trapframe *); /* Called from trap_subr.S */ int Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Wed Apr 11 21:56:55 2012 (r234155) +++ head/sys/powerpc/aim/mmu_oea.c Wed Apr 11 22:23:50 2012 (r234156) @@ -1023,7 +1023,7 @@ moea_copy_page(mmu_t mmu, vm_page_t msrc dst = VM_PAGE_TO_PHYS(mdst); src = VM_PAGE_TO_PHYS(msrc); - kcopy((void *)src, (void *)dst, PAGE_SIZE); + bcopy((void *)src, (void *)dst, PAGE_SIZE); } /* Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Wed Apr 11 21:56:55 2012 (r234155) +++ head/sys/powerpc/aim/mmu_oea64.c Wed Apr 11 22:23:50 2012 (r234156) @@ -1097,14 +1097,14 @@ moea64_copy_page(mmu_t mmu, vm_page_t ms src = VM_PAGE_TO_PHYS(msrc); if (hw_direct_map) { - kcopy((void *)src, (void *)dst, PAGE_SIZE); + bcopy((void *)src, (void *)dst, PAGE_SIZE); } else { mtx_lock(&moea64_scratchpage_mtx); moea64_set_scratchpage_pa(mmu, 0, src); moea64_set_scratchpage_pa(mmu, 1, dst); - kcopy((void *)moea64_scratchpage_va[0], + bcopy((void *)moea64_scratchpage_va[0], (void *)moea64_scratchpage_va[1], PAGE_SIZE); mtx_unlock(&moea64_scratchpage_mtx); Modified: head/sys/powerpc/include/cpu.h ============================================================================== --- head/sys/powerpc/include/cpu.h Wed Apr 11 21:56:55 2012 (r234155) +++ head/sys/powerpc/include/cpu.h Wed Apr 11 22:23:50 2012 (r234156) @@ -100,6 +100,5 @@ void swi_vm(void *); /* XXX the following should not be here. */ void savectx(struct pcb *); -int kcopy(const void *, void *, size_t); #endif /* _MACHINE_CPU_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204112223.q3BMNp6l098391>