Date: Thu, 26 Apr 2012 13:55:15 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r234703 - in stable/9/sys/powerpc: aim include Message-ID: <201204261355.q3QDtFdi051518@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Thu Apr 26 13:55:15 2012 New Revision: 234703 URL: http://svn.freebsd.org/changeset/base/234703 Log: MFC r234156: We don't need kcopy() in any of the remaining places it is used, so remove it. Modified: stable/9/sys/powerpc/aim/machdep.c stable/9/sys/powerpc/aim/mmu_oea.c stable/9/sys/powerpc/aim/mmu_oea64.c stable/9/sys/powerpc/include/cpu.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/powerpc/aim/machdep.c ============================================================================== --- stable/9/sys/powerpc/aim/machdep.c Thu Apr 26 13:46:16 2012 (r234702) +++ stable/9/sys/powerpc/aim/machdep.c Thu Apr 26 13:55:15 2012 (r234703) @@ -733,36 +733,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: stable/9/sys/powerpc/aim/mmu_oea.c ============================================================================== --- stable/9/sys/powerpc/aim/mmu_oea.c Thu Apr 26 13:46:16 2012 (r234702) +++ stable/9/sys/powerpc/aim/mmu_oea.c Thu Apr 26 13:55:15 2012 (r234703) @@ -991,7 +991,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: stable/9/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/9/sys/powerpc/aim/mmu_oea64.c Thu Apr 26 13:46:16 2012 (r234702) +++ stable/9/sys/powerpc/aim/mmu_oea64.c Thu Apr 26 13:55:15 2012 (r234703) @@ -1096,14 +1096,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: stable/9/sys/powerpc/include/cpu.h ============================================================================== --- stable/9/sys/powerpc/include/cpu.h Thu Apr 26 13:46:16 2012 (r234702) +++ stable/9/sys/powerpc/include/cpu.h Thu Apr 26 13:55:15 2012 (r234703) @@ -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?201204261355.q3QDtFdi051518>