Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Mar 2004 00:28:27 -0800 (PST)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 48047 for review
Message-ID:  <200403030828.i238SRAD090607@repoman.freebsd.org>

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

Change 48047 by peter@peter_daintree on 2004/03/03 00:27:29

	IFC @48044

Affected files ...

.. //depot/projects/hammer/contrib/diff/diff.h#3 integrate
.. //depot/projects/hammer/gnu/lib/libregex/regex.c#4 integrate
.. //depot/projects/hammer/gnu/lib/libregex/regex.h#3 integrate
.. //depot/projects/hammer/gnu/usr.bin/grep/dfa.c#3 integrate
.. //depot/projects/hammer/gnu/usr.bin/grep/search.c#3 integrate
.. //depot/projects/hammer/lib/libc/stdio/fvwrite.c#2 integrate
.. //depot/projects/hammer/lib/libc/stdlib/getopt_long.c#4 integrate
.. //depot/projects/hammer/sbin/camcontrol/camcontrol.c#6 integrate
.. //depot/projects/hammer/share/man/man4/acpi.4#19 integrate
.. //depot/projects/hammer/share/man/man4/man4.i386/cx.4#7 integrate
.. //depot/projects/hammer/share/man/man4/ubtbcmfw.4#4 integrate
.. //depot/projects/hammer/sys/amd64/include/dvcfg.h#1 branch
.. //depot/projects/hammer/sys/amd64/include/physio_proc.h#1 branch
.. //depot/projects/hammer/sys/dev/acpica/acpi.c#23 integrate
.. //depot/projects/hammer/sys/dev/acpica/acpi_powerres.c#6 integrate
.. //depot/projects/hammer/sys/dev/acpica/acpi_timer.c#5 integrate
.. //depot/projects/hammer/sys/dev/acpica/acpivar.h#19 integrate
.. //depot/projects/hammer/sys/dev/drm/drm_drv.h#12 integrate
.. //depot/projects/hammer/sys/dev/drm/drm_os_freebsd.h#11 integrate
.. //depot/projects/hammer/sys/dev/drm/drm_vm.h#7 integrate
.. //depot/projects/hammer/sys/dev/drm/radeon_state.c#6 integrate
.. //depot/projects/hammer/sys/dev/drm/sis_mm.c#3 integrate
.. //depot/projects/hammer/sys/dev/ed/if_ed.c#13 integrate
.. //depot/projects/hammer/sys/dev/ed/if_edvar.h#4 integrate
.. //depot/projects/hammer/sys/dev/lnc/if_lnc.c#11 integrate
.. //depot/projects/hammer/sys/dev/lnc/if_lncvar.h#2 integrate
.. //depot/projects/hammer/sys/dev/md/md.c#22 integrate
.. //depot/projects/hammer/sys/dev/usb/uftdi.c#8 integrate
.. //depot/projects/hammer/sys/dev/usb/usbdevs#27 integrate
.. //depot/projects/hammer/sys/dev/usb/usbdevs.h#26 integrate
.. //depot/projects/hammer/sys/dev/usb/usbdevs_data.h#26 integrate
.. //depot/projects/hammer/sys/fs/udf/udf_vnops.c#14 integrate
.. //depot/projects/hammer/sys/i386/acpica/acpi_toshiba.c#2 integrate
.. //depot/projects/hammer/sys/i386/conf/NOTES#31 integrate
.. //depot/projects/hammer/sys/netinet/ip_dummynet.c#20 integrate
.. //depot/projects/hammer/sys/netinet6/ip6_input.c#11 integrate
.. //depot/projects/hammer/usr.sbin/ac/ac.c#3 integrate
.. //depot/projects/hammer/usr.sbin/nologin/Makefile#1 branch
.. //depot/projects/hammer/usr.sbin/nologin/nologin.5#1 branch
.. //depot/projects/hammer/usr.sbin/nologin/nologin.8#1 branch
.. //depot/projects/hammer/usr.sbin/nologin/nologin.c#1 branch

Differences ...

==== //depot/projects/hammer/contrib/diff/diff.h#3 (text+ko) ====

@@ -16,7 +16,6 @@
 You should have received a copy of the GNU General Public License
 along with GNU DIFF; see the file COPYING.  If not, write to
 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
-/* $FreeBSD: src/contrib/diff/diff.h,v 1.3 2004/02/16 22:54:45 ache Exp $ */
 
 #include "system.h"
 #include <stdio.h>

==== //depot/projects/hammer/gnu/lib/libregex/regex.c#4 (text+ko) ====

@@ -1,4 +1,3 @@
-/* $FreeBSD: src/gnu/lib/libregex/regex.c,v 1.11 2004/02/25 02:39:10 ache Exp $ */
 /* Extended regular expression matching and search library,
    version 0.12.
    (Implements POSIX draft P1003.2/D11.2, except for some of the

==== //depot/projects/hammer/gnu/lib/libregex/regex.h#3 (text+ko) ====

@@ -1,4 +1,3 @@
-/* $FreeBSD: src/gnu/lib/libregex/regex.h,v 1.5 2004/02/25 02:39:10 ache Exp $ */
 #ifndef _REGEX_H
 #include <posix/regex.h>
 

==== //depot/projects/hammer/gnu/usr.bin/grep/dfa.c#3 (text+ko) ====

@@ -18,8 +18,6 @@
 /* Written June, 1988 by Mike Haertel
    Modified July, 1988 by Arthur David Olson to assist BMG speedups  */
 
-/* $FreeBSD: src/gnu/usr.bin/grep/dfa.c,v 1.14 2004/03/01 08:37:20 ache Exp $ */
-
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif

==== //depot/projects/hammer/gnu/usr.bin/grep/search.c#3 (text+ko) ====

@@ -18,8 +18,6 @@
 
 /* Written August 1992 by Mike Haertel. */
 
-/* $FreeBSD: src/gnu/usr.bin/grep/search.c,v 1.12 2004/03/01 08:37:20 ache Exp $ */
-
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif

==== //depot/projects/hammer/lib/libc/stdio/fvwrite.c#2 (text+ko) ====

@@ -38,8 +38,9 @@
 static char sccsid[] = "@(#)fvwrite.c	8.1 (Berkeley) 6/4/93";
 #endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdio/fvwrite.c,v 1.15 2002/03/22 21:53:04 obrien Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/fvwrite.c,v 1.16 2004/03/02 19:43:51 jkh Exp $");
 
+#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -67,8 +68,10 @@
 	if ((len = uio->uio_resid) == 0)
 		return (0);
 	/* make sure we can write */
-	if (cantwrite(fp))
+	if (cantwrite(fp)) {
+		errno = EBADF;
 		return (EOF);
+	}
 
 #define	MIN(a, b) ((a) < (b) ? (a) : (b))
 #define	COPY(n)	  (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n))

==== //depot/projects/hammer/lib/libc/stdlib/getopt_long.c#4 (text+ko) ====

@@ -62,7 +62,7 @@
 #endif /* LIBC_SCCS and not lint */
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdlib/getopt_long.c,v 1.6 2004/03/01 17:57:05 ache Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdlib/getopt_long.c,v 1.7 2004/03/03 03:05:21 ache Exp $");
 
 #include <err.h>
 #include <errno.h>
@@ -97,6 +97,13 @@
 
 #define	EMSG		""
 
+#ifdef GNU_COMPATIBLE
+#define NO_PREFIX	(-1)
+#define D_PREFIX	0
+#define DD_PREFIX	1
+#define W_PREFIX	2
+#endif
+
 static int getopt_internal(int, char * const *, const char *,
 			   const struct option *, int *, int);
 static int parse_long_options(char * const *, const char *,
@@ -112,15 +119,15 @@
 
 /* Error messages */
 static const char recargchar[] = "option requires an argument -- %c";
-/* From P1003.2 */
-static const char illoptchar[] = "illegal option -- %c";
+static const char illoptchar[] = "illegal option -- %c"; /* From P1003.2 */
 #ifdef GNU_COMPATIBLE
+static int dash_prefix = NO_PREFIX;
 static const char gnuoptchar[] = "invalid option -- %c";
 
-static const char recargstring[] = "option `--%s' requires an argument";
-static const char ambig[] = "option `--%.*s' is ambiguous";
-static const char noarg[] = "option `--%.*s' doesn't allow an argument";
-static const char illoptstring[] = "unrecognized option `--%s'";
+static const char recargstring[] = "option `%s%s' requires an argument";
+static const char ambig[] = "option `%s%.*s' is ambiguous";
+static const char noarg[] = "option `%s%.*s' doesn't allow an argument";
+static const char illoptstring[] = "unrecognized option `%s%s'";
 #else
 static const char recargstring[] = "option requires an argument -- %s";
 static const char ambig[] = "ambiguous option -- %.*s";
@@ -193,10 +200,29 @@
 	const struct option *long_options, int *idx, int short_too)
 {
 	char *current_argv, *has_equal;
+#ifdef GNU_COMPATIBLE
+	char *current_dash;
+#endif
 	size_t current_argv_len;
 	int i, match;
 
 	current_argv = place;
+#ifdef GNU_COMPATIBLE
+	switch (dash_prefix) {
+		case D_PREFIX:
+			current_dash = "-";
+			break;
+		case DD_PREFIX:
+			current_dash = "--";
+			break;
+		case W_PREFIX:
+			current_dash = "-W ";
+			break;
+		default:
+			current_dash = "";
+			break;
+	}
+#endif
 	match = -1;
 
 	optind++;
@@ -231,7 +257,11 @@
 		else {
 			/* ambiguous abbreviation */
 			if (PRINT_ERROR)
-				warnx(ambig, (int)current_argv_len,
+				warnx(ambig,
+#ifdef GNU_COMPATIBLE
+				     current_dash,
+#endif
+				     (int)current_argv_len,
 				     current_argv);
 			optopt = 0;
 			return (BADCH);
@@ -241,7 +271,11 @@
 		if (long_options[match].has_arg == no_argument
 		    && has_equal) {
 			if (PRINT_ERROR)
-				warnx(noarg, (int)current_argv_len,
+				warnx(noarg,
+#ifdef GNU_COMPATIBLE
+				     current_dash,
+#endif
+				     (int)current_argv_len,
 				     current_argv);
 			/*
 			 * XXX: GNU sets optopt to val regardless of flag
@@ -272,6 +306,9 @@
 			 */
 			if (PRINT_ERROR)
 				warnx(recargstring,
+#ifdef GNU_COMPATIBLE
+				    current_dash,
+#endif
 				    current_argv);
 			/*
 			 * XXX: GNU sets optopt to val regardless of flag
@@ -289,7 +326,11 @@
 			return (-1);
 		}
 		if (PRINT_ERROR)
-			warnx(illoptstring, current_argv);
+			warnx(illoptstring,
+#ifdef GNU_COMPATIBLE
+			      current_dash,
+#endif
+			      current_argv);
 		optopt = 0;
 		return (BADCH);
 	}
@@ -431,9 +472,15 @@
 	if (long_options != NULL && place != nargv[optind] &&
 	    (*place == '-' || (flags & FLAG_LONGONLY))) {
 		short_too = 0;
-		if (*place == '-')
+#ifdef GNU_COMPATIBLE
+		dash_prefix = D_PREFIX;
+#endif
+		if (*place == '-') {
 			place++;		/* --foo long option */
-		else if (*place != ':' && strchr(options, *place) != NULL)
+#ifdef GNU_COMPATIBLE
+			dash_prefix = DD_PREFIX;
+#endif
+		} else if (*place != ':' && strchr(options, *place) != NULL)
 			short_too = 1;		/* could be short option too */
 
 		optchar = parse_long_options(nargv, options, long_options,
@@ -479,6 +526,9 @@
 			return (BADARG);
 		} else				/* white space */
 			place = nargv[optind];
+#ifdef GNU_COMPATIBLE
+		dash_prefix = W_PREFIX;
+#endif
 		optchar = parse_long_options(nargv, options, long_options,
 		    idx, 0);
 		place = EMSG;

==== //depot/projects/hammer/sbin/camcontrol/camcontrol.c#6 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/camcontrol/camcontrol.c,v 1.51 2003/08/05 09:19:07 johan Exp $");
+__FBSDID("$FreeBSD: src/sbin/camcontrol/camcontrol.c,v 1.52 2004/03/03 01:51:24 ken Exp $");
 
 #include <sys/ioctl.h>
 #include <sys/stdint.h>
@@ -166,7 +166,9 @@
 			    const char **subopt);
 #ifndef MINIMALISTIC
 static int getdevlist(struct cam_device *device);
+#endif /* MINIMALISTIC */
 static int getdevtree(void);
+#ifndef MINIMALISTIC
 static int testunitready(struct cam_device *device, int retry_count,
 			 int timeout, int quiet);
 static int scsistart(struct cam_device *device, int startstop, int loadeject,
@@ -303,8 +305,11 @@
 		return(1);
 	}
 
-	bzero(&(&ccb.ccb_h)[1],
-	      sizeof(struct ccb_dev_match) - sizeof(struct ccb_hdr));
+	bzero(&ccb, sizeof(union ccb));
+
+	ccb.ccb_h.path_id = CAM_XPT_PATH_ID;
+	ccb.ccb_h.target_id = CAM_TARGET_WILDCARD;
+	ccb.ccb_h.target_lun = CAM_LUN_WILDCARD;
 
 	ccb.ccb_h.func_code = XPT_DEV_MATCH;
 	bufsize = sizeof(struct dev_match_result) * 100;
@@ -3380,6 +3385,11 @@
 				errx(1, "numeric device specification must "
 				     "be either bus:target, or "
 				     "bus:target:lun");
+			/* default to 0 if lun was not specified */
+			if ((arglist & CAM_ARG_LUN) == 0) {
+				lun = 0;
+				arglist |= CAM_ARG_LUN;
+			}
 			optstart++;
 		} else {
 			if (cam_get_device(argv[2], name, sizeof name, &unit)

==== //depot/projects/hammer/share/man/man4/acpi.4#19 (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/man4/acpi.4,v 1.30 2004/02/22 00:50:00 njl Exp $
+.\" $FreeBSD: src/share/man/man4/acpi.4,v 1.31 2004/03/03 03:02:17 njl Exp $
 .\"
 .Dd July 2, 2001
 .Dt ACPI 4
@@ -52,16 +52,11 @@
 be compiled into the kernel.
 .Sh ENVIRONMENT
 This support is still experimental, and thus there are many debugging
-and tuning options which are managed via the kernel environment
-space, and set in the
+and tuning options which are managed via the kernel environment.
+Tunables can be set at the
 .Xr loader 8
-before booting the kernel.
-Kernel environment variables may also be configured in the
-.Xr loader
-configuration file
-.Pa /boot/loader.conf
-or the device resource hints file
-.Pa /boot/device.hints .
+prompt before booting the kernel or stored in
+.Pa /boot/loader.conf .
 .Pp
 Debugging is separated between layers and levels, where a layer is
 a portion of the ACPI subsystem, and a level is a particular kind
@@ -102,25 +97,25 @@
 .It
 .Li ACPI_ALL_COMPONENTS
 .It
+.Li ACPI_AC_ADAPTER
+.It
+.Li ACPI_BATTERY
+.It
 .Li ACPI_BUS
 .It
-.Li ACPI_SYSTEM
-.It
-.Li ACPI_POWER
+.Li ACPI_BUTTON
 .It
 .Li ACPI_EC
 .It
-.Li ACPI_AC_ADAPTER
+.Li ACPI_FAN
 .It
-.Li ACPI_BATTERY
+.Li ACPI_POWER
 .It
-.Li ACPI_BUTTON
-.It
 .Li ACPI_PROCESSOR
 .It
 .Li ACPI_THERMAL
 .It
-.Li ACPI_FAN
+.Li ACPI_TIMER
 .It
 .Li ACPI_ALL_DRIVERS
 .El
@@ -231,7 +226,7 @@
 in case of problems.
 To disable a sub-driver, list it in the kernel
 environment variable
-.Va debug.acpi.disable .
+.Va debug.acpi.disabled .
 Multiple entries can be listed, separated by a space.
 .Pp
 ACPI sub-devices and features that can be disabled:
@@ -324,7 +319,7 @@
 Enables loading of a custom ACPI DSDT.
 .It Va acpi_dsdt_name
 Name of the DSDT table to load, if loading is enabled.
-.It Va debug.acpi.disable
+.It Va debug.acpi.disabled
 Selectively disables portions of ACPI for debugging purposes.
 .It Va hint.acpi.0.disabled
 Disables all of ACPI.

==== //depot/projects/hammer/share/man/man4/man4.i386/cx.4#7 (text+ko) ====

@@ -11,7 +11,7 @@
 .\" works or modified versions.
 .\"
 .\" Cronyx Id: cp.4,v 1.1.2.2 2003/09/11 14:56:50 rik Exp $
-.\" $FreeBSD: src/share/man/man4/man4.i386/cx.4,v 1.19 2004/03/02 18:20:42 brueffer Exp $
+.\" $FreeBSD: src/share/man/man4/man4.i386/cx.4,v 1.20 2004/03/02 20:42:21 brueffer Exp $
 .\"
 .Dd November 27, 2003
 .Dt CX 4 i386
@@ -80,7 +80,6 @@
 .Nm
 adapter configuration.
 .Sh SEE ALSO
-.Xr cx 4 , 
 .Xr sppp 4 , 
 .Xr ifconfig 8 , 
 .Xr sconfig 8 , 

==== //depot/projects/hammer/share/man/man4/ubtbcmfw.4#4 (text+ko) ====

@@ -23,7 +23,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $Id: ubtbcmfw.4,v 1.3 2003/05/21 19:37:35 max Exp $
-.\" $FreeBSD: src/share/man/man4/ubtbcmfw.4,v 1.3 2003/10/12 22:04:19 emax Exp $
+.\" $FreeBSD: src/share/man/man4/ubtbcmfw.4,v 1.4 2004/03/02 18:38:32 brueffer Exp $
 .\"
 .Dd April 28, 2003
 .Dt UBTBCMFW 4
@@ -44,7 +44,7 @@
 .Pp
 The control transfers can only happen on the control endpoint which
 is always endpoint 0.
-Control request are issued by
+Control requests are issued by
 .Xr ioctl 2
 calls.
 .Pp
@@ -52,7 +52,7 @@
 To perform I/O on an interrupt endpoint,
 .Xr read 2
 should be used.
-All I/O operations on a interrupt endpoint are unbuffered.
+All I/O operations on an interrupt endpoint are unbuffered.
 Interrupt endpoint is always endpoint 1.
 .Pp
 Only outgoing bulk transfers are supported on a bulk endpoint.

==== //depot/projects/hammer/sys/dev/acpica/acpi.c#23 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.120 2004/02/21 21:10:39 phk Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.121 2004/03/03 03:02:16 njl Exp $
  */
 
 #include "opt_acpi.h"
@@ -85,10 +85,28 @@
 struct mtx	acpi_mutex;
 #endif
 
+struct acpi_quirks {
+    char	*OemId;
+    uint32_t	OemRevision;
+    char	*value;
+};
+
+#define ACPI_OEM_REV_ANY	0
+
+static struct acpi_quirks acpi_quirks_table[] = {
+#ifdef notyet
+    /* Bad PCI routing table.  Used on some SuperMicro boards. */
+    { "PTLTD ", 0x06040000, "pci_link" },
+#endif
+
+    { NULL, 0, NULL }
+};
+
 static int	acpi_modevent(struct module *mod, int event, void *junk);
 static void	acpi_identify(driver_t *driver, device_t parent);
 static int	acpi_probe(device_t dev);
 static int	acpi_attach(device_t dev);
+static void	acpi_quirks_set(void);
 static device_t	acpi_add_child(device_t bus, int order, const char *name,
 			int unit);
 static int	acpi_print_child(device_t bus, device_t child);
@@ -207,7 +225,7 @@
     ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
 
     if (started)
-	return_VALUE(error);
+	return_VALUE (error);
     started = 1;
 
 #if __FreeBSD_version >= 500000
@@ -226,7 +244,7 @@
 #endif
     if (ACPI_FAILURE(error = AcpiInitializeSubsystem())) {
 	printf("ACPI: initialisation failed: %s\n", AcpiFormatException(error));
-	return_VALUE(error);
+	return_VALUE (error);
     }
 #ifdef ACPI_DEBUGGER
     debugpoint = getenv("debug.acpi.debugger");
@@ -241,7 +259,11 @@
 	printf("ACPI: table load failed: %s\n", AcpiFormatException(error));
 	return_VALUE(error);
     }
-    return_VALUE(AE_OK);
+
+    /* Set up any quirks we have for this XSDT. */
+    acpi_quirks_set();
+
+    return_VALUE (AE_OK);
 }
 
 /*
@@ -553,6 +575,46 @@
     return_VALUE (error);
 }
 
+static void
+acpi_quirks_set()
+{
+    XSDT_DESCRIPTOR *xsdt;
+    struct acpi_quirks *quirk;
+    char *env, *tmp;
+    int len;
+
+    /* If the user specifies "noquirks", leave the settings alone. */
+    len = 0;
+    if ((env = getenv("debug.acpi.disabled")) != NULL) {
+	if (strstr("noquirks", env) != NULL)
+	    goto out;
+	len = strlen(env);
+    }
+
+    /*
+     * Search through our quirk table and concatenate the disabled
+     * values with whatever we find.
+     */
+    xsdt = AcpiGbl_XSDT;
+    for (quirk = acpi_quirks_table; quirk->OemId; quirk++) {
+	if (!strncmp(xsdt->OemId, quirk->OemId, strlen(quirk->OemId)) &&
+	    (xsdt->OemRevision == quirk->OemRevision ||
+	    quirk->OemRevision == ACPI_OEM_REV_ANY)) {
+		len += strlen(quirk->value) + 2;
+		if ((tmp = malloc(len, M_TEMP, M_NOWAIT)) == NULL)
+		    goto out;
+		sprintf(tmp, "%s %s", env ? env : "", quirk->value);
+		setenv("debug.acpi.disabled", tmp);
+		free(tmp, M_TEMP);
+		break;
+	}
+    }
+
+out:
+    if (env)
+	freeenv(env);
+}
+
 /*
  * Handle a new device being added
  */
@@ -590,7 +652,6 @@
     return (retval);
 }
 
-
 /*
  * Handle per-device ivars
  */
@@ -1832,24 +1893,24 @@
     char	*cp, *env;
     int		len;
 
-    if ((env = getenv("debug.acpi.disable")) == NULL)
+    if ((env = getenv("debug.acpi.disabled")) == NULL)
 	return (0);
-    if (!strcmp(env, "all")) {
+    if (strcmp(env, "all") == 0) {
 	freeenv(env);
 	return (1);
     }
 
-    /* scan the disable list checking for a match */
+    /* Scan the disable list, checking for a match. */
     cp = env;
     for (;;) {
-	while ((*cp != 0) && isspace(*cp))
+	while (*cp != '\0' && isspace(*cp))
 	    cp++;
-	if (*cp == 0)
+	if (*cp == '\0')
 	    break;
 	len = 0;
-	while ((cp[len] != 0) && !isspace(cp[len]))
+	while (cp[len] != '\0' && !isspace(cp[len]))
 	    len++;
-	if (!strncmp(cp, subsys, len)) {
+	if (strncmp(cp, subsys, len) == 0) {
 	    freeenv(env);
 	    return (1);
 	}
@@ -2211,16 +2272,16 @@
     {"ACPI_CA_DISASSEMBLER",	ACPI_CA_DISASSEMBLER},
     {"ACPI_ALL_COMPONENTS",	ACPI_ALL_COMPONENTS},
 
-    {"ACPI_BUS",		ACPI_BUS},
-    {"ACPI_SYSTEM",		ACPI_SYSTEM},
-    {"ACPI_POWER",		ACPI_POWER},
-    {"ACPI_EC", 		ACPI_EC},
     {"ACPI_AC_ADAPTER",		ACPI_AC_ADAPTER},
     {"ACPI_BATTERY",		ACPI_BATTERY},
+    {"ACPI_BUS",		ACPI_BUS},
     {"ACPI_BUTTON",		ACPI_BUTTON},
+    {"ACPI_EC", 		ACPI_EC},
+    {"ACPI_FAN",		ACPI_FAN},
+    {"ACPI_POWERRES",		ACPI_POWERRES},
     {"ACPI_PROCESSOR",		ACPI_PROCESSOR},
     {"ACPI_THERMAL",		ACPI_THERMAL},
-    {"ACPI_FAN",		ACPI_FAN},
+    {"ACPI_TIMER",		ACPI_TIMER},
     {"ACPI_ALL_DRIVERS",	ACPI_ALL_DRIVERS},
     {NULL, 0}
 };

==== //depot/projects/hammer/sys/dev/acpica/acpi_powerres.c#6 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_powerres.c,v 1.17 2004/02/12 20:45:01 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_powerres.c,v 1.18 2004/03/03 03:02:16 njl Exp $");
 
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -58,7 +58,7 @@
 MALLOC_DEFINE(M_ACPIPWR, "acpipwr", "ACPI power resources");
 
 /* Hooks for the ACPI CA debugging infrastructure */
-#define _COMPONENT	ACPI_POWER
+#define _COMPONENT	ACPI_POWERRES
 ACPI_MODULE_NAME("POWERRES")
 
 /* Return values from _STA on a power resource */

==== //depot/projects/hammer/sys/dev/acpica/acpi_timer.c#5 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/acpica/acpi_timer.c,v 1.25 2003/08/28 16:06:30 njl Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpi_timer.c,v 1.26 2004/03/03 03:02:16 njl Exp $
  */
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -52,7 +52,7 @@
  */
 
 /* Hooks for the ACPI CA debugging infrastructure */
-#define _COMPONENT	ACPI_SYSTEM
+#define _COMPONENT	ACPI_TIMER
 ACPI_MODULE_NAME("TIMER")
 
 static device_t	acpi_timer_dev;

==== //depot/projects/hammer/sys/dev/acpica/acpivar.h#19 (text+ko) ====

@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.54 2004/02/19 18:20:03 njl Exp $
+ *	$FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.55 2004/03/03 03:02:16 njl Exp $
  */
 
 #include "bus_if.h"
@@ -115,17 +115,16 @@
  * ACPI CA does not define layers for non-ACPI CA drivers.
  * We define some here within the range provided.
  */
-#define	ACPI_BUS		0x00010000
-#define	ACPI_SYSTEM		0x00020000
-#define	ACPI_POWER		0x00040000
-#define	ACPI_EC			0x00080000
-#define	ACPI_AC_ADAPTER		0x00100000
-#define	ACPI_BATTERY		0x00200000
-#define	ACPI_BUTTON		0x00400000
+#define	ACPI_AC_ADAPTER		0x00010000
+#define	ACPI_BATTERY		0x00020000
+#define	ACPI_BUS		0x00040000
+#define	ACPI_BUTTON		0x00080000
+#define	ACPI_EC			0x00100000
+#define	ACPI_FAN		0x00200000
+#define	ACPI_POWERRES		0x00400000
 #define	ACPI_PROCESSOR		0x00800000
 #define	ACPI_THERMAL		0x01000000
-#define	ACPI_FAN		0x02000000
-#define	ACPI_TOSHIBA		0x04000000
+#define	ACPI_TIMER		0x02000000
 
 /*
  * Constants for different interrupt models used with acpi_SetIntrModel().

==== //depot/projects/hammer/sys/dev/drm/drm_drv.h#12 (text+ko) ====

@@ -28,7 +28,7 @@
  *    Rickard E. (Rik) Faith <faith@valinux.com>
  *    Gareth Hughes <gareth@valinux.com>
  *
- * $FreeBSD: src/sys/dev/drm/drm_drv.h,v 1.21 2004/02/21 21:10:42 phk Exp $
+ * $FreeBSD: src/sys/dev/drm/drm_drv.h,v 1.22 2004/03/03 06:18:29 obrien Exp $
  */
 
 /*
@@ -829,7 +829,7 @@
 	drm_file_t *priv;
 	DRM_DEVICE;
 	int retcode = 0;
-	DRMFILE filp = (void *)(DRM_CURRENTPID);
+	DRMFILE filp = (void *)(intptr_t)(DRM_CURRENTPID);
 	
 	DRM_DEBUG( "open_count = %d\n", dev->open_count );
 
@@ -907,7 +907,7 @@
 		}
 	}
 #elif __HAVE_DMA
-	DRM(reclaim_buffers)( dev, (void *)priv->pid );
+	DRM(reclaim_buffers)( dev, (void *)(intptr_t)priv->pid );
 #endif
 
 #if defined (__FreeBSD__) && (__FreeBSD_version >= 500000)
@@ -952,7 +952,7 @@
 	int nr = DRM_IOCTL_NR(cmd);
 	drm_file_t *priv;
 
-	DRM_GET_PRIV_WITH_RETURN(priv, (DRMFILE)DRM_CURRENTPID);
+	DRM_GET_PRIV_WITH_RETURN(priv, (DRMFILE)(intptr_t)DRM_CURRENTPID);
 
 	atomic_inc( &dev->counts[_DRM_STAT_IOCTLS] );
 	++priv->ioctl_count;
@@ -1007,7 +1007,7 @@
 	    !priv->authenticated))
 		return EACCES;
 
-	retcode = func(kdev, cmd, data, flags, p, (void *)DRM_CURRENTPID);
+	retcode = func(kdev, cmd, data, flags, p, (void *)(intptr_t)DRM_CURRENTPID);
 
 	return DRM_ERR(retcode);
 }
@@ -1038,7 +1038,7 @@
 	DRM_LOCK();
 	for (;;) {
 		if (DRM(lock_take)(&dev->lock.hw_lock->lock, lock.context)) {
-			dev->lock.filp = (void *)DRM_CURRENTPID;
+			dev->lock.filp = (void *)(intptr_t)DRM_CURRENTPID;
 			dev->lock.lock_time = jiffies;
 			atomic_inc(&dev->counts[_DRM_STAT_LOCKS]);
 			break;  /* Got lock */

==== //depot/projects/hammer/sys/dev/drm/drm_os_freebsd.h#11 (text+ko) ====

@@ -28,7 +28,7 @@
  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  * OTHER DEALINGS IN THE SOFTWARE.
  *
- * $FreeBSD: src/sys/dev/drm/drm_os_freebsd.h,v 1.17 2004/02/21 19:42:50 phk Exp $
+ * $FreeBSD: src/sys/dev/drm/drm_os_freebsd.h,v 1.18 2004/03/03 06:19:03 obrien Exp $
  */
 
 #include <sys/param.h>
@@ -178,7 +178,7 @@
 
 #define DRM_GET_PRIV_WITH_RETURN(_priv, _filp)			\
 do {								\
-	if (_filp != (DRMFILE)DRM_CURRENTPID) {			\
+	if (_filp != (DRMFILE)(intptr_t)DRM_CURRENTPID) {	\
 		DRM_ERROR("filp doesn't match curproc\n");	\
 		return EINVAL;					\
 	}							\
@@ -291,6 +291,12 @@
 #define DRM_READMEMORYBARRIER()		alpha_mb();
 #define DRM_WRITEMEMORYBARRIER()	alpha_wmb();
 #define DRM_MEMORYBARRIER()		alpha_mb();
+#elif defined(__amd64__)
+#define DRM_READMEMORYBARRIER()		__asm __volatile( \
+					"lock; addl $0,0(%%rsp)" : : : "memory");
+#define DRM_WRITEMEMORYBARRIER()	__asm __volatile("" : : : "memory");
+#define DRM_MEMORYBARRIER()		__asm __volatile( \
+					"lock; addl $0,0(%%rsp)" : : : "memory");
 #endif
 
 #define PAGE_ALIGN(addr) round_page(addr)

==== //depot/projects/hammer/sys/dev/drm/drm_vm.h#7 (text+ko) ====

@@ -22,7 +22,7 @@
  * DEALINGS IN THE SOFTWARE.
  *
  *
- * $FreeBSD: src/sys/dev/drm/drm_vm.h,v 1.8 2003/10/24 01:48:16 anholt Exp $
+ * $FreeBSD: src/sys/dev/drm/drm_vm.h,v 1.9 2004/03/03 06:18:29 obrien Exp $
  */
 
 #if defined(__FreeBSD__) && __FreeBSD_version >= 500102
@@ -68,7 +68,7 @@
 	drm_map_list_entry_t *listentry = NULL;
 	drm_file_t *priv;
 
-	DRM_GET_PRIV_WITH_RETURN(priv, (DRMFILE)DRM_CURRENTPID);
+	DRM_GET_PRIV_WITH_RETURN(priv, (DRMFILE)(intptr_t)DRM_CURRENTPID);
 
 	if (!priv->authenticated)
 		return DRM_ERR(EACCES);

==== //depot/projects/hammer/sys/dev/drm/radeon_state.c#6 (text+ko) ====

@@ -26,7 +26,7 @@
  *    Gareth Hughes <gareth@valinux.com>
  *    Kevin E. Martin <martin@valinux.com>
  *
- * $FreeBSD: src/sys/dev/drm/radeon_state.c,v 1.9 2003/11/12 20:56:30 anholt Exp $
+ * $FreeBSD: src/sys/dev/drm/radeon_state.c,v 1.10 2004/03/03 06:20:36 obrien Exp $
  */
 
 #include "dev/drm/radeon.h"
@@ -2400,7 +2400,7 @@
 		break;
 	case RADEON_PARAM_SAREA_HANDLE:
 		/* The lock is the first dword in the sarea. */
-		value = (int)dev->lock.hw_lock; 
+		value = (long)dev->lock.hw_lock; 
 		break;	
 	case RADEON_PARAM_GART_TEX_HANDLE:
 		value = dev_priv->gart_textures_offset;
@@ -2409,7 +2409,7 @@
 		return DRM_ERR(EINVAL);
 	}
 
-	if ( DRM_COPY_TO_USER( param.value, &value, sizeof(int) ) ) {
+	if ( DRM_COPY_TO_USER( param.value, &value, sizeof(&value) ) ) {
 		DRM_ERROR( "copy_to_user\n" );
 		return DRM_ERR(EFAULT);
 	}

==== //depot/projects/hammer/sys/dev/drm/sis_mm.c#3 (text+ko) ====

@@ -26,7 +26,7 @@
  * Authors:
  *    Sung-Ching Lin <sclin@sis.com.tw>
  * 
- * $FreeBSD: src/sys/dev/drm/sis_mm.c,v 1.2 2003/10/24 01:48:17 anholt Exp $
+ * $FreeBSD: src/sys/dev/drm/sis_mm.c,v 1.3 2004/03/03 06:20:36 obrien Exp $
  */
 
 #include "dev/drm/sis.h"
@@ -368,7 +368,7 @@
 
 	if (i < MAX_CONTEXT) {
 		set_t *set;
-		unsigned int item;
+		ITEM_TYPE item;
 		int retval;
 
 		DRM_DEBUG("find socket %d, context = %d\n", i, context);
@@ -377,7 +377,7 @@
 		set = global_ppriv[i].sets[0];
 		retval = setFirst(set, &item);
 		while (retval) {
-			DRM_DEBUG("free video memory 0x%x\n", item);
+			DRM_DEBUG("free video memory 0x%lx\n", item);
 #if defined(__linux__) && defined(CONFIG_FB_SIS)
 			sis_free(item);
 #else
@@ -391,7 +391,7 @@
 		set = global_ppriv[i].sets[1];
 		retval = setFirst(set, &item);
 		while (retval) {
-			DRM_DEBUG("free agp memory 0x%x\n", item);
+			DRM_DEBUG("free agp memory 0x%lx\n", item);
 			mmFreeMem((PMemBlock)item);
 			retval = setNext(set, &item);
 		}

==== //depot/projects/hammer/sys/dev/ed/if_ed.c#13 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed.c,v 1.224 2003/12/08 07:54:12 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed.c,v 1.226 2004/03/03 07:33:43 obrien Exp $");
 
 /*
  * Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@@ -100,7 +100,7 @@
 				    /* u_short */ int, /* u_short */ int);
 static u_short	ed_hpp_write_mbufs(struct ed_softc *, struct mbuf *, int);
 
-static u_short	ed_pio_write_mbufs(struct ed_softc *, struct mbuf *, int);
+static u_short	ed_pio_write_mbufs(struct ed_softc *, struct mbuf *, long);
 
 static void	ed_setrcr	(struct ed_softc *);
 
@@ -1149,7 +1149,8 @@
 	sc->tx_page_start = memsize / ED_PAGE_SIZE;
 
 	if (ED_FLAGS_GETTYPE(flags) == ED_FLAGS_GWETHER) {
-		int     x, i, mstart = 0, msize = 0;
+		int     x, i, msize = 0;
+		long    mstart = 0;
 		char    pbuf0[ED_PAGE_SIZE], pbuf[ED_PAGE_SIZE], tbuf[ED_PAGE_SIZE];
 
 		for (i = 0; i < ED_PAGE_SIZE; i++)
@@ -1198,10 +1199,10 @@
 		}
 
 		if (msize == 0) {
-			device_printf(dev, "Cannot find any RAM, start : %d, x = %d.\n", mstart, x);
+			device_printf(dev, "Cannot find any RAM, start : %ld, x = %d.\n", mstart, x);
 			return (ENXIO);
 		}
-		device_printf(dev, "RAM start at %d, size : %d.\n", mstart, msize);
+		device_printf(dev, "RAM start at %ld, size : %d.\n", mstart, msize);
 
 		sc->mem_size = msize;
 		sc->mem_start = (caddr_t) mstart;
@@ -2214,7 +2215,7 @@
 			}
 		}
 	} else {
-		len = ed_pio_write_mbufs(sc, m, (int)buffer);
+		len = ed_pio_write_mbufs(sc, m, (long)buffer);
 		if (len == 0) {
 			m_freem(m0);
 			goto outloop;
@@ -2290,7 +2291,7 @@
 		if (sc->mem_shared)
 			packet_hdr = *(struct ed_ring *) packet_ptr;
 		else
-			ed_pio_readmem(sc, (int)packet_ptr, (char *) &packet_hdr,
+			ed_pio_readmem(sc, (long)packet_ptr, (char *) &packet_hdr,
 				       sizeof(packet_hdr));
 		len = packet_hdr.count;
 		if (len > (ETHER_MAX_LEN - ETHER_CRC_LEN + sizeof(struct ed_ring)) ||
@@ -2761,7 +2762,7 @@
 		if (sc->mem_shared)
 			bcopy(src, dst, tmp_amount);
 		else
-			ed_pio_readmem(sc, (int)src, dst, tmp_amount);
+			ed_pio_readmem(sc, (long)src, dst, tmp_amount);
 
 		amount -= tmp_amount;
 		src = sc->mem_ring;
@@ -2770,7 +2771,7 @@
 	if (sc->mem_shared)
 		bcopy(src, dst, amount);
 	else
-		ed_pio_readmem(sc, (int)src, dst, amount);
+		ed_pio_readmem(sc, (long)src, dst, amount);
 
 	return (src + amount);
 }
@@ -2861,7 +2862,7 @@
 void
 ed_pio_readmem(sc, src, dst, amount)
 	struct ed_softc *sc;
-	int src;
+	long src;
 	unsigned char *dst;
 	unsigned short amount;
 {
@@ -2951,7 +2952,7 @@
 ed_pio_write_mbufs(sc, m, dst)
 	struct ed_softc *sc;
 	struct mbuf *m;
-	int dst;

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



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