PERFORCE change 61942 for review

John Baldwin jhb at FreeBSD.org
Wed Sep 22 08:32:07 PDT 2004


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

Change 61942 by jhb at jhb_slimer on 2004/09/22 15:31:15

	IFC @61941 - loop back some merges.

Affected files ...

.. //depot/projects/smpng/sys/alpha/alpha/db_trace.c#13 integrate
.. //depot/projects/smpng/sys/alpha/alpha/pmap.c#64 integrate
.. //depot/projects/smpng/sys/alpha/alpha/promcons.c#20 integrate
.. //depot/projects/smpng/sys/alpha/isa/isa_dma.c#7 integrate
.. //depot/projects/smpng/sys/alpha/tlsb/zs_tlsb.c#17 integrate
.. //depot/projects/smpng/sys/amd64/amd64/db_trace.c#8 integrate
.. //depot/projects/smpng/sys/amd64/amd64/pmap.c#34 integrate
.. //depot/projects/smpng/sys/amd64/conf/GENERIC#24 integrate
.. //depot/projects/smpng/sys/amd64/conf/NOTES#10 integrate
.. //depot/projects/smpng/sys/amd64/include/db_machdep.h#4 integrate
.. //depot/projects/smpng/sys/amd64/isa/isa_dma.c#7 integrate
.. //depot/projects/smpng/sys/amd64/isa/isa_dma.h#3 delete
.. //depot/projects/smpng/sys/arm/arm/db_trace.c#5 integrate
.. //depot/projects/smpng/sys/boot/i386/boot2/boot2.c#24 integrate
.. //depot/projects/smpng/sys/boot/i386/libi386/biosdisk.c#11 integrate
.. //depot/projects/smpng/sys/boot/ia64/skiload/start.S#2 integrate
.. //depot/projects/smpng/sys/boot/pc98/boot2/Makefile#12 integrate
.. //depot/projects/smpng/sys/compat/ndis/subr_ndis.c#20 integrate
.. //depot/projects/smpng/sys/compat/ndis/subr_ntoskrnl.c#20 integrate
.. //depot/projects/smpng/sys/compat/svr4/svr4_misc.c#32 integrate
.. //depot/projects/smpng/sys/conf/NOTES#81 integrate
.. //depot/projects/smpng/sys/conf/files#121 integrate
.. //depot/projects/smpng/sys/conf/kern.post.mk#38 integrate
.. //depot/projects/smpng/sys/conf/newvers.sh#14 integrate
.. //depot/projects/smpng/sys/conf/options#86 integrate
.. //depot/projects/smpng/sys/contrib/pf/net/if_pflog.c#6 integrate
.. //depot/projects/smpng/sys/contrib/pf/net/if_pfsync.c#8 integrate
.. //depot/projects/smpng/sys/contrib/pf/net/pf_if.c#4 integrate
.. //depot/projects/smpng/sys/contrib/pf/net/pf_ioctl.c#9 integrate
.. //depot/projects/smpng/sys/dev/aac/aac.c#44 integrate
.. //depot/projects/smpng/sys/dev/aac/aacreg.h#14 integrate
.. //depot/projects/smpng/sys/dev/acpica/acpi.c#73 integrate
.. //depot/projects/smpng/sys/dev/acpica/acpi_pci_link.c#20 integrate
.. //depot/projects/smpng/sys/dev/acpica/acpi_thermal.c#30 integrate
.. //depot/projects/smpng/sys/dev/adlink/adlink.c#10 integrate
.. //depot/projects/smpng/sys/dev/aha/aha_mca.c#8 integrate
.. //depot/projects/smpng/sys/dev/amr/amr.c#23 integrate
.. //depot/projects/smpng/sys/dev/ata/ata-all.c#60 integrate
.. //depot/projects/smpng/sys/dev/bge/if_bge.c#45 integrate
.. //depot/projects/smpng/sys/dev/buslogic/bt_mca.c#7 integrate
.. //depot/projects/smpng/sys/dev/fdc/fdc.c#8 integrate
.. //depot/projects/smpng/sys/dev/fdc/fdc_acpi.c#5 integrate
.. //depot/projects/smpng/sys/dev/fdc/fdc_isa.c#6 integrate
.. //depot/projects/smpng/sys/dev/fdc/fdc_pccard.c#4 integrate
.. //depot/projects/smpng/sys/dev/fdc/fdcvar.h#4 integrate
.. //depot/projects/smpng/sys/dev/fxp/if_fxp.c#55 integrate
.. //depot/projects/smpng/sys/dev/md/md.c#56 integrate
.. //depot/projects/smpng/sys/dev/mk48txx/mk48txx.c#3 integrate
.. //depot/projects/smpng/sys/dev/mk48txx/mk48txxreg.h#2 integrate
.. //depot/projects/smpng/sys/dev/nge/if_nge.c#35 integrate
.. //depot/projects/smpng/sys/dev/nge/if_ngereg.h#7 integrate
.. //depot/projects/smpng/sys/dev/pst/pst-iop.h#4 integrate
.. //depot/projects/smpng/sys/dev/pst/pst-pci.c#6 integrate
.. //depot/projects/smpng/sys/dev/pst/pst-raid.c#10 integrate
.. //depot/projects/smpng/sys/dev/re/if_re.c#15 integrate
.. //depot/projects/smpng/sys/dev/rp/rp.c#17 integrate
.. //depot/projects/smpng/sys/dev/sab/sab.c#22 integrate
.. //depot/projects/smpng/sys/dev/si/si.c#17 integrate
.. //depot/projects/smpng/sys/dev/sio/sio.c#49 integrate
.. //depot/projects/smpng/sys/dev/sound/pci/fm801.c#14 integrate
.. //depot/projects/smpng/sys/dev/sound/pci/ich.c#29 integrate
.. //depot/projects/smpng/sys/dev/uart/uart_tty.c#9 integrate
.. //depot/projects/smpng/sys/dev/usb/if_axe.c#15 integrate
.. //depot/projects/smpng/sys/dev/usb/ubser.c#6 integrate
.. //depot/projects/smpng/sys/dev/usb/ucom.c#20 integrate
.. //depot/projects/smpng/sys/dev/usb/ucomvar.h#5 integrate
.. //depot/projects/smpng/sys/dev/usb/umodem.c#20 integrate
.. //depot/projects/smpng/sys/dev/usb/uplcom.c#14 integrate
.. //depot/projects/smpng/sys/dev/usb/usb_port.h#20 integrate
.. //depot/projects/smpng/sys/dev/usb/usbdevs#62 integrate
.. //depot/projects/smpng/sys/dev/usb/uvscom.c#15 integrate
.. //depot/projects/smpng/sys/dev/vinum/vinumext.h#12 integrate
.. //depot/projects/smpng/sys/dev/vinum/vinummemory.c#9 integrate
.. //depot/projects/smpng/sys/dev/zs/zs.c#18 integrate
.. //depot/projects/smpng/sys/fs/nwfs/nwfs_io.c#14 integrate
.. //depot/projects/smpng/sys/fs/smbfs/smbfs_io.c#18 integrate
.. //depot/projects/smpng/sys/fs/specfs/spec_vnops.c#37 integrate
.. //depot/projects/smpng/sys/geom/concat/g_concat.c#10 integrate
.. //depot/projects/smpng/sys/geom/label/g_label.c#6 integrate
.. //depot/projects/smpng/sys/geom/mirror/g_mirror.c#6 integrate
.. //depot/projects/smpng/sys/geom/nop/g_nop.c#5 integrate
.. //depot/projects/smpng/sys/geom/raid3/g_raid3.c#4 integrate
.. //depot/projects/smpng/sys/geom/stripe/g_stripe.c#8 integrate
.. //depot/projects/smpng/sys/geom/uzip/g_uzip.c#3 integrate
.. //depot/projects/smpng/sys/geom/vinum/geom_vinum.h#5 integrate
.. //depot/projects/smpng/sys/geom/vinum/geom_vinum_drive.c#7 integrate
.. //depot/projects/smpng/sys/geom/vinum/geom_vinum_init.c#4 integrate
.. //depot/projects/smpng/sys/geom/vinum/geom_vinum_plex.c#6 integrate
.. //depot/projects/smpng/sys/geom/vinum/geom_vinum_raid5.c#4 integrate
.. //depot/projects/smpng/sys/geom/vinum/geom_vinum_raid5.h#3 integrate
.. //depot/projects/smpng/sys/geom/vinum/geom_vinum_rm.c#4 integrate
.. //depot/projects/smpng/sys/geom/vinum/geom_vinum_state.c#4 integrate
.. //depot/projects/smpng/sys/geom/vinum/geom_vinum_subr.c#7 integrate
.. //depot/projects/smpng/sys/geom/vinum/geom_vinum_var.h#2 integrate
.. //depot/projects/smpng/sys/geom/vinum/geom_vinum_volume.c#4 integrate
.. //depot/projects/smpng/sys/i386/conf/GENERIC#57 integrate
.. //depot/projects/smpng/sys/i386/i386/db_trace.c#20 integrate
.. //depot/projects/smpng/sys/i386/i386/gdb_machdep.c#2 integrate
.. //depot/projects/smpng/sys/i386/i386/pmap.c#72 integrate
.. //depot/projects/smpng/sys/i386/include/db_machdep.h#4 integrate
.. //depot/projects/smpng/sys/i386/isa/isa_dma.c#9 integrate
.. //depot/projects/smpng/sys/i386/isa/isa_dma.h#4 delete
.. //depot/projects/smpng/sys/ia64/acpica/OsdEnvironment.c#8 integrate
.. //depot/projects/smpng/sys/ia64/ia64/db_trace.c#17 integrate
.. //depot/projects/smpng/sys/ia64/ia64/dump_machdep.c#6 integrate
.. //depot/projects/smpng/sys/ia64/ia64/efi.c#4 integrate
.. //depot/projects/smpng/sys/ia64/ia64/eficlock.c#3 integrate
.. //depot/projects/smpng/sys/ia64/ia64/locore.S#5 integrate
.. //depot/projects/smpng/sys/ia64/ia64/machdep.c#85 integrate
.. //depot/projects/smpng/sys/ia64/ia64/pmap.c#62 integrate
.. //depot/projects/smpng/sys/ia64/ia64/sal.c#11 integrate
.. //depot/projects/smpng/sys/ia64/ia64/trap.c#68 integrate
.. //depot/projects/smpng/sys/ia64/include/efi.h#4 integrate
.. //depot/projects/smpng/sys/ia64/include/fpu.h#2 integrate
.. //depot/projects/smpng/sys/ia64/include/sal.h#6 integrate
.. //depot/projects/smpng/sys/ia64/isa/isa_dma.c#6 integrate
.. //depot/projects/smpng/sys/isa/isavar.h#6 integrate
.. //depot/projects/smpng/sys/isofs/cd9660/cd9660_vfsops.c#30 integrate
.. //depot/projects/smpng/sys/isofs/cd9660/cd9660_vnops.c#17 integrate
.. //depot/projects/smpng/sys/kern/kern_event.c#33 integrate
.. //depot/projects/smpng/sys/kern/kern_exec.c#76 integrate
.. //depot/projects/smpng/sys/kern/kern_exit.c#84 integrate
.. //depot/projects/smpng/sys/kern/kern_fork.c#84 integrate
.. //depot/projects/smpng/sys/kern/kern_kse.c#10 integrate
.. //depot/projects/smpng/sys/kern/kern_ktr.c#27 integrate
.. //depot/projects/smpng/sys/kern/kern_mbuf.c#3 integrate
.. //depot/projects/smpng/sys/kern/kern_proc.c#66 integrate
.. //depot/projects/smpng/sys/kern/kern_resource.c#50 integrate
.. //depot/projects/smpng/sys/kern/kern_switch.c#46 integrate
.. //depot/projects/smpng/sys/kern/kern_synch.c#81 integrate
.. //depot/projects/smpng/sys/kern/kern_thread.c#67 integrate
.. //depot/projects/smpng/sys/kern/sched_4bsd.c#39 integrate
.. //depot/projects/smpng/sys/kern/sched_ule.c#43 integrate
.. //depot/projects/smpng/sys/kern/subr_kdb.c#5 integrate
.. //depot/projects/smpng/sys/kern/subr_trap.c#70 integrate
.. //depot/projects/smpng/sys/kern/tty.c#47 integrate
.. //depot/projects/smpng/sys/kern/tty_pty.c#33 integrate
.. //depot/projects/smpng/sys/kern/vfs_bio.c#67 integrate
.. //depot/projects/smpng/sys/kern/vfs_init.c#17 integrate
.. //depot/projects/smpng/sys/kern/vfs_subr.c#82 integrate
.. //depot/projects/smpng/sys/kern/vfs_vnops.c#50 integrate
.. //depot/projects/smpng/sys/modules/netgraph/Makefile#15 integrate
.. //depot/projects/smpng/sys/modules/netgraph/netflow/Makefile#1 branch
.. //depot/projects/smpng/sys/net/if.c#55 integrate
.. //depot/projects/smpng/sys/net/if_clone.c#3 integrate
.. //depot/projects/smpng/sys/net/if_tap.c#29 integrate
.. //depot/projects/smpng/sys/netgraph/netflow/netflow.c#1 branch
.. //depot/projects/smpng/sys/netgraph/netflow/netflow.h#1 branch
.. //depot/projects/smpng/sys/netgraph/netflow/ng_netflow.c#1 branch
.. //depot/projects/smpng/sys/netgraph/netflow/ng_netflow.h#1 branch
.. //depot/projects/smpng/sys/netgraph/ng_tty.c#13 integrate
.. //depot/projects/smpng/sys/netinet/ip_fw2.c#40 integrate
.. //depot/projects/smpng/sys/netinet/ip_fw_pfil.c#4 integrate
.. //depot/projects/smpng/sys/netinet/ip_icmp.c#32 integrate
.. //depot/projects/smpng/sys/netinet/ip_input.c#58 integrate
.. //depot/projects/smpng/sys/netinet/ip_var.h#25 integrate
.. //depot/projects/smpng/sys/netinet/tcp_syncache.c#34 integrate
.. //depot/projects/smpng/sys/nfs4client/nfs4_vnops.c#7 integrate
.. //depot/projects/smpng/sys/nfsclient/nfs_bio.c#31 integrate
.. //depot/projects/smpng/sys/nfsclient/nfs_vnops.c#41 integrate
.. //depot/projects/smpng/sys/pc98/pc98/isa_dma.c#7 integrate
.. //depot/projects/smpng/sys/pc98/pc98/ppc.c#9 integrate
.. //depot/projects/smpng/sys/pc98/pc98/sio.c#47 integrate
.. //depot/projects/smpng/sys/pci/if_rlreg.h#20 integrate
.. //depot/projects/smpng/sys/powerpc/powerpc/db_trace.c#7 integrate
.. //depot/projects/smpng/sys/powerpc/powerpc/pmap.c#47 integrate
.. //depot/projects/smpng/sys/sparc64/sparc64/db_trace.c#20 integrate
.. //depot/projects/smpng/sys/sys/buf.h#29 integrate
.. //depot/projects/smpng/sys/sys/conf.h#31 integrate
.. //depot/projects/smpng/sys/sys/mbuf.h#43 integrate
.. //depot/projects/smpng/sys/sys/mdioctl.h#10 integrate
.. //depot/projects/smpng/sys/sys/proc.h#127 integrate
.. //depot/projects/smpng/sys/sys/sched.h#17 integrate
.. //depot/projects/smpng/sys/sys/tty.h#16 integrate
.. //depot/projects/smpng/sys/sys/ttydefaults.h#3 integrate
.. //depot/projects/smpng/sys/ufs/ffs/ffs_snapshot.c#40 integrate
.. //depot/projects/smpng/sys/ufs/ffs/ffs_vnops.c#32 integrate
.. //depot/projects/smpng/sys/vm/vm_glue.c#49 integrate
.. //depot/projects/smpng/sys/vm/vm_page.c#56 integrate

Differences ...

==== //depot/projects/smpng/sys/alpha/alpha/db_trace.c#13 (text+ko) ====

@@ -42,7 +42,7 @@
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 /*__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.9 2000/12/13 03:16:36 mycroft Exp $");*/
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/db_trace.c,v 1.20 2004/07/21 05:07:08 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/db_trace.c,v 1.21 2004/09/20 19:05:31 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>

==== //depot/projects/smpng/sys/alpha/alpha/pmap.c#64 (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/smpng/sys/alpha/alpha/promcons.c#20 (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/smpng/sys/alpha/isa/isa_dma.c#7 (text+ko) ====

@@ -44,7 +44,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/isa/isa_dma.c,v 1.11 2004/04/05 21:00:51 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/isa/isa_dma.c,v 1.12 2004/09/15 12:09:49 phk Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -93,10 +93,8 @@
 /*
  * Setup a DMA channel's bounce buffer.
  */
-void
-isa_dmainit(chan, bouncebufsize)
-	int chan;
-	u_int bouncebufsize;
+int
+isa_dma_init(int chan, u_int bouncebufsize, int flag __unused)
 {
 	static int initted = 0;
 	bus_addr_t boundary = chan >= 4 ? 0x20000 : 0x10000;
@@ -114,10 +112,10 @@
 
 #ifdef DIAGNOSTIC
 	if (chan & ~VALID_DMA_MASK)
-		panic("isa_dmainit: channel out of range");
+		panic("isa_dma_init: channel out of range");
 
 	if (dma_tag[chan] || dma_map[chan])
-		panic("isa_dmainit: impossible request"); 
+		panic("isa_dma_init: impossible request"); 
 #endif
 
 	if (bus_dma_tag_create(/*parent*/NULL,
@@ -132,13 +130,13 @@
 			       /*lockfunc*/busdma_lock_mutex,
 			       /*lockarg*/&Giant,
 			       &dma_tag[chan]) != 0) {
-		panic("isa_dmainit: unable to create dma tag\n");
+		panic("isa_dma_init: unable to create dma tag\n");
 	}
 	
 	if (bus_dmamap_create(dma_tag[chan], 0, &dma_map[chan])) {
-		panic("isa_dmainit: unable to create dma map\n");
+		panic("isa_dma_init: unable to create dma map\n");
 	}
-
+	return (0);
 }
 
 /*
@@ -349,7 +347,7 @@
 #endif
 
 	if (!dma_tag || !dma_map[chan])
-		panic("isa_dmastart: called without isa_dmainit");
+		panic("isa_dmastart: called without isa_dma_init");
 
 	dma_busy |= (1 << chan);
 

==== //depot/projects/smpng/sys/alpha/tlsb/zs_tlsb.c#17 (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/smpng/sys/amd64/amd64/db_trace.c#8 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.62 2004/07/21 05:07:08 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.63 2004/09/20 19:05:31 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>

==== //depot/projects/smpng/sys/amd64/amd64/pmap.c#34 (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.502 2004/09/22 05:01:48 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;
@@ -1014,22 +1014,15 @@
 		pdppg = PHYS_TO_VM_PAGE(*pmap_pml4e(pmap, va) & PG_FRAME);
 		pmap_unwire_pte_hold(pmap, va, pdppg);
 	}
-	if (pmap_is_current(pmap)) {
-		/*
-		 * Do an invltlb to make the invalidated mapping
-		 * take effect immediately.
-		 */
-		pmap_invalidate_page(pmap, pteva);
-	}
 
 	/*
-	 * If the page is finally unwired, simply free it.
+	 * Do an invltlb to make the invalidated mapping
+	 * take effect immediately.
 	 */
-	--m->wire_count;
-	if (m->wire_count == 0) {
-		vm_page_free_zero(m);
-		atomic_subtract_int(&cnt.v_wire_count, 1);
-	}
+	pmap_invalidate_page(pmap, pteva);
+
+	vm_page_free_zero(m);
+	atomic_subtract_int(&cnt.v_wire_count, 1);
 	return 1;
 }
 
@@ -1134,15 +1127,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 +1157,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 +1188,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 +1200,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 +1253,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 +1549,8 @@
 	if (pmap->pm_stats.resident_count == 0)
 		return;
 
+	anyvalid = 0;
+
 	vm_page_lock_queues();
 	PMAP_LOCK(pmap);
 
@@ -1581,8 +1567,6 @@
 		}
 	}
 
-	anyvalid = 0;
-
 	for (; sva < eva; sva = va_next) {
 
 		if (pmap->pm_stats.resident_count == 0)
@@ -1644,11 +1628,10 @@
 				break;
 		}
 	}
-
+out:
+	vm_page_unlock_queues();
 	if (anyvalid)
 		pmap_invalidate_all(pmap);
-out:
-	vm_page_unlock_queues();
 	PMAP_UNLOCK(pmap);
 }
 
@@ -1818,9 +1801,9 @@
 			}
 		}
 	}
+	vm_page_unlock_queues();
 	if (anychanged)
 		pmap_invalidate_all(pmap);
-	vm_page_unlock_queues();
 	PMAP_UNLOCK(pmap);
 }
 
@@ -1920,7 +1903,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 +2011,7 @@
 		 */
 		ptepindex = pmap_pde_pindex(va);
 		if (mpte && (mpte->pindex == ptepindex)) {
-			mpte->hold_count++;
+			mpte->wire_count++;
 		} else {
 	retry:
 			/*
@@ -2044,7 +2027,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 +2284,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 +2317,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/smpng/sys/amd64/conf/GENERIC#24 (text+ko) ====

@@ -16,7 +16,7 @@
 # If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.424 2004/09/10 20:57:46 wpaul Exp $
+# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.425 2004/09/22 00:44:13 peter Exp $
 
 machine		amd64
 cpu		HAMMER
@@ -98,6 +98,7 @@
 device		ahd		# AHA39320/29320 and onboard AIC79xx devices
 device		amd		# AMD 53C974 (Tekram DC-390(T))
 device		isp		# Qlogic family
+#device		ispfw		# Firmware for QLogic HBAs- normally a module
 device		mpt		# LSI-Logic MPT-Fusion
 #device		ncr		# NCR/Symbios Logic
 device		sym		# NCR/Symbios Logic (newer chipsets + those of `ncr')

==== //depot/projects/smpng/sys/amd64/conf/NOTES#10 (text+ko) ====

@@ -4,7 +4,7 @@
 # This file contains machine dependent kernel configuration notes.  For
 # machine independent notes, look in /sys/conf/NOTES.
 #
-# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.19 2004/08/27 21:29:20 arved Exp $
+# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.20 2004/09/22 01:04:54 peter Exp $
 #
 
 #
@@ -217,7 +217,7 @@
 # for AGP r128 and radeon cards.
 
 device		mgadrm
-device		"r128drm"
+device		r128drm
 device		radeondrm
 device		sisdrm
 device		tdfxdrm
@@ -365,20 +365,20 @@
 #	ifpi2 driver for AVM Fritz!Card PCI version 2
 #
 # AVM Fritz!Card PCI version 2
-#XXX#device  "ifpi2"
+#XXX#device	ifpi2
 #
 #---------------------------------------------------------------------------
 #	iwic driver for Winbond W6692 chipset
 #
 # ASUSCOM P-IN100-ST-D (and other Winbond W6692 based cards)
-#XXX#device  iwic
+#XXX#device	iwic
 #
 #---------------------------------------------------------------------------
 #	itjc driver for Siemens ISAC / TJNet Tiger300/320 chipset
 #
 # Traverse Technologies NETjet-S
 # Teles PCI-TJ
-#XXX#device  itjc
+#XXX#device	itjc
 #
 #---------------------------------------------------------------------------
 #	iavc driver (AVM active cards, needs i4bcapi driver!)
@@ -389,34 +389,38 @@
 #	ISDN Protocol Stack - mandatory for all hardware drivers
 #
 # Q.921 / layer 2 - i4b passive cards D channel handling
-#XXX#device		"i4bq921"
+#XXX#device	i4bq921
 #
 # Q.931 / layer 3 - i4b passive cards D channel handling
-#XXX#device		"i4bq931"
+#XXX#device	i4bq931
 #
 # layer 4 - i4b common passive and active card handling
-#XXX#device		"i4b"
+#XXX#device	i4b
 #
 #---------------------------------------------------------------------------
 #	ISDN devices - mandatory for all hardware drivers
 #
 # userland driver to do ISDN tracing (for passive cards only)
-#XXX#device		"i4btrc"	4
+#XXX#device	i4btrc
+#XXX#options	NI4BTRC=4
 #
 # userland driver to control the whole thing
-#XXX#device		"i4bctl"
+#XXX#device	i4bctl
 #
 #---------------------------------------------------------------------------
 #	ISDN devices - optional
 #
 # userland driver for access to raw B channel
-#XXX#device		"i4brbch"	4
+#XXX#device	i4brbch
+#XXX#options	NI4BRBCH=4
 #
 # userland driver for telephony
-#XXX#device		"i4btel"	2
+#XXX#device	i4btel
+#XXX#options 	NI4BTEL=2
 #
 # network driver for IP over raw HDLC ISDN
-#XXX#device		"i4bipr"	4
+#XXX#device	i4bipr
+#XXX#options 	NI4BIPR=4
 # enable VJ header compression detection for ipr i/f
 options 	IPR_VJ
 # enable logging of the first n IP packets to isdnd (n=32 here)
@@ -424,10 +428,15 @@
 #
 # network driver for sync PPP over ISDN; requires an equivalent
 # number of sppp device to be configured
-#XXX#device		"i4bisppp"	4
+#XXX#device	i4bisppp
+#XXX#options 	NI4BISPPP=4
 #
 # B-channel interface to the netgraph subsystem
-#XXX#device		"i4bing"	2
+#XXX#device	i4bing
+#XXX#options	NI4BING=2
+#
+# CAPI driver needed for active ISDN cards (see iavc driver above)
+#XXX#device	i4bcapi
 #
 #---------------------------------------------------------------------------
 

==== //depot/projects/smpng/sys/amd64/include/db_machdep.h#4 (text+ko) ====

@@ -23,7 +23,7 @@
  * any improvements or extensions that they make and grant Carnegie Mellon
  * the rights to redistribute these changes.
  *
- * $FreeBSD: src/sys/amd64/include/db_machdep.h,v 1.20 2004/07/10 23:47:18 marcel Exp $
+ * $FreeBSD: src/sys/amd64/include/db_machdep.h,v 1.21 2004/09/22 01:27:06 peter Exp $
  */
 
 #ifndef _MACHINE_DB_MACHDEP_H_
@@ -41,9 +41,17 @@
 #define	BKPT_SIZE	(1)		/* size of breakpoint inst */
 #define	BKPT_SET(inst)	(BKPT_INST)
 
-#define BKPT_SKIP		kdb_frame->tf_rip += 1
+#define BKPT_SKIP				\
+do {						\
+	kdb_frame->tf_rip += 1;			\
+	kdb_thrctx->pcb_rip += 1;		\
+} while(0)
 
-#define	FIXUP_PC_AFTER_BREAK	kdb_frame->tf_rip -= 1;
+#define	FIXUP_PC_AFTER_BREAK			\
+do {						\
+	kdb_frame->tf_rip -= 1;			\
+	kdb_thrctx->pcb_rip -= 1;		\
+} while(0);
 
 #define	db_clear_single_step	kdb_cpu_clear_singlestep
 #define	db_set_single_step	kdb_cpu_set_singlestep

==== //depot/projects/smpng/sys/amd64/isa/isa_dma.c#7 (text+ko) ====

@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/isa/isa_dma.c,v 1.19 2004/08/16 22:51:13 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/isa/isa_dma.c,v 1.20 2004/09/15 12:09:49 phk Exp $");
 
 /*
  * code to manage AT bus
@@ -96,15 +96,13 @@
 /*
  * Setup a DMA channel's bounce buffer.
  */
-void
-isa_dmainit(chan, bouncebufsize)
-	int chan;
-	u_int bouncebufsize;
+int
+isa_dma_init(int chan, u_int bouncebufsize, int flag)
 {
 	void *buf;
 
 	/*
-	 * If a DMA channel is shared, both drivers have to call isa_dmainit
+	 * If a DMA channel is shared, both drivers have to call isa_dma_init
 	 * since they don't know that the other driver will do it.
 	 * Just return if we're already set up good.
 	 * XXX: this only works if they agree on the bouncebuf size.  This
@@ -112,30 +110,30 @@
 	 * XXX: the same driver.
 	 */
 	if (dma_bouncebuf[chan] != NULL)
-		return;
+		return (0);
 
 #ifdef DIAGNOSTIC
 	if (chan & ~VALID_DMA_MASK)
-		panic("isa_dmainit: channel out of range");
+		panic("isa_dma_init: channel out of range");
 #endif
 
 	dma_bouncebufsize[chan] = bouncebufsize;
 
 	/* Try malloc() first.  It works better if it works. */
-	buf = malloc(bouncebufsize, M_DEVBUF, M_NOWAIT);
+	buf = malloc(bouncebufsize, M_DEVBUF, flag);
 	if (buf != NULL) {
 		if (isa_dmarangecheck(buf, bouncebufsize, chan) == 0) {
 			dma_bouncebuf[chan] = buf;
-			return;
+			return (0);
 		}
 		free(buf, M_DEVBUF);
 	}
-	buf = contigmalloc(bouncebufsize, M_DEVBUF, M_NOWAIT, 0ul, 0xfffffful,
+	buf = contigmalloc(bouncebufsize, M_DEVBUF, flag, 0ul, 0xfffffful,
 			   1ul, chan & 4 ? 0x20000ul : 0x10000ul);
 	if (buf == NULL)
-		printf("isa_dmainit(%d, %d) failed\n", chan, bouncebufsize);
-	else
-		dma_bouncebuf[chan] = buf;
+		return (ENOMEM);
+	dma_bouncebuf[chan] = buf;
+	return (0);
 }
 
 /*

==== //depot/projects/smpng/sys/arm/arm/db_trace.c#5 (text+ko) ====

@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/db_trace.c,v 1.4 2004/07/21 05:07:09 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/db_trace.c,v 1.5 2004/09/20 19:05:31 jhb Exp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 

==== //depot/projects/smpng/sys/boot/i386/boot2/boot2.c#24 (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/smpng/sys/boot/i386/libi386/biosdisk.c#11 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 

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


More information about the p4-projects mailing list