From owner-p4-projects@FreeBSD.ORG Sun Nov 1 17:06:15 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BC699106568F; Sun, 1 Nov 2009 17:06:15 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 805CD1065679 for ; Sun, 1 Nov 2009 17:06:15 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6B6858FC16 for ; Sun, 1 Nov 2009 17:06:15 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id nA1H6FY5089515 for ; Sun, 1 Nov 2009 17:06:15 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id nA1H6FIe089513 for perforce@freebsd.org; Sun, 1 Nov 2009 17:06:15 GMT (envelope-from mav@freebsd.org) Date: Sun, 1 Nov 2009 17:06:15 GMT Message-Id: <200911011706.nA1H6FIe089513@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 170042 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 17:06:15 -0000 http://p4web.freebsd.org/chv.cgi?CH=170042 Change 170042 by mav@mav_mavbook on 2009/11/01 17:05:43 IFC Affected files ... .. //depot/projects/scottl-camlock/src/Makefile.inc1#10 integrate .. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#48 integrate .. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#115 integrate .. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt_internal.h#11 integrate .. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_xpt.c#22 integrate .. //depot/projects/scottl-camlock/src/sys/conf/files.ia64#16 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-marvell.c#13 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-siliconimage.c#10 integrate .. //depot/projects/scottl-camlock/src/sys/dev/sym/sym_hipd.c#15 integrate .. //depot/projects/scottl-camlock/src/sys/ia64/ia64/highfp.c#1 branch .. //depot/projects/scottl-camlock/src/sys/ia64/ia64/interrupt.c#14 integrate .. //depot/projects/scottl-camlock/src/sys/ia64/ia64/machdep.c#19 integrate .. //depot/projects/scottl-camlock/src/sys/ia64/ia64/trap.c#14 integrate .. //depot/projects/scottl-camlock/src/sys/ia64/ia64/vm_machdep.c#10 integrate .. //depot/projects/scottl-camlock/src/sys/ia64/include/md_var.h#8 integrate .. //depot/projects/scottl-camlock/src/sys/ia64/include/proc.h#4 integrate .. //depot/projects/scottl-camlock/src/sys/powerpc/aim/copyinout.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/powerpc/aim/swtch.S#5 integrate .. //depot/projects/scottl-camlock/src/sys/powerpc/aim/trap.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/vm/vm_fault.c#25 integrate .. //depot/projects/scottl-camlock/src/usr.sbin/usbconfig/usbconfig.8#3 integrate Differences ... ==== //depot/projects/scottl-camlock/src/Makefile.inc1#10 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.632 2009/10/28 07:05:32 edwin Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.633 2009/11/01 08:20:30 rdivacky Exp $ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir @@ -272,7 +272,7 @@ LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} .endif LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -mfancy-math-387 -DCOMPAT_32BIT \ - -iprefix ${LIB32TMP}/usr/ \ + -isystem ${LIB32TMP}/usr/include/ \ -L${LIB32TMP}/usr/lib32 \ -B${LIB32TMP}/usr/lib32 ==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#48 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/ata/ata_xpt.c,v 1.10 2009/10/31 10:43:38 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/ata/ata_xpt.c,v 1.11 2009/11/01 11:31:06 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#115 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.230 2009/10/31 10:43:38 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.231 2009/11/01 11:31:06 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt_internal.h#11 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/cam/cam_xpt_internal.h,v 1.3 2009/10/21 15:27:48 mav Exp $ + * $FreeBSD: src/sys/cam/cam_xpt_internal.h,v 1.4 2009/11/01 11:31:06 mav Exp $ */ #ifndef _CAM_CAM_XPT_INTERNAL_H ==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_xpt.c#22 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_xpt.c,v 1.5 2009/10/31 10:43:38 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_xpt.c,v 1.6 2009/11/01 11:31:06 mav Exp $"); #include #include ==== //depot/projects/scottl-camlock/src/sys/conf/files.ia64#16 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.ia64,v 1.100 2009/09/03 09:33:57 ed Exp $ +# $FreeBSD: src/sys/conf/files.ia64,v 1.101 2009/10/31 22:27:31 marcel Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -84,6 +84,7 @@ ia64/ia64/emulate.c standard ia64/ia64/exception.S standard ia64/ia64/gdb_machdep.c optional gdb +ia64/ia64/highfp.c standard ia64/ia64/in_cksum.c optional inet ia64/ia64/interrupt.c standard ia64/ia64/locore.S standard no-obj ==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-marvell.c#13 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/chipsets/ata-marvell.c,v 1.14 2009/10/31 13:24:14 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/chipsets/ata-marvell.c,v 1.15 2009/10/31 14:19:50 mav Exp $"); #include "opt_ata.h" #include @@ -591,7 +591,9 @@ /* chip does not reliably do 64K DMA transfers */ if (ctlr->chip->cfg2 == MV_50XX || ctlr->chip->cfg2 == MV_60XX) - ch->dma.max_iosize = 64 * DEV_BSIZE; + ch->dma.max_iosize = 64 * DEV_BSIZE; + else + ch->dma.max_iosize = (ATA_DMA_ENTRIES - 1) * PAGE_SIZE; } ATA_DECLARE_DRIVER(ata_marvell); ==== //depot/projects/scottl-camlock/src/sys/dev/ata/chipsets/ata-siliconimage.c#10 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/chipsets/ata-siliconimage.c,v 1.9 2009/10/31 13:24:14 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/chipsets/ata-siliconimage.c,v 1.10 2009/11/01 13:06:15 mav Exp $"); #include "opt_ata.h" #include ==== //depot/projects/scottl-camlock/src/sys/dev/sym/sym_hipd.c#15 (text+ko) ==== @@ -56,7 +56,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/sym/sym_hipd.c,v 1.72 2008/10/14 20:18:57 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/sym/sym_hipd.c,v 1.73 2009/10/31 17:06:36 se Exp $"); #define SYM_DRIVER_NAME "sym-1.6.5-20000902" @@ -8582,7 +8582,7 @@ * Allocate a tag for the DMA of user data. */ if (bus_dma_tag_create(np->bus_dmat, 1, (1<<24), - BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE, SYM_CONF_MAX_SG, (1<<24), 0, busdma_lock_mutex, &np->mtx, ==== //depot/projects/scottl-camlock/src/sys/ia64/ia64/interrupt.c#14 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/ia64/ia64/interrupt.c,v 1.71 2009/08/13 17:09:45 attilio Exp $ */ +/* $FreeBSD: src/sys/ia64/ia64/interrupt.c,v 1.72 2009/10/31 22:27:31 marcel Exp $ */ /* $NetBSD: interrupt.c,v 1.23 1998/02/24 07:38:01 thorpej Exp $ */ /*- @@ -216,14 +216,7 @@ asts[PCPU_GET(cpuid)]++; CTR1(KTR_SMP, "IPI_AST, cpuid=%d", PCPU_GET(cpuid)); } else if (vector == ipi_vector[IPI_HIGH_FP]) { - struct thread *thr = PCPU_GET(fpcurthread); - if (thr != NULL) { - mtx_lock_spin(&thr->td_md.md_highfp_mtx); - save_high_fp(&thr->td_pcb->pcb_high_fp); - thr->td_pcb->pcb_fpcpu = NULL; - PCPU_SET(fpcurthread, NULL); - mtx_unlock_spin(&thr->td_md.md_highfp_mtx); - } + ia64_highfp_save_ipi(); } else if (vector == ipi_vector[IPI_RENDEZVOUS]) { rdvs[PCPU_GET(cpuid)]++; CTR1(KTR_SMP, "IPI_RENDEZVOUS, cpuid=%d", PCPU_GET(cpuid)); ==== //depot/projects/scottl-camlock/src/sys/ia64/ia64/machdep.c#19 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.247 2009/10/27 10:47:58 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.248 2009/10/31 22:27:31 marcel Exp $"); #include "opt_compat.h" #include "opt_ddb.h" @@ -1461,81 +1461,6 @@ return (0); } -/* - * High FP register functions. - */ - -int -ia64_highfp_drop(struct thread *td) -{ - struct pcb *pcb; - struct pcpu *cpu; - struct thread *thr; - - mtx_lock_spin(&td->td_md.md_highfp_mtx); - pcb = td->td_pcb; - cpu = pcb->pcb_fpcpu; - if (cpu == NULL) { - mtx_unlock_spin(&td->td_md.md_highfp_mtx); - return (0); - } - pcb->pcb_fpcpu = NULL; - thr = cpu->pc_fpcurthread; - cpu->pc_fpcurthread = NULL; - mtx_unlock_spin(&td->td_md.md_highfp_mtx); - - /* Post-mortem sanity checking. */ - KASSERT(thr == td, ("Inconsistent high FP state")); - return (1); -} - -int -ia64_highfp_save(struct thread *td) -{ - struct pcb *pcb; - struct pcpu *cpu; - struct thread *thr; - - /* Don't save if the high FP registers weren't modified. */ - if ((td->td_frame->tf_special.psr & IA64_PSR_MFH) == 0) - return (ia64_highfp_drop(td)); - - mtx_lock_spin(&td->td_md.md_highfp_mtx); - pcb = td->td_pcb; - cpu = pcb->pcb_fpcpu; - if (cpu == NULL) { - mtx_unlock_spin(&td->td_md.md_highfp_mtx); - return (0); - } -#ifdef SMP - if (td == curthread) - sched_pin(); - if (cpu != pcpup) { - mtx_unlock_spin(&td->td_md.md_highfp_mtx); - ipi_send(cpu, IPI_HIGH_FP); - if (td == curthread) - sched_unpin(); - while (pcb->pcb_fpcpu == cpu) - DELAY(100); - return (1); - } else { - save_high_fp(&pcb->pcb_high_fp); - if (td == curthread) - sched_unpin(); - } -#else - save_high_fp(&pcb->pcb_high_fp); -#endif - pcb->pcb_fpcpu = NULL; - thr = cpu->pc_fpcurthread; - cpu->pc_fpcurthread = NULL; - mtx_unlock_spin(&td->td_md.md_highfp_mtx); - - /* Post-mortem sanity cxhecking. */ - KASSERT(thr == td, ("Inconsistent high FP state")); - return (1); -} - void ia64_sync_icache(vm_offset_t va, vm_offset_t sz) { ==== //depot/projects/scottl-camlock/src/sys/ia64/ia64/trap.c#14 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ia64/ia64/trap.c,v 1.130 2008/03/12 10:11:58 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/ia64/ia64/trap.c,v 1.131 2009/10/31 22:27:31 marcel Exp $"); #include "opt_ddb.h" #include "opt_ktrace.h" @@ -652,66 +652,10 @@ break; case IA64_VEC_DISABLED_FP: { - struct pcpu *pcpu; - struct pcb *pcb; - struct thread *thr; - - /* Always fatal in kernel. Should never happen. */ - if (!user) + if (user) + ia64_highfp_enable(td, tf); + else trap_panic(vector, tf); - - sched_pin(); - thr = PCPU_GET(fpcurthread); - if (thr == td) { - /* - * Short-circuit handling the trap when this CPU - * already holds the high FP registers for this - * thread. We really shouldn't get the trap in the - * first place, but since it's only a performance - * issue and not a correctness issue, we emit a - * message for now, enable the high FP registers and - * return. - */ - printf("XXX: bogusly disabled high FP regs\n"); - tf->tf_special.psr &= ~IA64_PSR_DFH; - sched_unpin(); - goto out; - } else if (thr != NULL) { - mtx_lock_spin(&thr->td_md.md_highfp_mtx); - pcb = thr->td_pcb; - save_high_fp(&pcb->pcb_high_fp); - pcb->pcb_fpcpu = NULL; - PCPU_SET(fpcurthread, NULL); - mtx_unlock_spin(&thr->td_md.md_highfp_mtx); - thr = NULL; - } - - mtx_lock_spin(&td->td_md.md_highfp_mtx); - pcb = td->td_pcb; - pcpu = pcb->pcb_fpcpu; - -#ifdef SMP - if (pcpu != NULL) { - mtx_unlock_spin(&td->td_md.md_highfp_mtx); - ipi_send(pcpu, IPI_HIGH_FP); - while (pcb->pcb_fpcpu == pcpu) - DELAY(100); - mtx_lock_spin(&td->td_md.md_highfp_mtx); - pcpu = pcb->pcb_fpcpu; - thr = PCPU_GET(fpcurthread); - } -#endif - - if (thr == NULL && pcpu == NULL) { - restore_high_fp(&pcb->pcb_high_fp); - PCPU_SET(fpcurthread, td); - pcb->pcb_fpcpu = pcpup; - tf->tf_special.psr &= ~IA64_PSR_MFH; - tf->tf_special.psr &= ~IA64_PSR_DFH; - } - - mtx_unlock_spin(&td->td_md.md_highfp_mtx); - sched_unpin(); goto out; } ==== //depot/projects/scottl-camlock/src/sys/ia64/ia64/vm_machdep.c#10 (text+ko) ==== @@ -38,7 +38,7 @@ * * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ - * $FreeBSD: src/sys/ia64/ia64/vm_machdep.c,v 1.96 2009/06/20 05:36:53 marcel Exp $ + * $FreeBSD: src/sys/ia64/ia64/vm_machdep.c,v 1.97 2009/10/31 22:27:31 marcel Exp $ */ /*- * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -120,14 +120,11 @@ sp -= sizeof(struct trapframe); td->td_frame = (struct trapframe *)sp; td->td_frame->tf_length = sizeof(struct trapframe); - mtx_init(&td->td_md.md_highfp_mtx, "High FP lock", NULL, MTX_SPIN); } void cpu_thread_free(struct thread *td) { - - mtx_destroy(&td->td_md.md_highfp_mtx); } void @@ -148,6 +145,8 @@ struct pcb *pcb; struct trapframe *tf; + ia64_highfp_save(td0); + tf = td->td_frame; KASSERT(tf != NULL, ("foo")); bcopy(td0->td_frame, tf, sizeof(*tf)); ==== //depot/projects/scottl-camlock/src/sys/ia64/include/md_var.h#8 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/ia64/include/md_var.h,v 1.29 2009/05/18 18:44:54 marcel Exp $ + * $FreeBSD: src/sys/ia64/include/md_var.h,v 1.30 2009/10/31 22:27:31 marcel Exp $ */ #ifndef _MACHINE_MD_VAR_H_ @@ -86,7 +86,9 @@ int ia64_flush_dirty(struct thread *, struct _special *); uint64_t ia64_get_hcdp(void); int ia64_highfp_drop(struct thread *); +int ia64_highfp_enable(struct thread *, struct trapframe *); int ia64_highfp_save(struct thread *); +int ia64_highfp_save_ipi(void); struct ia64_init_return ia64_init(void); void ia64_probe_sapics(void); void ia64_sync_icache(vm_offset_t, vm_size_t); ==== //depot/projects/scottl-camlock/src/sys/ia64/include/proc.h#4 (text+ko) ==== @@ -23,14 +23,13 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/ia64/include/proc.h,v 1.15 2005/08/06 20:28:19 marcel Exp $ + * $FreeBSD: src/sys/ia64/include/proc.h,v 1.16 2009/10/31 22:27:31 marcel Exp $ */ #ifndef _MACHINE_PROC_H_ #define _MACHINE_PROC_H_ struct mdthread { - struct mtx md_highfp_mtx; int md_spinlock_count; /* (k) */ int md_saved_intr; /* (k) */ }; ==== //depot/projects/scottl-camlock/src/sys/powerpc/aim/copyinout.c#2 (text+ko) ==== @@ -54,7 +54,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/powerpc/aim/copyinout.c,v 1.16 2007/12/14 22:39:34 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/powerpc/aim/copyinout.c,v 1.17 2009/10/31 17:59:24 nwhitehorn Exp $"); #include #include @@ -347,8 +347,19 @@ return (-1); } - val = *p; - (void) atomic_cmpset_32((volatile uint32_t *)p, old, new); + __asm __volatile ( + "1:\tlwarx %0, 0, %2\n\t" /* load old value */ + "cmplw %3, %0\n\t" /* compare */ + "bne 2f\n\t" /* exit if not equal */ + "stwcx. %4, 0, %2\n\t" /* attempt to store */ + "bne- 1b\n\t" /* spin if failed */ + "b 3f\n\t" /* we've succeeded */ + "2:\n\t" + "stwcx. %0, 0, %2\n\t" /* clear reservation (74xx) */ + "3:\n\t" + : "=&r" (val), "=m" (*p) + : "r" (p), "r" (old), "r" (new), "m" (*p) + : "cc", "memory"); td->td_pcb->pcb_onfault = NULL; ==== //depot/projects/scottl-camlock/src/sys/powerpc/aim/swtch.S#5 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/powerpc/aim/swtch.S,v 1.29 2009/10/11 16:44:58 nwhitehorn Exp $ */ +/* $FreeBSD: src/sys/powerpc/aim/swtch.S,v 1.32 2009/10/31 20:59:13 nwhitehorn Exp $ */ /* $NetBSD: locore.S,v 1.24 2000/05/31 05:09:17 thorpej Exp $ */ /*- @@ -57,6 +57,7 @@ */ #include "assym.s" +#include "opt_sched.h" #include @@ -81,36 +82,36 @@ * Switch to a new thread saving the current state in the old thread. */ ENTRY(cpu_switch) - stw %r5,TD_LOCK(%r3) /* ULE: update old thread's lock */ - /* XXX needs to change for MP */ - - lwz %r5,TD_PCB(%r3) /* Get the old thread's PCB ptr */ + lwz %r6,TD_PCB(%r3) /* Get the old thread's PCB ptr */ mr %r12,%r2 - stmw %r12,PCB_CONTEXT(%r5) /* Save the non-volatile GP regs. + stmw %r12,PCB_CONTEXT(%r6) /* Save the non-volatile GP regs. These can now be used for scratch */ mfcr %r16 /* Save the condition register */ - stw %r16,PCB_CR(%r5) + stw %r16,PCB_CR(%r6) mflr %r16 /* Save the link register */ - stw %r16,PCB_LR(%r5) + stw %r16,PCB_LR(%r6) mfsr %r16,USER_SR /* Save USER_SR for copyin/out */ isync - stw %r16,PCB_AIM_USR(%r5) - stw %r1,PCB_SP(%r5) /* Save the stack pointer */ + stw %r16,PCB_AIM_USR(%r6) + stw %r1,PCB_SP(%r6) /* Save the stack pointer */ mr %r14,%r3 /* Copy the old thread ptr... */ mr %r15,%r4 /* and the new thread ptr in scratch */ + mr %r16,%r5 /* and the new lock */ + mr %r17,%r6 /* and the PCB */ - lwz %r6,PCB_FLAGS(%r5) + lwz %r7,PCB_FLAGS(%r17) /* Save FPU context if needed */ - andi. %r6, %r6, PCB_FPU + andi. %r7, %r7, PCB_FPU beq .L1 bl save_fpu .L1: - lwz %r6,PCB_FLAGS(%r5) + mr %r3,%r14 /* restore old thread ptr */ + lwz %r7,PCB_FLAGS(%r17) /* Save Altivec context if needed */ - andi. %r6, %r6, PCB_VEC + andi. %r7, %r7, PCB_VEC beq .L2 bl save_vec @@ -118,7 +119,19 @@ mr %r3,%r14 /* restore old thread ptr */ bl pmap_deactivate /* Deactivate the current pmap */ + stw %r16,TD_LOCK(%r14) /* ULE: update old thread's lock */ + cpu_switchin: +#if defined(SMP) && defined(SCHED_ULE) + /* Wait for the new thread to become unblocked */ + lis %r6,blocked_lock@ha + addi %r6,%r6,blocked_lock@l +blocked_loop: + lwz %r7,TD_LOCK(%r15) + cmpw %r6,%r7 + beq blocked_loop +#endif + mfsprg %r7,0 /* Get the pcpu pointer */ stw %r15,PC_CURTHREAD(%r7) /* Store new current thread */ lwz %r17,TD_PCB(%r15) /* Store new current PCB */ ==== //depot/projects/scottl-camlock/src/sys/powerpc/aim/trap.c#4 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/powerpc/aim/trap.c,v 1.75 2009/04/19 06:30:00 nwhitehorn Exp $"); +__FBSDID("$FreeBSD: src/sys/powerpc/aim/trap.c,v 1.76 2009/10/31 17:46:50 nwhitehorn Exp $"); #include "opt_ktrace.h" @@ -85,8 +85,6 @@ static int handle_onfault(struct trapframe *frame); static void syscall(struct trapframe *frame); -static __inline void setusr(u_int); - int setfault(faultbuf); /* defined in locore.S */ /* Why are these not defined in a header? */ @@ -558,13 +556,6 @@ return (SIGSEGV); } -static __inline void -setusr(u_int content) -{ - __asm __volatile ("isync; mtsr %0,%1; isync" - :: "n"(USER_SR), "r"(content)); -} - int badaddr(void *addr, size_t size) { ==== //depot/projects/scottl-camlock/src/sys/vm/vm_fault.c#25 (text+ko) ==== @@ -72,7 +72,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/vm/vm_fault.c,v 1.257 2009/10/27 10:15:58 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/vm_fault.c,v 1.258 2009/10/31 17:39:56 alc Exp $"); #include "opt_vm.h" @@ -1179,7 +1179,7 @@ dst_object->uip = dst_entry->uip; dst_entry->uip = NULL; } - access = prot = dst_entry->max_protection; + access = prot = dst_entry->protection; /* * If not an upgrade, then enter the mappings in the pmap as * read and/or execute accesses. Otherwise, enter them as ==== //depot/projects/scottl-camlock/src/usr.sbin/usbconfig/usbconfig.8#3 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" $FreeBSD: src/usr.sbin/usbconfig/usbconfig.8,v 1.2 2009/05/27 19:21:29 thompsa Exp $ +.\" $FreeBSD: src/usr.sbin/usbconfig/usbconfig.8,v 1.3 2009/11/01 11:39:07 brueffer Exp $ .\" .\" Copyright (c) 2008 Hans Petter Selasky. All rights reserved. .\" @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd Sep 28, 2008 +.Dd November 1, 2009 .Dt USBCONFIG 8 .Os .Sh NAME @@ -49,5 +49,13 @@ .It Fl h Show help and available commands. .El +.Pp +When called without options, +.Nm +prints a list of all available USB devices. +.Sh EXAMPLES +Show information about the device on USB bus 1 at address 2: +.Pp +.Dl usbconfig -u 1 -a 2 dump_info .Sh SEE ALSO .Xr usb 4