Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Sep 2004 07:27:52 GMT
From:      Julian Elischer <julian@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 61839 for review
Message-ID:  <200409200727.i8K7RqxO012208@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=61839

Change 61839 by julian@julian_ref on 2004/09/20 07:27:16

	IFC@61837

Affected files ...

.. //depot/projects/nsched/sys/alpha/alpha/pmap.c#10 integrate
.. //depot/projects/nsched/sys/alpha/alpha/promcons.c#5 integrate
.. //depot/projects/nsched/sys/alpha/tlsb/zs_tlsb.c#5 integrate
.. //depot/projects/nsched/sys/amd64/amd64/pmap.c#21 integrate
.. //depot/projects/nsched/sys/boot/i386/boot2/boot2.c#3 integrate
.. //depot/projects/nsched/sys/boot/ia64/skiload/start.S#2 integrate
.. //depot/projects/nsched/sys/boot/pc98/boot2/Makefile#2 integrate
.. //depot/projects/nsched/sys/compat/ndis/subr_ndis.c#8 integrate
.. //depot/projects/nsched/sys/compat/ndis/subr_ntoskrnl.c#6 integrate
.. //depot/projects/nsched/sys/conf/NOTES#20 integrate
.. //depot/projects/nsched/sys/conf/files#25 integrate
.. //depot/projects/nsched/sys/conf/kern.post.mk#5 integrate
.. //depot/projects/nsched/sys/conf/newvers.sh#5 integrate
.. //depot/projects/nsched/sys/conf/options#17 integrate
.. //depot/projects/nsched/sys/contrib/pf/net/pf_ioctl.c#9 integrate
.. //depot/projects/nsched/sys/dev/acpica/acpi_pci_link.c#8 integrate
.. //depot/projects/nsched/sys/dev/adlink/adlink.c#4 integrate
.. //depot/projects/nsched/sys/dev/ata/ata-all.c#12 integrate
.. //depot/projects/nsched/sys/dev/bge/if_bge.c#6 integrate
.. //depot/projects/nsched/sys/dev/fdc/fdc.c#10 integrate
.. //depot/projects/nsched/sys/dev/fdc/fdc_acpi.c#5 integrate
.. //depot/projects/nsched/sys/dev/fdc/fdc_isa.c#5 integrate
.. //depot/projects/nsched/sys/dev/fdc/fdcvar.h#4 integrate
.. //depot/projects/nsched/sys/dev/fxp/if_fxp.c#8 integrate
.. //depot/projects/nsched/sys/dev/md/md.c#12 integrate
.. //depot/projects/nsched/sys/dev/mk48txx/mk48txx.c#2 integrate
.. //depot/projects/nsched/sys/dev/mk48txx/mk48txxreg.h#2 integrate
.. //depot/projects/nsched/sys/dev/re/if_re.c#9 integrate
.. //depot/projects/nsched/sys/dev/rp/rp.c#8 integrate
.. //depot/projects/nsched/sys/dev/sab/sab.c#8 integrate
.. //depot/projects/nsched/sys/dev/si/si.c#8 integrate
.. //depot/projects/nsched/sys/dev/sio/sio.c#11 integrate
.. //depot/projects/nsched/sys/dev/sound/pci/ich.c#4 integrate
.. //depot/projects/nsched/sys/dev/uart/uart_tty.c#7 integrate
.. //depot/projects/nsched/sys/dev/usb/if_axe.c#8 integrate
.. //depot/projects/nsched/sys/dev/usb/ubser.c#9 integrate
.. //depot/projects/nsched/sys/dev/usb/ucom.c#9 integrate
.. //depot/projects/nsched/sys/dev/usb/ucomvar.h#4 integrate
.. //depot/projects/nsched/sys/dev/usb/umodem.c#5 integrate
.. //depot/projects/nsched/sys/dev/usb/uplcom.c#6 integrate
.. //depot/projects/nsched/sys/dev/usb/usbdevs#13 integrate
.. //depot/projects/nsched/sys/dev/usb/uvscom.c#5 integrate
.. //depot/projects/nsched/sys/dev/vinum/vinumext.h#3 integrate
.. //depot/projects/nsched/sys/dev/vinum/vinummemory.c#3 integrate
.. //depot/projects/nsched/sys/dev/zs/zs.c#8 integrate
.. //depot/projects/nsched/sys/fs/specfs/spec_vnops.c#8 integrate
.. //depot/projects/nsched/sys/geom/nop/g_nop.c#4 integrate
.. //depot/projects/nsched/sys/geom/uzip/g_uzip.c#3 integrate
.. //depot/projects/nsched/sys/geom/vinum/geom_vinum.h#5 integrate
.. //depot/projects/nsched/sys/geom/vinum/geom_vinum_init.c#3 integrate
.. //depot/projects/nsched/sys/geom/vinum/geom_vinum_plex.c#6 integrate
.. //depot/projects/nsched/sys/geom/vinum/geom_vinum_raid5.c#4 integrate
.. //depot/projects/nsched/sys/geom/vinum/geom_vinum_raid5.h#3 integrate
.. //depot/projects/nsched/sys/geom/vinum/geom_vinum_rm.c#4 integrate
.. //depot/projects/nsched/sys/geom/vinum/geom_vinum_state.c#4 integrate
.. //depot/projects/nsched/sys/geom/vinum/geom_vinum_subr.c#6 integrate
.. //depot/projects/nsched/sys/geom/vinum/geom_vinum_var.h#3 integrate
.. //depot/projects/nsched/sys/geom/vinum/geom_vinum_volume.c#5 integrate
.. //depot/projects/nsched/sys/i386/conf/GENERIC#9 integrate
.. //depot/projects/nsched/sys/i386/i386/pmap.c#23 integrate
.. //depot/projects/nsched/sys/ia64/acpica/OsdEnvironment.c#3 integrate
.. //depot/projects/nsched/sys/ia64/ia64/dump_machdep.c#2 integrate
.. //depot/projects/nsched/sys/ia64/ia64/efi.c#2 integrate
.. //depot/projects/nsched/sys/ia64/ia64/eficlock.c#2 integrate
.. //depot/projects/nsched/sys/ia64/ia64/locore.S#4 integrate
.. //depot/projects/nsched/sys/ia64/ia64/machdep.c#7 integrate
.. //depot/projects/nsched/sys/ia64/ia64/pmap.c#12 integrate
.. //depot/projects/nsched/sys/ia64/ia64/sal.c#3 integrate
.. //depot/projects/nsched/sys/ia64/ia64/trap.c#6 integrate
.. //depot/projects/nsched/sys/ia64/include/efi.h#2 integrate
.. //depot/projects/nsched/sys/ia64/include/fpu.h#2 integrate
.. //depot/projects/nsched/sys/ia64/include/sal.h#2 integrate
.. //depot/projects/nsched/sys/kern/kern_proc.c#13 integrate
.. //depot/projects/nsched/sys/kern/kern_switch.c#36 integrate
.. //depot/projects/nsched/sys/kern/subr_kdb.c#4 integrate
.. //depot/projects/nsched/sys/kern/tty.c#9 integrate
.. //depot/projects/nsched/sys/kern/tty_pty.c#9 integrate
.. //depot/projects/nsched/sys/modules/netgraph/Makefile#4 integrate
.. //depot/projects/nsched/sys/modules/netgraph/netflow/Makefile#1 branch
.. //depot/projects/nsched/sys/net/if.c#13 integrate
.. //depot/projects/nsched/sys/net/if_tap.c#6 integrate
.. //depot/projects/nsched/sys/netgraph/netflow/netflow.c#1 branch
.. //depot/projects/nsched/sys/netgraph/netflow/netflow.h#1 branch
.. //depot/projects/nsched/sys/netgraph/netflow/ng_netflow.c#1 branch
.. //depot/projects/nsched/sys/netgraph/netflow/ng_netflow.h#1 branch
.. //depot/projects/nsched/sys/netgraph/ng_tty.c#7 integrate
.. //depot/projects/nsched/sys/netinet/ip_input.c#10 integrate
.. //depot/projects/nsched/sys/pc98/pc98/ppc.c#3 integrate
.. //depot/projects/nsched/sys/pc98/pc98/sio.c#11 integrate
.. //depot/projects/nsched/sys/pci/if_rlreg.h#6 integrate
.. //depot/projects/nsched/sys/sys/conf.h#10 integrate
.. //depot/projects/nsched/sys/sys/mdioctl.h#4 integrate
.. //depot/projects/nsched/sys/sys/sched.h#21 integrate
.. //depot/projects/nsched/sys/sys/tty.h#9 integrate
.. //depot/projects/nsched/sys/ufs/ffs/ffs_snapshot.c#8 integrate
.. //depot/projects/nsched/sys/ufs/ffs/ffs_vnops.c#5 integrate
.. //depot/projects/nsched/sys/vm/vm_glue.c#8 integrate

Differences ...

==== //depot/projects/nsched/sys/alpha/alpha/pmap.c#10 (text+ko) ====

@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.168 2004/08/27 19:06:16 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.171 2004/09/19 21:20:01 alc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -895,8 +895,8 @@
 pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m)
 {
 
-	vm_page_unhold(m);
-	if (m->hold_count == 0)
+	--m->wire_count;
+	if (m->wire_count == 0)
 		return _pmap_unwire_pte_hold(pmap, va, m);
 	else
 		return 0;
@@ -941,14 +941,8 @@
 	if (pmap->pm_ptphint == m)
 		pmap->pm_ptphint = NULL;
 
-	/*
-	 * If the page is finally unwired, simply free it.
-	 */
-	--m->wire_count;
-	if (m->wire_count == 0) {
-		vm_page_free_zero(m);
-		atomic_subtract_int(&cnt.v_wire_count, 1);
-	}
+	vm_page_free_zero(m);
+	atomic_subtract_int(&cnt.v_wire_count, 1);
 	return 1;
 }
 
@@ -1073,15 +1067,6 @@
 	if ((m->flags & PG_ZERO) == 0)
 		pmap_zero_page(m);
 
-	KASSERT(m->queue == PQ_NONE,
-		("_pmap_allocpte: %p->queue != PQ_NONE", m));
-
-	/*
-	 * Increment the hold count for the page table page
-	 * (denoting a new mapping.)
-	 */
-	m->hold_count++;
-
 	/*
 	 * Map the pagetable page into the process address space, if
 	 * it isn't already there.
@@ -1099,7 +1084,7 @@
 		pt_entry_t* l2map;
 		if (!pmap_pte_v(l1pte)) {
 			if (_pmap_allocpte(pmap, NUSERLEV3MAPS + l1index) == NULL) {
-				vm_page_unhold(m);
+				--m->wire_count;
 				vm_page_free(m);
 				return (NULL);
 			}
@@ -1107,7 +1092,7 @@
 			vm_page_t l2page;
 
 			l2page = PHYS_TO_VM_PAGE(pmap_pte_pa(l1pte));
-			l2page->hold_count++;
+			l2page->wire_count++;
 		}
 		l2map = (pt_entry_t*) ALPHA_PHYS_TO_K0SEG(pmap_pte_pa(l1pte));
 		pte = &l2map[ptepindex & ((1 << ALPHA_PTSHIFT) - 1)];
@@ -1156,7 +1141,7 @@
 			m = PHYS_TO_VM_PAGE(pmap_pte_pa(lev2pte));
 			pmap->pm_ptphint = m;
 		}
-		m->hold_count++;
+		m->wire_count++;
 	} else {
 		/*
 		 * Here if the pte page isn't mapped, or if it has been
@@ -1632,7 +1617,8 @@
 				oldpte |= (PG_FOR | PG_FOE);
 			}
 			if ((oldpte & PG_FOW) == 0) {
-				m = PHYS_TO_VM_PAGE(pmap_pte_pa(pte));
+				if (m == NULL)
+					m = PHYS_TO_VM_PAGE(pmap_pte_pa(pte));
 				if (pmap_track_modified(sva))
 					vm_page_dirty(m);
 				oldpte |= PG_FOW;
@@ -1723,7 +1709,7 @@
 		 * Remove extra pte reference
 		 */
 		if (mpte)
-			mpte->hold_count--;
+			mpte->wire_count--;
 
 		/*
 		 * We might be turning off write access to the page,
@@ -1838,7 +1824,7 @@
 		 */
 		ptepindex = va >> ALPHA_L2SHIFT;
 		if (mpte && (mpte->pindex == ptepindex)) {
-			mpte->hold_count++;
+			mpte->wire_count++;
 		} else {
 	retry:
 			/*
@@ -1858,7 +1844,7 @@
 					mpte = PHYS_TO_VM_PAGE(pmap_pte_pa(l2pte));
 					pmap->pm_ptphint = mpte;
 				}
-				mpte->hold_count++;
+				mpte->wire_count++;
 			} else {
 				mpte = _pmap_allocpte(pmap, ptepindex);
 				if (mpte == NULL)

==== //depot/projects/nsched/sys/alpha/alpha/promcons.c#5 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/promcons.c,v 1.40 2004/07/15 20:47:36 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/promcons.c,v 1.41 2004/09/17 11:02:53 phk Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -71,7 +71,6 @@
 };
 
 
-static struct tty *prom_tp = NULL;
 static int polltime;
 static struct callout_handle promtimeouthandle
 	= CALLOUT_HANDLE_INITIALIZER(&promtimeouthandle);
@@ -99,7 +98,7 @@
 		return ENXIO;
 
 
-	tp = prom_tp = dev->si_tty = ttymalloc(prom_tp);
+	tp = dev->si_tty = ttyalloc();
 
 	s = spltty();
 	tp->t_oproc = promstart;
@@ -142,7 +141,7 @@
 	struct thread *td;
 {
 	int unit = minor(dev);
-	struct tty *tp = prom_tp;
+	struct tty *tp = dev->si_tty;
 
 	if (unit != 0)
 		return ENXIO;

==== //depot/projects/nsched/sys/alpha/tlsb/zs_tlsb.c#5 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/tlsb/zs_tlsb.c,v 1.47 2004/07/15 20:47:36 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/tlsb/zs_tlsb.c,v 1.48 2004/09/17 11:04:57 phk Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -115,11 +115,23 @@
 zs_attach(device_t dev)
 {
 	struct zs_softc *sc = device_get_softc(dev);
+	struct cdev *cdev;
+	struct tty *tp;
+	int unit;
+
 	sc->dev = dev;
 	sc->channel = zsc_get_channel(dev);
 	sc->base = zsc_get_base(dev);
-	make_dev(&zs_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600,
-	    "zs%d", device_get_unit(dev));
+	unit = device_get_unit(dev);
+	cdev = make_dev(&zs_cdevsw, unit, UID_ROOT, GID_WHEEL, 0600,
+	    "zs%d", unit);
+	tp = sc->tp = cdev->si_tty = ttyalloc();
+	cdev->si_drv1 = sc;
+	cdev->si_tty = tp;
+	tp->t_oproc = zsstart;
+	tp->t_param = zsparam;
+	tp->t_stop = zsstop;
+	tp->t_dev = cdev;
 	return 0;
 }
 
@@ -224,7 +236,6 @@
 	sprintf(zs_consdev.cn_name, "zs0");
 	zs_consdev.cn_unit = 0;
 	zs_consdev.cn_pri = CN_NORMAL;
-	make_dev(&zs_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "zs0");
 	cnadd(&zs_consdev);
 	return (0);
 }
@@ -259,20 +270,17 @@
 static int
 zsopen(struct cdev *dev, int flag, int mode, struct thread *td)
 {
-	struct zs_softc *sc = ZS_SOFTC(minor(dev));
+	struct zs_softc *sc;
 	struct tty *tp;
 	int error = 0, setuptimeout = 0;
 	int s;
  
+	sc = dev->si_drv1;
 	if (!sc)
 		return ENXIO;
 
 	s = spltty();
-	tp = sc->tp = dev->si_tty = ttymalloc(sc->tp);
-	tp->t_oproc = zsstart;
-	tp->t_param = zsparam;
-	tp->t_stop = zsstop;
-	tp->t_dev = dev;
+	tp = dev->si_tty;
 	if ((tp->t_state & TS_ISOPEN) == 0) {
 		tp->t_state |= TS_CARR_ON;
 		ttychars(tp);

==== //depot/projects/nsched/sys/amd64/amd64/pmap.c#21 (text+ko) ====

@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.498 2004/09/12 20:20:40 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.501 2004/09/19 21:20:01 alc Exp $");
 
 /*
  *	Manages physical address maps.
@@ -965,8 +965,8 @@
 pmap_unwire_pte_hold(pmap_t pmap, vm_offset_t va, vm_page_t m)
 {
 
-	vm_page_unhold(m);
-	if (m->hold_count == 0)
+	--m->wire_count;
+	if (m->wire_count == 0)
 		return _pmap_unwire_pte_hold(pmap, va, m);
 	else
 		return 0;
@@ -1022,14 +1022,8 @@
 		pmap_invalidate_page(pmap, pteva);
 	}
 
-	/*
-	 * If the page is finally unwired, simply free it.
-	 */
-	--m->wire_count;
-	if (m->wire_count == 0) {
-		vm_page_free_zero(m);
-		atomic_subtract_int(&cnt.v_wire_count, 1);
-	}
+	vm_page_free_zero(m);
+	atomic_subtract_int(&cnt.v_wire_count, 1);
 	return 1;
 }
 
@@ -1134,15 +1128,6 @@
 	if ((m->flags & PG_ZERO) == 0)
 		pmap_zero_page(m);
 
-	KASSERT(m->queue == PQ_NONE,
-		("_pmap_allocpte: %p->queue != PQ_NONE", m));
-
-	/*
-	 * Increment the hold count for the page table page
-	 * (denoting a new mapping.)
-	 */
-	m->hold_count++;
-
 	/*
 	 * Map the pagetable page into the process address space, if
 	 * it isn't already there.
@@ -1173,14 +1158,14 @@
 		if ((*pml4 & PG_V) == 0) {
 			/* Have to allocate a new pdp, recurse */
 			if (_pmap_allocpte(pmap, NUPDE + NUPDPE + pml4index) == NULL) {
-				vm_page_unhold(m);
+				--m->wire_count;
 				vm_page_free(m);
 				return (NULL);
 			}
 		} else {
 			/* Add reference to pdp page */
 			pdppg = PHYS_TO_VM_PAGE(*pml4 & PG_FRAME);
-			pdppg->hold_count++;
+			pdppg->wire_count++;
 		}
 		pdp = (pdp_entry_t *)PHYS_TO_DMAP(*pml4 & PG_FRAME);
 
@@ -1204,7 +1189,7 @@
 		if ((*pml4 & PG_V) == 0) {
 			/* Have to allocate a new pd, recurse */
 			if (_pmap_allocpte(pmap, NUPDE + pdpindex) == NULL) {
-				vm_page_unhold(m);
+				--m->wire_count;
 				vm_page_free(m);
 				return (NULL);
 			}
@@ -1216,14 +1201,14 @@
 			if ((*pdp & PG_V) == 0) {
 				/* Have to allocate a new pd, recurse */
 				if (_pmap_allocpte(pmap, NUPDE + pdpindex) == NULL) {
-					vm_page_unhold(m);
+					--m->wire_count;
 					vm_page_free(m);
 					return (NULL);
 				}
 			} else {
 				/* Add reference to the pd page */
 				pdpg = PHYS_TO_VM_PAGE(*pdp & PG_FRAME);
-				pdpg->hold_count++;
+				pdpg->wire_count++;
 			}
 		}
 		pd = (pd_entry_t *)PHYS_TO_DMAP(*pdp & PG_FRAME);
@@ -1269,7 +1254,7 @@
 	 */
 	if (pd != 0 && (*pd & PG_V) != 0) {
 		m = PHYS_TO_VM_PAGE(*pd & PG_FRAME);
-		m->hold_count++;
+		m->wire_count++;
 	} else {
 		/*
 		 * Here if the pte page isn't mapped, or if it has been
@@ -1565,6 +1550,8 @@
 	if (pmap->pm_stats.resident_count == 0)
 		return;
 
+	anyvalid = 0;
+
 	vm_page_lock_queues();
 	PMAP_LOCK(pmap);
 
@@ -1581,8 +1568,6 @@
 		}
 	}
 
-	anyvalid = 0;
-
 	for (; sva < eva; sva = va_next) {
 
 		if (pmap->pm_stats.resident_count == 0)
@@ -1644,11 +1629,10 @@
 				break;
 		}
 	}
-
+out:
+	vm_page_unlock_queues();
 	if (anyvalid)
 		pmap_invalidate_all(pmap);
-out:
-	vm_page_unlock_queues();
 	PMAP_UNLOCK(pmap);
 }
 
@@ -1818,9 +1802,9 @@
 			}
 		}
 	}
+	vm_page_unlock_queues();
 	if (anychanged)
 		pmap_invalidate_all(pmap);
-	vm_page_unlock_queues();
 	PMAP_UNLOCK(pmap);
 }
 
@@ -1920,7 +1904,7 @@
 		 * Remove extra pte reference
 		 */
 		if (mpte)
-			mpte->hold_count--;
+			mpte->wire_count--;
 
 		/*
 		 * We might be turning off write access to the page,
@@ -2028,7 +2012,7 @@
 		 */
 		ptepindex = pmap_pde_pindex(va);
 		if (mpte && (mpte->pindex == ptepindex)) {
-			mpte->hold_count++;
+			mpte->wire_count++;
 		} else {
 	retry:
 			/*
@@ -2044,7 +2028,7 @@
 				if (*ptepa & PG_PS)
 					panic("pmap_enter_quick: unexpected mapping into 2MB page");
 				mpte = PHYS_TO_VM_PAGE(*ptepa & PG_FRAME);
-				mpte->hold_count++;
+				mpte->wire_count++;
 			} else {
 				mpte = _pmap_allocpte(pmap, ptepindex);
 				if (mpte == NULL)
@@ -2301,7 +2285,7 @@
 		}
 
 		srcmpte = PHYS_TO_VM_PAGE(srcptepaddr & PG_FRAME);
-		if (srcmpte->hold_count == 0)
+		if (srcmpte->wire_count == 0)
 			panic("pmap_copy: source page table page is unused");
 
 		if (va_next > end_addr)
@@ -2334,7 +2318,7 @@
 					pmap_insert_entry(dst_pmap, addr, m);
 	 			} else
 					pmap_unwire_pte_hold(dst_pmap, addr, dstmpte);
-				if (dstmpte->hold_count >= srcmpte->hold_count)
+				if (dstmpte->wire_count >= srcmpte->wire_count)
 					break;
 			}
 			addr += PAGE_SIZE;

==== //depot/projects/nsched/sys/boot/i386/boot2/boot2.c#3 (text+ko) ====

@@ -14,7 +14,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/boot/i386/boot2/boot2.c,v 1.70 2004/07/30 00:33:09 kan Exp $");
+__FBSDID("$FreeBSD: src/sys/boot/i386/boot2/boot2.c,v 1.71 2004/09/18 02:07:00 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/disklabel.h>
@@ -321,7 +321,7 @@
 	return;
     }
     if (fmt == 0) {
-	addr = hdr.ex.a_entry & 0xffffff;
+	addr = hdr.ex.a_entry;
 	p = PTOV(addr);
 	fs_off = PAGE_SIZE;
 	if (xfsread(ino, p, hdr.ex.a_text))
@@ -355,7 +355,7 @@
 		j++;
 	}
 	for (i = 0; i < 2; i++) {
-	    p = PTOV(ep[i].p_paddr & 0xffffff);
+	    p = PTOV(ep[i].p_paddr);
 	    fs_off = ep[i].p_offset;
 	    if (xfsread(ino, p, ep[i].p_filesz))
 		return;
@@ -376,7 +376,7 @@
 		p += es[i].sh_size;
 	    }
 	}
-	addr = hdr.eh.e_entry & 0xffffff;
+	addr = hdr.eh.e_entry;
     }
     bootinfo.bi_esymtab = VTOP(p);
     bootinfo.bi_kernelname = VTOP(kname);

==== //depot/projects/nsched/sys/boot/ia64/skiload/start.S#2 (text+ko) ====

@@ -23,11 +23,9 @@
  * (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/boot/ia64/skiload/start.S,v 1.1 2003/07/17 01:49:59 marcel Exp $
+ * $FreeBSD: src/sys/boot/ia64/skiload/start.S,v 1.2 2004/09/18 21:18:44 marcel Exp $
  */
 
-#include <machine/fpu.h>
-
 #define	STACKSIZE	16384
 #define	FPSR_DEFAULT	0x0009804c0270033f
 

==== //depot/projects/nsched/sys/boot/pc98/boot2/Makefile#2 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/pc98/boot2/Makefile,v 1.18 2004/02/09 16:01:45 nyan Exp $
+# $FreeBSD: src/sys/boot/pc98/boot2/Makefile,v 1.19 2004/09/18 00:12:04 nyan Exp $
 #
 
 PROG=	boot
@@ -9,6 +9,7 @@
 BINMODE=	444
 CFLAGS=		-Os -mrtd \
 		-fno-guess-branch-probability \
+		-fno-unit-at-a-time \
 		-D_KERNEL -DPC98 -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT}
 CFLAGS+=	-DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK}
 CFLAGS+=	${CWARNFLAGS}

==== //depot/projects/nsched/sys/compat/ndis/subr_ndis.c#8 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.67 2004/08/16 19:25:27 wpaul Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.68 2004/09/17 19:54:26 bms Exp $");
 
 /*
  * This file implements a translation layer between the BSD networking
@@ -2875,7 +2875,7 @@
 	__stdcall ndis_proc	workfunc;
 
 	work = ctx;
-	workfunc = work->nwi_func;
+	workfunc = (__stdcall ndis_proc) work->nwi_func;
 	workfunc(work, work->nwi_ctx);
 	return;
 }

==== //depot/projects/nsched/sys/compat/ndis/subr_ntoskrnl.c#6 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.43 2004/08/16 18:52:37 wpaul Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.44 2004/09/17 19:54:26 bms Exp $");
 
 #include <sys/ctype.h>
 #include <sys/unistd.h>
@@ -1694,7 +1694,7 @@
 	uint8_t			irql;
 
 	dpc = arg;
-	dpcfunc = (kdpc_func)dpc->k_deferedfunc;
+	dpcfunc = (__stdcall kdpc_func) dpc->k_deferedfunc;
 	irql = ntoskrnl_raise_irql(DISPATCH_LEVEL);
 	dpcfunc(dpc, dpc->k_deferredctx, dpc->k_sysarg1, dpc->k_sysarg2);
 	ntoskrnl_lower_irql(irql);

==== //depot/projects/nsched/sys/conf/NOTES#20 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1277 2004/09/12 12:13:29 ceri Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1278 2004/09/16 20:35:27 glebius Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -483,6 +483,7 @@
 # MPPC compression requires proprietary files (not included)
 #options 	NETGRAPH_MPPC_COMPRESSION
 options 	NETGRAPH_MPPC_ENCRYPTION
+options		NETGRAPH_NETFLOW
 options 	NETGRAPH_ONE2MANY
 options 	NETGRAPH_PPP
 options 	NETGRAPH_PPPOE

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

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.952 2004/09/10 20:57:45 wpaul Exp $
+# $FreeBSD: src/sys/conf/files,v 1.953 2004/09/16 20:35:27 glebius Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -1453,6 +1453,8 @@
 netgraph/ng_l2tp.c	optional netgraph_l2tp
 netgraph/ng_mppc.c	optional netgraph_mppc_compression
 netgraph/ng_mppc.c	optional netgraph_mppc_encryption
+netgraph/netflow/ng_netflow.c	optional netgraph_netflow
+netgraph/netflow/netflow.c	optional netgraph_netflow
 crypto/rc4/rc4.c	optional wlan
 crypto/rc4/rc4.c	optional netgraph_mppc_encryption
 crypto/sha1.c		optional netgraph_mppc_encryption

==== //depot/projects/nsched/sys/conf/kern.post.mk#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/kern.post.mk,v 1.68 2004/06/27 23:03:43 imp Exp $
+# $FreeBSD: src/sys/conf/kern.post.mk,v 1.69 2004/09/17 09:17:33 ru Exp $
 
 # Part of a unified Makefile for building kernels.  This part includes all
 # the definitions that need to be after all the % directives except %RULES
@@ -221,7 +221,7 @@
 	${AWK} -f $S/conf/majors.awk $S/conf/majors > ${.TARGET}
 
 vers.c: $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP}
-	sh $S/conf/newvers.sh ${KERN_IDENT}
+	MAKE=${MAKE} sh $S/conf/newvers.sh ${KERN_IDENT}
 
 vnode_if.c: $S/tools/vnode_if.awk $S/kern/vnode_if.src
 	${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -c

==== //depot/projects/nsched/sys/conf/newvers.sh#5 (text+ko) ====

@@ -28,7 +28,7 @@
 # SUCH DAMAGE.
 #
 #	@(#)newvers.sh	8.1 (Berkeley) 4/20/94
-# $FreeBSD: src/sys/conf/newvers.sh,v 1.63 2004/08/18 00:21:12 scottl Exp $
+# $FreeBSD: src/sys/conf/newvers.sh,v 1.64 2004/09/17 09:17:33 ru Exp $
 
 TYPE="FreeBSD"
 REVISION="6.0"
@@ -82,7 +82,7 @@
 
 touch version
 v=`cat version` u=${USER-root} d=`pwd` h=${HOSTNAME-`hostname`} t=`date`
-i=`make -V KERN_IDENT`
+i=`${MAKE:-make} -V KERN_IDENT`
 cat << EOF > vers.c
 $COPYRIGHT
 char sccspad[32 - 4 /* sizeof(sccs) */] = { '\\0' };

==== //depot/projects/nsched/sys/conf/options#17 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.483 2004/09/02 20:44:56 alfred Exp $
+# $FreeBSD: src/sys/conf/options,v 1.484 2004/09/16 20:35:27 glebius Exp $
 #
 #        On the handling of kernel options
 #
@@ -409,6 +409,7 @@
 # MPPC compression requires proprietary files (not included)
 NETGRAPH_MPPC_COMPRESSION	opt_netgraph.h
 NETGRAPH_MPPC_ENCRYPTION	opt_netgraph.h
+NETGRAPH_NETFLOW	opt_netgraph.h
 NETGRAPH_ONE2MANY	opt_netgraph.h
 NETGRAPH_PPP		opt_netgraph.h
 NETGRAPH_PPPOE		opt_netgraph.h

==== //depot/projects/nsched/sys/contrib/pf/net/pf_ioctl.c#9 (text+ko) ====

@@ -1,5 +1,6 @@
-/*	$FreeBSD: src/sys/contrib/pf/net/pf_ioctl.c,v 1.14 2004/09/14 03:12:01 mlaier Exp $	*/
+/*	$FreeBSD: src/sys/contrib/pf/net/pf_ioctl.c,v 1.15 2004/09/17 02:15:05 mlaier Exp $	*/
 /*	$OpenBSD: pf_ioctl.c,v 1.112.2.2 2004/07/24 18:28:12 brad Exp $ */
+/* add	$OpenBSD: pf_ioctl.c,v 1.118 2004/05/03 07:51:59 kjc Exp $ */
 
 /*
  * Copyright (c) 2001 Daniel Hartmeier
@@ -132,6 +133,8 @@
 int			 pf_begin_altq(u_int32_t *);
 int			 pf_rollback_altq(u_int32_t);
 int			 pf_commit_altq(u_int32_t);
+int			 pf_enable_altq(struct pf_altq *);
+int			 pf_disable_altq(struct pf_altq *);
 #endif /* ALTQ */
 int			 pf_begin_rules(u_int32_t *, int, char *, char *);
 int			 pf_rollback_rules(u_int32_t, int, char *, char *);
@@ -144,6 +147,9 @@
 #endif
 
 struct pf_rule		 pf_default_rule;
+#ifdef ALTQ
+static int		 pf_altq_running;
+#endif
 
 #define	TAGID_MAX	 50000
 TAILQ_HEAD(pf_tags, pf_tagname)	pf_tags = TAILQ_HEAD_INITIALIZER(pf_tags),
@@ -866,7 +872,9 @@
 		if (altq->qname[0] == 0) {
 			/* attach the discipline */
 			error = altq_pfattach(altq);
-			if (error) {
+			if (error == 0 && pf_altq_running)
+				error = pf_enable_altq(altq);
+			if (error != 0) {
 				splx(s);
 				return (error);
 			}
@@ -878,6 +886,8 @@
 		TAILQ_REMOVE(pf_altqs_inactive, altq, entries);
 		if (altq->qname[0] == 0) {
 			/* detach and destroy the discipline */
+			if (pf_altq_running)
+				error = pf_disable_altq(altq);
 			err = altq_pfdetach(altq);
 			if (err != 0 && error == 0)
 				error = err;
@@ -893,6 +903,73 @@
 	altqs_inactive_open = 0;
 	return (error);
 }
+
+int
+pf_enable_altq(struct pf_altq *altq)
+{
+	struct ifnet		*ifp;
+	struct tb_profile	 tb;
+	int			 s, error = 0;
+
+	if ((ifp = ifunit(altq->ifname)) == NULL)
+		return (EINVAL);
+
+	if (ifp->if_snd.altq_type != ALTQT_NONE)
+		error = altq_enable(&ifp->if_snd);
+
+	/* set tokenbucket regulator */
+	if (error == 0 && ifp != NULL && ALTQ_IS_ENABLED(&ifp->if_snd)) {
+		tb.rate = altq->ifbandwidth;
+		tb.depth = altq->tbrsize;
+		s = splimp();
+#ifdef __FreeBSD__
+		PF_UNLOCK();
+#endif
+		error = tbr_set(&ifp->if_snd, &tb);
+#ifdef __FreeBSD__
+		PF_LOCK();
+#endif		
+		splx(s);
+	}
+
+	return (error);
+}
+
+int
+pf_disable_altq(struct pf_altq *altq)
+{
+	struct ifnet		*ifp;
+	struct tb_profile	 tb;
+	int			 s, error;
+
+	if ((ifp = ifunit(altq->ifname)) == NULL)
+		return (EINVAL);
+
+	/*
+	 * when the discipline is no longer referenced, it was overridden
+	 * by a new one.  if so, just return.
+	 */
+	if (altq->altq_disc != ifp->if_snd.altq_disc)
+		return (0);
+
+	error = altq_disable(&ifp->if_snd);
+
+	if (error == 0) {
+		/* clear tokenbucket regulator */
+		tb.rate = 0;
+		s = splimp();
+#ifdef __FreeBSD__
+		PF_UNLOCK();
+#endif
+		error = tbr_set(&ifp->if_snd, &tb);
+#ifdef __FreeBSD__
+		PF_LOCK();
+#endif
+		splx(s);
+	}
+
+	return (error);
+}
 #endif /* ALTQ */
 
 int
@@ -1957,35 +2034,18 @@
 #ifdef ALTQ
 	case DIOCSTARTALTQ: {
 		struct pf_altq		*altq;
-		struct ifnet		*ifp;
-		struct tb_profile	 tb;
 
 		/* enable all altq interfaces on active list */
 		s = splsoftnet();
 		TAILQ_FOREACH(altq, pf_altqs_active, entries) {
 			if (altq->qname[0] == 0) {
-				if ((ifp = ifunit(altq->ifname)) == NULL) {
-					error = EINVAL;
-					break;
-				}
-				if (ifp->if_snd.altq_type != ALTQT_NONE)
-					error = altq_enable(&ifp->if_snd);
+				error = pf_enable_altq(altq);
 				if (error != 0)
 					break;
-				/* set tokenbucket regulator */
-				tb.rate = altq->ifbandwidth;
-				tb.depth = altq->tbrsize;
-				PF_UNLOCK();
-				error = tbr_set(&ifp->if_snd, &tb);
-				PF_LOCK();
-				if (error != 0)
-					break;
 			}
 		}
-#ifndef __FreeBSD__
 		if (error == 0)
-			pfaltq_running = 1;
-#endif
+			pf_altq_running = 1;
 		splx(s);
 		DPFPRINTF(PF_DEBUG_MISC, ("altq: started\n"));
 		break;
@@ -1993,36 +2053,18 @@
 
 	case DIOCSTOPALTQ: {
 		struct pf_altq		*altq;
-		struct ifnet		*ifp;
-		struct tb_profile	 tb;
-		int			 err;
 
 		/* disable all altq interfaces on active list */
 		s = splsoftnet();
 		TAILQ_FOREACH(altq, pf_altqs_active, entries) {
 			if (altq->qname[0] == 0) {
-				if ((ifp = ifunit(altq->ifname)) == NULL) {
-					error = EINVAL;
+				error = pf_disable_altq(altq);
+				if (error != 0)
 					break;
-				}
-				if (ifp->if_snd.altq_type != ALTQT_NONE) {
-					err = altq_disable(&ifp->if_snd);
-					if (err != 0 && error == 0)
-						error = err;
-				}
-				/* clear tokenbucket regulator */
-				tb.rate = 0;
-				PF_UNLOCK();
-				err = tbr_set(&ifp->if_snd, &tb);
-				PF_LOCK();
-				if (err != 0 && error == 0)
-					error = err;
 			}
 		}
-#ifndef __FreeBSD__
 		if (error == 0)
-			pfaltq_running = 0;
-#endif
+			pf_altq_running = 0;
 		splx(s);
 		DPFPRINTF(PF_DEBUG_MISC, ("altq: stopped\n"));
 		break;

==== //depot/projects/nsched/sys/dev/acpica/acpi_pci_link.c#8 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.29 2004/09/01 17:59:29 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.31 2004/09/20 05:56:01 njl Exp $");
 
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -236,16 +236,14 @@
 		Interrupts = resources->Data.Irq.Interrupts;
 		break;
 	case ACPI_RSTYPE_EXT_IRQ:
-                NumberOfInterrupts =
+		NumberOfInterrupts =
 		    resources->Data.ExtendedIrq.NumberOfInterrupts;
-                Interrupts = resources->Data.ExtendedIrq.Interrupts;
+		Interrupts = resources->Data.ExtendedIrq.Interrupts;
 		break;
 	}
-	
-	if (NumberOfInterrupts == 0) {
-		printf("acpi link get: empty IRQ resource\n");
+
+	if (NumberOfInterrupts == 0)
 		return_ACPI_STATUS (AE_NULL_ENTRY);
-	}
 
 	count = 0;
 	for (i = 0; i < NumberOfInterrupts; i++) {
@@ -382,7 +380,7 @@
 	}
 	if (buf.Pointer == NULL) {
 		ACPI_DEBUG_PRINT((ACPI_DB_WARN,
-		    "_PRS nuffer is empty - %s\n", acpi_name(handle)));
+		    "_PRS buffer is empty - %s\n", acpi_name(handle)));
 		error = AE_NO_MEMORY;
 		goto out;
 	}
@@ -418,6 +416,13 @@
 	 * zero and flags to indicate this link is not routed.  If we can't
 	 * run _DIS (i.e., the method doesn't exist), assume the initial
 	 * IRQ was routed by the BIOS.
+	 *
+	 * XXX Since we detect link devices via _PRT entries but run long
+	 * after APIC mode has been enabled, we don't get a chance to
+	 * disable links that will be unused (especially in APIC mode).
+	 * Leaving them enabled can cause duplicate interrupts for some
+	 * devices.  The right fix is to probe links via their PNPID, so we
+	 * see them no matter what the _PRT says.
 	 */
 	if (ACPI_SUCCESS(AcpiEvaluateObject(handle, "_DIS", NULL, NULL))) {
 		link->current_irq = 0;

==== //depot/projects/nsched/sys/dev/adlink/adlink.c#4 (text+ko) ====

@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2003 Poul-Henning Kamp
+ * Copyright (c) 2003-2004 Poul-Henning Kamp
  * All rights reserved.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409200727.i8K7RqxO012208>