Date: Fri, 15 Aug 2003 20:01:15 -0700 (PDT) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 36240 for review Message-ID: <200308160301.h7G31F7t016661@repoman.freebsd.org>
index | next in thread | raw e-mail
http://perforce.freebsd.org/chv.cgi?CH=36240 Change 36240 by marcel@marcel_nfs on 2003/08/15 20:00:57 IFC @36237 Affected files ... .. //depot/projects/uart/alpha/alpha/critical.c#3 integrate .. //depot/projects/uart/alpha/alpha/mp_machdep.c#6 integrate .. //depot/projects/uart/alpha/alpha/swtch.s#2 integrate .. //depot/projects/uart/alpha/include/critical.h#3 integrate .. //depot/projects/uart/amd64/amd64/critical.c#4 integrate .. //depot/projects/uart/amd64/include/critical.h#3 integrate .. //depot/projects/uart/conf/NOTES#8 integrate .. //depot/projects/uart/conf/files#14 integrate .. //depot/projects/uart/conf/files.i386#6 integrate .. //depot/projects/uart/conf/files.ia64#6 integrate .. //depot/projects/uart/conf/files.pc98#4 integrate .. //depot/projects/uart/conf/majors#2 integrate .. //depot/projects/uart/conf/options#8 integrate .. //depot/projects/uart/contrib/dev/acpica/osunixxf.c#2 integrate .. //depot/projects/uart/ddb/db_access.c#2 integrate .. //depot/projects/uart/dev/acpica/acpi.c#6 integrate .. //depot/projects/uart/dev/acpica/acpi_acad.c#3 integrate .. //depot/projects/uart/dev/acpica/acpi_cmbat.c#3 integrate .. //depot/projects/uart/dev/ath/if_ath.c#6 integrate .. //depot/projects/uart/dev/ath/if_ath_pci.c#3 integrate .. //depot/projects/uart/dev/bge/if_bge.c#6 integrate .. //depot/projects/uart/dev/bge/if_bgereg.h#4 integrate .. //depot/projects/uart/dev/bktr/bktr_audio.c#2 integrate .. //depot/projects/uart/dev/bktr/bktr_audio.h#2 integrate .. //depot/projects/uart/dev/bktr/bktr_core.c#3 integrate .. //depot/projects/uart/dev/bktr/bktr_os.c#2 integrate .. //depot/projects/uart/dev/bktr/bktr_reg.h#2 integrate .. //depot/projects/uart/dev/bktr/msp34xx.c#1 branch .. //depot/projects/uart/dev/ciss/ciss.c#4 integrate .. //depot/projects/uart/dev/dgb/dgb.c#2 integrate .. //depot/projects/uart/dev/firewire/fwohci.c#7 integrate .. //depot/projects/uart/dev/mii/brgphy.c#3 integrate .. //depot/projects/uart/dev/pccard/pccarddevs#7 integrate .. //depot/projects/uart/dev/pccard/pccarddevs.h#7 integrate .. //depot/projects/uart/dev/pccbb/pccbb.c#4 integrate .. //depot/projects/uart/dev/puc/pucdata.c#4 integrate .. //depot/projects/uart/dev/safe/safe.c#2 integrate .. //depot/projects/uart/dev/sound/pci/csa.c#2 integrate .. //depot/projects/uart/dev/sound/pcm/dsp.c#2 integrate .. //depot/projects/uart/dev/trm/trm.c#4 integrate .. //depot/projects/uart/dev/twe/twe.c#3 integrate .. //depot/projects/uart/dev/twe/twe_compat.h#3 integrate .. //depot/projects/uart/dev/twe/twe_freebsd.c#4 integrate .. //depot/projects/uart/dev/twe/twevar.h#3 integrate .. //depot/projects/uart/dev/tx/if_tx.c#3 integrate .. //depot/projects/uart/dev/usb/uvisor.c#4 integrate .. //depot/projects/uart/dev/vinum/vinumio.c#2 integrate .. //depot/projects/uart/dev/wi/if_wi_pccard.c#6 integrate .. //depot/projects/uart/fs/msdosfs/msdosfs_vfsops.c#3 integrate .. //depot/projects/uart/fs/msdosfs/msdosfs_vnops.c#3 integrate .. //depot/projects/uart/fs/msdosfs/msdosfsmount.h#2 integrate .. //depot/projects/uart/fs/procfs/procfs_map.c#2 integrate .. //depot/projects/uart/geom/geom_dev.c#3 integrate .. //depot/projects/uart/geom/geom_io.c#2 integrate .. //depot/projects/uart/i386/conf/NOTES#3 integrate .. //depot/projects/uart/i386/conf/PAE#2 integrate .. //depot/projects/uart/i386/i386/critical.c#3 integrate .. //depot/projects/uart/i386/i386/exception.s#3 integrate .. //depot/projects/uart/i386/i386/identcpu.c#4 integrate .. //depot/projects/uart/i386/i386/initcpu.c#2 integrate .. //depot/projects/uart/i386/i386/mp_clock.c#2 integrate .. //depot/projects/uart/i386/i386/mp_machdep.c#5 integrate .. //depot/projects/uart/i386/i386/perfmon.c#2 integrate .. //depot/projects/uart/i386/i386/pmap.c#10 integrate .. //depot/projects/uart/i386/i386/support.s#2 integrate .. //depot/projects/uart/i386/i386/trap.c#3 integrate .. //depot/projects/uart/i386/ibcs2/ibcs2_ipc.h#2 integrate .. //depot/projects/uart/i386/include/apic.h#3 integrate .. //depot/projects/uart/i386/include/clock.h#3 integrate .. //depot/projects/uart/i386/include/critical.h#3 integrate .. //depot/projects/uart/i386/include/specialreg.h#2 integrate .. //depot/projects/uart/i386/isa/clock.c#3 integrate .. //depot/projects/uart/i386/isa/pcaudio.c#2 delete .. //depot/projects/uart/ia64/ia64/critical.c#3 integrate .. //depot/projects/uart/ia64/ia64/elf_machdep.c#2 integrate .. //depot/projects/uart/ia64/ia64/machdep.c#8 integrate .. //depot/projects/uart/ia64/ia64/ptrace_machdep.c#1 branch .. //depot/projects/uart/ia64/ia64/syscall.S#4 integrate .. //depot/projects/uart/ia64/ia64/trap.c#5 integrate .. //depot/projects/uart/ia64/include/critical.h#3 integrate .. //depot/projects/uart/ia64/include/ia64_cpu.h#3 integrate .. //depot/projects/uart/ia64/include/ptrace.h#2 integrate .. //depot/projects/uart/kern/kern_fork.c#3 integrate .. //depot/projects/uart/kern/kern_synch.c#3 integrate .. //depot/projects/uart/kern/kern_tc.c#3 integrate .. //depot/projects/uart/kern/kern_thr.c#3 integrate .. //depot/projects/uart/kern/kern_thread.c#8 integrate .. //depot/projects/uart/kern/sched_4bsd.c#2 integrate .. //depot/projects/uart/kern/subr_blist.c#2 integrate .. //depot/projects/uart/kern/subr_kobj.c#2 integrate .. //depot/projects/uart/kern/sys_pipe.c#6 integrate .. //depot/projects/uart/kern/sys_process.c#4 integrate .. //depot/projects/uart/libkern/arc4random.c#2 integrate .. //depot/projects/uart/modules/bktr/bktr/Makefile#2 integrate .. //depot/projects/uart/net80211/ieee80211.c#4 integrate .. //depot/projects/uart/net80211/ieee80211_input.c#3 integrate .. //depot/projects/uart/net80211/ieee80211_node.c#4 integrate .. //depot/projects/uart/net80211/ieee80211_node.h#3 integrate .. //depot/projects/uart/netinet/if_atm.c#3 integrate .. //depot/projects/uart/netinet/tcp_input.c#3 integrate .. //depot/projects/uart/netinet/tcp_output.c#2 integrate .. //depot/projects/uart/netinet/tcp_syncache.c#3 integrate .. //depot/projects/uart/netipsec/ipsec_input.c#2 integrate .. //depot/projects/uart/nfsclient/bootp_subr.c#3 integrate .. //depot/projects/uart/nfsclient/nfs_diskless.c#2 integrate .. //depot/projects/uart/nfsclient/nfs_vfsops.c#2 integrate .. //depot/projects/uart/nfsclient/nfsdiskless.h#2 integrate .. //depot/projects/uart/pc98/conf/NOTES#3 integrate .. //depot/projects/uart/pc98/pc98/pcaudio.c#2 delete .. //depot/projects/uart/pci/if_rl.c#9 integrate .. //depot/projects/uart/pci/if_rlreg.h#4 integrate .. //depot/projects/uart/powerpc/include/critical.h#3 integrate .. //depot/projects/uart/powerpc/powerpc/critical.c#3 integrate .. //depot/projects/uart/powerpc/powerpc/swtch.S#2 integrate .. //depot/projects/uart/powerpc/powerpc/vm_machdep.c#3 integrate .. //depot/projects/uart/sparc64/include/critical.h#3 integrate .. //depot/projects/uart/sparc64/sparc64/critical.c#3 integrate .. //depot/projects/uart/sys/blist.h#2 integrate .. //depot/projects/uart/sys/pipe.h#4 integrate .. //depot/projects/uart/sys/proc.h#5 integrate .. //depot/projects/uart/sys/ptrace.h#2 integrate .. //depot/projects/uart/sys/queue.h#2 integrate .. //depot/projects/uart/sys/soundcard.h#2 integrate .. //depot/projects/uart/ufs/ffs/ffs_balloc.c#2 integrate .. //depot/projects/uart/ufs/ffs/ffs_vfsops.c#3 integrate .. //depot/projects/uart/ufs/ufs/inode.h#2 integrate .. //depot/projects/uart/ufs/ufs/ufs_inode.c#2 integrate .. //depot/projects/uart/vm/swap_pager.c#8 integrate .. //depot/projects/uart/vm/vm_extern.h#2 integrate .. //depot/projects/uart/vm/vm_map.c#7 integrate .. //depot/projects/uart/vm/vm_map.h#4 integrate .. //depot/projects/uart/vm/vm_object.h#2 integrate .. //depot/projects/uart/vm/vm_pageout.c#5 integrate .. //depot/projects/uart/vm/vm_pageq.c#2 integrate .. //depot/projects/uart/vm/vm_zeroidle.c#2 integrate Differences ... ==== //depot/projects/uart/alpha/alpha/critical.c#3 (text+ko) ==== @@ -1,10 +1,32 @@ /*- - * Copyright (c) 2001 Matthew Dillon. This code is distributed under - * the BSD copyright, /usr/src/COPYRIGHT. + * Copyright (c) 2002 Matthew Dillon. All Rights Reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/critical.c,v 1.5 2003/08/04 20:32:44 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/critical.c,v 1.6 2003/08/12 23:24:03 imp Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/uart/alpha/alpha/mp_machdep.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/mp_machdep.c,v 1.46 2003/07/31 01:31:31 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/mp_machdep.c,v 1.47 2003/08/12 19:33:35 jhb Exp $"); #include "opt_kstack_pages.h" @@ -208,7 +208,7 @@ /* ok, now grab sched_lock and enter the scheduler */ mtx_lock_spin(&sched_lock); - cpu_throw(); /* doesn't return */ + cpu_throw(NULL, choosethread()); /* doesn't return */ panic("scheduler returned us to %s", __func__); } ==== //depot/projects/uart/alpha/alpha/swtch.s#2 (text+ko) ==== @@ -25,7 +25,7 @@ * rights to redistribute these changes. * * $NetBSD: locore.s,v 1.47 1998/03/22 07:26:32 thorpej Exp $ - * $FreeBSD: src/sys/alpha/alpha/swtch.s,v 1.33 2002/07/12 18:34:21 jhb Exp $ + * $FreeBSD: src/sys/alpha/alpha/swtch.s,v 1.34 2003/08/12 19:33:35 jhb Exp $ */ #define _LOCORE @@ -49,7 +49,7 @@ /* * savectx: save process context, i.e. callee-saved registers * - * Note that savectx() only works for processes other than curthread, + * Note that savectx() only works for threads other than curthread, * since cpu_switch will copy over the info saved here. (It _can_ * sanely be used for curthread iff cpu_switch won't be called again, e.g. * from if called from boot().) @@ -88,58 +88,67 @@ /* * cpu_throw() - * Switch to a new task discarding our current state. + * Switch to a new thread discarding our current state. + * + * Arguments: + * a0 'struct thread *' of the old thread + * a1 'struct thread *' of the new thread */ LEAF(cpu_throw, 0) LDGP(pv) - mov zero, s0 /* ensure newproc != oldproc */ CALL(Lcs1) END(cpu_throw) /* * cpu_switch() - * Find the highest priority process and resume it. + * Switch to a new thread saving the current state in the old thread. + * + * Arguments: + * a0 'struct thread *' of the old thread + * a1 'struct thread *' of the new thread */ LEAF(cpu_switch, 1) LDGP(pv) /* do an inline savectx(), to save old context */ - ldq a0, PC_CURTHREAD(pcpup) - ldq a1, TD_PCB(a0) + ldq a2, TD_PCB(a0) /* NOTE: ksp is stored by the swpctx */ - stq s0, PCB_CONTEXT+(0 * 8)(a1) /* store s0 - s6 */ - stq s1, PCB_CONTEXT+(1 * 8)(a1) - stq s2, PCB_CONTEXT+(2 * 8)(a1) - stq s3, PCB_CONTEXT+(3 * 8)(a1) - stq s4, PCB_CONTEXT+(4 * 8)(a1) - stq s5, PCB_CONTEXT+(5 * 8)(a1) - stq s6, PCB_CONTEXT+(6 * 8)(a1) - stq ra, PCB_CONTEXT+(7 * 8)(a1) /* store ra */ + stq s0, PCB_CONTEXT+(0 * 8)(a2) /* store s0 - s6 */ + stq s1, PCB_CONTEXT+(1 * 8)(a2) + stq s2, PCB_CONTEXT+(2 * 8)(a2) + stq s3, PCB_CONTEXT+(3 * 8)(a2) + stq s4, PCB_CONTEXT+(4 * 8)(a2) + stq s5, PCB_CONTEXT+(5 * 8)(a2) + stq s6, PCB_CONTEXT+(6 * 8)(a2) + stq ra, PCB_CONTEXT+(7 * 8)(a2) /* store ra */ call_pal PAL_OSF1_rdps /* NOTE: doesn't kill a0 */ - stq v0, PCB_CONTEXT+(8 * 8)(a1) /* store ps, for ipl */ + stq v0, PCB_CONTEXT+(8 * 8)(a2) /* store ps, for ipl */ mov a0, s0 /* s0 = old curthread */ - mov a1, s1 /* s1 = old pcb */ + mov a2, s1 /* s1 = old pcb */ + + /* + * Deactivate the old address space before activating the + * new one. We need to do this before activating the + * new thread's address space in the event that new + * thread is using the same vmspace as the old. If we + * do this after we activate, then we might end up + * incorrectly marking the pmap inactive! + * + * We don't deactivate if we came here from switch_exit + * (old pmap no longer exists; vmspace has been freed). + * oldproc will be NULL in this case. We have actually + * taken care of calling pmap_deactivate() in cpu_exit(), + * before the vmspace went away. + */ + beq a0, sw1 + CALL(pmap_deactivate) /* pmap_deactivate(oldthread) */ sw1: br pv, Lcs1 Lcs1: LDGP(pv) - CALL(choosethread) /* can't return NULL */ - mov v0, s2 /* s2 = new thread */ + mov a1, s2 /* s2 = new thread */ ldq s3, TD_MD_PCBPADDR(s2) /* s3 = new pcbpaddr */ - /* - * Check to see if we're switching to ourself. If we are, - * don't bother loading the new context. - * - * Note that even if we re-enter cpu_switch() from idle(), - * s0 will still contain the old curthread value because any - * users of that register between then and now must have - * saved it. Also note that switch_exit() ensures that - * s0 is clear before jumping here to find a new process. - */ - cmpeq s0, s2, t0 /* oldthread == newthread? */ - bne t0, Lcs7 /* Yes! Skip! */ - #ifdef SMP /* * Save fp state if we have some. @@ -150,27 +159,7 @@ #endif /* - * Deactivate the old address space before activating the - * new one. We need to do this before activating the - * new process's address space in the event that new - * process is using the same vmspace as the old. If we - * do this after we activate, then we might end up - * incorrectly marking the pmap inactive! - * - * We don't deactivate if we came here from switch_exit - * (old pmap no longer exists; vmspace has been freed). - * oldproc will be NULL in this case. We have actually - * taken care of calling pmap_deactivate() in cpu_exit(), - * before the vmspace went away. - */ - beq s0, Lcs6 - - mov s0, a0 /* pmap_deactivate(oldthread) */ - CALL(pmap_deactivate) /* XXXKSE */ - -Lcs6: - /* - * Activate the new process's address space and perform + * Activate the new thread's address space and perform * the actual context swap. */ @@ -180,18 +169,14 @@ mov s3, a0 /* swap the context */ SWITCH_CONTEXT -Lcs7: - /* * Now that the switch is done, update curthread and other - * globals. We must do this even if switching to ourselves - * because we might have re-entered cpu_switch() from idle(), - * in which case curthread would be NULL. + * globals. */ stq s2, PC_CURTHREAD(pcpup) /* curthread = p */ /* - * Now running on the new u struct. + * Now running on the new pcb. * Restore registers and return. */ ldq t0, TD_PCB(s2) ==== //depot/projects/uart/alpha/include/critical.h#3 (text+ko) ==== @@ -1,6 +1,28 @@ /*- - * Copyright (c) 2002 Matthew Dillon. This code is distributed under - * the BSD copyright, /usr/src/COPYRIGHT. + * Copyright (c) 2002 Matthew Dillon. All Rights Reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This file contains prototypes and high-level inlines related to * machine-level critical function support: @@ -11,7 +33,7 @@ * related support functions residing * in <arch>/<arch>/critical.c - prototyped * - * $FreeBSD: src/sys/alpha/include/critical.h,v 1.2 2003/08/04 20:32:44 jhb Exp $ + * $FreeBSD: src/sys/alpha/include/critical.h,v 1.3 2003/08/12 23:24:03 imp Exp $ */ #ifndef _MACHINE_CRITICAL_H_ ==== //depot/projects/uart/amd64/amd64/critical.c#4 (text+ko) ==== @@ -1,10 +1,32 @@ /*- - * Copyright (c) 2001 Matthew Dillon. This code is distributed under - * the BSD copyright, /usr/src/COPYRIGHT. + * Copyright (c) 2002 Matthew Dillon. All Rights Reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/critical.c,v 1.11 2003/08/04 20:32:44 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/critical.c,v 1.12 2003/08/12 23:24:04 imp Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/uart/amd64/include/critical.h#3 (text+ko) ==== @@ -1,6 +1,28 @@ /*- - * Copyright (c) 2002 Matthew Dillon. This code is distributed under - * the BSD copyright, /usr/src/COPYRIGHT. + * Copyright (c) 2002 Matthew Dillon. All Rights Reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This file contains prototypes and high-level inlines related to * machine-level critical function support: @@ -11,7 +33,7 @@ * related support functions residing * in <arch>/<arch>/critical.c - prototyped * - * $FreeBSD: src/sys/amd64/include/critical.h,v 1.4 2003/08/04 20:32:45 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/critical.h,v 1.5 2003/08/12 23:24:04 imp Exp $ */ #ifndef _MACHINE_CRITICAL_H_ ==== //depot/projects/uart/conf/NOTES#8 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1168 2003/08/11 08:40:01 harti Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1169 2003/08/12 09:45:33 alex Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -1917,6 +1917,10 @@ # motherboards and motherboards with bad or incomplete PCI 2.1 support. # As a rough guess, old = before 1998 # +# options BKTR_NEW_MSP34XX_DRIVER +# Use new, more complete initialization scheme for the msp34* soundchip. +# Should fix stereo autodetection if the old driver does only output +# mono sound. device meteor 1 ==== //depot/projects/uart/conf/files#14 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.813 2003/08/11 08:40:01 harti Exp $ +# $FreeBSD: src/sys/conf/files,v 1.814 2003/08/12 09:45:33 alex Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -335,6 +335,7 @@ dev/bktr/bktr_i2c.c optional bktr pci smbus dev/bktr/bktr_os.c optional bktr pci dev/bktr/bktr_tuner.c optional bktr pci +dev/bktr/msp34xx.c optional bktr pci dev/buslogic/bt.c optional bt dev/buslogic/bt_eisa.c optional bt eisa dev/buslogic/bt_isa.c optional bt isa ==== //depot/projects/uart/conf/files.i386#6 (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.i386,v 1.450 2003/08/04 02:39:14 imp Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.451 2003/08/15 14:56:05 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -255,7 +255,6 @@ i386/isa/loran.c optional loran i386/isa/mse.c optional mse i386/isa/npx.c optional npx -i386/isa/pcaudio.c optional pca i386/isa/pcf.c optional pcf i386/isa/pcvt/pcvt_drv.c optional vt i386/isa/pcvt/pcvt_ext.c optional vt ==== //depot/projects/uart/conf/files.ia64#6 (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.55 2003/08/01 05:28:43 marcel Exp $ +# $FreeBSD: src/sys/conf/files.ia64,v 1.56 2003/08/15 18:01:10 marcel Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -98,6 +98,7 @@ ia64/ia64/nexus.c standard ia64/ia64/pal.S standard ia64/ia64/pmap.c standard +ia64/ia64/ptrace_machdep.c standard ia64/ia64/sal.c standard ia64/ia64/sapic.c standard ia64/ia64/setjmp.S standard ==== //depot/projects/uart/conf/files.pc98#4 (text+ko) ==== @@ -3,7 +3,7 @@ # # modified for PC-9801 # -# $FreeBSD: src/sys/conf/files.pc98,v 1.274 2003/08/02 09:23:03 nyan Exp $ +# $FreeBSD: src/sys/conf/files.pc98,v 1.275 2003/08/15 14:56:05 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -347,7 +347,6 @@ pc98/pc98/pc98gdc.c optional gdc pc98/pc98/pc98kbd.c optional pckbd pc98/pc98/pc98_machdep.c standard -pc98/pc98/pcaudio.c optional pca pc98/pc98/pmc.c optional pmc pc98/pc98/ppc.c optional ppc pc98/pc98/scgdcrndr.c optional sc gdc ==== //depot/projects/uart/conf/majors#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/majors,v 1.175 2003/06/11 18:34:50 tmm Exp $ +# $FreeBSD: src/sys/conf/majors,v 1.176 2003/08/15 14:56:05 phk Exp $ # # This list is semi-obsoleted by DEVFS, but for now it still contains # the current allocation of device major numbers. @@ -37,7 +37,6 @@ 21 *psm PS/2 Mouse 22 *fd (/dev/stdin etc) 23 *bpf Berkeley Packet Filter -24 *pca PC speaker (/dev/pcaudio) 26 *spkr PC speaker (/dev/spkr) 27 *mse Microsoft bus-mouse 28 *sio 16450/16550 serial ==== //depot/projects/uart/conf/options#8 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.409 2003/08/11 08:40:01 harti Exp $ +# $FreeBSD: src/sys/conf/options,v 1.410 2003/08/12 09:45:34 alex Exp $ # # On the handling of kernel options # @@ -523,6 +523,7 @@ BKTR_430_FX_MODE opt_bktr.h BKTR_SIS_VIA_MODE opt_bktr.h BKTR_USE_FREEBSD_SMBUS opt_bktr.h +BKTR_NEW_MSP34XX_DRIVER opt_bktr.h # meteor opt_meteor.h METEOR_ALLOC_PAGES opt_meteor.h ==== //depot/projects/uart/contrib/dev/acpica/osunixxf.c#2 (text+ko) ==== @@ -478,7 +478,7 @@ void AcpiOsUnmapMemory ( void *where, - UINT32 length) + ACPI_SIZE length) { return; @@ -499,7 +499,7 @@ void * AcpiOsAllocate ( - UINT32 size) + ACPI_SIZE size) { void *Mem; ==== //depot/projects/uart/ddb/db_access.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/ddb/db_access.c,v 1.16 2003/06/10 22:09:23 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/ddb/db_access.c,v 1.17 2003/08/12 13:24:21 harti Exp $"); #include <sys/param.h> @@ -54,7 +54,7 @@ register int size; boolean_t is_signed; { - char data[sizeof(int)]; + char data[sizeof(u_int64_t)]; register db_expr_t value; register int i; ==== //depot/projects/uart/dev/acpica/acpi.c#6 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.94 2003/08/08 03:19:22 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.95 2003/08/15 02:10:38 njl Exp $ */ #include "opt_acpi.h" @@ -962,6 +962,8 @@ /* Enable and clear fixed events and install handlers. */ if ((AcpiGbl_FADT != NULL) && (AcpiGbl_FADT->PwrButton == 0)) { + AcpiEnableEvent(ACPI_EVENT_POWER_BUTTON, 0); + AcpiClearEvent(ACPI_EVENT_POWER_BUTTON); AcpiInstallFixedEventHandler(ACPI_EVENT_POWER_BUTTON, acpi_eventhandler_power_button_for_sleep, sc); if (first_time) { @@ -969,6 +971,8 @@ } } if ((AcpiGbl_FADT != NULL) && (AcpiGbl_FADT->SleepButton == 0)) { + AcpiEnableEvent(ACPI_EVENT_SLEEP_BUTTON, 0); + AcpiClearEvent(ACPI_EVENT_SLEEP_BUTTON); AcpiInstallFixedEventHandler(ACPI_EVENT_SLEEP_BUTTON, acpi_eventhandler_sleep_button_for_sleep, sc); if (first_time) { @@ -1405,7 +1409,9 @@ acpi_sleep_machdep(sc, state); /* AcpiEnterSleepState() maybe incompleted, unlock here if locked. */ - if (1/*AcpiGbl_AcpiMutexInfo[ACPI_MTX_HARDWARE].OwnerId != ACPI_MUTEX_NOT_ACQUIRED*/) { + if (AcpiGbl_MutexInfo[ACPI_MTX_HARDWARE].OwnerId != + ACPI_MUTEX_NOT_ACQUIRED) { + AcpiUtReleaseMutex(ACPI_MTX_HARDWARE); } ==== //depot/projects/uart/dev/acpica/acpi_acad.c#3 (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/dev/acpica/acpi_acad.c,v 1.15 2003/08/11 15:34:43 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi_acad.c,v 1.17 2003/08/15 06:33:11 njl Exp $ */ #include "opt_acpi.h" @@ -151,15 +151,10 @@ ACPI_HANDLE handle; int error; + sc = device_get_softc(dev); + if (sc == NULL) + return (ENXIO); handle = acpi_get_handle(dev); - AcpiInstallNotifyHandler(handle, ACPI_DEVICE_NOTIFY, - acpi_acad_notify_handler, dev); - /* XXX Installing system notify is not so good */ - AcpiInstallNotifyHandler(handle, ACPI_SYSTEM_NOTIFY, - acpi_acad_notify_handler, dev); - - if ((sc = device_get_softc(dev)) == NULL) - return (ENXIO); error = acpi_register_ioctl(ACPIIO_ACAD_GET_STATUS, acpi_acad_ioctl, dev); if (error != 0) @@ -177,6 +172,14 @@ sc->status = -1; sc->initializing = 0; + /* + * Also install a system notify handler even though this is not + * required by the specification. The Casio FIVA needs this. + */ + AcpiInstallNotifyHandler(handle, ACPI_SYSTEM_NOTIFY, + acpi_acad_notify_handler, dev); + AcpiInstallNotifyHandler(handle, ACPI_DEVICE_NOTIFY, + acpi_acad_notify_handler, dev); AcpiOsQueueForExecution(OSD_PRIORITY_LO, acpi_acad_init_acline, dev); return (0); @@ -189,8 +192,9 @@ device_t dev; dev = (device_t)arg; - if ((sc = device_get_softc(dev)) == NULL) - return(ENXIO); + sc = device_get_softc(dev); + if (sc == NULL) + return (ENXIO); /* * No security check required: information retrieval only. If @@ -238,15 +242,16 @@ "acline initialization start\n"); status = 0; - for (retry = 0; retry < ACPI_ACAD_RETRY_MAX; retry++, AcpiOsSleep(10, 0)) { + for (retry = 0; retry < ACPI_ACAD_RETRY_MAX; retry++) { acpi_acad_get_status(dev); if (status != sc->status) break; + AcpiOsSleep(10, 0); } sc->initializing = 0; ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), - "acline initialization done, tried %d times\n", retry+1); + "acline initialization done, tried %d times\n", retry + 1); } /* ==== //depot/projects/uart/dev/acpica/acpi_cmbat.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.21 2003/08/11 15:34:43 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.22 2003/08/15 02:18:15 njl Exp $ */ #include "opt_acpi.h" @@ -132,7 +132,25 @@ static int acpi_cmbat_get_total_battinfo(struct acpi_battinfo *); static void acpi_cmbat_init_battery(void *); -static __inline int +static device_method_t acpi_cmbat_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, acpi_cmbat_probe), + DEVMETHOD(device_attach, acpi_cmbat_attach), + DEVMETHOD(device_resume, acpi_cmbat_resume), + + {0, 0} +}; + +static driver_t acpi_cmbat_driver = { + "acpi_cmbat", + acpi_cmbat_methods, + sizeof(struct acpi_cmbat_softc), +}; + +static devclass_t acpi_cmbat_devclass; +DRIVER_MODULE(acpi_cmbat, acpi, acpi_cmbat_driver, acpi_cmbat_devclass, 0, 0); + +static int acpi_cmbat_info_expired(struct timespec *lastupdated) { struct timespec curtime; @@ -149,7 +167,7 @@ } -static __inline void +static void acpi_cmbat_info_updated(struct timespec *lastupdated) { if (lastupdated != NULL) @@ -352,24 +370,6 @@ return (0); } -static device_method_t acpi_cmbat_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, acpi_cmbat_probe), - DEVMETHOD(device_attach, acpi_cmbat_attach), - DEVMETHOD(device_resume, acpi_cmbat_resume), - - {0, 0} -}; - -static driver_t acpi_cmbat_driver = { - "acpi_cmbat", - acpi_cmbat_methods, - sizeof(struct acpi_cmbat_softc), -}; - -static devclass_t acpi_cmbat_devclass; -DRIVER_MODULE(acpi_cmbat, acpi, acpi_cmbat_driver, acpi_cmbat_devclass, 0, 0); - static int acpi_cmbat_ioctl(u_long cmd, caddr_t addr, void *arg) { @@ -428,7 +428,7 @@ return (0); } -static __inline int +static int acpi_cmbat_is_bst_valid(struct acpi_bst *bst) { if (bst->state >= ACPI_BATT_STAT_MAX || bst->cap == 0xffffffff || @@ -439,7 +439,7 @@ return (1); } -static __inline int +static int acpi_cmbat_is_bif_valid(struct acpi_bif *bif) { if (bif->lfcap == 0) @@ -617,6 +617,7 @@ break; } + sc->initializing = 0; if (retry == ACPI_CMBAT_RETRY_MAX) { ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), "battery initialization failed, giving up\n"); @@ -624,7 +625,6 @@ ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), "battery initialization done, tried %d times\n", retry + 1); } - sc->initializing = 0; } /* ==== //depot/projects/uart/dev/ath/if_ath.c#6 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.5 2003/08/02 06:14:15 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.6 2003/08/13 21:29:35 sam Exp $"); /* * Driver for the Atheros Wireless LAN controller. @@ -199,6 +199,7 @@ goto bad; } sc->sc_ah = ah; + sc->sc_invalid = 0; /* ready to go, enable interrupt handling */ /* * Collect the channel list using the default country @@ -372,8 +373,8 @@ if (sc->sc_invalid) { /* - * The hardware is gone, don't touch anything. - * XXX can this happen? + * The hardware is not ready/present, don't touch anything. + * Note this can happen early on if the IRQ is shared. */ DPRINTF(("ath_intr: invalid; ignored\n")); return; ==== //depot/projects/uart/dev/ath/if_ath_pci.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath_pci.c,v 1.2 2003/07/01 15:51:53 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath_pci.c,v 1.3 2003/08/13 21:29:35 sam Exp $"); /* * PCI/Cardbus front-end for the Atheros Wireless LAN controller driver. @@ -152,6 +152,11 @@ } sc->sc_st = rman_get_bustag(psc->sc_sr); sc->sc_sh = rman_get_bushandle(psc->sc_sr); + /* + * Mark device invalid so any interrupts (shared or otherwise) + * that arrive before the HAL is setup are discarded. + */ + sc->sc_invalid = 1; /* * Arrange interrupt line. ==== //depot/projects/uart/dev/bge/if_bge.c#6 (text+ko) ==== @@ -64,7 +64,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.49 2003/08/10 18:04:35 wpaul Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.50 2003/08/12 05:18:51 wpaul Exp $"); #include <sys/param.h> #include <sys/endian.h> @@ -154,6 +154,10 @@ "Broadcom BCM5705M Gigabit Ethernet" }, { BCOM_VENDORID, BCOM_DEVICEID_BCM5782, "Broadcom BCM5782 Gigabit Ethernet" }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM5901, + "Broadcom BCM5901 Fast Ethernet" }, + { BCOM_VENDORID, BCOM_DEVICEID_BCM5901A2, + "Broadcom BCM5901A2 Fast Ethernet" }, { SK_VENDORID, SK_DEVICEID_ALTIMA, "SysKonnect Gigabit Ethernet" }, { ALTIMA_VENDORID, ALTIMA_DEVICE_AC1000, ==== //depot/projects/uart/dev/bge/if_bgereg.h#4 (text+ko) ==== @@ -30,7 +30,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/bge/if_bgereg.h,v 1.20 2003/07/25 20:33:43 wpaul Exp $ + * $FreeBSD: src/sys/dev/bge/if_bgereg.h,v 1.21 2003/08/12 05:18:51 wpaul Exp $ */ /* @@ -1822,6 +1822,8 @@ #define BCOM_DEVICEID_BCM5705M 0x165D #define BCOM_DEVICEID_BCM5705M_ALT 0x165E #define BCOM_DEVICEID_BCM5782 0x1696 +#define BCOM_DEVICEID_BCM5901 0x170D +#define BCOM_DEVICEID_BCM5901A2 0x170E /* * Alteon AceNIC PCI vendor/device ID. ==== //depot/projects/uart/dev/bktr/bktr_audio.c#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/bktr/bktr_audio.c,v 1.9 2003/02/02 17:46:00 orion Exp $ */ +/* $FreeBSD: src/sys/dev/bktr/bktr_audio.c,v 1.10 2003/08/12 09:45:34 alex Exp $ */ >>> TRUNCATED FOR MAIL (1000 lines) <<<home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200308160301.h7G31F7t016661>
