Date: Sun, 14 Nov 2004 10:20:43 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 65085 for review Message-ID: <200411141020.iAEAKh17073007@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=65085 Change 65085 by rwatson@rwatson_zoo on 2004/11/14 10:19:59 Integrate netperf_socket up to @64998: - busdma uses zone-like mechanism for bounce buffers. - many an armism - more vmisms - if_gx removed - network drivers less verbose about link state changes - if_em vlan fix for promiscuous mode - direct device access from file descriptor now supported - sf_buf_alloc() interface can now take a sleep argument - atomic operation optimization for up - critical section KTR tracing - system v ipc ABI cleanup - c99 sparse structure initialization for protocols/domains - fdclose() centralized - unifdef ALTQ if_var.h - in_addprefix(), in_scrubprefix(). - loop back TCP input locking fixes to make sure info lock is held over use of pcb. - kame ipsec tcp signatures - loop back of NFS server locking fixes relating to nfsrv_access() - if_sf polling support - if_xl xl_watchdog queuing fix Affected files ... .. //depot/projects/netperf_socket/sys/alpha/conf/GENERIC#13 integrate .. //depot/projects/netperf_socket/sys/alpha/conf/NOTES#4 integrate .. //depot/projects/netperf_socket/sys/amd64/amd64/busdma_machdep.c#7 integrate .. //depot/projects/netperf_socket/sys/arm/arm/bcopy_page.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/bcopyinout.S#3 integrate .. //depot/projects/netperf_socket/sys/arm/arm/bcopyinout_xscale.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/blockio.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/bus_space_asm_generic.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/copystr.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/cpufunc.c#5 integrate .. //depot/projects/netperf_socket/sys/arm/arm/cpufunc_asm.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/cpufunc_asm_arm3.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/cpufunc_asm_arm67.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/cpufunc_asm_arm7tdmi.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/cpufunc_asm_arm8.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/cpufunc_asm_arm9.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/cpufunc_asm_armv4.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/cpufunc_asm_ixp12x0.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/cpufunc_asm_sa1.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/cpufunc_asm_sa11x0.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/cpufunc_asm_xscale.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/fiq_subr.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/fusu.S#4 integrate .. //depot/projects/netperf_socket/sys/arm/arm/genassym.c#3 integrate .. //depot/projects/netperf_socket/sys/arm/arm/in_cksum_arm.S#3 integrate .. //depot/projects/netperf_socket/sys/arm/arm/intr.c#4 integrate .. //depot/projects/netperf_socket/sys/arm/arm/irq_dispatch.S#3 integrate .. //depot/projects/netperf_socket/sys/arm/arm/locore.S#5 integrate .. //depot/projects/netperf_socket/sys/arm/arm/mem.c#1 branch .. //depot/projects/netperf_socket/sys/arm/arm/nexus_io_asm.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/pmap.c#11 integrate .. //depot/projects/netperf_socket/sys/arm/arm/setcpsr.S#2 integrate .. //depot/projects/netperf_socket/sys/arm/arm/support.S#5 integrate .. //depot/projects/netperf_socket/sys/arm/arm/swtch.S#4 integrate .. //depot/projects/netperf_socket/sys/arm/arm/vm_machdep.c#6 integrate .. //depot/projects/netperf_socket/sys/arm/conf/IQ31244#3 integrate .. //depot/projects/netperf_socket/sys/arm/conf/SIMICS#5 integrate .. //depot/projects/netperf_socket/sys/arm/include/asm.h#3 integrate .. //depot/projects/netperf_socket/sys/arm/include/memdev.h#1 branch .. //depot/projects/netperf_socket/sys/arm/include/pmap.h#5 integrate .. //depot/projects/netperf_socket/sys/arm/xscale/i80321/iq31244_machdep.c#3 integrate .. //depot/projects/netperf_socket/sys/boot/common/commands.c#3 integrate .. //depot/projects/netperf_socket/sys/boot/forth/loader.conf#13 integrate .. //depot/projects/netperf_socket/sys/boot/forth/loader.conf.5#5 integrate .. //depot/projects/netperf_socket/sys/boot/i386/libi386/biossmap.c#2 integrate .. //depot/projects/netperf_socket/sys/compat/linprocfs/linprocfs.c#5 integrate .. //depot/projects/netperf_socket/sys/compat/svr4/svr4_filio.c#3 integrate .. //depot/projects/netperf_socket/sys/conf/NOTES#45 integrate .. //depot/projects/netperf_socket/sys/conf/files#56 integrate .. //depot/projects/netperf_socket/sys/conf/files.i386#30 integrate .. //depot/projects/netperf_socket/sys/conf/files.sparc64#12 integrate .. //depot/projects/netperf_socket/sys/conf/kern.post.mk#10 integrate .. //depot/projects/netperf_socket/sys/conf/options#33 integrate .. //depot/projects/netperf_socket/sys/conf/options.arm#3 integrate .. //depot/projects/netperf_socket/sys/contrib/pf/net/pf.c#16 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pcib.c#12 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pcib_acpi.c#12 integrate .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_snc.c#1 branch .. //depot/projects/netperf_socket/sys/dev/acpica/acpi_video.c#9 integrate .. //depot/projects/netperf_socket/sys/dev/aha/aha_isa.c#3 integrate .. //depot/projects/netperf_socket/sys/dev/ata/ata-card.c#6 integrate .. //depot/projects/netperf_socket/sys/dev/bge/if_bge.c#13 integrate .. //depot/projects/netperf_socket/sys/dev/ed/if_ed.c#10 integrate .. //depot/projects/netperf_socket/sys/dev/ed/if_ed_cbus.c#2 integrate .. //depot/projects/netperf_socket/sys/dev/em/if_em.c#13 integrate .. //depot/projects/netperf_socket/sys/dev/em/if_em.h#4 integrate .. //depot/projects/netperf_socket/sys/dev/esp/esp_sbus.c#7 integrate .. //depot/projects/netperf_socket/sys/dev/esp/lsi64854.c#3 delete .. //depot/projects/netperf_socket/sys/dev/esp/lsi64854reg.h#2 delete .. //depot/projects/netperf_socket/sys/dev/esp/lsi64854var.h#3 delete .. //depot/projects/netperf_socket/sys/dev/fdc/fdc.c#14 integrate .. //depot/projects/netperf_socket/sys/dev/firewire/fwmem.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/gx/if_gx.c#6 delete .. //depot/projects/netperf_socket/sys/dev/gx/if_gxreg.h#2 delete .. //depot/projects/netperf_socket/sys/dev/gx/if_gxvar.h#2 delete .. //depot/projects/netperf_socket/sys/dev/lge/if_lge.c#9 integrate .. //depot/projects/netperf_socket/sys/dev/md/md.c#25 integrate .. //depot/projects/netperf_socket/sys/dev/nge/if_nge.c#15 integrate .. //depot/projects/netperf_socket/sys/dev/pbio/pbio.c#2 integrate .. //depot/projects/netperf_socket/sys/dev/pci/pci.c#13 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/maestro.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/sound/pci/maestro_reg.h#2 integrate .. //depot/projects/netperf_socket/sys/dev/usb/ehci.c#11 integrate .. //depot/projects/netperf_socket/sys/dev/usb/ohci.c#5 integrate .. //depot/projects/netperf_socket/sys/dev/usb/uhci.c#7 integrate .. //depot/projects/netperf_socket/sys/dev/usb/uhub.c#9 integrate .. //depot/projects/netperf_socket/sys/dev/usb/umass.c#13 integrate .. //depot/projects/netperf_socket/sys/dev/usb/usb_port.h#4 integrate .. //depot/projects/netperf_socket/sys/fs/autofs/autofs.h#5 delete .. //depot/projects/netperf_socket/sys/fs/autofs/autofs_util.c#5 delete .. //depot/projects/netperf_socket/sys/fs/autofs/autofs_vfsops.c#5 delete .. //depot/projects/netperf_socket/sys/fs/autofs/autofs_vnops.c#5 delete .. //depot/projects/netperf_socket/sys/fs/devfs/devfs_vfsops.c#5 integrate .. //depot/projects/netperf_socket/sys/fs/devfs/devfs_vnops.c#8 integrate .. //depot/projects/netperf_socket/sys/fs/fdescfs/fdesc_vfsops.c#7 integrate .. //depot/projects/netperf_socket/sys/fs/hpfs/hpfs_vfsops.c#6 integrate .. //depot/projects/netperf_socket/sys/fs/msdosfs/msdosfs_vfsops.c#11 integrate .. //depot/projects/netperf_socket/sys/fs/ntfs/ntfs_vfsops.c#7 integrate .. //depot/projects/netperf_socket/sys/fs/nullfs/null_vfsops.c#6 integrate .. //depot/projects/netperf_socket/sys/fs/nwfs/nwfs_vfsops.c#4 integrate .. //depot/projects/netperf_socket/sys/fs/portalfs/portal_vfsops.c#6 integrate .. //depot/projects/netperf_socket/sys/fs/smbfs/smbfs_vfsops.c#5 integrate .. //depot/projects/netperf_socket/sys/fs/umapfs/umap_vfsops.c#5 integrate .. //depot/projects/netperf_socket/sys/fs/unionfs/union_vfsops.c#6 integrate .. //depot/projects/netperf_socket/sys/geom/geom.h#9 integrate .. //depot/projects/netperf_socket/sys/geom/geom_event.c#6 integrate .. //depot/projects/netperf_socket/sys/geom/mirror/g_mirror.c#15 integrate .. //depot/projects/netperf_socket/sys/geom/raid3/g_raid3.c#9 integrate .. //depot/projects/netperf_socket/sys/gnu/ext2fs/ext2_mount.h#6 integrate .. //depot/projects/netperf_socket/sys/gnu/ext2fs/ext2_vfsops.c#11 integrate .. //depot/projects/netperf_socket/sys/i386/acpica/acpi_asus.c#11 integrate .. //depot/projects/netperf_socket/sys/i386/acpica/acpi_panasonic.c#5 integrate .. //depot/projects/netperf_socket/sys/i386/i386/autoconf.c#6 integrate .. //depot/projects/netperf_socket/sys/i386/i386/busdma_machdep.c#7 integrate .. //depot/projects/netperf_socket/sys/i386/i386/vm_machdep.c#16 integrate .. //depot/projects/netperf_socket/sys/i386/include/atomic.h#3 integrate .. //depot/projects/netperf_socket/sys/i386/isa/pbio.c#3 delete .. //depot/projects/netperf_socket/sys/isofs/cd9660/cd9660_vfsops.c#10 integrate .. //depot/projects/netperf_socket/sys/kern/init_main.c#11 integrate .. //depot/projects/netperf_socket/sys/kern/kern_descrip.c#21 integrate .. //depot/projects/netperf_socket/sys/kern/kern_environment.c#4 integrate .. //depot/projects/netperf_socket/sys/kern/kern_exec.c#18 integrate .. //depot/projects/netperf_socket/sys/kern/kern_fork.c#20 integrate .. //depot/projects/netperf_socket/sys/kern/kern_mac.c#6 integrate .. //depot/projects/netperf_socket/sys/kern/kern_shutdown.c#19 integrate .. //depot/projects/netperf_socket/sys/kern/kern_subr.c#9 integrate .. //depot/projects/netperf_socket/sys/kern/kern_switch.c#17 integrate .. //depot/projects/netperf_socket/sys/kern/sched_ule.c#24 integrate .. //depot/projects/netperf_socket/sys/kern/subr_param.c#7 integrate .. //depot/projects/netperf_socket/sys/kern/subr_witness.c#13 integrate .. //depot/projects/netperf_socket/sys/kern/sys_pipe.c#8 integrate .. //depot/projects/netperf_socket/sys/kern/sysv_msg.c#3 integrate .. //depot/projects/netperf_socket/sys/kern/sysv_sem.c#4 integrate .. //depot/projects/netperf_socket/sys/kern/sysv_shm.c#8 integrate .. //depot/projects/netperf_socket/sys/kern/tty.c#18 integrate .. //depot/projects/netperf_socket/sys/kern/uipc_cow.c#4 integrate .. //depot/projects/netperf_socket/sys/kern/uipc_domain.c#8 integrate .. //depot/projects/netperf_socket/sys/kern/uipc_socket.c#43 integrate .. //depot/projects/netperf_socket/sys/kern/uipc_syscalls.c#29 integrate .. //depot/projects/netperf_socket/sys/kern/uipc_usrreq.c#28 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_mount.c#17 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_subr.c#27 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_syscalls.c#15 integrate .. //depot/projects/netperf_socket/sys/kern/vfs_vnops.c#13 integrate .. //depot/projects/netperf_socket/sys/libkern/arm/divsi3.S#3 integrate .. //depot/projects/netperf_socket/sys/libkern/arm/ffs.S#2 integrate .. //depot/projects/netperf_socket/sys/modules/Makefile#23 integrate .. //depot/projects/netperf_socket/sys/modules/acpi/Makefile#5 integrate .. //depot/projects/netperf_socket/sys/modules/acpi/acpi_snc/Makefile#1 branch .. //depot/projects/netperf_socket/sys/modules/autofs/Makefile#3 delete .. //depot/projects/netperf_socket/sys/modules/esp/Makefile#3 integrate .. //depot/projects/netperf_socket/sys/modules/gx/Makefile#2 delete .. //depot/projects/netperf_socket/sys/net/if_ppp.c#9 integrate .. //depot/projects/netperf_socket/sys/net/if_pppvar.h#2 integrate .. //depot/projects/netperf_socket/sys/net/if_sl.c#14 integrate .. //depot/projects/netperf_socket/sys/net/if_var.h#22 integrate .. //depot/projects/netperf_socket/sys/net/ppp_tty.c#5 integrate .. //depot/projects/netperf_socket/sys/net/raw_usrreq.c#8 integrate .. //depot/projects/netperf_socket/sys/net/rtsock.c#16 integrate .. //depot/projects/netperf_socket/sys/netatalk/ddp_usrreq.c#12 integrate .. //depot/projects/netperf_socket/sys/netatm/atm_aal5.c#3 integrate .. //depot/projects/netperf_socket/sys/netatm/atm_usrreq.c#2 integrate .. //depot/projects/netperf_socket/sys/netgraph/bluetooth/socket/ng_btsocket.c#4 integrate .. //depot/projects/netperf_socket/sys/netgraph/ng_device.c#9 integrate .. //depot/projects/netperf_socket/sys/netgraph/ng_socket.c#8 integrate .. //depot/projects/netperf_socket/sys/netinet/in.c#6 integrate .. //depot/projects/netperf_socket/sys/netinet/ip_divert.c#17 integrate .. //depot/projects/netperf_socket/sys/netinet/ip_fastfwd.c#14 integrate .. //depot/projects/netperf_socket/sys/netinet/raw_ip.c#17 integrate .. //depot/projects/netperf_socket/sys/netinet/tcp_input.c#21 integrate .. //depot/projects/netperf_socket/sys/netinet/tcp_subr.c#24 integrate .. //depot/projects/netperf_socket/sys/netinet/tcp_usrreq.c#16 integrate .. //depot/projects/netperf_socket/sys/netinet/udp_usrreq.c#18 integrate .. //depot/projects/netperf_socket/sys/netinet6/ah_core.c#3 integrate .. //depot/projects/netperf_socket/sys/netinet6/raw_ip6.c#9 integrate .. //depot/projects/netperf_socket/sys/netinet6/udp6_usrreq.c#8 integrate .. //depot/projects/netperf_socket/sys/netipsec/keysock.c#3 integrate .. //depot/projects/netperf_socket/sys/netipx/ipx_usrreq.c#5 integrate .. //depot/projects/netperf_socket/sys/netipx/spx_usrreq.c#9 integrate .. //depot/projects/netperf_socket/sys/netkey/key.c#6 integrate .. //depot/projects/netperf_socket/sys/netkey/key.h#2 integrate .. //depot/projects/netperf_socket/sys/netkey/keydb.h#2 integrate .. //depot/projects/netperf_socket/sys/netkey/keysock.c#4 integrate .. //depot/projects/netperf_socket/sys/netnatm/natm.c#7 integrate .. //depot/projects/netperf_socket/sys/netsmb/smb_dev.c#5 integrate .. //depot/projects/netperf_socket/sys/nfs4client/nfs4_vfsops.c#9 integrate .. //depot/projects/netperf_socket/sys/nfsclient/nfs_vfsops.c#11 integrate .. //depot/projects/netperf_socket/sys/nfsserver/nfs_serv.c#12 integrate .. //depot/projects/netperf_socket/sys/pc98/conf/NOTES#18 integrate .. //depot/projects/netperf_socket/sys/pc98/pc98/fd.c#16 integrate .. //depot/projects/netperf_socket/sys/pci/if_de.c#11 integrate .. //depot/projects/netperf_socket/sys/pci/if_sf.c#10 integrate .. //depot/projects/netperf_socket/sys/pci/if_sfreg.h#2 integrate .. //depot/projects/netperf_socket/sys/pci/if_xl.c#13 integrate .. //depot/projects/netperf_socket/sys/sparc64/sbus/lsi64854.c#2 integrate .. //depot/projects/netperf_socket/sys/sparc64/sparc64/vm_machdep.c#10 integrate .. //depot/projects/netperf_socket/sys/sys/_types.h#6 integrate .. //depot/projects/netperf_socket/sys/sys/conf.h#12 integrate .. //depot/projects/netperf_socket/sys/sys/fdcio.h#4 integrate .. //depot/projects/netperf_socket/sys/sys/file.h#4 integrate .. //depot/projects/netperf_socket/sys/sys/filedesc.h#5 integrate .. //depot/projects/netperf_socket/sys/sys/kernel.h#8 integrate .. //depot/projects/netperf_socket/sys/sys/ktr.h#4 integrate .. //depot/projects/netperf_socket/sys/sys/mac_policy.h#7 integrate .. //depot/projects/netperf_socket/sys/sys/msg.h#2 integrate .. //depot/projects/netperf_socket/sys/sys/pbioio.h#2 delete .. //depot/projects/netperf_socket/sys/sys/protosw.h#4 integrate .. //depot/projects/netperf_socket/sys/sys/resource.h#6 integrate .. //depot/projects/netperf_socket/sys/sys/rman.h#5 integrate .. //depot/projects/netperf_socket/sys/sys/sem.h#2 integrate .. //depot/projects/netperf_socket/sys/sys/sf_buf.h#4 integrate .. //depot/projects/netperf_socket/sys/sys/shm.h#2 integrate .. //depot/projects/netperf_socket/sys/sys/vnode.h#13 integrate .. //depot/projects/netperf_socket/sys/ufs/ffs/ffs_vfsops.c#13 integrate .. //depot/projects/netperf_socket/sys/vm/vm_object.c#13 integrate .. //depot/projects/netperf_socket/sys/vm/vm_pager.h#4 integrate .. //depot/projects/netperf_socket/sys/vm/vm_param.h#4 integrate Differences ... ==== //depot/projects/netperf_socket/sys/alpha/conf/GENERIC#13 (text+ko) ==== @@ -18,7 +18,7 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.180 2004/11/02 20:57:19 andre Exp $ +# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.181 2004/11/09 22:23:34 wilko Exp $ machine alpha cpu EV4 @@ -32,7 +32,6 @@ # Platforms supported options API_UP1000 # UP1000, UP1100 (Nautilus) -options DEC_AXPPCI_33 # UDB, Multia, AXPpci33, NoName options DEC_EB164 # EB164, PC164, PC164LX, PC164SX options DEC_EB64PLUS # EB64+, AlphaPC64, Aspen Alpine, etc options DEC_2100_A50 # AlphaStation 200, 250, 255, 400 @@ -41,8 +40,6 @@ options DEC_ST550 # Personal Workstation 433, 500, 600 options DEC_ST6600 # XP1000, DP264, DS20, DS10, family options DEC_1000A # AlphaServer 1000, 1000A, 800 -# TurboLaser support is broken -# options DEC_KN8AE # AlphaServer 8200/8400 (Turbolaser) options DEC_KN300 # AlphaServer 4100 (Rawhide), # AlphaServer 1200 (Tincup) ==== //depot/projects/netperf_socket/sys/alpha/conf/NOTES#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/alpha/conf/NOTES,v 1.155 2004/08/28 21:47:24 wilko Exp $ +# $FreeBSD: src/sys/alpha/conf/NOTES,v 1.156 2004/11/09 22:24:47 wilko Exp $ # # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. @@ -27,7 +27,6 @@ # PLATFORM OPTIONS options API_UP1000 # UP1000, UP1100 (Nautilus) -options DEC_AXPPCI_33 # UDB, Multia, AXPpci33, NoName options DEC_EB164 # EB164, PC164, PC164LX, PC164SX options DEC_EB64PLUS # EB64+, AlphaPC64, Aspen Alpine, etc options DEC_2100_A50 # AlphaStation 200, 250, 255, 400 @@ -36,8 +35,6 @@ options DEC_ST550 # Personal Workstation 433, 500, 600 options DEC_ST6600 # XP1000, DP264, DS20, DS10, family options DEC_1000A # AlphaServer 1000, 1000A, 800 -# TurboLaser support is broken -# options DEC_KN8AE # AlphaServer 8200/8400 (Turbolaser) options DEC_KN300 # AlphaServer 4100 (Rawhide), # AlphaServer 1200 (Tincup) ==== //depot/projects/netperf_socket/sys/amd64/amd64/busdma_machdep.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.59 2004/11/05 18:24:01 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.60 2004/11/10 03:49:24 scottl Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -52,6 +52,8 @@ #define MAX_BPAGES 512 +struct bounce_zone; + struct bus_dma_tag { bus_dma_tag_t parent; bus_size_t alignment; @@ -69,6 +71,7 @@ bus_dma_lock_t *lockfunc; void *lockfuncarg; bus_dma_segment_t *segments; + struct bounce_zone *bounce_zone; }; struct bounce_page { @@ -81,29 +84,32 @@ int busdma_swi_pending; +struct bounce_zone { + STAILQ_ENTRY(bounce_zone) links; + STAILQ_HEAD(bp_list, bounce_page) bounce_page_list; + int free_bpages; + int reserved_bpages; + int active_bpages; + int total_bounced; + int total_deferred; + bus_size_t alignment; + bus_size_t boundary; + bus_addr_t lowaddr; + char zoneid[8]; + char lowaddrid[20]; + struct sysctl_ctx_list sysctl_tree; + struct sysctl_oid *sysctl_tree_top; +}; + static struct mtx bounce_lock; -static STAILQ_HEAD(bp_list, bounce_page) bounce_page_list; -static int free_bpages; -static int reserved_bpages; -static int active_bpages; static int total_bpages; -static int total_bounced; -static int total_deferred; +static int busdma_zonecount; +static STAILQ_HEAD(, bounce_zone) bounce_zone_list; static bus_addr_t bounce_lowaddr = BUS_SPACE_MAXADDR; SYSCTL_NODE(_hw, OID_AUTO, busdma, CTLFLAG_RD, 0, "Busdma parameters"); -SYSCTL_INT(_hw_busdma, OID_AUTO, free_bpages, CTLFLAG_RD, &free_bpages, 0, - "Free bounce pages"); -SYSCTL_INT(_hw_busdma, OID_AUTO, reserved_bpages, CTLFLAG_RD, &reserved_bpages, - 0, "Reserved bounce pages"); -SYSCTL_INT(_hw_busdma, OID_AUTO, active_bpages, CTLFLAG_RD, &active_bpages, 0, - "Active bounce pages"); SYSCTL_INT(_hw_busdma, OID_AUTO, total_bpages, CTLFLAG_RD, &total_bpages, 0, "Total bounce pages"); -SYSCTL_INT(_hw_busdma, OID_AUTO, total_bounced, CTLFLAG_RD, &total_bounced, 0, - "Total bounce requests"); -SYSCTL_INT(_hw_busdma, OID_AUTO, total_deferred, CTLFLAG_RD, &total_deferred, 0, - "Total bounce requests that were deferred"); struct bus_dmamap { struct bp_list bpages; @@ -122,6 +128,7 @@ static struct bus_dmamap nobounce_dmamap; static void init_bounce_pages(void *dummy); +static struct bounce_zone * alloc_bounce_zone(bus_dma_tag_t dmat); static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages); static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int commit); @@ -219,7 +226,8 @@ /* Return a NULL tag on failure */ *dmat = NULL; - newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_DEVBUF, M_NOWAIT); + newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_DEVBUF, + M_ZERO | M_NOWAIT); if (newtag == NULL) { CTR3(KTR_BUSDMA, "bus_dma_tag_create returned tag %p tag " "flags 0x%x error %d", newtag, 0, error); @@ -376,6 +384,7 @@ */ if (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem) || dmat->alignment > 1 || dmat->boundary > 0) { + /* Must bounce */ int maxpages; @@ -845,7 +854,7 @@ * want to add support for invalidating * the caches on broken hardware */ - total_bounced++; + dmat->bounce_zone->total_bounced++; CTR3(KTR_BUSDMA, "_bus_dmamap_sync: tag %p tag flags 0x%x " "op 0x%x performing bounce", op, dmat, dmat->flags); @@ -873,22 +882,111 @@ init_bounce_pages(void *dummy __unused) { - free_bpages = 0; - reserved_bpages = 0; - active_bpages = 0; total_bpages = 0; - STAILQ_INIT(&bounce_page_list); + STAILQ_INIT(&bounce_zone_list); STAILQ_INIT(&bounce_map_waitinglist); STAILQ_INIT(&bounce_map_callbacklist); mtx_init(&bounce_lock, "bounce pages lock", NULL, MTX_DEF); } SYSINIT(bpages, SI_SUB_LOCK, SI_ORDER_ANY, init_bounce_pages, NULL); +static struct sysctl_ctx_list * +busdma_sysctl_tree(struct bounce_zone *bz) +{ + return (&bz->sysctl_tree); +} + +static struct sysctl_oid * +busdma_sysctl_tree_top(struct bounce_zone *bz) +{ + return (bz->sysctl_tree_top); +} + +static struct bounce_zone * +alloc_bounce_zone(bus_dma_tag_t dmat) +{ + struct bounce_zone *bz; + + if ((bz = (struct bounce_zone *)malloc(sizeof(*bz), M_DEVBUF, + M_NOWAIT | M_ZERO)) == NULL) + return (NULL); + + STAILQ_INIT(&bz->bounce_page_list); + bz->free_bpages = 0; + bz->reserved_bpages = 0; + bz->active_bpages = 0; + bz->lowaddr = dmat->lowaddr; + bz->alignment = dmat->alignment; + bz->boundary = dmat->boundary; + snprintf(bz->zoneid, 8, "zone%d", busdma_zonecount); + busdma_zonecount++; + snprintf(bz->lowaddrid, 18, "%#jx", (uintmax_t)bz->lowaddr); + STAILQ_INSERT_TAIL(&bounce_zone_list, bz, links); + + sysctl_ctx_init(&bz->sysctl_tree); + bz->sysctl_tree_top = SYSCTL_ADD_NODE(&bz->sysctl_tree, + SYSCTL_STATIC_CHILDREN(_hw_busdma), OID_AUTO, bz->zoneid, + CTLFLAG_RD, 0, ""); + if (bz->sysctl_tree_top == NULL) { + sysctl_ctx_free(&bz->sysctl_tree); + return (bz); + } + + SYSCTL_ADD_INT(busdma_sysctl_tree(bz), + SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, + "free_bpages", CTLFLAG_RD, &bz->free_bpages, 0, + "Free bounce pages"); + SYSCTL_ADD_INT(busdma_sysctl_tree(bz), + SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, + "reserved_bpages", CTLFLAG_RD, &bz->reserved_bpages, 0, + "Reserved bounce pages"); + SYSCTL_ADD_INT(busdma_sysctl_tree(bz), + SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, + "active_bpages", CTLFLAG_RD, &bz->active_bpages, 0, + "Active bounce pages"); + SYSCTL_ADD_INT(busdma_sysctl_tree(bz), + SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, + "total_bounced", CTLFLAG_RD, &bz->total_bounced, 0, + "Total bounce requests"); + SYSCTL_ADD_INT(busdma_sysctl_tree(bz), + SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, + "total_deferred", CTLFLAG_RD, &bz->total_deferred, 0, + "Total bounce requests that were deferred"); + SYSCTL_ADD_STRING(busdma_sysctl_tree(bz), + SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, + "lowaddr", CTLFLAG_RD, bz->lowaddrid, 0, ""); + SYSCTL_ADD_INT(busdma_sysctl_tree(bz), + SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, + "alignment", CTLFLAG_RD, &bz->alignment, 0, ""); + SYSCTL_ADD_INT(busdma_sysctl_tree(bz), + SYSCTL_CHILDREN(busdma_sysctl_tree_top(bz)), OID_AUTO, + "boundary", CTLFLAG_RD, &bz->boundary, 0, ""); + + return (bz); +} + static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages) { + struct bounce_zone *bz; int count; + bz = dmat->bounce_zone; + if (bz == NULL) { + STAILQ_FOREACH(bz, &bounce_zone_list, links) { + if ((dmat->alignment <= bz->alignment) + && (dmat->boundary <= bz->boundary) + && (dmat->lowaddr >= bz->lowaddr)) + break; + } + + if (bz == NULL) { + if ((bz = alloc_bounce_zone(dmat)) == NULL) + return (ENOMEM); + } + dmat->bounce_zone = bz; + } + count = 0; while (numpages > 0) { struct bounce_page *bpage; @@ -900,18 +998,18 @@ break; bpage->vaddr = (vm_offset_t)contigmalloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT, 0ul, - dmat->lowaddr, + bz->lowaddr, PAGE_SIZE, - dmat->boundary); + bz->boundary); if (bpage->vaddr == 0) { free(bpage, M_DEVBUF); break; } bpage->busaddr = pmap_kextract(bpage->vaddr); mtx_lock(&bounce_lock); - STAILQ_INSERT_TAIL(&bounce_page_list, bpage, links); + STAILQ_INSERT_TAIL(&bz->bounce_page_list, bpage, links); total_bpages++; - free_bpages++; + bz->free_bpages++; mtx_unlock(&bounce_lock); count++; numpages--; @@ -922,14 +1020,16 @@ static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int commit) { + struct bounce_zone *bz; int pages; mtx_assert(&bounce_lock, MA_OWNED); - pages = MIN(free_bpages, map->pagesneeded - map->pagesreserved); + bz = dmat->bounce_zone; + pages = MIN(bz->free_bpages, map->pagesneeded - map->pagesreserved); if (commit == 0 && map->pagesneeded > (map->pagesreserved + pages)) return (map->pagesneeded - (map->pagesreserved + pages)); - free_bpages -= pages; - reserved_bpages += pages; + bz->free_bpages -= pages; + bz->reserved_bpages += pages; map->pagesreserved += pages; pages = map->pagesneeded - map->pagesreserved; @@ -940,11 +1040,14 @@ add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, vm_offset_t vaddr, bus_size_t size) { + struct bounce_zone *bz; struct bounce_page *bpage; + KASSERT(dmat->bounce_zone != NULL, ("no bounce zone in dma tag")); KASSERT(map != NULL && map != &nobounce_dmamap, ("add_bounce_page: bad map %p", map)); + bz = dmat->bounce_zone; if (map->pagesneeded == 0) panic("add_bounce_page: map doesn't need any pages"); map->pagesneeded--; @@ -954,13 +1057,13 @@ map->pagesreserved--; mtx_lock(&bounce_lock); - bpage = STAILQ_FIRST(&bounce_page_list); + bpage = STAILQ_FIRST(&bz->bounce_page_list); if (bpage == NULL) panic("add_bounce_page: free page list is empty"); - STAILQ_REMOVE_HEAD(&bounce_page_list, links); - reserved_bpages--; - active_bpages++; + STAILQ_REMOVE_HEAD(&bz->bounce_page_list, links); + bz->reserved_bpages--; + bz->active_bpages++; mtx_unlock(&bounce_lock); bpage->datavaddr = vaddr; @@ -973,21 +1076,23 @@ free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage) { struct bus_dmamap *map; + struct bounce_zone *bz; + bz = dmat->bounce_zone; bpage->datavaddr = 0; bpage->datacount = 0; mtx_lock(&bounce_lock); - STAILQ_INSERT_HEAD(&bounce_page_list, bpage, links); - free_bpages++; - active_bpages--; + STAILQ_INSERT_HEAD(&bz->bounce_page_list, bpage, links); + bz->free_bpages++; + bz->active_bpages--; if ((map = STAILQ_FIRST(&bounce_map_waitinglist)) != NULL) { if (reserve_bounce_pages(map->dmat, map, 1) == 0) { STAILQ_REMOVE_HEAD(&bounce_map_waitinglist, links); STAILQ_INSERT_TAIL(&bounce_map_callbacklist, map, links); busdma_swi_pending = 1; - total_deferred++; + bz->total_deferred++; swi_sched(vm_ih, 0); } } ==== //depot/projects/netperf_socket/sys/arm/arm/bcopy_page.S#2 (text+ko) ==== @@ -40,7 +40,7 @@ #include <machine/asm.h> #include <machine/param.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/bcopy_page.S,v 1.1 2004/05/14 11:46:42 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/bcopy_page.S,v 1.2 2004/11/09 16:47:47 cognet Exp $"); #ifndef __XSCALE__ /* #define BIG_LOOPS */ @@ -242,7 +242,7 @@ strd r4, [r1], #0x08 bgt 1b ldmfd sp!, {r4, r5} - mov pc, lr + RET /* * XSCALE version of bzero_page @@ -269,5 +269,5 @@ strd r2, [r0], #8 subs r1, r1, #128 bne 1b - mov pc, lr + RET #endif /* __XSCALE__ */ ==== //depot/projects/netperf_socket/sys/arm/arm/bcopyinout.S#3 (text+ko) ==== @@ -40,7 +40,7 @@ #include <machine/asm.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/bcopyinout.S,v 1.2 2004/09/23 21:56:36 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/bcopyinout.S,v 1.3 2004/11/09 16:47:47 cognet Exp $"); #ifdef __XSCALE__ #include <arm/arm/bcopyinout_xscale.S> #else @@ -80,7 +80,7 @@ /* Quick exit if length is zero */ teq r2, #0 moveq r0, #0 - moveq pc, lr + RETEQ SAVE_REGS #ifdef MULTIPROCESSOR @@ -280,14 +280,14 @@ str r5, [r4, #PCB_ONFAULT] RESTORE_REGS - mov pc, lr + RET .Lcopyfault: mov r0, #14 /* EFAULT */ str r5, [r4, #PCB_ONFAULT] RESTORE_REGS - mov pc, lr + RET /* * r0 = kernel space address @@ -304,7 +304,7 @@ /* Quick exit if length is zero */ teq r2, #0 moveq r0, #0 - moveq pc, lr + RETeq SAVE_REGS #ifdef MULTIPROCESSOR @@ -501,7 +501,7 @@ str r5, [r4, #PCB_ONFAULT] RESTORE_REGS - mov pc, lr + RET /* * r0 = kernel space source address @@ -517,7 +517,7 @@ /* Quick exit if length is zero */ teq r2, #0 moveq r0, #0 - moveq pc, lr + RETeq SAVE_REGS #ifdef MULTIPROCESSOR @@ -703,7 +703,7 @@ str r5, [r4, #PCB_ONFAULT] RESTORE_REGS - mov pc, lr + RET #endif /* !__XSCALE__ */ /* @@ -738,7 +738,7 @@ strb r3, [r1] mov r0, #0 /* No fault */ 1: str ip, [r2, #PCB_ONFAULT] - mov pc, lr + RET /* * int badaddr_read_2(const uint16_t *src, uint16_t *dest) @@ -772,7 +772,7 @@ strh r3, [r1] mov r0, #0 /* No fault */ 1: str ip, [r2, #PCB_ONFAULT] - mov pc, lr + RET /* * int badaddr_read_4(const uint32_t *src, uint32_t *dest) @@ -806,5 +806,5 @@ str r3, [r1] mov r0, #0 /* No fault */ 1: str ip, [r2, #PCB_ONFAULT] - mov pc, lr + RET ==== //depot/projects/netperf_socket/sys/arm/arm/bcopyinout_xscale.S#2 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include <machine/asm.h> -__FBSDID("$FreeBSD: src/sys/arm/arm/bcopyinout_xscale.S,v 1.1 2004/05/14 11:46:42 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/bcopyinout_xscale.S,v 1.2 2004/11/09 16:47:47 cognet Exp $"); .text .align 0 @@ -111,7 +111,7 @@ ldrbt ip, [r0], #0x01 strb ip, [r1], #0x01 cmp r2, #0x00 /* All done? */ - moveq pc, lr + RETeq /* Destination buffer is now word aligned */ .Lcopyin_wordaligned: @@ -193,7 +193,7 @@ .Lcopyin_w_lessthan128: adds r2, r2, #0x80 /* Adjust for extra sub */ ldmeqfd sp!, {r4-r9} - moveq pc, lr /* Return now if done */ + RETeq subs r2, r2, #0x20 blt .Lcopyin_w_lessthan32 @@ -218,7 +218,7 @@ .Lcopyin_w_lessthan32: adds r2, r2, #0x20 /* Adjust for extra sub */ ldmeqfd sp!, {r4-r9} - moveq pc, lr /* Return now if done */ + RETeq /* Return now if done */ and r4, r2, #0x18 rsb r5, r4, #0x18 @@ -246,14 +246,14 @@ /* Less than 8 bytes remaining */ ldmfd sp!, {r4-r9} - moveq pc, lr /* Return now if done */ + RETeq /* Return now if done */ mov r3, #0x00 .Lcopyin_w_less_than8: subs r2, r2, #0x04 ldrget ip, [r0], #0x04 strge ip, [r1], #0x04 - moveq pc, lr /* Return now if done */ + RETeq /* Return now if done */ addlt r2, r2, #0x04 ldrbt ip, [r0], #0x01 cmp r2, #0x02 @@ -262,7 +262,7 @@ ldrgtbt ip, [r0] strgeb r2, [r1], #0x01 strgtb ip, [r1] - mov pc, lr + RET /* * At this point, it has not been possible to word align both buffers. @@ -317,7 +317,7 @@ adds r2, r2, #0x10 ldmeqfd sp!, {r4-r7} - moveq pc, lr /* Return now if done */ + RETeq /* Return now if done */ subs r2, r2, #0x04 sublt r0, r0, #0x03 blt .Lcopyin_l4 @@ -378,7 +378,7 @@ adds r2, r2, #0x10 ldmeqfd sp!, {r4-r7} - moveq pc, lr /* Return now if done */ + RETeq /* Return now if done */ subs r2, r2, #0x04 sublt r0, r0, #0x02 blt .Lcopyin_l4 @@ -439,7 +439,7 @@ adds r2, r2, #0x10 ldmeqfd sp!, {r4-r7} - moveq pc, lr /* Return now if done */ + RETeq /* Return now if done */ subs r2, r2, #0x04 sublt r0, r0, #0x01 blt .Lcopyin_l4 @@ -465,7 +465,7 @@ ldmfd sp!, {r4-r7} mov r3, #0x00 adds r2, r2, #0x04 - moveq pc, lr + RETeq .Lcopyin_l4_2: rsbs r2, r2, #0x03 addne pc, pc, r2, lsl #3 @@ -476,7 +476,7 @@ strb ip, [r1], #0x01 ldrbt ip, [r0] strb ip, [r1] - mov pc, lr + RET /* @@ -541,7 +541,7 @@ ldrb ip, [r0], #0x01 strbt ip, [r1], #0x01 cmp r2, #0x00 /* All done? */ - moveq pc, lr + RETeq /* Destination buffer is now word aligned */ .Lcopyout_wordaligned: @@ -639,7 +639,7 @@ .Lcopyout_w_lessthan128: adds r2, r2, #0x80 /* Adjust for extra sub */ ldmeqfd sp!, {r4-r9} - moveq pc, lr /* Return now if done */ + RETeq /* Return now if done */ subs r2, r2, #0x20 blt .Lcopyout_w_lessthan32 @@ -668,7 +668,7 @@ .Lcopyout_w_lessthan32: adds r2, r2, #0x20 /* Adjust for extra sub */ ldmeqfd sp!, {r4-r9} - moveq pc, lr /* Return now if done */ + RETeq /* Return now if done */ and r4, r2, #0x18 rsb r5, r4, #0x18 @@ -696,14 +696,14 @@ /* Less than 8 bytes remaining */ ldmfd sp!, {r4-r9} - moveq pc, lr /* Return now if done */ + RETeq /* Return now if done */ mov r3, #0x00 .Lcopyout_w_less_than8: subs r2, r2, #0x04 ldrge ip, [r0], #0x04 strget ip, [r1], #0x04 - moveq pc, lr /* Return now if done */ + RETeq /* Return now if done */ addlt r2, r2, #0x04 ldrb ip, [r0], #0x01 cmp r2, #0x02 @@ -712,7 +712,7 @@ ldrgtb ip, [r0] strgebt r2, [r1], #0x01 strgtbt ip, [r1] - mov pc, lr + RET /* * At this point, it has not been possible to word align both buffers. @@ -767,7 +767,7 @@ adds r2, r2, #0x10 ldmeqfd sp!, {r4-r7} - moveq pc, lr /* Return now if done */ + RETeq /* Return now if done */ subs r2, r2, #0x04 sublt r0, r0, #0x03 blt .Lcopyout_l4 @@ -828,7 +828,7 @@ adds r2, r2, #0x10 ldmeqfd sp!, {r4-r7} - moveq pc, lr /* Return now if done */ + RETeq /* Return now if done */ subs r2, r2, #0x04 sublt r0, r0, #0x02 blt .Lcopyout_l4 @@ -889,7 +889,7 @@ adds r2, r2, #0x10 ldmeqfd sp!, {r4-r7} - moveq pc, lr /* Return now if done */ + RETeq /* Return now if done */ subs r2, r2, #0x04 sublt r0, r0, #0x01 blt .Lcopyout_l4 @@ -915,7 +915,7 @@ ldmfd sp!, {r4-r7} mov r3, #0x00 adds r2, r2, #0x04 - moveq pc, lr + RETeq .Lcopyout_l4_2: rsbs r2, r2, #0x03 addne pc, pc, r2, lsl #3 @@ -926,7 +926,7 @@ strbt ip, [r1], #0x01 ldrb ip, [r0] strbt ip, [r1] - mov pc, lr + RET /* @@ -990,7 +990,7 @@ ldrb ip, [r0], #0x01 strb ip, [r1], #0x01 cmp r2, #0x00 /* All done? */ - moveq pc, lr + RETeq /* Destination buffer is now word aligned */ .Lkcopy_wordaligned: @@ -1071,7 +1071,7 @@ .Lkcopy_w_lessthan128: adds r2, r2, #0x80 /* Adjust for extra sub */ ldmeqfd sp!, {r4-r9} - moveq pc, lr /* Return now if done */ + RETeq /* Return now if done */ subs r2, r2, #0x20 blt .Lkcopy_w_lessthan32 @@ -1096,7 +1096,7 @@ .Lkcopy_w_lessthan32: adds r2, r2, #0x20 /* Adjust for extra sub */ ldmeqfd sp!, {r4-r9} - moveq pc, lr /* Return now if done */ + RETeq /* Return now if done */ and r4, r2, #0x18 rsb r5, r4, #0x18 @@ -1124,14 +1124,14 @@ /* Less than 8 bytes remaining */ >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411141020.iAEAKh17073007>