PERFORCE change 30848 for review

John Baldwin jhb at FreeBSD.org
Fri May 9 10:31:43 PDT 2003


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

Change 30848 by jhb at jhb_laptop on 2003/05/09 10:31:32

	IFC @30847.

Affected files ...

.. //depot/projects/smpng/sys/Makefile#3 integrate
.. //depot/projects/smpng/sys/amd64/amd64/exception.S#2 integrate
.. //depot/projects/smpng/sys/amd64/amd64/machdep.c#2 integrate
.. //depot/projects/smpng/sys/amd64/amd64/trap.c#2 integrate
.. //depot/projects/smpng/sys/dev/ata/ata-raid.c#20 integrate
.. //depot/projects/smpng/sys/dev/bge/if_bge.c#26 integrate
.. //depot/projects/smpng/sys/dev/bge/if_bgereg.h#14 integrate
.. //depot/projects/smpng/sys/dev/vinum/vinumioctl.c#13 integrate
.. //depot/projects/smpng/sys/kern/kern_mac.c#25 integrate
.. //depot/projects/smpng/sys/sys/_label.h#4 integrate
.. //depot/projects/smpng/sys/sys/mbuf.h#24 integrate
.. //depot/projects/smpng/sys/vm/vm_object.c#35 integrate

Differences ...

==== //depot/projects/smpng/sys/Makefile#3 (text+ko) ====

@@ -1,7 +1,10 @@
-# $FreeBSD: src/sys/Makefile,v 1.26 2002/04/26 17:55:21 ru Exp $
+# $FreeBSD: src/sys/Makefile,v 1.27 2003/05/08 06:35:39 peter Exp $
 
+SUBDIR=
 # The boot loader
-SUBDIR=	boot
+.if ${MACHINE_ARCH} != "amd64"
+SUBDIR+=boot
+.endif
 
 # KLD modules build for both a.out and ELF
 .if defined(MODULES_WITH_WORLD)

==== //depot/projects/smpng/sys/amd64/amd64/exception.S#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/amd64/amd64/exception.S,v 1.105 2003/05/03 00:21:43 peter Exp $
+ * $FreeBSD: src/sys/amd64/amd64/exception.S,v 1.106 2003/05/08 00:05:00 peter Exp $
  */
 
 #include <machine/asmacros.h>
@@ -202,7 +202,6 @@
 	#swapgs
 	movq	%rsp,PCPU(SCRATCH_RSP)
 	movq	common_tss+COMMON_TSS_RSP0,%rsp
-	sti
 	/* Now emulate a trapframe. Ugh. */
 	subq	$TF_SIZE,%rsp
 	movq	$KUDSEL,TF_SS(%rsp)
@@ -226,6 +225,7 @@
 	movq	%r15,TF_R15(%rsp)	/* C preserved */
 	movq	PCPU(SCRATCH_RSP),%r12	/* %r12 already saved */
 	movq	%r12,TF_RSP(%rsp)	/* user stack pointer */
+	sti
 	call	syscall
 	movq	PCPU(CURPCB),%rax
 	testq	$PCB_FULLCTX,PCB_FLAGS(%rax)

==== //depot/projects/smpng/sys/amd64/amd64/machdep.c#2 (text+ko) ====

@@ -35,7 +35,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)machdep.c	7.4 (Berkeley) 6/3/91
- * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.565 2003/05/01 04:18:02 peter Exp $
+ * $FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.568 2003/05/08 08:25:51 peter Exp $
  */
 
 #include "opt_atalk.h"
@@ -99,6 +99,7 @@
 #include <machine/clock.h>
 #include <machine/specialreg.h>
 #include <machine/md_var.h>
+#include <machine/metadata.h>
 #include <machine/proc.h>
 #ifdef PERFMON
 #include <machine/perfmon.h>
@@ -258,7 +259,7 @@
 		p->p_sigstk.ss_flags |= SS_ONSTACK;
 #endif
 	} else
-		sp = (char *)regs->tf_rsp - sizeof(struct sigframe);
+		sp = (char *)regs->tf_rsp - sizeof(struct sigframe) - 128;
 	/* Align to 16 bytes. */
 	sfp = (struct sigframe *)((unsigned long)sp & ~0xF);
 	PROC_UNLOCK(p);
@@ -1218,7 +1219,7 @@
 	setidt(11, &IDTVEC(missing),  SDT_SYSTGT, SEL_KPL, 0);
 	setidt(12, &IDTVEC(stk),  SDT_SYSTGT, SEL_KPL, 0);
 	setidt(13, &IDTVEC(prot),  SDT_SYSTGT, SEL_KPL, 0);
-	setidt(14, &IDTVEC(page),  SDT_SYSTGT, SEL_KPL, 0);
+	setidt(14, &IDTVEC(page),  SDT_SYSIGT, SEL_KPL, 0);
 	setidt(15, &IDTVEC(rsvd),  SDT_SYSTGT, SEL_KPL, 0);
 	setidt(16, &IDTVEC(fpu),  SDT_SYSTGT, SEL_KPL, 0);
 	setidt(17, &IDTVEC(align), SDT_SYSTGT, SEL_KPL, 0);

==== //depot/projects/smpng/sys/amd64/amd64/trap.c#2 (text+ko) ====

@@ -35,7 +35,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)trap.c	7.4 (Berkeley) 5/13/91
- * $FreeBSD: src/sys/amd64/amd64/trap.c,v 1.252 2003/05/01 01:05:21 peter Exp $
+ * $FreeBSD: src/sys/amd64/amd64/trap.c,v 1.253 2003/05/08 08:25:51 peter Exp $
  */
 
 /*
@@ -213,9 +213,17 @@
 		 * do the VM lookup, so just consider it a fatal trap so the
 		 * kernel can print out a useful trap message and even get
 		 * to the debugger.
+		 *
+		 * Note that T_PAGEFLT is registered as an interrupt gate.  This
+		 * is just like a trap gate, except interrupts are disabled.  This
+		 * happens to be critically important, because we could otherwise
+		 * preempt and run another process that may cause %cr2 to be
+		 * clobbered for something else.
 		 */
 		eva = rcr2();
-		if (PCPU_GET(spinlocks) != NULL)
+		if (PCPU_GET(spinlocks) == NULL)
+			enable_intr();
+		else
 			trap_fatal(&frame, eva);
 	}
 

==== //depot/projects/smpng/sys/dev/ata/ata-raid.c#20 (text+ko) ====

@@ -25,7 +25,7 @@
  * (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/ata/ata-raid.c,v 1.64 2003/05/04 16:17:54 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.65 2003/05/08 16:38:14 jhb Exp $
  */
 
 #include "opt_ata.h"
@@ -969,6 +969,7 @@
     int disk, s, count = 0, error = 0;
     caddr_t buffer;
 
+    mtx_lock(&Giant);
     if ((rdp->flags & (AR_F_READY|AR_F_DEGRADED)) != (AR_F_READY|AR_F_DEGRADED))
 	kthread_exit(EEXIST);
 

==== //depot/projects/smpng/sys/dev/bge/if_bge.c#26 (text+ko) ====

@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.39 2003/05/04 00:07:21 ps Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/bge/if_bge.c,v 1.40 2003/05/07 21:51:13 ps Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -483,10 +483,10 @@
 	ifp = &sc->arpcom.ac_if;
 
 	if (phy != 1)
-		switch(sc->bge_asicrev) {
-		case BGE_ASICREV_BCM5701_B5:
-		case BGE_ASICREV_BCM5703_A2:
-		case BGE_ASICREV_BCM5704_A0:
+		switch(sc->bge_chipid) {
+		case BGE_CHIPID_BCM5701_B5:
+		case BGE_CHIPID_BCM5703_A2:
+		case BGE_CHIPID_BCM5704_A0:
 			return(0);
 		}
 
@@ -937,12 +937,12 @@
 
 	CSR_WRITE_4(sc, BGE_MBX_TX_HOST_PROD0_LO, 0);
 	/* 5700 b2 errata */
-	if (BGE_ASICREV(sc->bge_asicrev) == BGE_ASICREV_BCM5700)
+	if (sc->bge_chiprev == BGE_CHIPREV_5700_BX)
 		CSR_WRITE_4(sc, BGE_MBX_TX_HOST_PROD0_LO, 0);
 
 	CSR_WRITE_4(sc, BGE_MBX_TX_NIC_PROD0_LO, 0);
 	/* 5700 b2 errata */
-	if (BGE_ASICREV(sc->bge_asicrev) == BGE_ASICREV_BCM5700)
+	if (sc->bge_chiprev == BGE_CHIPREV_5700_BX)
 		CSR_WRITE_4(sc, BGE_MBX_TX_NIC_PROD0_LO, 0);
 
 	return(0);
@@ -1061,7 +1061,7 @@
 		 * The 5704 uses a different encoding of read/write
 		 * watermarks.
 		 */
-		if (BGE_ASICREV(sc->bge_asicrev) == BGE_ASICREV_BCM5704)
+		if (sc->bge_asicrev == BGE_ASICREV_BCM5704)
 			dma_rw_ctl = BGE_PCI_READ_CMD|BGE_PCI_WRITE_CMD |
 			    (0x7 << BGE_PCIDMARWCTL_RD_WAT_SHIFT) |
 			    (0x3 << BGE_PCIDMARWCTL_WR_WAT_SHIFT);
@@ -1075,8 +1075,8 @@
 		 * 5703 and 5704 need ONEDMA_AT_ONCE as a workaround
 		 * for hardware bugs.
 		 */
-		if (BGE_ASICREV(sc->bge_asicrev) == BGE_ASICREV_BCM5703 ||
-		    BGE_ASICREV(sc->bge_asicrev) == BGE_ASICREV_BCM5704) {
+		if (sc->bge_asicrev == BGE_ASICREV_BCM5703 ||
+		    sc->bge_asicrev == BGE_ASICREV_BCM5704) {
 			u_int32_t tmp;
 
 			tmp = CSR_READ_4(sc, BGE_PCI_CLKCTL) & 0x1f;
@@ -1085,8 +1085,8 @@
 		}
 	}
 
-	if (BGE_ASICREV(sc->bge_asicrev) == BGE_ASICREV_BCM5703 ||
-	    BGE_ASICREV(sc->bge_asicrev) == BGE_ASICREV_BCM5704)
+	if (sc->bge_asicrev == BGE_ASICREV_BCM5703 ||
+	    sc->bge_asicrev == BGE_ASICREV_BCM5704)
 		dma_rw_ctl &= ~BGE_PCIDMARWCTL_MINDMA;
 	pci_write_config(sc->bge_dev, BGE_PCI_DMA_RW_CTL, dma_rw_ctl, 4);
 
@@ -1442,9 +1442,6 @@
 	CSR_WRITE_4(sc, BGE_SDI_STATS_CTL,
 	    BGE_SDISTATSCTL_ENABLE|BGE_SDISTATSCTL_FASTER);
 
-	/* init LED register */
-	CSR_WRITE_4(sc, BGE_MAC_LED_CTL, 0x00000000);
-
 	/* ack/clear link change events */
 	CSR_WRITE_4(sc, BGE_MAC_STS, BGE_MACSTAT_SYNC_CHANGED|
 	    BGE_MACSTAT_CFG_CHANGED);
@@ -1455,7 +1452,7 @@
 		CSR_WRITE_4(sc, BGE_MI_STS, BGE_MISTS_LINK);
  	} else {
 		BGE_SETBIT(sc, BGE_MI_MODE, BGE_MIMODE_AUTOPOLL|10<<16);
-		if (BGE_ASICREV(sc->bge_asicrev) == BGE_ASICREV_BCM5700)
+		if (sc->bge_asicrev == BGE_ASICREV_BCM5700)
 			CSR_WRITE_4(sc, BGE_MAC_EVT_ENB,
 			    BGE_EVTENB_MI_INTERRUPT);
 	}
@@ -1656,9 +1653,11 @@
 
 	/* Save ASIC rev. */
 
-	sc->bge_asicrev =
+	sc->bge_chipid =
 	    pci_read_config(dev, BGE_PCI_MISC_CTL, 4) &
 	    BGE_PCIMISCCTL_ASICREV;
+	sc->bge_asicrev = BGE_ASICREV(sc->bge_chipid);
+	sc->bge_chiprev = BGE_CHIPREV(sc->bge_chipid);
 
 	/*
 	 * Figure out what sort of media we have by checking the
@@ -1714,11 +1713,11 @@
 	 * which do not support unaligned accesses, we will realign the
 	 * payloads by copying the received packets.
 	 */
-	switch (sc->bge_asicrev) {
-	case BGE_ASICREV_BCM5701_A0:
-	case BGE_ASICREV_BCM5701_B0:
-	case BGE_ASICREV_BCM5701_B2:
-	case BGE_ASICREV_BCM5701_B5:
+	switch (sc->bge_chipid) {
+	case BGE_CHIPID_BCM5701_A0:
+	case BGE_CHIPID_BCM5701_B0:
+	case BGE_CHIPID_BCM5701_B2:
+	case BGE_CHIPID_BCM5701_B5:
 		/* If in PCI-X mode, work around the alignment bug. */
 		if ((pci_read_config(dev, BGE_PCI_PCISTATE, 4) &
 		    (BGE_PCISTATE_PCI_BUSMODE | BGE_PCISTATE_PCI_BUSSPEED)) ==
@@ -2073,7 +2072,7 @@
 	 * the interrupt handler.
 	 */
 
-	if (BGE_ASICREV(sc->bge_asicrev) == BGE_ASICREV_BCM5700) {
+	if (sc->bge_asicrev == BGE_ASICREV_BCM5700) {
 		u_int32_t		status;
 
 		status = CSR_READ_4(sc, BGE_MAC_STS);
@@ -2353,7 +2352,7 @@
 	/* Transmit */
 	CSR_WRITE_4(sc, BGE_MBX_TX_HOST_PROD0_LO, prodidx);
 	/* 5700 b2 errata */
-	if (BGE_ASICREV(sc->bge_asicrev) == BGE_ASICREV_BCM5700)
+	if (sc->bge_chiprev == BGE_CHIPREV_5700_BX)
 		CSR_WRITE_4(sc, BGE_MBX_TX_HOST_PROD0_LO, prodidx);
 
 	/*

==== //depot/projects/smpng/sys/dev/bge/if_bgereg.h#14 (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.15 2003/05/03 22:58:45 ps Exp $
+ * $FreeBSD: src/sys/dev/bge/if_bgereg.h,v 1.16 2003/05/07 21:51:13 ps Exp $
  */
 
 /*
@@ -212,23 +212,23 @@
 	(BGE_PCIMISCCTL_CLEAR_INTA|BGE_PCIMISCCTL_MASK_PCI_INTR|	\
 	BGE_PCIMISCCTL_ENDIAN_WORDSWAP|BGE_PCIMISCCTL_INDIRECT_ACCESS)
 
-#define BGE_ASICREV_TIGON_I		0x40000000
-#define BGE_ASICREV_TIGON_II		0x60000000
-#define BGE_ASICREV_BCM5700_B0		0x71000000
-#define BGE_ASICREV_BCM5700_B1		0x71020000
-#define BGE_ASICREV_BCM5700_B2		0x71030000
-#define BGE_ASICREV_BCM5700_ALTIMA	0x71040000
-#define BGE_ASICREV_BCM5700_C0		0x72000000
-#define BGE_ASICREV_BCM5701_A0		0x00000000	/* grrrr */
-#define BGE_ASICREV_BCM5701_B0		0x01000000
-#define BGE_ASICREV_BCM5701_B2		0x01020000
-#define BGE_ASICREV_BCM5701_B5		0x01050000
-#define BGE_ASICREV_BCM5703_A0		0x10000000
-#define BGE_ASICREV_BCM5703_A1		0x10010000
-#define BGE_ASICREV_BCM5703_A2		0x10020000
-#define BGE_ASICREV_BCM5704_A0		0x20000000
-#define BGE_ASICREV_BCM5704_A1		0x20010000
-#define BGE_ASICREV_BCM5704_A2		0x20020000
+#define BGE_CHIPID_TIGON_I		0x40000000
+#define BGE_CHIPID_TIGON_II		0x60000000
+#define BGE_CHIPID_BCM5700_B0		0x71000000
+#define BGE_CHIPID_BCM5700_B1		0x71020000
+#define BGE_CHIPID_BCM5700_B2		0x71030000
+#define BGE_CHIPID_BCM5700_ALTIMA	0x71040000
+#define BGE_CHIPID_BCM5700_C0		0x72000000
+#define BGE_CHIPID_BCM5701_A0		0x00000000	/* grrrr */
+#define BGE_CHIPID_BCM5701_B0		0x01000000
+#define BGE_CHIPID_BCM5701_B2		0x01020000
+#define BGE_CHIPID_BCM5701_B5		0x01050000
+#define BGE_CHIPID_BCM5703_A0		0x10000000
+#define BGE_CHIPID_BCM5703_A1		0x10010000
+#define BGE_CHIPID_BCM5703_A2		0x10020000
+#define BGE_CHIPID_BCM5704_A0		0x20000000
+#define BGE_CHIPID_BCM5704_A1		0x20010000
+#define BGE_CHIPID_BCM5704_A2		0x20020000
 
 /* shorthand one */
 #define BGE_ASICREV(x)			((x) >> 28)
@@ -237,6 +237,13 @@
 #define BGE_ASICREV_BCM5703		0x01
 #define BGE_ASICREV_BCM5704		0x02
 
+/* chip revisions */
+#define BGE_CHIPREV(x)			((x) >> 24)
+#define BGE_CHIPREV_5700_AX		0x70
+#define BGE_CHIPREV_5700_BX		0x71
+#define BGE_CHIPREV_5700_CX		0x72
+#define BGE_CHIPREV_5701_AX		0x00
+
 /* PCI DMA Read/Write Control register */
 #define BGE_PCIDMARWCTL_MINDMA		0x000000FF
 #define BGE_PCIDMARWCTL_RDADRR_BNDRY	0x00000700
@@ -2135,7 +2142,9 @@
 	u_int8_t		bge_extram;	/* has external SSRAM */
 	u_int8_t		bge_tbi;
 	u_int8_t		bge_rx_alignment_bug;
-	u_int32_t		bge_asicrev;
+	u_int32_t		bge_chipid;
+	u_int8_t		bge_asicrev;
+	u_int8_t		bge_chiprev;
 	struct bge_ring_data	*bge_rdata;	/* rings */
 	struct bge_chain_data	bge_cdata;	/* mbufs */
 	u_int16_t		bge_tx_saved_considx;

==== //depot/projects/smpng/sys/dev/vinum/vinumioctl.c#13 (text+ko) ====

@@ -41,8 +41,8 @@
  * otherwise) arising in any way out of the use of this software, even if
  * advised of the possibility of such damage.
  *
- * $Id: vinumioctl.c,v 1.21 2003/05/04 05:23:09 grog Exp grog $
- * $FreeBSD: src/sys/dev/vinum/vinumioctl.c,v 1.45 2003/05/05 08:41:53 grog Exp $
+ * $Id: vinumioctl.c,v 1.22 2003/05/07 03:31:45 grog Exp grog $
+ * $FreeBSD: src/sys/dev/vinum/vinumioctl.c,v 1.46 2003/05/08 00:36:20 grog Exp $
  */
 
 #include <dev/vinum/vinumhdr.h>
@@ -303,9 +303,6 @@
 	return error;
 
     case VINUM_READCONFIG:
-	error = lock_config();				    /* get the config for us alone */
-	if (error)					    /* can't do it, */
-	    return error;				    /* give up */
 	if (((char *) data)[0] == '\0')
 	    ioctl_reply->error = vinum_scandisk(NULL);	    /* built your own list */
 	else
@@ -317,7 +314,6 @@
 		strcpy(ioctl_reply->msg, "no drives found");
 	} else if (ioctl_reply->error)
 	    strcpy(ioctl_reply->msg, "can't read configuration information, see log file");
-	unlock_config();
 	return 0;					    /* must be 0 to return the real error info */
 
     case VINUM_INIT:

==== //depot/projects/smpng/sys/kern/kern_mac.c#25 (text+ko) ====

@@ -33,7 +33,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/kern/kern_mac.c,v 1.89 2003/05/07 17:49:24 rwatson Exp $
+ * $FreeBSD: src/sys/kern/kern_mac.c,v 1.90 2003/05/08 19:49:42 rwatson Exp $
  */
 /*
  * Developed by the TrustedBSD Project.
@@ -98,14 +98,14 @@
 SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
     "TrustedBSD MAC policy controls");
 
-#if MAC_MAX_POLICIES > 32
-#error "MAC_MAX_POLICIES too large"
+#if MAC_MAX_SLOTS > 32
+#error "MAC_MAX_SLOTS too large"
 #endif
 
-static unsigned int mac_max_policies = MAC_MAX_POLICIES;
-static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1;
-SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD,
-    &mac_max_policies, 0, "");
+static unsigned int mac_max_slots = MAC_MAX_SLOTS;
+static unsigned int mac_slot_offsets_free = (1 << MAC_MAX_SLOTS) - 1;
+SYSCTL_UINT(_security_mac, OID_AUTO, max_slots, CTLFLAG_RD,
+    &mac_max_slots, 0, "");
 
 /*
  * Has the kernel started generating labeled objects yet?  All read/write
@@ -645,13 +645,13 @@
 		}
 	}
 	if (mpc->mpc_field_off != NULL) {
-		slot = ffs(mac_policy_offsets_free);
+		slot = ffs(mac_slot_offsets_free);
 		if (slot == 0) {
 			error = ENOMEM;
 			goto out;
 		}
 		slot--;
-		mac_policy_offsets_free &= ~(1 << slot);
+		mac_slot_offsets_free &= ~(1 << slot);
 		*mpc->mpc_field_off = slot;
 	}
 	mpc->mpc_runtime_flags |= MPC_RUNTIME_FLAG_REGISTERED;

==== //depot/projects/smpng/sys/sys/_label.h#4 (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/sys/_label.h,v 1.3 2002/11/04 02:35:46 rwatson Exp $
+ * $FreeBSD: src/sys/sys/_label.h,v 1.4 2003/05/08 19:49:42 rwatson Exp $
  */
 #ifndef _SYS__LABEL_H
 #define	_SYS__LABEL_H
@@ -41,7 +41,7 @@
  * and various other messes.
  */
 
-#define	MAC_MAX_POLICIES	4
+#define	MAC_MAX_SLOTS	4
 
 #define	MAC_FLAG_INITIALIZED	0x0000001	/* Is initialized for use. */
 
@@ -50,7 +50,7 @@
 	union {
 		void	*l_ptr;
 		long	 l_long;
-	}	l_perpolicy[MAC_MAX_POLICIES];
+	}	l_perpolicy[MAC_MAX_SLOTS];
 };
 
 #endif /* !_SYS__LABEL_H */

==== //depot/projects/smpng/sys/sys/mbuf.h#24 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)mbuf.h	8.5 (Berkeley) 2/19/95
- * $FreeBSD: src/sys/sys/mbuf.h,v 1.121 2003/05/02 03:43:40 silby Exp $
+ * $FreeBSD: src/sys/sys/mbuf.h,v 1.122 2003/05/09 02:15:52 silby Exp $
  */
 
 #ifndef _SYS_MBUF_H_
@@ -153,7 +153,7 @@
 #define	M_PROTO3	0x0040	/* protocol-specific */
 #define	M_PROTO4	0x0080	/* protocol-specific */
 #define	M_PROTO5	0x0100	/* protocol-specific */
-#define	M_FREELIST	0x4000	/* mbuf is on the free list */
+#define	M_FREELIST	0x8000	/* mbuf is on the free list */
 
 /*
  * mbuf pkthdr flags (also stored in m_flags).

==== //depot/projects/smpng/sys/vm/vm_object.c#35 (text+ko) ====

@@ -61,7 +61,7 @@
  * any improvements or extensions that they make and grant Carnegie the
  * rights to redistribute these changes.
  *
- * $FreeBSD: src/sys/vm/vm_object.c,v 1.286 2003/05/06 02:45:28 alc Exp $
+ * $FreeBSD: src/sys/vm/vm_object.c,v 1.287 2003/05/09 02:13:23 alc Exp $
  */
 
 /*
@@ -238,8 +238,13 @@
 	_vm_object_allocate(OBJT_DEFAULT, OFF_TO_IDX(VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS),
 	    kernel_object);
 
+	/*
+	 * The kmem object's mutex is given a unique name, instead of
+	 * "vm object", to avoid false reports of lock-order reversal
+	 * with a system map mutex.
+	 */
 	kmem_object = &kmem_object_store;
-	VM_OBJECT_LOCK_INIT(&kmem_object_store);
+	mtx_init(VM_OBJECT_MTX(kmem_object), "kmem object", NULL, MTX_DEF);
 	_vm_object_allocate(OBJT_DEFAULT, OFF_TO_IDX(VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS),
 	    kmem_object);
 


More information about the p4-projects mailing list