From owner-svn-src-head@FreeBSD.ORG Wed Apr 11 22:23:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61404106564A; Wed, 11 Apr 2012 22:23:51 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 426288FC0C; Wed, 11 Apr 2012 22:23:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3BMNpZB098396; Wed, 11 Apr 2012 22:23:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3BMNp6l098391; Wed, 11 Apr 2012 22:23:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204112223.q3BMNp6l098391@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 11 Apr 2012 22:23:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234156 - in head/sys/powerpc: aim include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Apr 2012 22:23:51 -0000 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_ */