Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 May 2003 23:33:38 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 32153 for review
Message-ID:  <200305310633.h4V6XcJ3039715@repoman.freebsd.org>

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

Change 32153 by peter@peter_overcee on 2003/05/30 23:31:53

	IFC @32151

Affected files ...

.. //depot/projects/hammer/lib/libc_r/uthread/uthread_close.c#3 integrate
.. //depot/projects/hammer/share/man/man9/CTASSERT.9#2 integrate
.. //depot/projects/hammer/share/man/man9/Makefile#12 integrate
.. //depot/projects/hammer/share/man/man9/bus_activate_resource.9#2 integrate
.. //depot/projects/hammer/share/man/man9/bus_child_present.9#2 integrate
.. //depot/projects/hammer/share/man/man9/bus_dma.9#1 branch
.. //depot/projects/hammer/share/man/man9/bus_set_resource.9#2 integrate
.. //depot/projects/hammer/share/man/man9/device_get_name.9#2 integrate
.. //depot/projects/hammer/share/man/man9/device_get_parent.9#2 integrate
.. //depot/projects/hammer/share/man/man9/device_printf.9#2 integrate
.. //depot/projects/hammer/share/man/man9/device_set_driver.9#2 integrate
.. //depot/projects/hammer/share/man/man9/rman.9#2 integrate
.. //depot/projects/hammer/sys/alpha/include/bus.h#8 integrate
.. //depot/projects/hammer/sys/amd64/include/bus_dma.h#7 integrate
.. //depot/projects/hammer/sys/boot/i386/loader/Makefile#5 integrate
.. //depot/projects/hammer/sys/boot/i386/loader/loader.rc#1 branch
.. //depot/projects/hammer/sys/i386/include/bus_dma.h#6 integrate
.. //depot/projects/hammer/sys/i4b/layer1/itjc/i4b_itjc_pci.c#5 integrate
.. //depot/projects/hammer/sys/ia64/include/bus.h#7 integrate
.. //depot/projects/hammer/sys/sparc64/ebus/ebus.c#4 integrate
.. //depot/projects/hammer/sys/sparc64/include/bus.h#9 integrate
.. //depot/projects/hammer/sys/sparc64/include/ofw_bus.h#3 integrate
.. //depot/projects/hammer/sys/sparc64/isa/isa.c#3 integrate
.. //depot/projects/hammer/sys/sparc64/pci/ofw_pci.c#5 integrate
.. //depot/projects/hammer/sys/sparc64/pci/ofw_pci.h#3 integrate
.. //depot/projects/hammer/sys/sparc64/pci/psycho.c#11 integrate
.. //depot/projects/hammer/sys/sparc64/pci/psychovar.h#5 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/ofw_bus.c#4 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/sparcbus_if.m#2 integrate
.. //depot/projects/hammer/usr.bin/usbhidaction/usbhidaction.1#2 integrate

Differences ...

==== //depot/projects/hammer/lib/libc_r/uthread/uthread_close.c#3 (text+ko) ====

@@ -29,7 +29,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/lib/libc_r/uthread/uthread_close.c,v 1.13 2002/08/29 23:06:06 deischen Exp $
+ * $FreeBSD: src/lib/libc_r/uthread/uthread_close.c,v 1.15 2003/05/31 05:23:20 ru Exp $
  */
 #include <errno.h>
 #include <stdlib.h>
@@ -49,9 +49,11 @@
 	struct stat	sb;
 	struct fd_table_entry	*entry;
 
-	if ((fd == _thread_kern_pipe[0]) || (fd == _thread_kern_pipe[1])) {
+	if ((fd == _thread_kern_pipe[0]) || (fd == _thread_kern_pipe[1]) ||
+	    (_thread_fd_table[fd] == NULL)) {
 		/*
-		 * Don't allow silly programs to close the kernel pipe.
+		 * Don't allow silly programs to close the kernel pipe
+		 * and non-active descriptors.
 		 */
 		errno = EBADF;
 		ret = -1;
@@ -96,6 +98,10 @@
 		_thread_fd_table[fd] = NULL;
 		free(entry);
 
+		/* Drop stale pthread stdio descriptor flags. */
+		if (fd < 3)
+			_pthread_stdio_flags[fd] = -1;
+
 		/* Close the file descriptor: */
 		ret = __sys_close(fd);
 	}

==== //depot/projects/hammer/share/man/man9/CTASSERT.9#2 (text+ko) ====

@@ -24,7 +24,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man9/CTASSERT.9,v 1.1 2003/05/16 15:24:07 hmp Exp $
+.\" $FreeBSD: src/share/man/man9/CTASSERT.9,v 1.2 2003/05/30 21:13:32 ru Exp $
 .\"
 .Dd May 15, 2003
 .Os
@@ -33,19 +33,18 @@
 .Nm CTASSERT
 .Nd compile time assertion macro
 .Sh SYNOPSIS
-.Pp
 .In sys/param.h
 .In sys/systm.h
 .Fn CTASSERT expression
 .Sh DESCRIPTION
 The
-.Nm
+.Fn CTASSERT
 macro evaluates
 .Fa expression
 at compile time and causes a compiler error if it is false.
 .Pp
 The
-.Nm
+.Fn CTASSERT
 macro is useful for asserting the size or alignment of important
 data structures and variables during compilation, which would
 otherwise cause the code to fail at run time.
@@ -53,12 +52,11 @@
 Assert that the size of the
 .Vt uuid
 structure is 16 bytes.
-.Bd -literal -offset indent
-CTASSERT(sizeof(struct uuid) == 16);
-.Ed
+.Pp
+.Dl "CTASSERT(sizeof(struct uuid) == 16);"
 .Sh SEE ALSO
 .Xr KASSERT 9
 .Sh AUTHORS
 This manual page was written by
 .An Hiten M. Pandya
-.Aq hmp@FreeBSD.ORG .
+.Aq hmp@FreeBSD.org .

==== //depot/projects/hammer/share/man/man9/Makefile#12 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/share/man/man9/Makefile,v 1.191 2003/05/21 17:37:22 ru Exp $
+# $FreeBSD: src/share/man/man9/Makefile,v 1.192 2003/05/30 22:57:54 hmp Exp $
 
 MAN=	BUF_LOCK.9 BUF_LOCKFREE.9 BUF_LOCKINIT.9 BUF_REFCNT.9 \
 	BUF_TIMELOCK.9 BUF_UNLOCK.9 BUS_PRINT_CHILD.9 BUS_READ_IVAR.9 \
@@ -22,6 +22,7 @@
 	accept_filter.9 accf_data.9 accf_http.9 acl.9 atomic.9 \
 	bios.9 boot.9 buf.9 bus_activate_resource.9 \
 	bus_alloc_resource.9 bus_child_present.9 bus_generic_attach.9 \
+	bus_dma.9 \
 	bus_generic_detach.9 \
 	bus_generic_print_child.9 bus_generic_read_ivar.9 \
 	bus_generic_shutdown.9 bus_release_resource.9 \
@@ -112,6 +113,17 @@
 MLINKS+=atomic.9 atomic_subtract.9
 MLINKS+=atomic.9 atomic_store.9
 MLINKS+=bus_activate_resource.9 bus_deactivate_resource.9
+MLINKS+=bus_dma.9 bus_dma_tag_create.9
+MLINKS+=bus_dma.9 bus_dma_tag_destroy.9
+MLINKS+=bus_dma.9 bus_dmamap_create.9
+MLINKS+=bus_dma.9 bus_dmamap_destroy.9
+MLINKS+=bus_dma.9 bus_dmamap_load.9
+MLINKS+=bus_dma.9 bus_dmamap_load_mbuf.9
+MLINKS+=bus_dma.9 bus_dmamap_load_uio.9
+MLINKS+=bus_dma.9 bus_dmamap_sync.9
+MLINKS+=bus_dma.9 bus_dmamap_unload.9
+MLINKS+=bus_dma.9 bus_dmamem_alloc.9
+MLINKS+=bus_dma.9 bus_dmamem_free.9
 MLINKS+=byteorder.9 bswap16.9
 MLINKS+=byteorder.9 bswap32.9
 MLINKS+=byteorder.9 bswap64.9

==== //depot/projects/hammer/share/man/man9/bus_activate_resource.9#2 (text+ko) ====

@@ -26,14 +26,14 @@
 .\" (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/share/man/man9/bus_activate_resource.9,v 1.2 2003/03/30 00:30:29 imp Exp $
+.\" $FreeBSD: src/share/man/man9/bus_activate_resource.9,v 1.3 2003/05/30 21:13:32 ru Exp $
 .\"
 .Dd March 28, 2003
 .Dt BUS_ACTIVATE_RESOURCE 9
 .Os
 .Sh NAME
-.Nm bus_activate_resource, bus_deactivate_resources
-.Nd activates or deactivates a resources
+.Nm bus_activate_resource , bus_deactivate_resource
+.Nd activate or deactivate a resource
 .Sh SYNOPSIS
 .In sys/param.h
 .In sys/bus.h
@@ -42,26 +42,29 @@
 .In sys/rman.h
 .In machine/resource.h
 .Ft int
-.Fn bus_activate_resource "device_t dev" "int type" "int rid" "struct resource *r"
+.Fo bus_activate_resource
+.Fa "device_t dev" "int type" "int rid" "struct resource *r"
+.Fc
 .Ft int
-.Fn bus_deactivate_resource "device_t dev" "int type" "int rid" "struct resource *r"
+.Fo bus_deactivate_resource
+.Fa "device_t dev" "int type" "int rid" "struct resource *r"
+.Fc
 .Sh DESCRIPTION
-Activates or deactivates a previously allocated resource.
+These functions activate or deactivate a previously allocated resource.
 In general, resources must be activated before they can be accessed by
 the driver so that the bus driver can map the resource into the
 devices space.
 .Pp
-Its arguments are as follows:
-.Bl -item
-.It
-.Fa dev
-is the device that requests ownership of the resource.
+The arguments are as follows:
+.Bl -tag -width indent
+.It Fa dev
+The device that requests ownership of the resource.
 Before allocation, the resource is owned by the parent bus.
-.It
-.Fa type
-is the type of resource you want to allocate.
+.It Fa type
+The type of resource you want to allocate.
 It is one of:
-.Bl -tag -width SYS_RES_MEMORY
+.Pp
+.Bl -tag -width ".Dv SYS_RES_MEMORY" -compact
 .It Dv SYS_RES_IRQ
 for IRQs
 .It Dv SYS_RES_DRQ
@@ -71,27 +74,20 @@
 .It Dv SYS_RES_MEMORY
 for I/O memory
 .El
-.It
-.Fa rid
-points to a bus specific handle that identifies the resource being allocated.
-.It
-.Fa r
-points to the
-.Ft struct resource
+.It Fa rid
+A pointer to a bus specific handle that identifies the resource being allocated.
+.It Fa r
+A pointer to the
+.Vt "struct resource"
 returned by
 .Xr bus_alloc_resource 9 .
 .El
 .Sh RETURN VALUES
-Zero indicates success.
-Non-zero is an error from errno.h.
-.\".Sh EXAMPLES
-.\".Bd -literal
-.\".Ed
+Zero is returned on success, otherwise an error is returned.
 .Sh SEE ALSO
 .Xr bus_alloc_resource 9 ,
 .Xr device 9 ,
 .Xr driver 9
 .Sh AUTHORS
-.An -nosplit
-This man page was written by
+This manual page was written by
 .An Warner Losh Aq imp@FreeBSD.org .

==== //depot/projects/hammer/share/man/man9/bus_child_present.9#2 (text+ko) ====

@@ -26,14 +26,14 @@
 .\" (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/share/man/man9/bus_child_present.9,v 1.1 2003/03/28 07:09:17 imp Exp $
+.\" $FreeBSD: src/share/man/man9/bus_child_present.9,v 1.2 2003/05/30 21:13:32 ru Exp $
 .\"
 .Dd March 27, 2003
 .Dt BUS_CHILD_PRESENT 9
 .Os
 .Sh NAME
 .Nm bus_child_present
-.Nd Ask the bus driver to see if this device is still really present.
+.Nd "ask the bus driver to see if this device is still really present"
 .Sh SYNOPSIS
 .In sys/param.h
 .In sys/bus.h
@@ -44,18 +44,22 @@
 .Ft int
 .Fn bus_child_present "device_t dev"
 .Sh DESCRIPTION
-Requests that the parent device driver of
+The
+.Fn bus_child_present
+function requests that the parent device driver of
 .Fa dev
 check to see if the
 hardware represented by
-.Fa dev 
+.Fa dev
 is still physically accessible at this time.
 While the notion of accessible varies from bus to bus, generally
-hardware that is not acceessible cannot be accessed via the bus_space
-methods that would otherwise be used to acceess the device.
+hardware that is not acceessible cannot be accessed via the
+.Fn bus_space*
+methods that would otherwise be used to access the device.
 .Pp
-This does not ask the question 'does this device have children?' which
-can better be answered by
+This does not ask the question
+.Dq does this device have children?
+which can better be answered by
 .Xr device_get_children 9 .
 .Sh RETURN VALUES
 A zero return value indicates that the device is not present in the
@@ -64,19 +68,20 @@
 system, or that the state of the device cannot be determined.
 .Sh EXAMPLES
 This is some example code.
-It only calls stop when the dc device is actually present.
-.Bd -literal
-	device_t dev;
-	dc_softc *sc;
+It only calls stop when the
+.Xr dc 4
+device is actually present.
+.Bd -literal -offset indent
+device_t dev;
+dc_softc *sc;
 
-	sc = device_get_softc(dev);
-	if (bus_child_present(dev))
-		dc_stop(sc);
+sc = device_get_softc(dev);
+if (bus_child_present(dev))
+	dc_stop(sc);
 .Ed
 .Sh SEE ALSO
 .Xr device 9 ,
 .Xr driver 9
 .Sh AUTHORS
-.An -nosplit
 This man page was written by
 .An Warner Losh Aq imp@FreeBSD.org .

==== //depot/projects/hammer/share/man/man9/bus_set_resource.9#2 (text+ko) ====

@@ -26,14 +26,14 @@
 .\" (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/share/man/man9/bus_set_resource.9,v 1.1 2003/03/30 00:25:23 imp Exp $
+.\" $FreeBSD: src/share/man/man9/bus_set_resource.9,v 1.2 2003/05/30 21:13:32 ru Exp $
 .\"
 .Dd March 29, 2003
 .Dt BUS_SET_RESOURCE 9
 .Os
 .Sh NAME
 .Nm bus_set_resource
-.Nd Associates a definite resource with a given rid.
+.Nd "associate a definite resource with a given resource ID"
 .Sh SYNOPSIS
 .In sys/param.h
 .In sys/bus.h
@@ -42,23 +42,31 @@
 .In sys/rman.h
 .In machine/resource.h
 .Ft int
-.Fn bus_set_resource "device_t dev" "int type" "int rid" "u_long start" "u_long count"
+.Fo bus_set_resource
+.Fa "device_t dev" "int type" "int rid" "u_long start" "u_long count"
+.Fc
 .Sh DESCRIPTION
-Set the start address of the resource type, rid pair to be count long.
-Typically client drivers do not use this interface.
-Bus drivers, however, often use it to setup the resources a client
-driver users.
+The
+.Fn bus_set_resource
+function
+sets the start address of the resource
+.Fa type , rid
+pair to be
+.Fa count
+long.
+Typically, client drivers do not use this interface.
+Bus drivers, however, often use it to set up the resources a client
+driver uses.
 .Pp
-Its arguments are as follows:
-.Bl -item
-.It
-.Fa dev
-is the device to set the resource on.
-.It
-.Fa type
-is the type of resource you want to allocate.
+The arguments are as follows:
+.Bl -tag -width indent
+.It Fa dev
+The device to set the resource on.
+.It Fa type
+The type of resource you want to allocate.
 It is one of:
-.Bl -tag -width SYS_RES_MEMORY
+.Pp
+.Bl -tag -width ".Dv SYS_RES_MEMORY" -compact
 .It Dv SYS_RES_IRQ
 for IRQs
 .It Dv SYS_RES_DRQ
@@ -68,28 +76,20 @@
 .It Dv SYS_RES_MEMORY
 for I/O memory
 .El
-.It
-.Fa rid
-points to a bus specific handle that identifies the resource being allocated.
-.It
-.Fa start
-is the beginning address of this resource.
-.It
-.Fa count
-is the length of the resource.
+.It Fa rid
+A pointer to a bus specific handle that identifies the resource being allocated.
+.It Fa start
+The start address of this resource.
+.It Fa count
+The length of the resource.
 .El
 .Sh RETURN VALUES
-Zero indicates success.
-Non-zero is an error from errno.h.
-.\".Sh EXAMPLES
-.\".Bd -literal
-.\".Ed
+Zero is returned on success, otherwise an error is returned.
 .Sh SEE ALSO
 .Xr bus_alloc_resource 9 ,
 .Xr bus_get_resource 9 ,
 .Xr device 9 ,
 .Xr driver 9
 .Sh AUTHORS
-.An -nosplit
 This man page was written by
 .An Warner Losh Aq imp@FreeBSD.org .

==== //depot/projects/hammer/share/man/man9/device_get_name.9#2 (text+ko) ====

@@ -26,15 +26,14 @@
 .\" (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/share/man/man9/device_get_name.9,v 1.1 2003/04/22 00:18:55 imp Exp $
+.\" $FreeBSD: src/share/man/man9/device_get_name.9,v 1.2 2003/05/30 21:13:32 ru Exp $
 .\"
 .Dd April 21, 2003
 .Dt DEVICE_GET_NAME 9
 .Os
 .Sh NAME
-.Nm device_get_name
-.Nm device_get_nameunit
-.Nd access the name of a device's device class or instance.
+.Nm device_get_name , device_get_nameunit
+.Nd access the name of a device's device class or instance
 .Sh SYNOPSIS
 .In sys/param.h
 .In sys/bus.h
@@ -43,11 +42,13 @@
 .Ft int
 .Fn device_get_nameunit "device_t dev"
 .Sh DESCRIPTION
+The
 .Fn device_get_name
-Returns the name of the device's device class.
+function returns the name of the device's device class.
 .Pp
+The
 .Fn device_get_nameunit
-Returns the name of the device's instance.
+function returns the name of the device's instance.
 .Sh SEE ALSO
 .Xr device 9
 .Sh AUTHORS

==== //depot/projects/hammer/share/man/man9/device_get_parent.9#2 (text+ko) ====

@@ -26,22 +26,23 @@
 .\" (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/share/man/man9/device_get_parent.9,v 1.1 2003/04/22 00:26:02 imp Exp $
+.\" $FreeBSD: src/share/man/man9/device_get_parent.9,v 1.2 2003/05/30 21:13:32 ru Exp $
 .\"
 .Dd April 21, 2003
 .Dt DEVICE_GET_PARENT 9
 .Os
 .Sh NAME
 .Nm device_get_parent
-.Nd returns the device's parent.
+.Nd return the device's parent
 .Sh SYNOPSIS
 .In sys/param.h
 .In sys/bus.h
 .Ft device_t
 .Fn device_get_parent "device_t dev"
 .Sh DESCRIPTION
+The
 .Fn device_get_parent
-Returns the name of the device's parent device.
+function returns the name of the device's parent device.
 .Sh SEE ALSO
 .Xr device 9
 .Sh AUTHORS

==== //depot/projects/hammer/share/man/man9/device_printf.9#2 (text+ko) ====

@@ -23,7 +23,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man9/device_printf.9,v 1.1 2003/04/22 03:32:31 imp Exp $
+.\" $FreeBSD: src/share/man/man9/device_printf.9,v 1.2 2003/05/30 21:13:32 ru Exp $
 .\"
 .Dd April 21, 2003
 .Dt DEVICE_PRINTF 9
@@ -35,19 +35,19 @@
 .In sys/param.h
 .In sys/bus.h
 .Ft int
-.Fn device_printf "device_t dev" "const char *fmt" "..."
+.Fn device_printf "device_t dev" "const char *fmt" ...
 .Sh DESCRIPTION
 The
-.Xr device_printf 9
+.Fn device_printf
 function is a convenience interface to the
 .Xr printf 9
 function.
 It outputs the name of the
-.Ar dev
+.Fa dev
 device, followed by a colon and a space, and then what
 .Xr printf 9
-woult print if you passed
-.Ar fmt
+would print if you passed
+.Fa fmt
 and the remaining arguments to it.
 .Sh RETURN VALUES
 The

==== //depot/projects/hammer/share/man/man9/device_set_driver.9#2 (text+ko) ====

@@ -26,14 +26,14 @@
 .\" (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/share/man/man9/device_set_driver.9,v 1.1 2003/04/22 03:43:44 imp Exp $
+.\" $FreeBSD: src/share/man/man9/device_set_driver.9,v 1.2 2003/05/30 21:13:32 ru Exp $
 .\"
 .Dd April 21, 2003
 .Dt DEVICE_SET_DRIVER 9
 .Os
 .Sh NAME
 .Nm device_set_driver
-.Nd associate a specific driver with a device node in the tree.
+.Nd "associate a specific driver with a device node in the tree"
 .Sh SYNOPSIS
 .In sys/param.h
 .In sys/bus.h

==== //depot/projects/hammer/share/man/man9/rman.9#2 (text+ko) ====

@@ -23,35 +23,35 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man9/rman.9,v 1.1 2003/05/16 19:22:27 hmp Exp $
+.\" $FreeBSD: src/share/man/man9/rman.9,v 1.2 2003/05/30 21:13:32 ru Exp $
 .\"
 .Dd May 12, 2003
 .Dt RMAN 9
 .Os
 .Sh NAME
 .Nm rman ,
-.Nm rman_activate_resource , 
-.Nm rman_await_resource , 
-.Nm rman_deactivate_resource , 
-.Nm rman_fini , 
-.Nm rman_init , 
-.Nm rman_manage_region , 
-.Nm rman_release_resource , 
-.Nm rman_reserve_resource , 
-.Nm rman_reserve_resource_bound , 
-.Nm rman_make_alignment_flags , 
-.Nm rman_get_start , 
-.Nm rman_get_end , 
-.Nm rman_get_size , 
-.Nm rman_get_flags , 
-.Nm rman_set_virtual , 
-.Nm rman_get_virtual , 
-.Nm rman_set_bustag , 
-.Nm rman_get_bustag , 
-.Nm rman_set_bushandle , 
-.Nm rman_get_bushandle , 
-.Nm rman_set_rid , 
-.Nm rman_get_rid   
+.Nm rman_activate_resource ,
+.Nm rman_await_resource ,
+.Nm rman_deactivate_resource ,
+.Nm rman_fini ,
+.Nm rman_init ,
+.Nm rman_manage_region ,
+.Nm rman_release_resource ,
+.Nm rman_reserve_resource ,
+.Nm rman_reserve_resource_bound ,
+.Nm rman_make_alignment_flags ,
+.Nm rman_get_start ,
+.Nm rman_get_end ,
+.Nm rman_get_size ,
+.Nm rman_get_flags ,
+.Nm rman_set_virtual ,
+.Nm rman_get_virtual ,
+.Nm rman_set_bustag ,
+.Nm rman_get_bustag ,
+.Nm rman_set_bushandle ,
+.Nm rman_get_bushandle ,
+.Nm rman_set_rid ,
+.Nm rman_get_rid
 .Nd resource management functions
 .Sh SYNOPSIS
 .In sys/rman.h
@@ -69,36 +69,42 @@
 .Fn rman_manage_region "struct rman *rm" "u_long start" "u_long end"
 .Ft int
 .Fn rman_release_resource "struct resource *r"
-.Ft struct resource *
-.Fn rman_reserve_resource "struct rman *rm" "u_long start" "u_long end" "u_long count" "u_int flags" "struct device *dev"
-.Ft struct resource *
-.Fn rman_reserve_resource_bound "struct rman *rm" "u_long start" "u_long end" "u_long count" "u_long bound" "u_int flags" "struct device *dev"
+.Ft "struct resource *"
+.Fo rman_reserve_resource
+.Fa "struct rman *rm" "u_long start" "u_long end" "u_long count"
+.Fa "u_int flags" "struct device *dev"
+.Fc
+.Ft "struct resource *"
+.Fo rman_reserve_resource_bound
+.Fa "struct rman *rm" "u_long start" "u_long end" "u_long count"
+.Fa "u_long bound" "u_int flags" "struct device *dev"
+.Fc
 .Ft uint32_t
 .Fn rman_make_alignment_flags "uint32_t size"
-.Ft u_long 
-.Fn rman_get_start "struct resource *_r"
+.Ft u_long
+.Fn rman_get_start "struct resource *r"
 .Ft u_long
-.Fn rman_get_end "struct resource *_r"
+.Fn rman_get_end "struct resource *r"
 .Ft u_long
-.Fn rman_get_size "struct resource *_r"
+.Fn rman_get_size "struct resource *r"
 .Ft u_int
-.Fn rman_get_flags "struct resource *_r"
+.Fn rman_get_flags "struct resource *r"
 .Ft void
-.Fn rman_set_virtual "struct resource *_r" "void *_v"
-.Ft void *
-.Fn rman_get_virtual "struct resource *_r"
+.Fn rman_set_virtual "struct resource *r" "void *v"
+.Ft "void *"
+.Fn rman_get_virtual "struct resource *r"
 .Ft void
-.Fn rman_set_bustag "struct resource *_r" "bus_space_tag_t _t"
+.Fn rman_set_bustag "struct resource *r" "bus_space_tag_t t"
 .Ft bus_space_tag_t
-.Fn rman_get_bustag "struct resource *_r"
+.Fn rman_get_bustag "struct resource *r"
 .Ft void
-.Fn rman_set_bushandle "struct resource *_r" "bus_space_handle_t _h"
+.Fn rman_set_bushandle "struct resource *r" "bus_space_handle_t h"
 .Ft bus_space_handle_t
-.Fn rman_get_bushandle "struct resource *_r"
+.Fn rman_get_bushandle "struct resource *r"
 .Ft void
-.Fn rman_set_rid "struct resource *_r" "int _rid"
-.Ft int 
-.Fn rman_get_rid "struct resource *_r"
+.Fn rman_set_rid "struct resource *r" "int rid"
+.Ft int
+.Fn rman_get_rid "struct resource *r"
 .Sh DESCRIPTION
 The
 .Nm
@@ -137,8 +143,8 @@
 function frees any structures associated with the structure
 pointed to by the
 .Fa rm
-argument. If any of the resources within the managed
-region have the
+argument.
+If any of the resources within the managed region have the
 .Dv RF_ALLOCATED
 flag set, it will return
 .Er EBUSY ;
@@ -153,7 +159,11 @@
 The
 .Fa rman
 argument points to the region descriptor.
-The start and end arguments specify the bounds of the region.
+The
+.Fa start
+and
+.Fa end
+arguments specify the bounds of the region.
 .Pp
 .Em NOTE :
 This interface is not robust against programming errors which
@@ -162,12 +172,17 @@
 The
 .Fn rman_reserve_resource_bound
 function is where the bulk of the
-.Nm logic is located.
+.Nm
+logic is located.
 It attempts to reserve a contiguous range in the specified region
 .Fa rm
 for the use of the device
 .Fa dev .
-The caller can specify the start and end of an acceptable range, as well as
+The caller can specify the
+.Fa start
+and
+.Fa end
+of an acceptable range, as well as
 alignment, and the code will attempt to find a free segment which fits.
 The default behavior is to allocate an exclusive segment, unless the
 .Dv RF_SHAREABLE
@@ -207,7 +222,7 @@
 flag.
 If this is a time shared resource, and the caller has not yet acquired
 the resource, the function returns
-.Er EBUSY.
+.Er EBUSY .
 .Pp
 The
 .Fn rman_deactivate_resource
@@ -238,7 +253,8 @@
 The
 .Fn rman_get_start ,
 .Fn rman_get_end ,
-.Fn rman_get_size , and
+.Fn rman_get_size ,
+and
 .Fn rman_get_flags
 functions return the bounds, size and flags of the previously reserved
 resource
@@ -246,7 +262,8 @@
 .Pp
 The
 .Fn rman_set_bustag
-function associates a bus_space_tag_t
+function associates a
+.Vt bus_space_tag_t
 .Fa t
 with the resource
 .Fa r .
@@ -256,7 +273,8 @@
 .Pp
 The
 .Fn rman_set_bushandle
-function associates a bus_space_handle_t
+function associates a
+.Vt bus_space_handle_t
 .Fa h
 with the resource
 .Fa r .
@@ -276,7 +294,9 @@
 .Fn rman_set_rid
 function associates a resource identifier with a resource
 .Fa r .
-The rman_get_rid function retrieves this RID.
+The
+.Fn rman_get_rid
+function retrieves this RID.
 .Pp
 The
 .Fn rman_get_device

==== //depot/projects/hammer/sys/alpha/include/bus.h#8 (text+ko) ====

@@ -67,7 +67,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-/* $FreeBSD: src/sys/alpha/include/bus.h,v 1.20 2003/05/27 04:59:56 scottl Exp $ */
+/* $FreeBSD: src/sys/alpha/include/bus.h,v 1.21 2003/05/30 20:40:32 hmp Exp $ */
 
 #ifndef _ALPHA_BUS_H_
 #define _ALPHA_BUS_H_
@@ -469,7 +469,7 @@
 #define	BUS_DMA_WAITOK		0x00	/* safe to sleep (pseudo-flag) */
 #define	BUS_DMA_NOWAIT		0x01	/* not safe to sleep */
 #define	BUS_DMA_ALLOCNOW	0x02	/* perform resource allocation now */
-#define	BUS_DMAMEM_NOSYNC	0x04	/* map memory to not require sync */
+#define	BUS_DMA_COHERENT	0x04	/* hint: map memory in a coherent way */
 #define	BUS_DMA_ISA		0x10	/* map memory for ISA dma */
 #define	BUS_DMA_BUS2		0x20	/* placeholders for bus functions... */
 #define	BUS_DMA_BUS3		0x40

==== //depot/projects/hammer/sys/amd64/include/bus_dma.h#7 (text+ko) ====

@@ -67,7 +67,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-/* $FreeBSD: src/sys/amd64/include/bus_dma.h,v 1.21 2003/05/27 04:59:56 scottl Exp $ */
+/* $FreeBSD: src/sys/amd64/include/bus_dma.h,v 1.22 2003/05/30 20:40:33 hmp Exp $ */
 
 #ifndef _AMD64_BUS_DMA_H_
 #define _AMD64_BUS_DMA_H_
@@ -78,7 +78,7 @@
 #define	BUS_DMA_WAITOK		0x00	/* safe to sleep (pseudo-flag) */
 #define	BUS_DMA_NOWAIT		0x01	/* not safe to sleep */
 #define	BUS_DMA_ALLOCNOW	0x02	/* perform resource allocation now */
-#define	BUS_DMAMEM_NOSYNC	0x04	/* map memory to not require sync */
+#define	BUS_DMA_COHERENT	0x04	/* hint map memory in a coherent way */
 #define	BUS_DMA_BUS1		0x10	/* placeholders for bus functions... */
 #define	BUS_DMA_BUS2		0x20
 #define	BUS_DMA_BUS3		0x40

==== //depot/projects/hammer/sys/boot/i386/loader/Makefile#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/i386/loader/Makefile,v 1.64 2003/05/30 09:29:24 scottl Exp $
+# $FreeBSD: src/sys/boot/i386/loader/Makefile,v 1.65 2003/05/31 05:25:17 scottl Exp $
 
 PROG=		loader
 STRIP=
@@ -106,7 +106,7 @@
 FILESDIR_loader.conf=	/boot/defaults
 
 .if !exists(${DESTDIR}/boot/loader.rc)
-FILES+=	loader.rc
+FILES+=	${.CURDIR}/loader.rc
 .endif
 
 .include <${.CURDIR}/../Makefile.inc>

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

@@ -67,7 +67,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-/* $FreeBSD: src/sys/i386/include/bus_dma.h,v 1.20 2003/05/27 04:59:58 scottl Exp $ */
+/* $FreeBSD: src/sys/i386/include/bus_dma.h,v 1.21 2003/05/30 20:40:33 hmp Exp $ */
 
 #ifndef _I386_BUS_DMA_H_
 #define _I386_BUS_DMA_H_
@@ -78,7 +78,7 @@
 #define	BUS_DMA_WAITOK		0x00	/* safe to sleep (pseudo-flag) */
 #define	BUS_DMA_NOWAIT		0x01	/* not safe to sleep */
 #define	BUS_DMA_ALLOCNOW	0x02	/* perform resource allocation now */
-#define	BUS_DMAMEM_NOSYNC	0x04	/* map memory to not require sync */
+#define	BUS_DMA_COHERENT	0x04	/* hint: map memory in a coherent way */
 #define	BUS_DMA_BUS1		0x10	/* placeholders for bus functions... */
 #define	BUS_DMA_BUS2		0x20
 #define	BUS_DMA_BUS3		0x40

==== //depot/projects/hammer/sys/i4b/layer1/itjc/i4b_itjc_pci.c#5 (text+ko) ====

@@ -33,7 +33,7 @@
  *	i4b_itjc_pci.c: NetJet-S hardware driver
  *	----------------------------------------
  *
- * $FreeBSD: src/sys/i4b/layer1/itjc/i4b_itjc_pci.c,v 1.6 2002/10/15 20:32:45 phk Exp $
+ * $FreeBSD: src/sys/i4b/layer1/itjc/i4b_itjc_pci.c,v 1.7 2003/05/30 20:40:33 hmp Exp $
  *
  *      last edit-date: [Thu Jan 11 11:29:38 2001]
  *
@@ -1607,7 +1607,7 @@
 		ITJC_DMA_POOL_BYTES,			/* maxsize*/
 		1,					/* nsegments*/
 		ITJC_DMA_POOL_BYTES,			/* maxsegsz*/
-		BUS_DMA_ALLOCNOW | BUS_DMAMEM_NOSYNC,	/* flags*/
+		BUS_DMA_ALLOCNOW | BUS_DMA_COHERENT,	/* flags*/
 		&ctx->tag);
 
 	if (error)
@@ -1621,7 +1621,7 @@
         error = bus_dmamem_alloc(
 		ctx->tag, 				/* DMA tag */
 		(void **)&ctx->pool,	/* KV addr of the allocated memory */
-		BUS_DMA_NOWAIT | BUS_DMAMEM_NOSYNC,	/* flags */
+		BUS_DMA_NOWAIT | BUS_DMA_COHERENT,	/* flags */
 		&ctx->map);				/* KV <-> PCI map */
 
 	if (error)

==== //depot/projects/hammer/sys/ia64/include/bus.h#7 (text+ko) ====

@@ -67,7 +67,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-/* $FreeBSD: src/sys/ia64/include/bus.h,v 1.11 2003/05/27 04:59:58 scottl Exp $ */
+/* $FreeBSD: src/sys/ia64/include/bus.h,v 1.12 2003/05/30 20:40:33 hmp Exp $ */
 
 #ifndef _MACHINE_BUS_H_
 #define _MACHINE_BUS_H_
@@ -851,7 +851,7 @@
 #define	BUS_DMA_WAITOK		0x00	/* safe to sleep (pseudo-flag) */
 #define	BUS_DMA_NOWAIT		0x01	/* not safe to sleep */
 #define	BUS_DMA_ALLOCNOW	0x02	/* perform resource allocation now */
-#define	BUS_DMAMEM_NOSYNC	0x04	/* map memory to not require sync */
+#define	BUS_DMA_COHERENT	0x04	/* hint: map memory in a coherent way */
 #define	BUS_DMA_ISA		0x10	/* map memory for ISA dma */
 #define	BUS_DMA_BUS2		0x20	/* placeholders for bus functions... */
 #define	BUS_DMA_BUS3		0x40

==== //depot/projects/hammer/sys/sparc64/ebus/ebus.c#4 (text+ko) ====

@@ -28,7 +28,7 @@
  *
  *	from: NetBSD: ebus.c,v 1.26 2001/09/10 16:27:53 eeh Exp
  *
- * $FreeBSD: src/sys/sparc64/ebus/ebus.c,v 1.7 2003/02/19 05:47:44 imp Exp $
+ * $FreeBSD: src/sys/sparc64/ebus/ebus.c,v 1.8 2003/05/30 20:48:04 tmm Exp $
  */
 
 #include "opt_ebus.h"
@@ -112,7 +112,7 @@
     u_long, u_long, u_long, u_int);
 static struct resource_list *ebus_get_resource_list(device_t, device_t);
 
-static struct ebus_devinfo *ebus_setup_dinfo(struct ebus_softc *,
+static struct ebus_devinfo *ebus_setup_dinfo(device_t, struct ebus_softc *,
     phandle_t, char *);
 static void ebus_destroy_dinfo(struct ebus_devinfo *);
 static int ebus_print_res(struct ebus_devinfo *);
@@ -200,7 +200,7 @@
 		if ((OF_getprop_alloc(node, "name", 1, (void **)&cname)) == -1)
 			continue;
 
-		if ((edi = ebus_setup_dinfo(sc, node, cname)) == NULL) {
+		if ((edi = ebus_setup_dinfo(dev, sc, node, cname)) == NULL) {
 			device_printf(dev, "<%s>: incomplete\n", cname);
 			free(cname, M_OFWPROP);
 			continue;
@@ -363,7 +363,8 @@
 }
 
 static struct ebus_devinfo *
-ebus_setup_dinfo(struct ebus_softc *sc, phandle_t node, char *name)
+ebus_setup_dinfo(device_t dev, struct ebus_softc *sc, phandle_t node,
+    char *name)
 {
 	struct ebus_devinfo *edi;
 	struct isa_regs *reg;
@@ -398,7 +399,8 @@
 	nintr = OF_getprop_alloc(node, "interrupts",  sizeof(*intrs),
 	    (void **)&intrs);
 	for (i = 0; i < nintr; i++) {
-		intr = ofw_bus_route_intr(node, intrs[i], ofw_pci_orb_callback);
+		intr = ofw_bus_route_intr(node, intrs[i], ofw_pci_orb_callback,
+		    dev);
 		if (intr == ORIR_NOTFOUND) {
 			panic("ebus_setup_dinfo: could not map ebus "
 			    "interrupt %d", intrs[i]);

==== //depot/projects/hammer/sys/sparc64/include/bus.h#9 (text+ko) ====

@@ -69,7 +69,7 @@
  *	and
  *	from: FreeBSD: src/sys/alpha/include/bus.h,v 1.9 2001/01/09
  *
- * $FreeBSD: src/sys/sparc64/include/bus.h,v 1.25 2003/05/27 04:59:59 scottl Exp $
+ * $FreeBSD: src/sys/sparc64/include/bus.h,v 1.26 2003/05/30 20:40:33 hmp Exp $
  */
 
 #ifndef	_MACHINE_BUS_H_
@@ -881,7 +881,7 @@
 #define	BUS_DMA_WAITOK		0x000	/* safe to sleep (pseudo-flag) */
 #define	BUS_DMA_NOWAIT		0x001	/* not safe to sleep */
 #define	BUS_DMA_ALLOCNOW	0x002	/* perform resource allocation now */
-#define	BUS_DMAMEM_NOSYNC	0x004	/* map memory to not require sync */
+#define	BUS_DMA_COHERENT	0x004	/* hint: map memory in a coherent way */
 #define	BUS_DMA_NOWRITE		0x008
 #define	BUS_DMA_BUS1		0x010
 #define	BUS_DMA_BUS2		0x020
@@ -895,7 +895,6 @@
 #define	BUS_DMA_STREAMING	0x100	/* hint: sequential, unidirectional */
 #define	BUS_DMA_READ		0x200	/* mapping is device -> memory only */
 #define	BUS_DMA_WRITE		0x400	/* mapping is memory -> device only */
-#define	BUS_DMA_COHERENT	0x800	/* hint: map memory DMA coherent */
 
 #define	BUS_DMA_NOCACHE		BUS_DMA_BUS1
 /* Don't bother with alignment */

==== //depot/projects/hammer/sys/sparc64/include/ofw_bus.h#3 (text+ko) ====

@@ -22,7 +22,7 @@
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/sparc64/include/ofw_bus.h,v 1.3 2002/11/07 16:07:46 tmm Exp $

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



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