Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Apr 2003 09:14:53 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 29695 for review
Message-ID:  <200304251614.h3PGErVE007238@repoman.freebsd.org>

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

Change 29695 by jhb@jhb_laptop on 2003/04/25 09:14:36

	IFC @29694.

Affected files ...

.. //depot/projects/smpng/sys/alpha/alpha/machdep.c#55 integrate
.. //depot/projects/smpng/sys/alpha/include/_limits.h#2 integrate
.. //depot/projects/smpng/sys/arm/include/_limits.h#2 integrate
.. //depot/projects/smpng/sys/compat/linux/linux_ioctl.c#26 integrate
.. //depot/projects/smpng/sys/compat/linux/linux_ioctl.h#7 integrate
.. //depot/projects/smpng/sys/conf/options#53 integrate
.. //depot/projects/smpng/sys/dev/drm/drmP.h#3 integrate
.. //depot/projects/smpng/sys/dev/drm/drm_bufs.h#3 integrate
.. //depot/projects/smpng/sys/dev/drm/drm_context.h#3 integrate
.. //depot/projects/smpng/sys/dev/drm/drm_dma.h#4 integrate
.. //depot/projects/smpng/sys/dev/drm/drm_drv.h#9 integrate
.. //depot/projects/smpng/sys/dev/drm/drm_fops.h#5 integrate
.. //depot/projects/smpng/sys/dev/drm/drm_init.h#3 delete
.. //depot/projects/smpng/sys/dev/drm/drm_ioctl.h#3 integrate
.. //depot/projects/smpng/sys/dev/drm/drm_lists.h#3 delete
.. //depot/projects/smpng/sys/dev/drm/drm_lock.h#3 integrate
.. //depot/projects/smpng/sys/dev/drm/drm_memory.h#5 integrate
.. //depot/projects/smpng/sys/dev/drm/drm_os_freebsd.h#7 integrate
.. //depot/projects/smpng/sys/dev/drm/drm_sysctl.h#3 integrate
.. //depot/projects/smpng/sys/dev/drm/drm_vm.h#5 integrate
.. //depot/projects/smpng/sys/dev/drm/mga_dma.c#4 integrate
.. //depot/projects/smpng/sys/dev/drm/mga_drv.c#3 integrate
.. //depot/projects/smpng/sys/dev/drm/mga_drv.h#4 integrate
.. //depot/projects/smpng/sys/dev/drm/mga_state.c#4 integrate
.. //depot/projects/smpng/sys/dev/drm/r128_cce.c#4 integrate
.. //depot/projects/smpng/sys/dev/drm/r128_drv.c#3 integrate
.. //depot/projects/smpng/sys/dev/drm/r128_drv.h#4 integrate
.. //depot/projects/smpng/sys/dev/drm/r128_state.c#4 integrate
.. //depot/projects/smpng/sys/dev/drm/radeon.h#3 integrate
.. //depot/projects/smpng/sys/dev/drm/radeon_cp.c#4 integrate
.. //depot/projects/smpng/sys/dev/drm/radeon_drm.h#3 integrate
.. //depot/projects/smpng/sys/dev/drm/radeon_drv.c#3 integrate
.. //depot/projects/smpng/sys/dev/drm/radeon_drv.h#4 integrate
.. //depot/projects/smpng/sys/dev/drm/radeon_irq.c#2 integrate
.. //depot/projects/smpng/sys/dev/drm/radeon_mem.c#2 integrate
.. //depot/projects/smpng/sys/dev/drm/radeon_state.c#4 integrate
.. //depot/projects/smpng/sys/dev/drm/tdfx_drv.c#3 integrate
.. //depot/projects/smpng/sys/dev/firewire/firewire.c#14 integrate
.. //depot/projects/smpng/sys/dev/firewire/fwohci.c#15 integrate
.. //depot/projects/smpng/sys/dev/firewire/fwohci_pci.c#11 integrate
.. //depot/projects/smpng/sys/dev/firewire/fwohcireg.h#6 integrate
.. //depot/projects/smpng/sys/dev/firewire/sbp.c#14 integrate
.. //depot/projects/smpng/sys/dev/fxp/if_fxp.c#33 integrate
.. //depot/projects/smpng/sys/dev/fxp/if_fxpvar.h#9 integrate
.. //depot/projects/smpng/sys/dev/iir/iir.c#6 integrate
.. //depot/projects/smpng/sys/dev/iir/iir.h#4 integrate
.. //depot/projects/smpng/sys/dev/iir/iir_ctrl.c#6 integrate
.. //depot/projects/smpng/sys/dev/iir/iir_pci.c#6 integrate
.. //depot/projects/smpng/sys/dev/pccard/pccardvar.h#13 integrate
.. //depot/projects/smpng/sys/dev/sr/if_sr.c#9 integrate
.. //depot/projects/smpng/sys/dev/sr/if_sr_isa.c#3 integrate
.. //depot/projects/smpng/sys/dev/sr/if_sr_pci.c#3 integrate
.. //depot/projects/smpng/sys/dev/sr/if_srregs.h#3 integrate
.. //depot/projects/smpng/sys/fs/msdosfs/msdosfs_vfsops.c#17 integrate
.. //depot/projects/smpng/sys/geom/geom.h#26 integrate
.. //depot/projects/smpng/sys/geom/geom_bsd.c#28 integrate
.. //depot/projects/smpng/sys/geom/geom_disk.c#23 integrate
.. //depot/projects/smpng/sys/geom/geom_dump.c#18 integrate
.. //depot/projects/smpng/sys/geom/geom_event.c#16 integrate
.. //depot/projects/smpng/sys/geom/geom_int.h#11 integrate
.. //depot/projects/smpng/sys/geom/geom_kern.c#14 integrate
.. //depot/projects/smpng/sys/geom/geom_mbr.c#19 integrate
.. //depot/projects/smpng/sys/geom/geom_pc98.c#17 integrate
.. //depot/projects/smpng/sys/geom/geom_slice.c#20 integrate
.. //depot/projects/smpng/sys/geom/geom_slice.h#12 integrate
.. //depot/projects/smpng/sys/geom/geom_subr.c#25 integrate
.. //depot/projects/smpng/sys/geom/geom_sunlabel.c#20 integrate
.. //depot/projects/smpng/sys/i386/conf/NOTES#56 integrate
.. //depot/projects/smpng/sys/i386/i386/machdep.c#58 integrate
.. //depot/projects/smpng/sys/i386/i386/pmap.c#36 integrate
.. //depot/projects/smpng/sys/i386/i386/trap.c#54 integrate
.. //depot/projects/smpng/sys/i386/include/_limits.h#2 integrate
.. //depot/projects/smpng/sys/ia64/ia32/ia32_proto.h#7 integrate
.. //depot/projects/smpng/sys/ia64/ia32/ia32_syscall.h#7 integrate
.. //depot/projects/smpng/sys/ia64/ia32/ia32_sysent.c#7 integrate
.. //depot/projects/smpng/sys/ia64/ia32/syscalls.master#10 integrate
.. //depot/projects/smpng/sys/ia64/ia64/machdep.c#52 integrate
.. //depot/projects/smpng/sys/ia64/include/_limits.h#2 integrate
.. //depot/projects/smpng/sys/kern/kern_context.c#4 integrate
.. //depot/projects/smpng/sys/kern/kern_mac.c#23 integrate
.. //depot/projects/smpng/sys/kern/kern_proc.c#50 integrate
.. //depot/projects/smpng/sys/kern/kern_sig.c#62 integrate
.. //depot/projects/smpng/sys/kern/kern_thread.c#30 integrate
.. //depot/projects/smpng/sys/kern/vfs_mount.c#13 integrate
.. //depot/projects/smpng/sys/kern/vfs_subr.c#49 integrate
.. //depot/projects/smpng/sys/kern/vfs_syscalls.c#54 integrate
.. //depot/projects/smpng/sys/net/if_ethersubr.c#31 integrate
.. //depot/projects/smpng/sys/nfsclient/nfs_vfsops.c#21 integrate
.. //depot/projects/smpng/sys/nfsclient/nfs_vnops.c#28 integrate
.. //depot/projects/smpng/sys/nfsserver/nfs_serv.c#27 integrate
.. //depot/projects/smpng/sys/pc98/conf/NOTES#5 integrate
.. //depot/projects/smpng/sys/pc98/i386/machdep.c#52 integrate
.. //depot/projects/smpng/sys/pccard/cardinfo.h#6 integrate
.. //depot/projects/smpng/sys/pccard/pccard.c#19 integrate
.. //depot/projects/smpng/sys/pccard/pccard_nbk.c#10 integrate
.. //depot/projects/smpng/sys/pccard/slot.h#7 integrate
.. //depot/projects/smpng/sys/powerpc/include/_limits.h#2 integrate
.. //depot/projects/smpng/sys/powerpc/powerpc/machdep.c#36 integrate
.. //depot/projects/smpng/sys/sparc64/include/_limits.h#2 integrate
.. //depot/projects/smpng/sys/sparc64/sparc64/machdep.c#48 integrate
.. //depot/projects/smpng/sys/sys/limits.h#1 branch
.. //depot/projects/smpng/sys/sys/proc.h#84 integrate
.. //depot/projects/smpng/sys/sys/ucontext.h#7 integrate
.. //depot/projects/smpng/sys/vm/swap_pager.h#8 integrate
.. //depot/projects/smpng/sys/vm/vm_contig.c#13 integrate
.. //depot/projects/smpng/sys/vm/vm_map.c#34 integrate
.. //depot/projects/smpng/sys/vm/vm_object.c#31 integrate
.. //depot/projects/smpng/sys/vm/vm_page.c#36 integrate
.. //depot/projects/smpng/sys/vm/vm_pageout.c#28 integrate
.. //depot/projects/smpng/sys/vm/vm_pageout.h#8 integrate
.. //depot/projects/smpng/sys/x86_64/include/_limits.h#2 integrate

Differences ...

==== //depot/projects/smpng/sys/alpha/alpha/machdep.c#55 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.200 2003/04/18 20:09:03 jhb Exp $
+ * $FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.201 2003/04/25 01:50:28 deischen Exp $
  */
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -1977,13 +1977,17 @@
 }
 
 int
-get_mcontext(struct thread *td, mcontext_t *mcp)
+get_mcontext(struct thread *td, mcontext_t *mcp, int clear_ret)
 {
 	/*
 	 * Use a trapframe for getsetcontext, so just copy the
 	 * threads trapframe.
 	 */
-	bcopy(&td->td_frame, &mcp->mc_regs, sizeof(td->td_frame));
+	bcopy(td->td_frame, &mcp->mc_regs, sizeof(struct trapframe));
+	if (clear_ret != 0) {
+		mcp->mc_regs[FRAME_V0] = 0;
+		mcp->mc_regs[FRAME_A4] = 0;
+	}
 
 	/*
 	 * When the thread is the current thread, the user stack pointer
@@ -2029,7 +2033,7 @@
 		 * The context is a trapframe, so just copy it over the
 		 * threads frame.
 		 */
-		bcopy(&mcp->mc_regs, &td->td_frame, sizeof(td->td_frame));
+		bcopy(&mcp->mc_regs, td->td_frame, sizeof(struct trapframe));
 	}
 	return (0);
 }

==== //depot/projects/smpng/sys/alpha/include/_limits.h#2 (text+ko) ====

@@ -32,76 +32,61 @@
  *
  *	@(#)limits.h	8.3 (Berkeley) 1/4/94
  *	From: NetBSD: limits.h,v 1.3 1997/04/06 08:47:31 cgd Exp
- * $FreeBSD: src/sys/alpha/include/_limits.h,v 1.10 2002/12/22 06:38:44 tjr Exp $
+ * $FreeBSD: src/sys/alpha/include/_limits.h,v 1.11 2003/04/23 21:41:58 kan Exp $
  */
 
-#ifndef	_MACHINE_LIMITS_H_
-#define	_MACHINE_LIMITS_H_
+#ifndef	_MACHINE__LIMITS_H_
+#define	_MACHINE__LIMITS_H_
 
-#define	CHAR_BIT	8		/* number of bits in a char */
+#define	__CHAR_BIT	8		/* number of bits in a char */
 
-/*
- * According to ANSI (section 2.2.4.2), the values below must be usable by
- * #if preprocessing directives.  Additionally, the expression must have the
- * same type as would an expression that is an object of the corresponding
- * type converted according to the integral promotions.  The subtraction for
- * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
- * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
- * These numbers are for the default configuration of gcc.  They work for
- * some other compilers as well, but this should not be depended on.
- */
-#define	SCHAR_MAX	0x7f		/* max value for a signed char */
-#define	SCHAR_MIN	(-0x7f-1)	/* min value for a signed char */
+#define	__SCHAR_MAX	0x7f		/* max value for a signed char */
+#define	__SCHAR_MIN	(-0x7f-1)	/* min value for a signed char */
 
-#define	UCHAR_MAX	0xffU		/* max value for an unsigned char */
-#define	CHAR_MAX	0x7f		/* max value for a char */
-#define	CHAR_MIN	(-0x7f-1)	/* min value for a char */
+#define	__UCHAR_MAX	0xffU		/* max value for an unsigned char */
+#define	__CHAR_MAX	0x7f		/* max value for a char */
+#define	__CHAR_MIN	(-0x7f-1)	/* min value for a char */
 
-#define	USHRT_MAX	0xffffU		/* max value for an unsigned short */
-#define	SHRT_MAX	0x7fff		/* max value for a short */
-#define	SHRT_MIN	(-0x7fff-1)	/* min value for a short */
+#define	__USHRT_MAX	0xffffU		/* max value for an unsigned short */
+#define	__SHRT_MAX	0x7fff		/* max value for a short */
+#define	__SHRT_MIN	(-0x7fff-1)	/* min value for a short */
 
-#define	UINT_MAX	0xffffffffU	/* max value for an unsigned int */
-#define	INT_MAX		0x7fffffff	/* max value for an int */
-#define	INT_MIN		(-0x7fffffff-1)	/* min value for an int */
+#define	__UINT_MAX	0xffffffffU	/* max value for an unsigned int */
+#define	__INT_MAX	0x7fffffff	/* max value for an int */
+#define	__INT_MIN	(-0x7fffffff-1)	/* min value for an int */
 
-#define	ULONG_MAX	0xffffffffffffffffUL	/* max for an unsigned long */
-#define	LONG_MAX	0x7fffffffffffffffL	/* max for a long */
-#define	LONG_MIN	(-0x7fffffffffffffffL-1) /* min for a long */
+#define	__ULONG_MAX	0xffffffffffffffffUL	/* max for an unsigned long */
+#define	__LONG_MAX	0x7fffffffffffffffL	/* max for a long */
+#define	__LONG_MIN	(-0x7fffffffffffffffL-1) /* min for a long */
 
 /* Long longs and longs are the same size on the alpha. */
 					/* max for an unsigned long long */
-#define	ULLONG_MAX	0xffffffffffffffffULL
-#define	LLONG_MAX	0x7fffffffffffffffLL	/* max for a long long */
-#define	LLONG_MIN	(-0x7fffffffffffffffLL-1) /* min for a long long */
+#define	__ULLONG_MAX	0xffffffffffffffffULL
+#define	__LLONG_MAX	0x7fffffffffffffffLL	/* max for a long long */
+#define	__LLONG_MIN	(-0x7fffffffffffffffLL-1) /* min for a long long */
 
-#if !defined(_ANSI_SOURCE)
-#define	SSIZE_MAX	LONG_MAX	/* max value for a ssize_t */
+#define	__SSIZE_MAX	__LONG_MAX	/* max value for a ssize_t */
 
-#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
-#define	SIZE_T_MAX	ULONG_MAX	/* max value for a size_t */
+#define	__SIZE_T_MAX	__ULONG_MAX	/* max value for a size_t */
 
-#define	OFF_MAX		LONG_MAX	/* max value for a off_t */
-#define	OFF_MIN		LONG_MIN	/* min value for a off_t */
+#define	__OFF_MAX	__LONG_MAX	/* max value for a off_t */
+#define	__OFF_MIN	__LONG_MIN	/* min value for a off_t */
 
 /* Quads and longs are the same on the alpha.  Ensure they stay in sync. */
-#define	UQUAD_MAX	(ULONG_MAX)	/* max value for a uquad_t */
-#define	QUAD_MAX	(LONG_MAX)	/* max value for a quad_t */
-#define	QUAD_MIN	(LONG_MIN)	/* min value for a quad_t */
-#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
-#endif /* !_ANSI_SOURCE */
+#define	__UQUAD_MAX	(__ULONG_MAX)	/* max value for a uquad_t */
+#define	__QUAD_MAX	(__LONG_MAX)	/* max value for a quad_t */
+#define	__QUAD_MIN	(__LONG_MIN)	/* min value for a quad_t */
 
-#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE)
-#define	LONG_BIT	64
-#define	WORD_BIT	32
+#define	__LONG_BIT	64
+#define	__WORD_BIT	32
 
-#define	DBL_DIG		15
-#define	DBL_MAX		1.7976931348623157E+308
-#define	DBL_MIN		2.2250738585072014E-308
+#define	__DBL_DIG	15
+#define	__DBL_MAX	1.7976931348623157E+308
+#define	__DBL_MIN	2.2250738585072014E-308
 
-#define	FLT_DIG		6
-#define	FLT_MAX		3.40282347E+38F
-#define	FLT_MIN		1.17549435E-38F
+#define	__FLT_DIG	6
+#define	__FLT_MAX	3.40282347E+38F
+#define	__FLT_MIN	1.17549435E-38F
 #endif
 
-#endif /* !_MACHINE_LIMITS_H_ */
+#endif /* !_MACHINE__LIMITS_H_ */

==== //depot/projects/smpng/sys/arm/include/_limits.h#2 (text+ko) ====

@@ -31,75 +31,68 @@
  * SUCH DAMAGE.
  *
  *	@(#)limits.h	8.3 (Berkeley) 1/4/94
- * $FreeBSD: src/sys/arm/include/_limits.h,v 1.3 2002/12/22 06:38:44 tjr Exp $
+ * $FreeBSD: src/sys/arm/include/_limits.h,v 1.4 2003/04/23 21:41:58 kan Exp $
  */
 
-#ifndef _MACHINE_LIMITS_H_
-#define	_MACHINE_LIMITS_H_
+#ifndef _MACHINE__LIMITS_H_
+#define	_MACHINE__LIMITS_H_
 
-#define	CHAR_BIT	8		/* number of bits in a char */
+#define	__CHAR_BIT	8		/* number of bits in a char */
 
-/*
- * According to ANSI (section 2.2.4.2), the values below must be usable by
- * #if preprocessing directives.  Additionally, the expression must have the
- * same type as would an expression that is an object of the corresponding
- * type converted according to the integral promotions.  The subtraction for
- * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
- * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
- * These numbers are for the default configuration of gcc.  They work for
- * some other compilers as well, but this should not be depended on.
- */
-#define	SCHAR_MAX	0x7f		/* max value for a signed char */
-#define	SCHAR_MIN	(-0x7f - 1)	/* min value for a signed char */
+#define	__SCHAR_MAX	0x7f		/* max value for a signed char */
+#define	__SCHAR_MIN	(-0x7f - 1)	/* min value for a signed char */
 
-#define	UCHAR_MAX	0xff		/* max value for an unsigned char */
+#define	__UCHAR_MAX	0xff		/* max value for an unsigned char */
 
-#ifdef __CHAR_UNSIGNED__
-#define	CHAR_MAX	UCHAR_MAX	/* max value for a char */
-#define	CHAR_MIN	0		/* min value for a char */
-#else
-#define	CHAR_MAX	SCHAR_MAX	/* max value for a char */
-#define	CHAR_MIN	SCHAR_MIN	/* min value for a char */
-#endif
+#define	__USHRT_MAX	0xffff		/* max value for an unsigned short */
+#define	__SHRT_MAX	0x7fff		/* max value for a short */
+#define	__SHRT_MIN	(-0x7fff - 1)	/* min value for a short */
 
-#define	USHRT_MAX	0xffff		/* max value for an unsigned short */
-#define	SHRT_MAX	0x7fff		/* max value for a short */
-#define	SHRT_MIN	(-0x7fff - 1)	/* min value for a short */
-
-#define	UINT_MAX	0xffffffffU	/* max value for an unsigned int */
-#define	INT_MAX		0x7fffffff	/* max value for an int */
-#define	INT_MIN		(-0x7fffffff - 1)	/* min value for an int */
+#define	__UINT_MAX	0xffffffffU	/* max value for an unsigned int */
+#define	__INT_MAX	0x7fffffff	/* max value for an int */
+#define	__INT_MIN	(-0x7fffffff - 1)	/* min value for an int */
 
 /* Bad hack for gcc configured to give 64-bit longs. */
 #ifdef _LARGE_LONG
-#define	ULONG_MAX	0xffffffffffffffffUL
-#define	LONG_MAX	0x7fffffffffffffffL
-#define	LONG_MIN	(-0x7fffffffffffffffL - 1)
+#define	__ULONG_MAX	0xffffffffffffffffUL
+#define	__LONG_MAX	0x7fffffffffffffffL
+#define	__LONG_MIN	(-0x7fffffffffffffffL - 1)
 #else
-#define	ULONG_MAX	0xffffffffUL	/* max value for an unsigned long */
-#define	LONG_MAX	0x7fffffffL	/* max value for a long */
-#define	LONG_MIN	(-0x7fffffffL - 1)	/* min value for a long */
+#define	__ULONG_MAX	0xffffffffUL	/* max value for an unsigned long */
+#define	__LONG_MAX	0x7fffffffL	/* max value for a long */
+#define	__LONG_MIN	(-0x7fffffffL - 1)	/* min value for a long */
 #endif
 
 			/* max value for an unsigned long long */
-#define	ULLONG_MAX	0xffffffffffffffffULL
-#define	LLONG_MAX	0x7fffffffffffffffLL	/* max value for a long long */
-#define	LLONG_MIN	(-0x7fffffffffffffffLL - 1)  /* min for a long long */
+#define	__ULLONG_MAX	0xffffffffffffffffULL
+#define	__LLONG_MAX	0x7fffffffffffffffLL	/* max value for a long long */
+#define	__LLONG_MIN	(-0x7fffffffffffffffLL - 1)  /* min for a long long */
 
-#if !defined(_ANSI_SOURCE)
-#define	SSIZE_MAX	INT_MAX		/* max value for a ssize_t */
+#define	__SSIZE_MAX	__INT_MAX	/* max value for a ssize_t */
 
-#if !defined(_POSIX_SOURCE)
-#define	SIZE_T_MAX	UINT_MAX	/* max value for a size_t */
+#define	__SIZE_T_MAX	__UINT_MAX	/* max value for a size_t */
 
-#define	OFF_MAX		LLONG_MAX	/* max value for a off_t */
-#define	OFF_MIN		LLONG_MIN	/* min value for a off_t */
+#define	__OFF_MAX	__LLONG_MAX	/* max value for a off_t */
+#define	__OFF_MIN	__LLONG_MIN	/* min value for a off_t */
 
 /* Quads and long longs are the same size.  Ensure they stay in sync. */
-#define	UQUAD_MAX	ULLONG_MAX	/* max value for a uquad_t */
-#define	QUAD_MAX	LLONG_MAX	/* max value for a quad_t */
-#define	QUAD_MIN	LLONG_MIN	/* min value for a quad_t */
-#endif /* !_POSIX_SOURCE */
-#endif /* !_ANSI_SOURCE */
+#define	__UQUAD_MAX	__ULLONG_MAX	/* max value for a uquad_t */
+#define	__QUAD_MAX	__LLONG_MAX	/* max value for a quad_t */
+#define	__QUAD_MIN	__LLONG_MIN	/* min value for a quad_t */
+
+#ifdef _LARGE_LONG
+#define	__LONG_BIT	64
+#else
+#define	__LONG_BIT	32
+#endif
+#define	__WORD_BIT	32
+
+#define	__DBL_DIG	15
+#define	__DBL_MAX	1.7976931348623157E+308
+#define	__DBL_MIN	2.2250738585072014E-308
+
+#define	__FLT_DIG	6
+#define	__FLT_MAX	3.40282347E+38F
+#define	__FLT_MIN	1.17549435E-38F
 
-#endif /* !_MACHINE_LIMITS_H_ */
+#endif /* !_MACHINE__LIMITS_H_ */

==== //depot/projects/smpng/sys/compat/linux/linux_ioctl.c#26 (text+ko) ====

@@ -25,7 +25,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.106 2003/04/16 20:57:35 phk Exp $
+ * $FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.107 2003/04/24 23:36:35 anholt Exp $
  */
 
 #include <sys/param.h>
@@ -69,6 +69,7 @@
 static linux_ioctl_function_t linux_ioctl_sound;
 static linux_ioctl_function_t linux_ioctl_termio;
 static linux_ioctl_function_t linux_ioctl_private;
+static linux_ioctl_function_t linux_ioctl_drm;
 static linux_ioctl_function_t linux_ioctl_special;
 
 static struct linux_ioctl_handler cdrom_handler =
@@ -87,6 +88,8 @@
 { linux_ioctl_termio, LINUX_IOCTL_TERMIO_MIN, LINUX_IOCTL_TERMIO_MAX };
 static struct linux_ioctl_handler private_handler =
 { linux_ioctl_private, LINUX_IOCTL_PRIVATE_MIN, LINUX_IOCTL_PRIVATE_MAX };
+static struct linux_ioctl_handler drm_handler =
+{ linux_ioctl_drm, LINUX_IOCTL_DRM_MIN, LINUX_IOCTL_DRM_MAX };
 
 DATA_SET(linux_ioctl_handler_set, cdrom_handler);
 DATA_SET(linux_ioctl_handler_set, vfat_handler);
@@ -96,6 +99,7 @@
 DATA_SET(linux_ioctl_handler_set, sound_handler);
 DATA_SET(linux_ioctl_handler_set, termio_handler);
 DATA_SET(linux_ioctl_handler_set, private_handler);
+DATA_SET(linux_ioctl_handler_set, drm_handler);
 
 struct handler_element
 {
@@ -2331,6 +2335,16 @@
 }
 
 /*
+ * DRM ioctl handler (sys/dev/drm)
+ */
+static int
+linux_ioctl_drm(struct thread *td, struct linux_ioctl_args *args)
+{
+	args->cmd = SETDIR(args->cmd);
+	return ioctl(td, (struct ioctl_args *)args);
+}
+
+/*
  * Special ioctl handler
  */
 static int

==== //depot/projects/smpng/sys/compat/linux/linux_ioctl.h#7 (text+ko) ====

@@ -25,7 +25,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/compat/linux/linux_ioctl.h,v 1.15 2002/10/11 11:43:08 sobomax Exp $
+ * $FreeBSD: src/sys/compat/linux/linux_ioctl.h,v 1.16 2003/04/24 23:36:35 anholt Exp $
  */
 
 #ifndef _LINUX_IOCTL_H_
@@ -667,6 +667,9 @@
 #define	LINUX_ASYNC_CALLOUT_NOHUP	0x0400
 #define	LINUX_ASYNC_FLAGS		0x0FFF
 
+#define	LINUX_IOCTL_DRM_MIN	0x6400
+#define	LINUX_IOCTL_DRM_MAX	0x64ff
+
 /*
  * This doesn't really belong here, but I can't think of a better
  * place to put it.

==== //depot/projects/smpng/sys/conf/options#53 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.391 2003/04/15 20:59:43 jhb Exp $
+# $FreeBSD: src/sys/conf/options,v 1.392 2003/04/25 01:18:45 anholt Exp $
 #
 #        On the handling of kernel options
 #
@@ -394,7 +394,6 @@
 NETGRAPH_VJC		opt_netgraph.h
 
 # DRM options
-DRM_LINUX		opt_drm.h
 DRM_DEBUG		opt_drm.h
 
 ZERO_COPY_SOCKETS	opt_zero.h

==== //depot/projects/smpng/sys/dev/drm/drmP.h#3 (text+ko) ====

@@ -27,7 +27,7 @@
  * Authors:
  *    Rickard E. (Rik) Faith <faith@valinux.com>
  *    Gareth Hughes <gareth@valinux.com>
- * $FreeBSD: src/sys/dev/drm/drmP.h,v 1.3 2003/03/09 02:08:28 anholt Exp $
+ * $FreeBSD: src/sys/dev/drm/drmP.h,v 1.4 2003/04/25 01:18:46 anholt Exp $
  */
 
 #ifndef _DRM_P_H_
@@ -52,15 +52,6 @@
 #ifndef __HAVE_DMA_IRQ
 #define __HAVE_DMA_IRQ		0
 #endif
-#ifndef __HAVE_DMA_WAITLIST
-#define __HAVE_DMA_WAITLIST	0
-#endif
-#ifndef __HAVE_DMA_FREELIST
-#define __HAVE_DMA_FREELIST	0
-#endif
-#ifndef __HAVE_DMA_HISTOGRAM
-#define __HAVE_DMA_HISTOGRAM	0
-#endif
 
 #define DRM_DEBUG_CODE 0	  /* Include debugging code (if > 1, then
 				     also include looping detection. */
@@ -83,12 +74,8 @@
 #define DRM_HASH_SIZE	      16 /* Size of key hash table		  */
 #define DRM_KERNEL_CONTEXT    0	 /* Change drm_resctx if changed	  */
 #define DRM_RESERVED_CONTEXTS 1	 /* Change drm_resctx if changed	  */
-#define DRM_LOOPING_LIMIT     5000000
-#define DRM_BSZ		      1024 /* Buffer size for /dev/drm? output	  */
-#define DRM_LOCK_SLICE	      1	/* Time slice for lock, in jiffies	  */
 
 #define DRM_FLAG_DEBUG	  0x01
-#define DRM_FLAG_NOCTX	  0x02
 
 #define DRM_MEM_DMA	   0
 #define DRM_MEM_SAREA	   1
@@ -96,30 +83,23 @@
 #define DRM_MEM_MAGIC	   3
 #define DRM_MEM_IOCTLS	   4
 #define DRM_MEM_MAPS	   5
-#define DRM_MEM_VMAS	   6
-#define DRM_MEM_BUFS	   7
-#define DRM_MEM_SEGS	   8
-#define DRM_MEM_PAGES	   9
-#define DRM_MEM_FILES	  10
-#define DRM_MEM_QUEUES	  11
-#define DRM_MEM_CMDS	  12
-#define DRM_MEM_MAPPINGS  13
-#define DRM_MEM_BUFLISTS  14
-#define DRM_MEM_AGPLISTS  15
-#define DRM_MEM_TOTALAGP  16
-#define DRM_MEM_BOUNDAGP  17
-#define DRM_MEM_CTXBITMAP 18
-#define DRM_MEM_STUB      19
-#define DRM_MEM_SGLISTS   20
+#define DRM_MEM_BUFS	   6
+#define DRM_MEM_SEGS	   7
+#define DRM_MEM_PAGES	   8
+#define DRM_MEM_FILES	  9
+#define DRM_MEM_QUEUES	  10
+#define DRM_MEM_CMDS	  11
+#define DRM_MEM_MAPPINGS  12
+#define DRM_MEM_BUFLISTS  13
+#define DRM_MEM_AGPLISTS  14
+#define DRM_MEM_TOTALAGP  15
+#define DRM_MEM_BOUNDAGP  16
+#define DRM_MEM_CTXBITMAP 17
+#define DRM_MEM_STUB	  18
+#define DRM_MEM_SGLISTS	  19
 
 #define DRM_MAX_CTXBITMAP (PAGE_SIZE * 8)
 
-				/* Backward compatibility section */
-				/* _PAGE_WT changed to _PAGE_PWT in 2.2.6 */
-#ifndef _PAGE_PWT
-#define _PAGE_PWT _PAGE_WT
-#endif
-
 				/* Mapping helper macros */
 #define DRM_IOREMAP(map)						\
 	(map)->handle = DRM(ioremap)( dev, map )
@@ -147,22 +127,12 @@
 } while(0)
 
 
-typedef struct drm_pci_list {
-	u16 vendor;
-	u16 device;
-} drm_pci_list_t;
-
 typedef struct drm_ioctl_desc {
-	d_ioctl_t            *func;
+	int		     (*func)(DRM_IOCTL_ARGS);
 	int		     auth_needed;
 	int		     root_only;
 } drm_ioctl_desc_t;
 
-typedef struct drm_devstate {
-	pid_t		  owner;	/* X server pid holding x_lock */
-
-} drm_devstate_t;
-
 typedef struct drm_magic_entry {
 	drm_magic_t	       magic;
 	struct drm_file	       *priv;
@@ -174,12 +144,6 @@
 	struct drm_magic_entry *tail;
 } drm_magic_head_t;
 
-typedef struct drm_vma_entry {
-	struct vm_area_struct *vma;
-	struct drm_vma_entry  *next;
-	pid_t		      pid;
-} drm_vma_entry_t;
-
 typedef struct drm_buf {
 	int		  idx;	       /* Index into master buflist	     */
 	int		  total;       /* Buffer size			     */
@@ -189,12 +153,9 @@
 	void		  *address;    /* Address of buffer		     */
 	unsigned long	  bus_address; /* Bus address of buffer		     */
 	struct drm_buf	  *next;       /* Kernel-only: used for free list    */
-	__volatile__ int  waiting;     /* On kernel DMA queue		     */
 	__volatile__ int  pending;     /* On hardware DMA queue		     */
-	wait_queue_head_t dma_wait;    /* Processes waiting		     */
-	pid_t		  pid;	       /* PID of holding process	     */
+	DRMFILE		  filp;	       /* Unique identifier of holding process */
 	int		  context;     /* Kernel queue for this buffer	     */
-	int		  while_locked;/* Dispatch this buffer while locked  */
 	enum {
 		DRM_LIST_NONE	 = 0,
 		DRM_LIST_FREE	 = 1,
@@ -204,39 +165,10 @@
 		DRM_LIST_RECLAIM = 5
 	}		  list;	       /* Which list we're on		     */
 
-#if DRM_DMA_HISTOGRAM
-	cycles_t	  time_queued;	   /* Queued to kernel DMA queue     */
-	cycles_t	  time_dispatched; /* Dispatched to hardware	     */
-	cycles_t	  time_completed;  /* Completed by hardware	     */
-	cycles_t	  time_freed;	   /* Back on freelist		     */
-#endif
-
 	int		  dev_priv_size; /* Size of buffer private stoarge   */
 	void		  *dev_private;  /* Per-buffer private storage       */
 } drm_buf_t;
 
-#if DRM_DMA_HISTOGRAM
-#define DRM_DMA_HISTOGRAM_SLOTS		  9
-#define DRM_DMA_HISTOGRAM_INITIAL	 10
-#define DRM_DMA_HISTOGRAM_NEXT(current)	 ((current)*10)
-typedef struct drm_histogram {
-	atomic_t	  total;
-
-	atomic_t	  queued_to_dispatched[DRM_DMA_HISTOGRAM_SLOTS];
-	atomic_t	  dispatched_to_completed[DRM_DMA_HISTOGRAM_SLOTS];
-	atomic_t	  completed_to_freed[DRM_DMA_HISTOGRAM_SLOTS];
-
-	atomic_t	  queued_to_completed[DRM_DMA_HISTOGRAM_SLOTS];
-	atomic_t	  queued_to_freed[DRM_DMA_HISTOGRAM_SLOTS];
-
-	atomic_t	  dma[DRM_DMA_HISTOGRAM_SLOTS];
-	atomic_t	  schedule[DRM_DMA_HISTOGRAM_SLOTS];
-	atomic_t	  ctx[DRM_DMA_HISTOGRAM_SLOTS];
-	atomic_t	  lacq[DRM_DMA_HISTOGRAM_SLOTS];
-	atomic_t	  lhld[DRM_DMA_HISTOGRAM_SLOTS];
-} drm_histogram_t;
-#endif
-
 				/* bufs is one longer than it has to be */
 typedef struct drm_waitlist {
 	int		  count;	/* Number of possible buffers	   */
@@ -253,10 +185,8 @@
 	atomic_t	  count;       /* Number of free buffers	   */
 	drm_buf_t	  *next;       /* End pointer			   */
 
-	wait_queue_head_t waiting;     /* Processes waiting on free bufs   */
 	int		  low_mark;    /* Low water mark		   */
 	int		  high_mark;   /* High water mark		   */
-	atomic_t	  wfh;	       /* If waiting for high mark	   */
 	DRM_SPINTYPE   lock;
 } drm_freelist_t;
 
@@ -289,48 +219,14 @@
 	struct drm_device *devXX;
 };
 
-typedef struct drm_queue {
-	atomic_t	  use_count;	/* Outstanding uses (+1)	    */
-	atomic_t	  finalization;	/* Finalization in progress	    */
-	atomic_t	  block_count;	/* Count of processes waiting	    */
-	atomic_t	  block_read;	/* Queue blocked for reads	    */
-	wait_queue_head_t read_queue;	/* Processes waiting on block_read  */
-	atomic_t	  block_write;	/* Queue blocked for writes	    */
-	wait_queue_head_t write_queue;	/* Processes waiting on block_write */
-#if 1
-	atomic_t	  total_queued;	/* Total queued statistic	    */
-	atomic_t	  total_flushed;/* Total flushes statistic	    */
-	atomic_t	  total_locks;	/* Total locks statistics	    */
-#endif
-	drm_ctx_flags_t	  flags;	/* Context preserving and 2D-only   */
-	drm_waitlist_t	  waitlist;	/* Pending buffers		    */
-	wait_queue_head_t flush_queue;	/* Processes waiting until flush    */
-} drm_queue_t;
-
 typedef struct drm_lock_data {
 	drm_hw_lock_t	  *hw_lock;	/* Hardware lock		   */
-	pid_t		  pid;		/* PID of lock holder (0=kernel)   */
+	DRMFILE		  filp;	        /* Unique identifier of holding process (NULL is kernel)*/
 	wait_queue_head_t lock_queue;	/* Queue of blocked processes	   */
 	unsigned long	  lock_time;	/* Time of last lock in jiffies	   */
 } drm_lock_data_t;
 
 typedef struct drm_device_dma {
-#if 0
-				/* Performance Counters */
-	atomic_t	  total_prio;	/* Total DRM_DMA_PRIORITY	   */
-	atomic_t	  total_bytes;	/* Total bytes DMA'd		   */
-	atomic_t	  total_dmas;	/* Total DMA buffers dispatched	   */
-
-	atomic_t	  total_missed_dma;  /* Missed drm_do_dma	    */
-	atomic_t	  total_missed_lock; /* Missed lock in drm_do_dma   */
-	atomic_t	  total_missed_free; /* Missed drm_free_this_buffer */
-	atomic_t	  total_missed_sched;/* Missed drm_dma_schedule	    */
-
-	atomic_t	  total_tried;	/* Tried next_buffer		    */
-	atomic_t	  total_hit;	/* Sent next_buffer		    */
-	atomic_t	  total_lost;	/* Lost interrupt		    */
-#endif
-
 	drm_buf_entry_t	  bufs[DRM_MAX_ORDER+1];
 	int		  buf_count;
 	drm_buf_t	  **buflist;	/* Vector of pointers info bufs	   */
@@ -346,8 +242,6 @@
 				/* DMA support */
 	drm_buf_t	  *this_buffer;	/* Buffer being sent		   */
 	drm_buf_t	  *next_buffer; /* Selected buffer to send	   */
-	drm_queue_t	  *next_queue;	/* Queue from which buffer selected*/
-	wait_queue_head_t waiting;	/* Processes waiting on free bufs  */
 } drm_device_dma_t;
 
 #if __REALLY_HAVE_AGP
@@ -381,11 +275,6 @@
 	dma_addr_t	*busaddr;
 } drm_sg_mem_t;
 
-typedef struct drm_sigdata {
-	int           context;
-	drm_hw_lock_t *lock;
-} drm_sigdata_t;
-
 typedef struct drm_local_map {
 	unsigned long	offset;	 /* Physical address (0 for SAREA)*/
 	unsigned long	size;	 /* Physical size (bytes)	    */
@@ -424,21 +313,16 @@
 	device_t	  device;	/* Device instance from newbus     */
 #endif
 	dev_t		  devnode;	/* Device number for mknod	   */
-	char		  *devname;	/* For /proc/interrupts		   */
 
-	int		  blocked;	/* Blocked due to VC switch?	   */
 	int		  flags;	/* Flags to open(2)		   */
-	int		  writable;	/* Opened with FWRITE		   */
 
 				/* Locks */
-	DRM_SPINTYPE	  count_lock;	/* For inuse, open_count, buf_use  */
+	DRM_SPINTYPE	  count_lock;	/* For open_count, buf_use, buf_alloc */
 	struct lock       dev_lock;	/* For others			   */
 				/* Usage Counters */
 	int		  open_count;	/* Outstanding files open	   */
-	atomic_t	  ioctl_count;	/* Outstanding IOCTLs pending	   */
-	atomic_t	  vma_count;	/* Outstanding vma areas open	   */
 	int		  buf_use;	/* Buffers in use -- cannot alloc  */
-	atomic_t	  buf_alloc;	/* Buffer allocation in progress   */
+	int		  buf_alloc;	/* Buffer allocation in progress   */
 
 				/* Performance counters */
 	unsigned long     counters;
@@ -451,19 +335,13 @@
 
 				/* Memory management */
 	drm_map_list_t	  *maplist;	/* Linked list of regions	   */
-	int		  map_count;	/* Number of mappable regions	   */
 
 	drm_local_map_t	  **context_sareas;
 	int		  max_context;
 
-	drm_vma_entry_t	  *vmalist;	/* List of vmas (for debugging)	   */
 	drm_lock_data_t	  lock;		/* Information on hardware lock	   */
 
 				/* DMA queues (contexts) */
-	int		  queue_count;	/* Number of active DMA queues	   */
-	int		  queue_reserved; /* Number of reserved DMA queues */
-	int		  queue_slots;	/* Actual length of queuelist	   */
-	drm_queue_t	  **queuelist;	/* Vector of pointers to DMA queues */
 	drm_device_dma_t  *dma;		/* Optional pointer for DMA support */
 
 				/* Context support */
@@ -477,45 +355,25 @@
 #endif
 	void		  *irqh;	/* Handle from bus_setup_intr      */
 	atomic_t	  context_flag;	/* Context swapping flag	   */
-	atomic_t	  interrupt_flag; /* Interruption handler flag	   */
-	atomic_t	  dma_flag;	/* DMA dispatch flag		   */
 	struct callout    timer;	/* Timer for delaying ctx switch   */
-	wait_queue_head_t context_wait; /* Processes waiting on ctx switch */
-	int		  last_checked;	/* Last context checked for DMA	   */
 	int		  last_context;	/* Last current context		   */
-	unsigned long	  last_switch;	/* jiffies at last context switch  */
 #if __FreeBSD_version >= 400005
 	struct task       task;
 #endif
 #if __HAVE_VBL_IRQ
    	wait_queue_head_t vbl_queue;	/* vbl wait channel */
    	atomic_t          vbl_received;
-#if 0 /* vbl signals are untested, ntested */
+#if 0 /* vbl signals are untested */
 	struct drm_vbl_sig_list vbl_sig_list;
 	DRM_SPINTYPE      vbl_lock;
 #endif
 #endif
-	cycles_t	  ctx_start;
-	cycles_t	  lck_start;
-#if __HAVE_DMA_HISTOGRAM
-	drm_histogram_t	  histo;
-#endif
 
-				/* Callback to X server for context switch
-				   and for heavy-handed reset. */
-	char		  buf[DRM_BSZ]; /* Output buffer		   */
-	char		  *buf_rp;	/* Read pointer			   */
-	char		  *buf_wp;	/* Write pointer		   */
-	char		  *buf_end;	/* End pointer			   */
 #ifdef __FreeBSD__
 	struct sigio      *buf_sigio;	/* Processes waiting for SIGIO     */
 #elif defined(__NetBSD__)
 	pid_t		  buf_pgid;
 #endif
-	struct selinfo    buf_sel;	/* Workspace for select/poll       */
-	int               buf_selecting;/* True if poll sleeper            */
-	wait_queue_head_t buf_readers;	/* Processes waiting to read	   */
-	wait_queue_head_t buf_writers;	/* Processes waiting to ctx switch */
 
 				/* Sysctl support */
 	struct drm_sysctl_info *sysctl;
@@ -526,13 +384,9 @@
 	drm_sg_mem_t      *sg;  /* Scatter gather memory */
 	atomic_t          *ctx_bitmap;
 	void		  *dev_private;
-	drm_sigdata_t     sigdata; /* For block_all_signals */
-	sigset_t          sigmask;
 };
 
 extern int	     DRM(flags);
-extern void	     DRM(parse_options)( char *s );
-extern int           DRM(cpu_valid)( void );
 
 				/* Authentication (drm_auth.h) */
 extern int           DRM(add_magic)(drm_device_t *dev, drm_file_t *priv, 
@@ -541,7 +395,6 @@
 
 				/* Driver support (drm_drv.h) */
 extern int           DRM(version)( DRM_IOCTL_ARGS );
-extern int	     DRM(write_string)(drm_device_t *dev, const char *s);
 
 				/* Memory management support (drm_memory.h) */
 extern void	     DRM(mem_init)(void);
@@ -582,11 +435,6 @@
 extern int	     DRM(lock_free)(drm_device_t *dev,
 				    __volatile__ unsigned int *lock,
 				    unsigned int context);
-extern int	     DRM(flush_unblock)(drm_device_t *dev, int context,
-					drm_lock_flags_t flags);
-extern int	     DRM(flush_block_and_flush)(drm_device_t *dev, int context,
-						drm_lock_flags_t flags);
-extern int           DRM(notifier)(void *priv);
 
 				/* Buffer management support (drm_bufs.h) */
 extern int	     DRM(order)( unsigned long size );
@@ -596,16 +444,7 @@
 extern int	     DRM(dma_setup)(drm_device_t *dev);
 extern void	     DRM(dma_takedown)(drm_device_t *dev);
 extern void	     DRM(free_buffer)(drm_device_t *dev, drm_buf_t *buf);
-extern void	     DRM(reclaim_buffers)(drm_device_t *dev, pid_t pid);
-#if __HAVE_OLD_DMA
-/* GH: This is a dirty hack for now...
- */
-extern void	     DRM(clear_next_buffer)(drm_device_t *dev);
-extern int	     DRM(select_queue)(drm_device_t *dev,
-				       void (*wrapper)(unsigned long));
-extern int	     DRM(dma_enqueue)(drm_device_t *dev, drm_dma_t *dma);
-extern int	     DRM(dma_get_buffers)(drm_device_t *dev, drm_dma_t *dma);
-#endif
+extern void	     DRM(reclaim_buffers)(drm_device_t *dev, DRMFILE filp);
 #if __HAVE_DMA_IRQ
 extern int           DRM(irq_install)( drm_device_t *dev, int irq );
 extern int           DRM(irq_uninstall)( drm_device_t *dev );
@@ -617,10 +456,6 @@
 extern void          DRM(dma_immediate_bh)( DRM_TASKQUEUE_ARGS );
 #endif
 #endif
-#if DRM_DMA_HISTOGRAM
-extern int	     DRM(histogram_slot)(unsigned long count);
-extern void	     DRM(histogram_compute)(drm_device_t *dev, drm_buf_t *buf);
-#endif
 
 				/* Buffer list support (drm_lists.h) */
 #if __HAVE_DMA_WAITLIST
@@ -629,13 +464,6 @@
 extern int	     DRM(waitlist_put)(drm_waitlist_t *bl, drm_buf_t *buf);
 extern drm_buf_t     *DRM(waitlist_get)(drm_waitlist_t *bl);
 #endif
-#if __HAVE_DMA_FREELIST
-extern int	     DRM(freelist_create)(drm_freelist_t *bl, int count);
-extern int	     DRM(freelist_destroy)(drm_freelist_t *bl);
-extern int	     DRM(freelist_put)(drm_device_t *dev, drm_freelist_t *bl,
-				       drm_buf_t *buf);
-extern drm_buf_t     *DRM(freelist_get)(drm_freelist_t *bl, int block);
-#endif
 #endif /* __HAVE_DMA */
 #if __HAVE_VBL_IRQ
 extern int           DRM(vblank_wait)(drm_device_t *dev, unsigned int *vbl_seq);
@@ -668,5 +496,75 @@
 					       dma_addr_t bus_addr);
 #endif
 
+/* Locking IOCTL support (drm_drv.h) */
+extern int		DRM(lock)(DRM_IOCTL_ARGS);
+extern int		DRM(unlock)(DRM_IOCTL_ARGS);
+
+/* Misc. IOCTL support (drm_ioctl.h) */
+extern int		DRM(irq_busid)(DRM_IOCTL_ARGS);
+extern int		DRM(getunique)(DRM_IOCTL_ARGS);
+extern int		DRM(setunique)(DRM_IOCTL_ARGS);
+extern int		DRM(getmap)(DRM_IOCTL_ARGS);
+extern int		DRM(getclient)(DRM_IOCTL_ARGS);
+extern int		DRM(getstats)(DRM_IOCTL_ARGS);
+extern int		DRM(noop)(DRM_IOCTL_ARGS);
+
+/* Context IOCTL support (drm_context.h) */
+extern int		DRM(resctx)(DRM_IOCTL_ARGS);
+extern int		DRM(addctx)(DRM_IOCTL_ARGS);
+extern int		DRM(modctx)(DRM_IOCTL_ARGS);
+extern int		DRM(getctx)(DRM_IOCTL_ARGS);
+extern int		DRM(switchctx)(DRM_IOCTL_ARGS);
+extern int		DRM(newctx)(DRM_IOCTL_ARGS);
+extern int		DRM(rmctx)(DRM_IOCTL_ARGS);
+extern int		DRM(setsareactx)(DRM_IOCTL_ARGS);
+extern int		DRM(getsareactx)(DRM_IOCTL_ARGS);
+
+/* Drawable IOCTL support (drm_drawable.h) */
+extern int		DRM(adddraw)(DRM_IOCTL_ARGS);
+extern int		DRM(rmdraw)(DRM_IOCTL_ARGS);
+
+/* Authentication IOCTL support (drm_auth.h) */
+extern int		DRM(getmagic)(DRM_IOCTL_ARGS);
+extern int		DRM(authmagic)(DRM_IOCTL_ARGS);
+
+/* Buffer management support (drm_bufs.h) */
+extern int		DRM(addmap)(DRM_IOCTL_ARGS);
+extern int		DRM(rmmap)(DRM_IOCTL_ARGS);
+#if __HAVE_DMA
+extern int		DRM(addbufs)(DRM_IOCTL_ARGS);
+extern int		DRM(infobufs)(DRM_IOCTL_ARGS);
+extern int		DRM(markbufs)(DRM_IOCTL_ARGS);
+extern int		DRM(freebufs)(DRM_IOCTL_ARGS);
+extern int		DRM(mapbufs)(DRM_IOCTL_ARGS);
+#endif
+
+/* DMA support (drm_dma.h) */
+#if __HAVE_DMA
+extern int		DRM(control)(DRM_IOCTL_ARGS);
+#endif
+#if __HAVE_VBL_IRQ
+extern int		DRM(wait_vblank)(DRM_IOCTL_ARGS);
+#endif
+
+/* AGP/GART support (drm_agpsupport.h) */
+#if __REALLY_HAVE_AGP
+extern int		DRM(agp_acquire)(DRM_IOCTL_ARGS);
+extern int		DRM(agp_release)(DRM_IOCTL_ARGS);
+extern int		DRM(agp_enable)(DRM_IOCTL_ARGS);
+extern int		DRM(agp_info)(DRM_IOCTL_ARGS);
+extern int		DRM(agp_alloc)(DRM_IOCTL_ARGS);
+extern int		DRM(agp_free)(DRM_IOCTL_ARGS);
+extern int		DRM(agp_unbind)(DRM_IOCTL_ARGS);
+extern int		DRM(agp_bind)(DRM_IOCTL_ARGS);
+#endif
+
+/* Scatter Gather Support (drm_scatter.h) */
+#if __HAVE_SG
+extern int		DRM(sg_alloc)(DRM_IOCTL_ARGS);
+extern int		DRM(sg_free)(DRM_IOCTL_ARGS);
+#endif
+
+
 #endif /* __KERNEL__ */
 #endif /* _DRM_P_H_ */

==== //depot/projects/smpng/sys/dev/drm/drm_bufs.h#3 (text+ko) ====


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



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