PERFORCE change 42176 for review

Sam Leffler sam at FreeBSD.org
Wed Nov 12 14:30:31 PST 2003


http://perforce.freebsd.org/chv.cgi?CH=42176

Change 42176 by sam at sam_ebb on 2003/11/12 14:30:23

	IFC

Affected files ...

.. //depot/projects/netperf/sys/amd64/amd64/autoconf.c#3 integrate
.. //depot/projects/netperf/sys/conf/files#25 integrate
.. //depot/projects/netperf/sys/crypto/rijndael/rijndael-api.c#1 branch
.. //depot/projects/netperf/sys/crypto/rijndael/rijndael.c#2 delete
.. //depot/projects/netperf/sys/dev/acpica/Osd/OsdInterrupt.c#3 integrate
.. //depot/projects/netperf/sys/dev/aha/ahareg.h#4 integrate
.. //depot/projects/netperf/sys/dev/firewire/sbp.c#11 integrate
.. //depot/projects/netperf/sys/dev/firewire/sbp.h#2 integrate
.. //depot/projects/netperf/sys/dev/firewire/sbp_targ.c#2 integrate
.. //depot/projects/netperf/sys/dev/pccbb/pccbb.c#8 integrate
.. //depot/projects/netperf/sys/dev/usb/ohci.c#4 integrate
.. //depot/projects/netperf/sys/fs/devfs/devfs.h#2 integrate
.. //depot/projects/netperf/sys/fs/nwfs/nwfs_vfsops.c#2 integrate
.. //depot/projects/netperf/sys/fs/smbfs/smbfs_vfsops.c#4 integrate
.. //depot/projects/netperf/sys/geom/geom_ccd.c#5 integrate
.. //depot/projects/netperf/sys/i386/i386/apic_vector.s#2 integrate
.. //depot/projects/netperf/sys/i386/i386/genassym.c#4 integrate
.. //depot/projects/netperf/sys/i386/i386/intr_machdep.c#2 integrate
.. //depot/projects/netperf/sys/i386/i386/io_apic.c#4 integrate
.. //depot/projects/netperf/sys/i386/i386/local_apic.c#2 integrate
.. //depot/projects/netperf/sys/i386/i386/mp_machdep.c#13 integrate
.. //depot/projects/netperf/sys/i386/include/apicvar.h#2 integrate
.. //depot/projects/netperf/sys/i386/include/clock.h#6 integrate
.. //depot/projects/netperf/sys/i386/isa/atpic.c#2 integrate
.. //depot/projects/netperf/sys/i386/isa/atpic_vector.s#2 integrate
.. //depot/projects/netperf/sys/i386/isa/icu.h#3 integrate
.. //depot/projects/netperf/sys/ia64/ia64/interrupt.c#5 integrate
.. //depot/projects/netperf/sys/ia64/ia64/machdep.c#18 integrate
.. //depot/projects/netperf/sys/ia64/ia64/trap.c#9 integrate
.. //depot/projects/netperf/sys/ia64/include/md_var.h#5 integrate
.. //depot/projects/netperf/sys/kern/init_sysent.c#6 integrate
.. //depot/projects/netperf/sys/kern/kern_exec.c#8 integrate
.. //depot/projects/netperf/sys/kern/kern_mac.c#9 integrate
.. //depot/projects/netperf/sys/kern/syscalls.c#6 integrate
.. //depot/projects/netperf/sys/kern/syscalls.master#6 integrate
.. //depot/projects/netperf/sys/kern/vfs_bio.c#15 integrate
.. //depot/projects/netperf/sys/kern/vfs_cluster.c#5 integrate
.. //depot/projects/netperf/sys/kern/vfs_mount.c#5 integrate
.. //depot/projects/netperf/sys/kern/vfs_syscalls.c#8 integrate
.. //depot/projects/netperf/sys/net/bpfdesc.h#3 integrate
.. //depot/projects/netperf/sys/net/if_var.h#5 integrate
.. //depot/projects/netperf/sys/net/if_vlan.c#7 integrate
.. //depot/projects/netperf/sys/netgraph/netgraph.h#3 integrate
.. //depot/projects/netperf/sys/netgraph/ng_message.h#4 integrate
.. //depot/projects/netperf/sys/netinet/ip_var.h#12 integrate
.. //depot/projects/netperf/sys/nfsclient/nfs_vfsops.c#9 integrate
.. //depot/projects/netperf/sys/security/mac/mac_internal.h#5 integrate
.. //depot/projects/netperf/sys/security/mac/mac_label.c#1 branch
.. //depot/projects/netperf/sys/security/mac/mac_net.c#5 integrate
.. //depot/projects/netperf/sys/security/mac/mac_pipe.c#4 integrate
.. //depot/projects/netperf/sys/security/mac/mac_process.c#4 integrate
.. //depot/projects/netperf/sys/security/mac/mac_system.c#2 integrate
.. //depot/projects/netperf/sys/security/mac/mac_vfs.c#4 integrate
.. //depot/projects/netperf/sys/security/mac_biba/mac_biba.c#5 integrate
.. //depot/projects/netperf/sys/security/mac_lomac/mac_lomac.c#6 integrate
.. //depot/projects/netperf/sys/security/mac_mls/mac_mls.c#4 integrate
.. //depot/projects/netperf/sys/security/mac_partition/mac_partition.c#2 integrate
.. //depot/projects/netperf/sys/security/mac_test/mac_test.c#3 integrate
.. //depot/projects/netperf/sys/sys/mac.h#6 integrate
.. //depot/projects/netperf/sys/sys/mount.h#3 integrate
.. //depot/projects/netperf/sys/sys/pipe.h#4 integrate
.. //depot/projects/netperf/sys/sys/proc.h#12 integrate
.. //depot/projects/netperf/sys/sys/socketvar.h#5 integrate
.. //depot/projects/netperf/sys/sys/syscall.h#6 integrate
.. //depot/projects/netperf/sys/sys/syscall.mk#6 integrate
.. //depot/projects/netperf/sys/sys/sysproto.h#6 integrate
.. //depot/projects/netperf/sys/sys/ucred.h#2 integrate
.. //depot/projects/netperf/sys/sys/vnode.h#6 integrate
.. //depot/projects/netperf/sys/ufs/ffs/ffs_vfsops.c#8 integrate

Differences ...

==== //depot/projects/netperf/sys/amd64/amd64/autoconf.c#3 (text+ko) ====

@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/autoconf.c,v 1.174 2003/07/25 21:15:44 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/autoconf.c,v 1.175 2003/11/12 01:49:49 peter Exp $");
 
 /*
  * Setup the system to run on the current machine.
@@ -155,6 +155,8 @@
 {
 
 	cninit_finish(); 
+	if (bootverbose)
+		printf("Device configuration finished.\n");
 	cold = 0;
 }
 

==== //depot/projects/netperf/sys/conf/files#25 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.848 2003/11/11 22:07:29 jhb Exp $
+# $FreeBSD: src/sys/conf/files,v 1.850 2003/11/12 04:22:36 ume Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -207,7 +207,7 @@
 crypto/des/des_ecb.c	optional ipsec ipsec_esp
 crypto/des/des_setkey.c	optional ipsec ipsec_esp
 crypto/rijndael/rijndael-alg-fst.c	optional ipsec
-crypto/rijndael/rijndael.c	optional ipsec
+crypto/rijndael/rijndael-api.c	optional ipsec
 opencrypto/rmd160.c	optional ipsec
 crypto/sha1.c		optional ipsec
 crypto/sha2/sha2.c	optional ipsec
@@ -1619,6 +1619,7 @@
 posix4/p1003_1b.c	standard
 posix4/posix4_mib.c	standard
 kern/uipc_sem.c		optional p1003_1b_semaphores
+security/mac/mac_label.c	optional mac
 security/mac/mac_net.c		optional mac
 security/mac/mac_pipe.c		optional mac
 security/mac/mac_process.c	optional mac

==== //depot/projects/netperf/sys/dev/acpica/Osd/OsdInterrupt.c#3 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/acpica/Osd/OsdInterrupt.c,v 1.13 2003/11/11 18:12:12 jhb Exp $
+ *	$FreeBSD: src/sys/dev/acpica/Osd/OsdInterrupt.c,v 1.15 2003/11/12 16:24:16 jhb Exp $
  */
 
 /*
@@ -135,10 +135,12 @@
 acpi_OverrideInterruptLevel(UINT32 InterruptNumber)
 {
 
-	if (InterruptOverride != 0)
-		return_ACPI_STATUS(AE_ALREADY_EXISTS);
-	InterruptOverride = InterruptNumber;
-	return_ACPI_STATUS(AE_OK);
+    ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
+
+    if (InterruptOverride != 0)
+	return_ACPI_STATUS(AE_ALREADY_EXISTS);
+    InterruptOverride = InterruptNumber;
+    return_ACPI_STATUS(AE_OK);
 }
 
 /*

==== //depot/projects/netperf/sys/dev/aha/ahareg.h#4 (text+ko) ====

@@ -30,7 +30,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/aha/ahareg.h,v 1.15 2003/11/09 19:51:16 imp Exp $
+ * $FreeBSD: src/sys/dev/aha/ahareg.h,v 1.16 2003/11/12 05:44:44 imp Exp $
  */
 
 #ifndef _AHAREG_H_
@@ -426,4 +426,4 @@
 #define AHA1542_PNPCOMPAT	0xA000D040	/* PNP00A0 */
 #define ICU0091_PNP		0X91005AA4	/* ICU0091 */
 
-#endif	/* _AHA_H_ */
+#endif	/* _AHAREG_H_ */

==== //depot/projects/netperf/sys/dev/firewire/sbp.c#11 (text+ko) ====

@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2003 Hidetosh Shimokawa
- * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetosh Shimokawa
+ * Copyright (c) 2003 Hidetoshi Shimokawa
+ * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.68 2003/11/10 14:04:37 simokawa Exp $
+ * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.71 2003/11/12 04:06:21 simokawa Exp $
  *
  */
 
@@ -1142,7 +1142,7 @@
 END_DEBUG
 	if (xfer->resp != 0) {
 		/* XXX */
-		printf("%s: xfer->resp != 0\n", __FUNCTION__);
+		printf("%s: xfer->resp = %d\n", __FUNCTION__, xfer->resp);
 	}
 	sbp_xfer_free(xfer);
 	sdev->flags &= ~ORB_POINTER_ACTIVE;
@@ -1208,7 +1208,7 @@
 END_DEBUG
 	if (xfer->resp != 0) {
 		/* XXX */
-		printf("%s: xfer->resp != 0\n", __FUNCTION__);
+		printf("%s: xfer->resp = %d\n", __FUNCTION__, xfer->resp);
 	}
 	sbp_xfer_free(xfer);
 	return;
@@ -1317,6 +1317,7 @@
 	}
 	if ((ocb = sbp_get_ocb(sdev)) == NULL) {
 		splx(s);
+		/* XXX */
 		return;
 	}
 	ocb->flags = OCB_ACT_MGM;
@@ -1572,7 +1573,7 @@
 */
 	sbp = (struct sbp_softc *)xfer->sc;
 	if (xfer->resp != 0){
-		printf("sbp_recv: xfer->resp != 0\n");
+		printf("sbp_recv: xfer->resp = %d\n", xfer->resp);
 		goto done0;
 	}
 	if (xfer->recv.payload == NULL){
@@ -1903,7 +1904,7 @@
 	sbp->sim = cam_sim_alloc(sbp_action, sbp_poll, "sbp", sbp,
 				 device_get_unit(dev),
 				 /*untagged*/ 1,
-				 /*tagged*/ SBP_QUEUE_LEN,
+				 /*tagged*/ SBP_QUEUE_LEN - 1,
 				 devq);
 
 	if (sbp->sim == NULL) {
@@ -2325,8 +2326,11 @@
 			}
 		}
 #endif
-		if ((ocb = sbp_get_ocb(sdev)) == NULL)
+		if ((ocb = sbp_get_ocb(sdev)) == NULL) {
+			ccb->ccb_h.status = CAM_REQUEUE_REQ;
+			xpt_done(ccb);
 			return;
+		}
 
 		ocb->flags = OCB_ACT_CMD;
 		ocb->sdev = sdev;

==== //depot/projects/netperf/sys/dev/firewire/sbp.h#2 (text+ko) ====

@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2003 Hidetosh Shimokawa
- * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetosh Shimokawa
+ * Copyright (c) 2003 Hidetoshi Shimokawa
+ * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/dev/firewire/sbp.h,v 1.1 2003/10/02 04:06:56 simokawa Exp $
+ * $FreeBSD: src/sys/dev/firewire/sbp.h,v 1.2 2003/11/12 03:29:57 simokawa Exp $
  *
  */
 

==== //depot/projects/netperf/sys/dev/firewire/sbp_targ.c#2 (text+ko) ====

@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/dev/firewire/sbp_targ.c,v 1.1 2003/10/18 05:41:31 simokawa Exp $
+ * $FreeBSD: src/sys/dev/firewire/sbp_targ.c,v 1.2 2003/11/12 04:06:21 simokawa Exp $
  */
 
 #include <sys/param.h>
@@ -471,7 +471,7 @@
 	orbi = (struct orb_info *)xfer->sc;
 	if (xfer->resp != 0) {
 		/* XXX */
-		printf("%s: xfer->resp != 0\n", __FUNCTION__);
+		printf("%s: xfer->resp = %d\n", __FUNCTION__, xfer->resp);
 	}
 	free(orbi, M_SBP_TARG);
 	fw_xfer_free(xfer);
@@ -589,7 +589,7 @@
 			xfer->resp, orbi->refcount);
 
 	if (xfer->resp != 0) {
-		printf("%s: xfer->resp != 0\n", __FUNCTION__);
+		printf("%s: xfer->resp = %d\n", __FUNCTION__, xfer->resp);
 		orbi->status.resp = SBP_TRANS_FAIL;
 		orbi->status.status = htonl(OBJ_DATA | SBE_TIMEOUT /*XXX*/);
 		orbi->status.dead = 1;
@@ -734,7 +734,7 @@
 		return;
 	}
 	if (xfer->resp != 0) {
-		printf("%s: xfer->resp != 0\n", __FUNCTION__);
+		printf("%s: xfer->resp = %d\n", __FUNCTION__, xfer->resp);
 		orbi->status.resp = SBP_TRANS_FAIL;
 		orbi->status.status = htonl(OBJ_PT | SBE_TIMEOUT /*XXX*/);
 		orbi->status.dead = 1;
@@ -1013,7 +1013,7 @@
 
 	orbi = (struct orb_info *)xfer->sc;
 	if (xfer->resp != 0) {
-		printf("%s: xfer->resp != 0\n", __FUNCTION__);
+		printf("%s: xfer->resp = %d\n", __FUNCTION__, xfer->resp);
 		orbi->status.resp = SBP_TRANS_FAIL;
 		orbi->status.status = htonl(OBJ_ORB | SBE_TIMEOUT /*XXX*/);
 		orbi->status.dead = 1;
@@ -1126,7 +1126,7 @@
 
 	orbi = (struct orb_info *)xfer->sc;
 	if (xfer->resp != 0) {
-		printf("%s: xfer->resp != 0\n", __FUNCTION__);
+		printf("%s: xfer->resp = %d\n", __FUNCTION__, xfer->resp);
 		orbi->status.resp = SBP_TRANS_FAIL;
 		orbi->status.status = htonl(OBJ_ORB | SBE_TIMEOUT /*XXX*/);
 		orbi->status.dead = 1;
@@ -1203,7 +1203,7 @@
 
 	orbi = (struct orb_info *)xfer->sc;
 	if (xfer->resp != 0) {
-		printf("%s: xfer->resp != 0\n", __FUNCTION__);
+		printf("%s: xfer->resp = %d\n", __FUNCTION__, xfer->resp);
 		goto done;
 	}
 

==== //depot/projects/netperf/sys/dev/pccbb/pccbb.c#8 (text+ko) ====

@@ -25,8 +25,6 @@
  * 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.
- *
- * $FreeBSD: src/sys/dev/pccbb/pccbb.c,v 1.98 2003/11/08 03:28:43 imp Exp $
  */
 
 /*
@@ -74,6 +72,9 @@
  *  * David Cross: Author of the initial ugly hack for a specific cardbus card
  */
 
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: src/sys/dev/pccbb/pccbb.c,v 1.99 2003/11/12 05:21:06 imp Exp $");
+
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/proc.h>
@@ -337,7 +338,7 @@
 	 * it later.
 	 */
 	rle = malloc(sizeof(struct cbb_reslist), M_DEVBUF, M_NOWAIT);
-	if (!res)
+	if (rle == NULL)
 		panic("cbb_cardbus_alloc_resource: can't record entry!");
 	rle->res = res;
 	rle->type = type;

==== //depot/projects/netperf/sys/dev/usb/ohci.c#4 (text+ko) ====

@@ -8,7 +8,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/ohci.c,v 1.137 2003/11/10 00:20:52 joe Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/ohci.c,v 1.138 2003/11/12 01:40:11 joe Exp $");
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -1475,7 +1475,7 @@
 			printf("ohci_softintr: sitd=%p is done\n", sitd);
 		sitd->isdone = 1;
 #endif
-		struct ohci_pipe *opipe = (struct ohci_pipe *)xfer->pipe;
+		opipe = (struct ohci_pipe *)xfer->pipe;
 		if (opipe->aborting)
 			continue;
  

==== //depot/projects/netperf/sys/fs/devfs/devfs.h#2 (text+ko) ====

@@ -33,7 +33,7 @@
  *	@(#)kernfs.h	8.6 (Berkeley) 3/29/95
  * From: FreeBSD: src/sys/miscfs/kernfs/kernfs.h 1.14
  *
- * $FreeBSD: src/sys/fs/devfs/devfs.h,v 1.17 2002/12/09 03:44:27 rwatson Exp $
+ * $FreeBSD: src/sys/fs/devfs/devfs.h,v 1.18 2003/11/12 03:14:29 rwatson Exp $
  */
 
 #ifndef _FS_DEVFS_DEVFS_H_
@@ -159,7 +159,7 @@
 	mode_t	de_mode;
 	uid_t	de_uid;
 	gid_t	de_gid;
-	struct label	de_label;
+	struct label	*de_label;
 	struct timespec de_atime;
 	struct timespec de_mtime;
 	struct timespec de_ctime;

==== //depot/projects/netperf/sys/fs/nwfs/nwfs_vfsops.c#2 (text+ko) ====

@@ -29,7 +29,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/fs/nwfs/nwfs_vfsops.c,v 1.30 2003/06/12 20:48:37 phk Exp $
+ * $FreeBSD: src/sys/fs/nwfs/nwfs_vfsops.c,v 1.31 2003/11/12 09:54:07 phk Exp $
  */
 #include "opt_ncp.h"
 #ifndef NCP
@@ -428,7 +428,6 @@
 	    nmp->n_volume, &vi, td, td->td_ucred);
 	if (error) return error;
 	secsize = 512;			/* XXX how to get real value ??? */
-	sbp->f_spare2=0;		/* placeholder */
 	/* fundamental filesystem block size */
 	sbp->f_bsize = vi.sectors_per_block*secsize;
 	/* optimal transfer block size */

==== //depot/projects/netperf/sys/fs/smbfs/smbfs_vfsops.c#4 (text+ko) ====

@@ -29,7 +29,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/fs/smbfs/smbfs_vfsops.c,v 1.21 2003/09/26 20:26:23 fjoe Exp $
+ * $FreeBSD: src/sys/fs/smbfs/smbfs_vfsops.c,v 1.22 2003/11/12 09:52:10 phk Exp $
  */
 #include "opt_netsmb.h"
 #ifndef NETSMB
@@ -375,7 +375,6 @@
 		return EINVAL;
 	
 	sbp->f_iosize = SSTOVC(ssp)->vc_txmax;		/* optimal transfer block size */
-	sbp->f_spare2 = 0;			/* placeholder */
 	smb_makescred(&scred, td, td->td_ucred);
 
 	if (SMB_DIALECT(SSTOVC(ssp)) >= SMB_DIALECT_LANMAN2_0)

==== //depot/projects/netperf/sys/geom/geom_ccd.c#5 (text+ko) ====

@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/geom/geom_ccd.c,v 1.147 2003/10/24 18:47:31 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/geom/geom_ccd.c,v 1.148 2003/11/12 09:46:54 phk Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -447,7 +447,7 @@
 		err = ccdbuffer(cbp, cs, bp, bn, addr, bcount);
 		if (err) {
 			bp->bio_completed += bcount;
-			if (bp->bio_error != 0)
+			if (bp->bio_error == 0)
 				bp->bio_error = err;
 			if (bp->bio_completed == bp->bio_length)
 				g_io_deliver(bp, bp->bio_error);

==== //depot/projects/netperf/sys/i386/i386/apic_vector.s#2 (text+ko) ====

@@ -32,7 +32,7 @@
  * SUCH DAMAGE.
  *
  *	from: vector.s, 386BSD 0.1 unknown origin
- * $FreeBSD: src/sys/i386/i386/apic_vector.s,v 1.91 2003/11/03 21:53:36 jhb Exp $
+ * $FreeBSD: src/sys/i386/i386/apic_vector.s,v 1.92 2003/11/12 18:13:57 jhb Exp $
  */
 
 /*
@@ -82,9 +82,7 @@
 	movl	$KPSEL, %eax ;	/* reload with per-CPU data segment */	\
 	mov	%ax, %fs ;						\
 	movl	lapic, %edx ;	/* pointer to local APIC */		\
-	movl	PCPU(CURTHREAD), %ebx ;					\
 	movl	LA_ISR + 16 * (index)(%edx), %eax ;	/* load ISR */	\
-	incl	TD_INTR_NESTING_LEVEL(%ebx) ;				\
 	bsrl	%eax, %eax ;	/* index of highset set bit in ISR */	\
 	jz	2f ;							\
 	addl	$(32 * index),%eax ;					\
@@ -93,7 +91,6 @@
 	pushl	%eax ;		/* pass the IRQ */			\
 	call	lapic_handle_intr ;					\
 	addl	$4, %esp ;	/* discard parameter */			\
-	decl	TD_INTR_NESTING_LEVEL(%ebx) ;				\
 	MEXITCOUNT ;							\
 	jmp	doreti ;						\
 2:	movl	$-1, %eax ;	/* send a vector of -1 */		\
@@ -245,12 +242,9 @@
 	movl	lapic, %edx
 	movl	$0, LA_EOI(%edx)	/* End Of Interrupt to APIC */
 
-	movl	PCPU(CURTHREAD),%ebx
-	incl	TD_INTR_NESTING_LEVEL(%ebx)
 	pushl	$0		/* XXX convert trapframe to clockframe */
 	call	forwarded_hardclock
 	addl	$4, %esp	/* XXX convert clockframe to trapframe */
-	decl	TD_INTR_NESTING_LEVEL(%ebx)
 	MEXITCOUNT
 	jmp	doreti
 
@@ -273,12 +267,9 @@
 
 	FAKE_MCOUNT(13*4(%esp))
 
-	movl	PCPU(CURTHREAD),%ebx
-	incl	TD_INTR_NESTING_LEVEL(%ebx)
 	pushl	$0		/* XXX convert trapframe to clockframe */
 	call	forwarded_statclock
 	addl	$4, %esp	/* XXX convert clockframe to trapframe */
-	decl	TD_INTR_NESTING_LEVEL(%ebx)
 	MEXITCOUNT
 	jmp	doreti
 

==== //depot/projects/netperf/sys/i386/i386/genassym.c#4 (text+ko) ====

@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/genassym.c,v 1.145 2003/11/03 22:34:53 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/genassym.c,v 1.146 2003/11/12 18:14:34 jhb Exp $");
 
 #include "opt_apic.h"
 #include "opt_compat.h"
@@ -88,8 +88,6 @@
 ASSYM(TD_FLAGS, offsetof(struct thread, td_flags));
 ASSYM(TD_PCB, offsetof(struct thread, td_pcb));
 ASSYM(TD_PROC, offsetof(struct thread, td_proc));
-ASSYM(TD_INTR_NESTING_LEVEL, offsetof(struct thread, td_intr_nesting_level));
-ASSYM(TD_CRITNEST, offsetof(struct thread, td_critnest));
 ASSYM(TD_MD, offsetof(struct thread, td_md));
 
 ASSYM(P_MD, offsetof(struct proc, p_md));

==== //depot/projects/netperf/sys/i386/i386/intr_machdep.c#2 (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/i386/i386/intr_machdep.c,v 1.1 2003/11/03 21:25:52 jhb Exp $
+ * $FreeBSD: src/sys/i386/i386/intr_machdep.c,v 1.2 2003/11/12 18:13:57 jhb Exp $
  */
 
 /*
@@ -49,6 +49,7 @@
 #include <sys/proc.h>
 #include <sys/syslog.h>
 #include <sys/systm.h>
+#include <machine/clock.h>
 #include <machine/intr_machdep.h>
 #ifdef DDB
 #include <ddb/ddb.h>
@@ -152,10 +153,14 @@
 void
 intr_execute_handlers(struct intsrc *isrc, struct intrframe *iframe)
 {
+	struct thread *td;
 	struct ithd *it;
 	struct intrhand *ih;
 	int error, vector;
 
+	td = curthread;
+	td->td_intr_nesting_level++;
+
 	/*
 	 * We count software interrupts when we process them.  The
 	 * code here follows previous practice, but there's an
@@ -165,18 +170,25 @@
 	atomic_add_long(isrc->is_count, 1);
 	atomic_add_int(&cnt.v_intr, 1);
 
+	it = isrc->is_ithread;
+	ih = TAILQ_FIRST(&it->it_handlers);
+
 	/*
-	 * Execute fast interrupt handlers directly.
-	 * To support clock handlers, if a handler registers
-	 * with a NULL argument, then we pass it a pointer to
-	 * a trapframe as its argument.
+	 * XXX: We assume that IRQ 0 is only used for the ISA timer
+	 * device (clk).
 	 */
-	it = isrc->is_ithread;
-	ih = TAILQ_FIRST(&it->it_handlers);
+	vector = isrc->is_pic->pic_vector(isrc);
+	if (vector == 0)
+		clkintr_pending = 1;
+
 	critical_enter();
-	if (ih == NULL)
-		error = EINVAL;
-	else if (ih->ih_flags & IH_FAST) {
+	if (ih != NULL && ih->ih_flags & IH_FAST) {
+		/*
+		 * Execute fast interrupt handlers directly.
+		 * To support clock handlers, if a handler registers
+		 * with a NULL argument, then we pass it a pointer to
+		 * a trapframe as its argument.
+		 */
 		TAILQ_FOREACH(ih, &it->it_handlers, ih_next) {
 			MPASS(ih->ih_flags & IH_FAST);
 			CTR3(KTR_INTR, "%s: executing handler %p(%p)",
@@ -188,13 +200,22 @@
 			else
 				ih->ih_handler(ih->ih_argument);
 		}
-		isrc->is_pic->pic_enable_source(isrc);
+		isrc->is_pic->pic_eoi_source(isrc);
 		error = 0;
-	} else
-		error = ithread_schedule(it, !cold);
+	} else {
+		/*
+		 * For stray and threaded interrupts, we mask and EOI the
+		 * source.
+		 */
+		isrc->is_pic->pic_disable_source(isrc);
+		isrc->is_pic->pic_eoi_source(isrc);
+		if (ih == NULL)
+			error = EINVAL;
+		else
+			error = ithread_schedule(it, !cold);
+	}
 	critical_exit();
 	if (error == EINVAL) {
-		vector = isrc->is_pic->pic_vector(isrc);
 		atomic_add_long(isrc->is_straycount, 1);
 		if (*isrc->is_straycount < MAX_STRAY_LOG)
 			log(LOG_ERR, "stray irq%d\n", vector);
@@ -203,6 +224,7 @@
 			    "too many stray irq %d's: not logging anymore\n",
 			    vector);
 	}
+	td->td_intr_nesting_level--;
 }
 
 void

==== //depot/projects/netperf/sys/i386/i386/io_apic.c#4 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/io_apic.c,v 1.5 2003/11/07 23:44:35 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/io_apic.c,v 1.6 2003/11/12 18:13:57 jhb Exp $");
 
 #include "opt_isa.h"
 #include "opt_no_mixed_mode.h"
@@ -201,8 +201,7 @@
 ioapic_eoi_source(struct intsrc *isrc)
 {
 
-	TODO;
-	/* lapic_eoi(); */
+	lapic_eoi();
 }
 
 /*

==== //depot/projects/netperf/sys/i386/i386/local_apic.c#2 (text+ko) ====

@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/local_apic.c,v 1.1 2003/11/03 21:53:36 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/local_apic.c,v 1.2 2003/11/12 18:13:57 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -467,6 +467,13 @@
 }
 
 void
+lapic_eoi(void)
+{
+
+	lapic->eoi = 0;
+}
+
+void
 lapic_handle_intr(struct intrframe frame)
 {
 	struct intsrc *isrc;
@@ -474,8 +481,6 @@
 	if (frame.if_vec == -1)
 		panic("Couldn't get vector from ISR!");
 	isrc = intr_lookup_source(apic_idt_to_irq(frame.if_vec));
-	isrc->is_pic->pic_disable_source(isrc);
-	lapic->eoi = 0;
 	intr_execute_handlers(isrc, &frame);
 }
 

==== //depot/projects/netperf/sys/i386/i386/mp_machdep.c#13 (text+ko) ====

@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/mp_machdep.c,v 1.223 2003/11/11 17:16:15 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/mp_machdep.c,v 1.224 2003/11/12 18:13:57 jhb Exp $");
 
 #include "opt_apic.h"
 #include "opt_cpu.h"
@@ -1047,12 +1047,16 @@
 void
 forwarded_statclock(struct clockframe frame)
 {
+	struct thread *td;
 
 	CTR0(KTR_SMP, "forwarded_statclock");
+	td = curthread;
+	td->td_intr_nesting_level++;
 	if (profprocs != 0)
 		profclock(&frame);
 	if (pscnt == psdiv)
 		statclock(&frame);
+	td->td_intr_nesting_level--;
 }
 
 void
@@ -1080,9 +1084,13 @@
 void
 forwarded_hardclock(struct clockframe frame)
 {
+	struct thread *td;
 
 	CTR0(KTR_SMP, "forwarded_hardclock");
+	td = curthread;
+	td->td_intr_nesting_level++;
 	hardclock_process(&frame);
+	td->td_intr_nesting_level--;
 }
 
 void 

==== //depot/projects/netperf/sys/i386/include/apicvar.h#2 (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/i386/include/apicvar.h,v 1.1 2003/11/03 21:53:38 jhb Exp $
+ * $FreeBSD: src/sys/i386/include/apicvar.h,v 1.2 2003/11/12 18:13:57 jhb Exp $
  */
 
 #ifndef _MACHINE_APICVAR_H_
@@ -147,6 +147,7 @@
 void	lapic_disable(void);
 void	lapic_dump(const char *str);
 void	lapic_enable_intr(u_int vector);
+void	lapic_eoi(void);
 int	lapic_id(void);
 void	lapic_init(uintptr_t addr);
 int	lapic_intr_pending(u_int vector);

==== //depot/projects/netperf/sys/i386/include/clock.h#6 (text+ko) ====

@@ -3,7 +3,7 @@
  * Garrett Wollman, September 1994.
  * This file is in the public domain.
  *
- * $FreeBSD: src/sys/i386/include/clock.h,v 1.48 2003/11/03 21:53:38 jhb Exp $
+ * $FreeBSD: src/sys/i386/include/clock.h,v 1.49 2003/11/12 18:13:57 jhb Exp $
  */
 
 #ifndef _MACHINE_CLOCK_H_
@@ -15,6 +15,7 @@
  * XXX large parts of the driver and its interface are misplaced.
  */
 extern int	adjkerntz;
+extern int	clkintr_pending;
 extern int	disable_rtc_set;
 extern int	pscnt;
 extern int	psdiv;

==== //depot/projects/netperf/sys/i386/isa/atpic.c#2 (text+ko) ====

@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/isa/atpic.c,v 1.2 2003/11/04 13:13:04 nyan Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/isa/atpic.c,v 1.3 2003/11/12 18:13:57 jhb Exp $");
 
 #include "opt_auto_eoi.h"
 #include "opt_isa.h"
@@ -192,6 +192,10 @@
 #endif
 }
 
+/*
+ * The data sheet says no auto-EOI on slave, but it sometimes works.
+ * So, if AUTO_EOI_2 is enabled, we use it.
+ */
 static void
 atpic_eoi_slave(struct intsrc *isrc)
 {
@@ -327,7 +331,7 @@
 SYSINIT(atpic_init, SI_SUB_INTR, SI_ORDER_SECOND + 1, atpic_init, NULL)
 
 void
-atpic_sched_ithd(struct intrframe iframe)
+atpic_handle_intr(struct intrframe iframe)
 {
 	struct intsrc *isrc;
 

==== //depot/projects/netperf/sys/i386/isa/atpic_vector.s#2 (text+ko) ====

@@ -32,7 +32,7 @@
  * SUCH DAMAGE.
  *
  *	from: vector.s, 386BSD 0.1 unknown origin
- * $FreeBSD: src/sys/i386/isa/atpic_vector.s,v 1.38 2003/11/03 21:34:45 jhb Exp $
+ * $FreeBSD: src/sys/i386/isa/atpic_vector.s,v 1.39 2003/11/12 18:13:57 jhb Exp $
  */
 
 /*
@@ -52,50 +52,10 @@
 
 #include "assym.s"
 
-#define	IRQ_BIT(irq_num)	(1 << ((irq_num) % 8))
-#define	IRQ_BYTE(irq_num)	((irq_num) >> 3)
-
-#ifdef AUTO_EOI_1
-
-#define	ENABLE_ICU1		/* use auto-EOI to reduce i/o */
-#define	OUTB_ICU1
-
-#else
-
-#define	ENABLE_ICU1							\
-	movb	$ICU_EOI,%al ;	/* as soon as possible send EOI ... */	\
-	OUTB_ICU1		/* ... to clear in service bit */
-
-#define	OUTB_ICU1							\
-	outb	%al,$IO_ICU1
-
-#endif
-
-#ifdef AUTO_EOI_2
-/*
- * The data sheet says no auto-EOI on slave, but it sometimes works.
- */
-#define	ENABLE_ICU1_AND_2	ENABLE_ICU1
-
-#else
-
-#define	ENABLE_ICU1_AND_2						\
-	movb	$ICU_EOI,%al ;	/* as above */				\
-	outb	%al,$IO_ICU2 ;	/* but do second icu first ... */	\
-	OUTB_ICU1		/* ... then first icu (if !AUTO_EOI_1) */
-
-#endif
-
 /*
  * Macros for interrupt interrupt entry, call to handler, and exit.
- *
- * XXX Most of the parameters here are obsolete.  Fix this when we're
- * done.
- * XXX we really shouldn't return via doreti if we just schedule the
- * interrupt handler and don't run anything.  We could just do an
- * iret.  FIXME.
  */
-#define	INTR(irq_num, vec_name, icu, enable_icus, maybe_extra_ipending) \
+#define	INTR(irq_num, vec_name) \
 	.text ;								\
 	SUPERALIGN_TEXT ;						\
 IDTVEC(vec_name) ;							\
@@ -111,42 +71,29 @@
 	mov	$KPSEL,%ax ;						\
 	mov	%ax,%fs ;						\
 ;									\
-	maybe_extra_ipending ;						\
-	movb	imen + IRQ_BYTE(irq_num),%al ;				\
-	orb	$IRQ_BIT(irq_num),%al ;					\
-	movb	%al,imen + IRQ_BYTE(irq_num) ;				\
-	outb	%al,$icu+ICU_IMR_OFFSET ;				\
-	enable_icus ;							\
-;									\
-	movl	PCPU(CURTHREAD),%ebx ;					\
-	incl	TD_INTR_NESTING_LEVEL(%ebx) ;				\
-;									\
 	FAKE_MCOUNT(13*4(%esp)) ;	/* XXX late to avoid double count */ \
 	pushl	$irq_num; 	/* pass the IRQ */			\
-	call	atpic_sched_ithd ;					\
+	call	atpic_handle_intr ;					\
 	addl	$4, %esp ;	/* discard the parameter */		\
 ;									\
-	decl	TD_INTR_NESTING_LEVEL(%ebx) ;				\
 	MEXITCOUNT ;							\
 	jmp	doreti
 
 MCOUNT_LABEL(bintr)
-#define	CLKINTR_PENDING	movl $1,CNAME(clkintr_pending)
-/* Threaded interrupts */
-	INTR(0,atpic_intr0, IO_ICU1, ENABLE_ICU1, CLKINTR_PENDING)
-	INTR(1,atpic_intr1, IO_ICU1, ENABLE_ICU1,)
-	INTR(2,atpic_intr2, IO_ICU1, ENABLE_ICU1,)
-	INTR(3,atpic_intr3, IO_ICU1, ENABLE_ICU1,)
-	INTR(4,atpic_intr4, IO_ICU1, ENABLE_ICU1,)
-	INTR(5,atpic_intr5, IO_ICU1, ENABLE_ICU1,)
-	INTR(6,atpic_intr6, IO_ICU1, ENABLE_ICU1,)
-	INTR(7,atpic_intr7, IO_ICU1, ENABLE_ICU1,)
-	INTR(8,atpic_intr8, IO_ICU2, ENABLE_ICU1_AND_2,)
-	INTR(9,atpic_intr9, IO_ICU2, ENABLE_ICU1_AND_2,)
-	INTR(10,atpic_intr10, IO_ICU2, ENABLE_ICU1_AND_2,)
-	INTR(11,atpic_intr11, IO_ICU2, ENABLE_ICU1_AND_2,)
-	INTR(12,atpic_intr12, IO_ICU2, ENABLE_ICU1_AND_2,)
-	INTR(13,atpic_intr13, IO_ICU2, ENABLE_ICU1_AND_2,)
-	INTR(14,atpic_intr14, IO_ICU2, ENABLE_ICU1_AND_2,)
-	INTR(15,atpic_intr15, IO_ICU2, ENABLE_ICU1_AND_2,)
+	INTR(0, atpic_intr0)
+	INTR(1, atpic_intr1)
+	INTR(2, atpic_intr2)
+	INTR(3, atpic_intr3)
+	INTR(4, atpic_intr4)
+	INTR(5, atpic_intr5)
+	INTR(6, atpic_intr6)
+	INTR(7, atpic_intr7)
+	INTR(8, atpic_intr8)
+	INTR(9, atpic_intr9)
+	INTR(10, atpic_intr10)
+	INTR(11, atpic_intr11)
+	INTR(12, atpic_intr12)
+	INTR(13, atpic_intr13)
+	INTR(14, atpic_intr14)
+	INTR(15, atpic_intr15)
 MCOUNT_LABEL(eintr)

==== //depot/projects/netperf/sys/i386/isa/icu.h#3 (text+ko) ====

@@ -34,7 +34,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)icu.h	5.6 (Berkeley) 5/9/91
- * $FreeBSD: src/sys/i386/isa/icu.h,v 1.28 2003/11/03 21:34:45 jhb Exp $
+ * $FreeBSD: src/sys/i386/isa/icu.h,v 1.29 2003/11/12 18:13:57 jhb Exp $
  */
 
 /*
@@ -104,7 +104,7 @@
 #define	HWI_MASK	0xffff		/* bits for h/w interrupts */
 
 #ifndef LOCORE
-void	atpic_sched_ithd(struct intrframe iframe);
+void	atpic_handle_intr(struct intrframe iframe);
 void	atpic_startup(void);
 #endif
 

==== //depot/projects/netperf/sys/ia64/ia64/interrupt.c#5 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/ia64/ia64/interrupt.c,v 1.41 2003/09/10 22:49:38 marcel Exp $ */
+/* $FreeBSD: src/sys/ia64/ia64/interrupt.c,v 1.42 2003/11/12 01:26:02 marcel Exp $ */
 /* $NetBSD: interrupt.c,v 1.23 1998/02/24 07:38:01 thorpej Exp $ */
 
 /*
@@ -200,8 +200,12 @@
 		asts[PCPU_GET(cpuid)]++;
 		CTR1(KTR_SMP, "IPI_AST, cpuid=%d", PCPU_GET(cpuid));
 	} else if (vector == ipi_vector[IPI_HIGH_FP]) {
-		if (PCPU_GET(fpcurthread) != NULL)
-			ia64_highfp_save(PCPU_GET(fpcurthread));
+		struct thread *thr = PCPU_GET(fpcurthread);
+		if (thr != NULL) {
+			save_high_fp(&thr->td_pcb->pcb_high_fp);
+			thr->td_pcb->pcb_fpcpu = NULL;
+			PCPU_SET(fpcurthread, NULL);
+		}
 	} else if (vector == ipi_vector[IPI_RENDEZVOUS]) {
 		rdvs[PCPU_GET(cpuid)]++;
 		CTR1(KTR_SMP, "IPI_RENDEZVOUS, cpuid=%d", PCPU_GET(cpuid));

==== //depot/projects/netperf/sys/ia64/ia64/machdep.c#18 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *

>>> TRUNCATED FOR MAIL (1000 lines) <<<


More information about the p4-projects mailing list