CVS commit: src/usr.bin/ftp

2009-08-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Aug 17 09:08:17 UTC 2009

Modified Files:
src/usr.bin/ftp: fetch.c

Log Message:
back out previous; luke says:
'@' is a reserved URI char per RFC 3986, use %40


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/usr.bin/ftp/fetch.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/ftp/fetch.c
diff -u src/usr.bin/ftp/fetch.c:1.190 src/usr.bin/ftp/fetch.c:1.191
--- src/usr.bin/ftp/fetch.c:1.190	Sat Aug 15 22:49:23 2009
+++ src/usr.bin/ftp/fetch.c	Mon Aug 17 05:08:16 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fetch.c,v 1.190 2009/08/16 02:49:23 christos Exp $	*/
+/*	$NetBSD: fetch.c,v 1.191 2009/08/17 09:08:16 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.190 2009/08/16 02:49:23 christos Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.191 2009/08/17 09:08:16 christos Exp $");
 #endif /* not lint */
 
 /*
@@ -374,7 +374,7 @@
 		*path = ftp_strdup(ep);
 	}
 
-	cp = strrchr(thost, '@');	/* look for user[:pass]@ in URLs */
+	cp = strchr(thost, '@');	/* look for user[:pass]@ in URLs */
 	if (cp != NULL) {
 		if (*utype == FTP_URL_T)
 			anonftp = 0;	/* disable anonftp */



CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2009-08-17 Thread VANHULLEBUS Yvan
Module Name:src
Committed By:   vanhu
Date:   Mon Aug 17 11:59:10 UTC 2009

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon: crypto_openssl.h

Log Message:
removed a self include


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.h
diff -u src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.h:1.6 src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.h:1.7
--- src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.h:1.6	Thu Mar 12 10:57:26 2009
+++ src/crypto/dist/ipsec-tools/src/racoon/crypto_openssl.h	Mon Aug 17 11:59:10 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: crypto_openssl.h,v 1.6 2009/03/12 10:57:26 tteras Exp $	*/
+/*	$NetBSD: crypto_openssl.h,v 1.7 2009/08/17 11:59:10 vanhu Exp $	*/
 
 /* Id: crypto_openssl.h,v 1.11 2004/11/13 11:28:01 manubsd Exp */
 
@@ -34,8 +34,6 @@
 #ifndef _CRYPTO_OPENSSL_H
 #define _CRYPTO_OPENSSL_H
 
-#include "crypto_openssl.h"
-
 #include 
 #include 
 



CVS commit: src/crypto/dist/ipsec-tools/src/racoon

2009-08-17 Thread VANHULLEBUS Yvan
Module Name:src
Committed By:   vanhu
Date:   Mon Aug 17 12:00:53 UTC 2009

Modified Files:
src/crypto/dist/ipsec-tools/src/racoon: schedule.h

Log Message:
include stddef.h so we have a chance to get the system offsetof if present


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/crypto/dist/ipsec-tools/src/racoon/schedule.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/dist/ipsec-tools/src/racoon/schedule.h
diff -u src/crypto/dist/ipsec-tools/src/racoon/schedule.h:1.7 src/crypto/dist/ipsec-tools/src/racoon/schedule.h:1.8
--- src/crypto/dist/ipsec-tools/src/racoon/schedule.h:1.7	Fri Jan 23 08:25:07 2009
+++ src/crypto/dist/ipsec-tools/src/racoon/schedule.h	Mon Aug 17 12:00:53 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: schedule.h,v 1.7 2009/01/23 08:25:07 tteras Exp $	*/
+/*	$NetBSD: schedule.h,v 1.8 2009/08/17 12:00:53 vanhu Exp $	*/
 
 /* Id: schedule.h,v 1.5 2006/05/03 21:53:42 vanhu Exp */
 
@@ -35,6 +35,8 @@
 #ifndef _SCHEDULE_H
 #define _SCHEDULE_H
 
+#include 
+
 #include 
 #if TIME_WITH_SYS_TIME
 # include 



CVS commit: src/sys/dev/gpio

2009-08-17 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Mon Aug 17 12:44:44 UTC 2009

Modified Files:
src/sys/dev/gpio: gpio.c

Log Message:
unfold short lines, fold long line.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/gpio/gpio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/gpio/gpio.c
diff -u src/sys/dev/gpio/gpio.c:1.25 src/sys/dev/gpio/gpio.c:1.26
--- src/sys/dev/gpio/gpio.c:1.25	Fri Aug  7 08:05:48 2009
+++ src/sys/dev/gpio/gpio.c	Mon Aug 17 12:44:44 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: gpio.c,v 1.25 2009/08/07 08:05:48 mbalmer Exp $ */
+/* $NetBSD: gpio.c,v 1.26 2009/08/17 12:44:44 mbalmer Exp $ */
 /*	$OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $	*/
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.25 2009/08/07 08:05:48 mbalmer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.26 2009/08/17 12:44:44 mbalmer Exp $");
 
 /*
  * General Purpose Input/Output framework.
@@ -300,8 +300,7 @@
 }
 
 int
-gpioopen(dev_t dev, int flag, int mode,
-struct lwp *l)
+gpioopen(dev_t dev, int flag, int mode, struct lwp *l)
 {
 	struct gpio_softc *sc;
 	int ret;
@@ -328,8 +327,7 @@
 }
 
 int
-gpioclose(dev_t dev, int flag, int mode,
-struct lwp *l)
+gpioclose(dev_t dev, int flag, int mode, struct lwp *l)
 {
 	struct gpio_softc *sc;
 
@@ -353,8 +351,7 @@
 }
 
 int
-gpioioctl(dev_t dev, u_long cmd, void *data, int flag,
-struct lwp *l)
+gpioioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
 {
 	struct gpio_softc *sc;
 	gpio_chipset_tag_t gc;
@@ -375,7 +372,8 @@
 	gc = sc->sc_gc;
 
 	if (cmd != GPIOINFO && !device_is_active(sc->sc_dev)) {
-		DPRINTF(("%s: device is not active\n", device_xname(sc->sc_dev)));
+		DPRINTF(("%s: device is not active\n",
+		device_xname(sc->sc_dev)));
 		return EBUSY;
 	}
 	



CVS commit: src/crypto/dist/ipsec-tools/src/libipsec

2009-08-17 Thread VANHULLEBUS Yvan
Module Name:src
Committed By:   vanhu
Date:   Mon Aug 17 13:52:14 UTC 2009

Modified Files:
src/crypto/dist/ipsec-tools/src/libipsec: libpfkey.h

Log Message:
do not use SADB_X_NAT_T_NEW_MAPPING to check system support for NAT-T, as at 
least FreeBSD doesn't have this define anymore


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 \
src/crypto/dist/ipsec-tools/src/libipsec/libpfkey.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/dist/ipsec-tools/src/libipsec/libpfkey.h
diff -u src/crypto/dist/ipsec-tools/src/libipsec/libpfkey.h:1.16 src/crypto/dist/ipsec-tools/src/libipsec/libpfkey.h:1.17
--- src/crypto/dist/ipsec-tools/src/libipsec/libpfkey.h:1.16	Fri Jul  3 06:40:10 2009
+++ src/crypto/dist/ipsec-tools/src/libipsec/libpfkey.h	Mon Aug 17 13:52:14 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: libpfkey.h,v 1.16 2009/07/03 06:40:10 tteras Exp $	*/
+/*	$NetBSD: libpfkey.h,v 1.17 2009/08/17 13:52:14 vanhu Exp $	*/
 
 /* Id: libpfkey.h,v 1.13 2005/12/04 20:26:43 manubsd Exp */
 
@@ -161,7 +161,7 @@
 
 /* XXX should be somewhere else !!!
  */
-#ifdef SADB_X_NAT_T_NEW_MAPPING
+#ifdef SADB_X_EXT_NAT_T_TYPE
 #define PFKEY_ADDR_X_PORT(ext) (ntohs(((struct sadb_x_nat_t_port *)ext)->sadb_x_nat_t_port_port))
 #define PFKEY_ADDR_X_NATTYPE(ext) ( ext != NULL && ((struct sadb_x_nat_t_type *)ext)->sadb_x_nat_t_type_type )
 #endif



CVS commit: src/sys/dev/pci

2009-08-17 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Aug 17 14:11:10 UTC 2009

Modified Files:
src/sys/dev/pci: pcireg.h

Log Message:
A few new PCI register #defines:
 - size of config and extended config space
 - EFI ROM code type number
 - extended capability list register bits


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/pcireg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/pcireg.h
diff -u src/sys/dev/pci/pcireg.h:1.59 src/sys/dev/pci/pcireg.h:1.60
--- src/sys/dev/pci/pcireg.h:1.59	Fri Jan 16 23:23:34 2009
+++ src/sys/dev/pci/pcireg.h	Mon Aug 17 14:11:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcireg.h,v 1.59 2009/01/16 23:23:34 cegger Exp $	*/
+/*	$NetBSD: pcireg.h,v 1.60 2009/08/17 14:11:09 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996, 1999, 2000
@@ -41,6 +41,13 @@
  */
 
 /*
+ * Size of each function's configuration space.
+ */
+
+#define	PCI_CONF_SIZE			0x100
+#define	PCI_EXTCONF_SIZE		0x1000
+
+/*
  * Device identification register; contains a vendor ID and a device ID.
  */
 #define	PCI_ID_REG			0x00
@@ -742,6 +749,7 @@
 #define	PCI_ROM_CODE_TYPE_X86	0		/* Intel x86 BIOS */
 #define	PCI_ROM_CODE_TYPE_OFW	1		/* Open Firmware */
 #define	PCI_ROM_CODE_TYPE_HPPA	2		/* HP PA/RISC */
+#define	PCI_ROM_CODE_TYPE_EFI	3		/* EFI Image */
 
 #define	PCI_ROM_INDICATOR_LAST	0x80
 
@@ -756,4 +764,14 @@
 #define	PCI_RETRY_TIMEOUT_REG		0x40
 #define		PCI_RETRY_TIMEOUT_REG_MASK	0xff00
 
+/*
+ * PCI-X 2.0 Extended Capability List
+ */
+
+#define	PCI_EXTCAPLIST_BASE		0x100
+
+#define	PCI_EXTCAPLIST_CAP(ecr)		((ecr) & 0x)
+#define	PCI_EXTCAPLIST_VERSION(ecr)	(((ecr) >> 16) & 0xf)
+#define	PCI_EXTCAPLIST_NEXT(ecr)	(((ecr) >> 20) & 0xfff)
+
 #endif /* _DEV_PCI_PCIREG_H_ */



CVS commit: src/usr.bin/nbperf

2009-08-17 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Aug 17 14:15:07 UTC 2009

Modified Files:
src/usr.bin/nbperf: nbperf-bdz.c

Log Message:
GCC doesn't trace switch (foo & 7) completely, so add a default: abort()
to avoid warnings about unused variables.
Consistently use \t for the output function.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/nbperf/nbperf-bdz.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/nbperf/nbperf-bdz.c
diff -u src/usr.bin/nbperf/nbperf-bdz.c:1.1 src/usr.bin/nbperf/nbperf-bdz.c:1.2
--- src/usr.bin/nbperf/nbperf-bdz.c:1.1	Sat Aug 15 16:21:05 2009
+++ src/usr.bin/nbperf/nbperf-bdz.c	Mon Aug 17 14:15:07 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: nbperf-bdz.c,v 1.1 2009/08/15 16:21:05 joerg Exp $	*/
+/*	$NetBSD: nbperf-bdz.c,v 1.2 2009/08/17 14:15:07 joerg Exp $	*/
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: nbperf-bdz.c,v 1.1 2009/08/15 16:21:05 joerg Exp $");
+__RCSID("$NetBSD: nbperf-bdz.c,v 1.2 2009/08/17 14:15:07 joerg Exp $");
 
 #include 
 #include 
@@ -259,42 +259,44 @@
 	fprintf(nbperf->output,
 	"\tswitch ((idx >> 5) & 7) {\n"
 	"\tcase 0:\n"
-	"\t	idx2 = idx - holes64k[idx >> 16] - holes256[idx >> 8];\n"
-	"\t	break;\n"
+	"\t\tidx2 = idx - holes64k[idx >> 16] - holes256[idx >> 8];\n"
+	"\t\tbreak;\n"
 	"\tcase 1: case 2:\n"
-	"\t	idx2 = idx - holes64k[idx >> 16] - holes256[idx >> 8]\n"
-	"\t	- holes256_64[idx >> 8];\n"
-	"\t	break;\n"
+	"\t\tidx2 = idx - holes64k[idx >> 16] - holes256[idx >> 8]\n"
+	"\t\t- holes256_64[idx >> 8];\n"
+	"\t\tbreak;\n"
 	"\tcase 3: case 4:\n"
-	"\t	idx2 = idx - holes64k[idx >> 16] - holes256[idx >> 8]\n"
-	"\t	- holes256_128[idx >> 8];\n"
-	"\t	break;\n"
+	"\t\tidx2 = idx - holes64k[idx >> 16] - holes256[idx >> 8]\n"
+	"\t\t- holes256_128[idx >> 8];\n"
+	"\t\tbreak;\n"
 	"\tcase 5: case 6:\n"
-	"\t	idx2 = idx - holes64k[idx >> 16] - holes256[idx >> 8]\n"
-	"\t	- holes256_192[idx >> 8];\n"
-	"\t	break;\n"
+	"\t\tidx2 = idx - holes64k[idx >> 16] - holes256[idx >> 8]\n"
+	"\t\t- holes256_192[idx >> 8];\n"
+	"\t\tbreak;\n"
 	"\tcase 7:\n"
-	"\t	idx2 = idx - holes64k[(idx + 32) >> 16] -\n"
-	"\t	holes256[(idx + 32) >> 8];\n"
-	"\t	break;\n"
+	"\t\tidx2 = idx - holes64k[(idx + 32) >> 16] -\n"
+	"\t\tholes256[(idx + 32) >> 8];\n"
+	"\t\tbreak;\n"
+	"\tdefault:\n"
+	"\t\tabort();\n"
 	"\t}\n"
 	"\tswitch ((idx >> 4) & 3) {\n"
 	"\tcase 1:\n"
-	"\t	m = (g[(idx >> 4) - 1] & (g[(idx >> 4) - 1] >> 1) & 0xU);\n"
-	"\t	idx2 -= popcount32(m);\n"
+	"\t\tm = (g[(idx >> 4) - 1] & (g[(idx >> 4) - 1] >> 1) & 0xU);\n"
+	"\t\tidx2 -= popcount32(m);\n"
 	"\tcase 0:\n"
-	"\t	m = (g[idx >> 4] & (g[idx >> 4] >> 1) & 0xU);\n"
-	"\t	m &= ((2U << (2 * (idx & 15))) - 1);\n"
-	"\t	idx2 -= popcount32(m);\n"
-	"\t	break;\n"
+	"\t\tm = (g[idx >> 4] & (g[idx >> 4] >> 1) & 0xU);\n"
+	"\t\tm &= ((2U << (2 * (idx & 15))) - 1);\n"
+	"\t\tidx2 -= popcount32(m);\n"
+	"\t\tbreak;\n"
 	"\tcase 2:\n"
-	"\t	m = (g[(idx >> 4) + 1] & (g[(idx >> 4) + 1] >> 1) & 0xU);\n"
-	"\t	idx2 += popcount32(m);\n"
+	"\t\tm = (g[(idx >> 4) + 1] & (g[(idx >> 4) + 1] >> 1) & 0xU);\n"
+	"\t\tidx2 += popcount32(m);\n"
 	"\tcase 3:\n"
-	"\t	m = (g[idx >> 4] & (g[idx >> 4] >> 1) & 0xU);\n"
-	"\t	m &= ~((2U << (2 * (idx & 15))) - 1);\n"
-	"\t	idx2 += popcount32(m);\n"
-	"\t	break;\n"
+	"\t\tm = (g[idx >> 4] & (g[idx >> 4] >> 1) & 0xU);\n"
+	"\t\tm &= ~((2U << (2 * (idx & 15))) - 1);\n"
+	"\t\tidx2 += popcount32(m);\n"
+	"\t\tbreak;\n"
 	"\t}\n\n");
 
 	fprintf(nbperf->output,



CVS commit: src/sys/arch/i386/pci

2009-08-17 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Mon Aug 17 14:18:58 UTC 2009

Modified Files:
src/sys/arch/i386/pci: gscpcib.c

Log Message:
Add struct pcib_softc to the gscpcib's softc, it is needed since we call
pcibattach() later.  This fixes the driver and lets the GPIO pins attach.
While here, remove the empty gscpcib_childdetach function.  Fixes GPIO
on my Soekris net4801 where I can now control the error LED...

"please commit" joerg@


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/i386/pci/gscpcib.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/i386/pci/gscpcib.c
diff -u src/sys/arch/i386/pci/gscpcib.c:1.12 src/sys/arch/i386/pci/gscpcib.c:1.13
--- src/sys/arch/i386/pci/gscpcib.c:1.12	Mon May  4 12:41:09 2009
+++ src/sys/arch/i386/pci/gscpcib.c	Mon Aug 17 14:18:58 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: gscpcib.c,v 1.12 2009/05/04 12:41:09 cegger Exp $	*/
+/*	$NetBSD: gscpcib.c,v 1.13 2009/08/17 14:18:58 mbalmer Exp $	*/
 /*	$OpenBSD: gscpcib.c,v 1.3 2004/10/05 19:02:33 grange Exp $	*/
 /*
  * Copyright (c) 2004 Alexander Yurchenko 
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gscpcib.c,v 1.12 2009/05/04 12:41:09 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gscpcib.c,v 1.13 2009/08/17 14:18:58 mbalmer Exp $");
 
 #include 
 #include 
@@ -40,8 +40,11 @@
 #include 
 
 #include 
+#include 
 
 struct gscpcib_softc {
+	struct pcib_softc sc_pcib;
+
 	bool sc_gpio_present;
 
 	/* GPIO interface */
@@ -54,29 +57,19 @@
 int	gscpcib_match(device_t, cfdata_t, void *);
 void	gscpcib_attach(device_t, device_t, void *);
 int	gscpcib_detach(device_t, int);
-void	gscpcib_childdetached(device_t, device_t);
 
 int	gscpcib_gpio_pin_read(void *, int);
 void	gscpcib_gpio_pin_write(void *, int, int);
 void	gscpcib_gpio_pin_ctl(void *, int, int);
 
-/* arch/i386/pci/pcib.c */
+/* arch/x86/pci/pcib.c */
 voidpcibattach(device_t, device_t, void *);
 
-CFATTACH_DECL2_NEW(gscpcib, sizeof(struct gscpcib_softc),
-	gscpcib_match, gscpcib_attach, gscpcib_detach, NULL, NULL,
-	gscpcib_childdetached);
+CFATTACH_DECL_NEW(gscpcib, sizeof(struct gscpcib_softc),
+	gscpcib_match, gscpcib_attach, gscpcib_detach, NULL);
 
 extern struct cfdriver gscpcib_cd;
 
-void
-gscpcib_childdetached(device_t self, device_t child)
-{
-	/* We hold no pointers to child devices, so there is nothing
-	 * to do here.
-	 */
-}
-
 int
 gscpcib_match(device_t parent, cfdata_t match, void *aux)
 {



CVS commit: src/sys/dist/acpica

2009-08-17 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Mon Aug 17 15:36:10 UTC 2009

Modified Files:
src/sys/dist/acpica: hwregs.c

Log Message:
Apply fix from upstream:
http://git.moblin.org/cgit.cgi/acpica/commit/?id=26a2eea9f4a18acb0ba2a92070d945d9835df948

I uncovered the bug by having the console flooded with:

ACPI Error (evgpe-0896): No handler or method for GPE[ 0], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[ 1], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[ 2], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[ 4], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[ 5], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[ 6], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[ 7], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[ 8], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[ 9], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[ A], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[ B], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[ C], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[ D], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[ E], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[ F], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[10], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[11], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[12], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[13], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[14], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[15], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[16], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[17], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[18], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[19], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[1A], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[1B], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[1C], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[1D], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[1E], disabling event 
[20080321]
ACPI Error (evgpe-0896): No handler or method for GPE[1F], disabling event 
[20080321]

and with breaking into ddb:

ACPI Error (evgpe-0899): No handler or method for GPE[ 0], disabling event 
[20080321]
fatal breakpoint trap in supervisor mode
trap type 1 code 0 rip 8020c1fd cs e030 rflags 296 cr2  0 cpl 8 rsp 
80f32c98
Stopped in pid 0.1 (system) at  netbsd:breakpoint+0x5:  leave
breakpoint() at netbsd:breakpoint+0x5
AcpiEvGpeDispatch() at netbsd:AcpiEvGpeDispatch+0x9f
AcpiEvGpeDetect() at netbsd:AcpiEvGpeDetect+0x136
AcpiEvSciXruptHandler() at netbsd:AcpiEvSciXruptHandler+0x46
Xresume_xenev6() at netbsd:Xresume_xenev6+0x55

With this merged fix console is no longer flooded and I get in dmesg:

ACPI Exception (evevent-0165): AE_BAD_ADDRESS, Unable to initialize fixed 
events [20080321]
acpi0: unable to enable ACPI: AE_BAD_ADDRESS

Upstream fix pointed out by jmcneill@, merged fix ok'd by jo...@.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dist/acpica/hwregs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dist/acpica/hwregs.c
diff -u src/sys/dist/acpica/hwregs.c:1.4 src/sys/dist/acpica/hwregs.c:1.5
--- src/sys/dist/acpica/hwregs.c:1.4	Sat Apr 12 16:16:08 2008
+++ src/sys/dist/acpica/hwregs.c	Mon Aug 17 15:36:10 2009
@@ -3,7 +3,7 @@
  *
  * Module Name: hwregs - Read/write access functions for the various ACPI
  *   control and status registers.
- *  $Revision: 1.4 $
+ *  $Revision: 1.5 $
  *
  **/
 
@@ -869,13 +869,12 @@
 
 
 /*
- * Must have a valid pointer to a GAS structure, and
- * a non-zero address within. However, don't return an error
- * because the PM1A/B code must not fail if B isn't present.
+ * Must have a valid pointer to a GAS structure, and a non-zero address
+ * within.
  */
 if (!Reg)
 {
-return (AE_OK);
+

CVS commit: [matt-nb5-mips64] src/common/lib/libc/string

2009-08-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 17 17:24:25 UTC 2009

Added Files:
src/common/lib/libc/string [matt-nb5-mips64]: bzero2.c memset2.c

Log Message:
Add word-load-store optimized version of memset/bzero.  On platforms with
64bit registers they can be as efficient as assembly coded version.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/common/lib/libc/string/bzero2.c \
src/common/lib/libc/string/memset2.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/common/lib/libc/string/bzero2.c
diff -u /dev/null src/common/lib/libc/string/bzero2.c:1.1.2.1
--- /dev/null	Mon Aug 17 17:24:25 2009
+++ src/common/lib/libc/string/bzero2.c	Mon Aug 17 17:24:25 2009
@@ -0,0 +1,36 @@
+/*-
+ * Copyright (c) 2009 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas .
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, 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.
+ */
+
+#define	BZERO
+
+#include "memset2.c"
+
+#if defined(LIBC_SCCS) && !defined(lint)
+__RCSID("$NetBSD: bzero2.c,v 1.1.2.1 2009/08/17 17:24:25 matt Exp $");
+#endif /* LIBC_SCCS and not lint */
Index: src/common/lib/libc/string/memset2.c
diff -u /dev/null src/common/lib/libc/string/memset2.c:1.1.2.1
--- /dev/null	Mon Aug 17 17:24:25 2009
+++ src/common/lib/libc/string/memset2.c	Mon Aug 17 17:24:25 2009
@@ -0,0 +1,208 @@
+/*-
+ * Copyright (c) 2009 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas .
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, 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.
+ */
+
+#include 
+
+#if !defined(_KERNEL) && !defined(_STANDALONE)
+#include 
+#include 
+#include 
+#include 
+#else
+#include 
+#include 
+#endif 
+
+#include 
+#include 
+
+#ifdef _FORTIFY_SOURCE
+#undef bzero
+#undef memset
+#endif
+
+#if defined(LIBC_SCCS) && !defined(lint)
+__RCSID("$NetBSD: memset2.c,v 1.1.2.1 2009/08/17 17:24:25 matt Exp $");
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Assume register_t is the widest non-synthetic type.
+ */
+typedef register_t memword_t;
+
+#ifdef BZERO
+static inline
+#define	memset memset0
+#endif
+
+void *
+memset(void *addr, int c, size_t len)
+{
+	memword_t *dstp = addr;
+	memword_t *edstp;
+	memword_t fill;
+#ifndef __OPTIMIZE_SIZE__
+	memword_t keep_mask = 

CVS commit: src/sys/arch/mips/include

2009-08-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 17 18:55:11 UTC 2009

Modified Files:
src/sys/arch/mips/include: Makefile

Log Message:
Don't install aout_machpep.h and bsd-aout.h


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/mips/include/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/include/Makefile
diff -u src/sys/arch/mips/include/Makefile:1.28 src/sys/arch/mips/include/Makefile:1.29
--- src/sys/arch/mips/include/Makefile:1.28	Fri Feb  9 21:55:06 2007
+++ src/sys/arch/mips/include/Makefile	Mon Aug 17 18:55:11 2009
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.28 2007/02/09 21:55:06 ad Exp $
+#	$NetBSD: Makefile,v 1.29 2009/08/17 18:55:11 matt Exp $
 
 INCSDIR= /usr/include/mips
 
-INCS=	ansi.h aout_machdep.h asm.h \
-	bswap.h bsd-aout.h \
+INCS=	ansi.h asm.h \
+	bswap.h \
 	cachectl.h cdefs.h cpu.h cpuregs.h \
 	ecoff_machdep.h elf_machdep.h endian.h endian_machdep.h \
 	float.h \



CVS commit: src/sys/arch/mips

2009-08-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 17 18:56:10 UTC 2009

Modified Files:
src/sys/arch/mips/include: proc.h
src/sys/arch/mips/mips: vm_machdep.c

Log Message:
Only include md_uptes if USPACE > PAGE_SIZE


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/mips/include/proc.h
cvs rdiff -u -r1.123 -r1.124 src/sys/arch/mips/mips/vm_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/include/proc.h
diff -u src/sys/arch/mips/include/proc.h:1.21 src/sys/arch/mips/include/proc.h:1.22
--- src/sys/arch/mips/include/proc.h:1.21	Fri Nov 16 07:36:11 2007
+++ src/sys/arch/mips/include/proc.h	Mon Aug 17 18:56:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: proc.h,v 1.21 2007/11/16 07:36:11 skrll Exp $	*/
+/*	$NetBSD: proc.h,v 1.22 2009/08/17 18:56:09 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -48,10 +48,12 @@
 struct mdlwp {
 	void	*md_regs;		/* registers on current frame */
 	int	md_flags;		/* machine-dependent flags */
-	int	md_upte[UPAGES];	/* ptes for mapping u page */
 	vaddr_t	md_ss_addr;		/* single step address for ptrace */
 	int	md_ss_instr;		/* single step instruction for ptrace */
 	volatile int md_astpending;	/* AST pending on return to userland */
+#if USPACE > PAGE_SIZE
+	int	md_upte[UPAGES];	/* ptes for mapping u page */
+#endif
 };
 
 struct mdproc {

Index: src/sys/arch/mips/mips/vm_machdep.c
diff -u src/sys/arch/mips/mips/vm_machdep.c:1.123 src/sys/arch/mips/mips/vm_machdep.c:1.124
--- src/sys/arch/mips/mips/vm_machdep.c:1.123	Sat May 30 18:26:06 2009
+++ src/sys/arch/mips/mips/vm_machdep.c	Mon Aug 17 18:56:10 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.123 2009/05/30 18:26:06 martin Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.124 2009/08/17 18:56:10 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -77,7 +77,7 @@
  */
 
 #include 			/* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.123 2009/05/30 18:26:06 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.124 2009/08/17 18:56:10 matt Exp $");
 
 #include "opt_ddb.h"
 
@@ -128,8 +128,6 @@
 {
 	struct pcb *pcb;
 	struct frame *f;
-	pt_entry_t *pte;
-	int i, x;
 
 	l2->l_md.md_ss_addr = 0;
 	l2->l_md.md_ss_instr = 0;
@@ -162,12 +160,17 @@
 
 	l2->l_md.md_regs = (void *)f;
 	l2->l_md.md_flags = l1->l_md.md_flags & MDP_FPUSED;
-	x = (MIPS_HAS_R4K_MMU) ?
-	(MIPS3_PG_G | MIPS3_PG_RO | MIPS3_PG_WIRED) :
-	MIPS1_PG_G;
-	pte = kvtopte(l2->l_addr);
-	for (i = 0; i < UPAGES; i++)
-		l2->l_md.md_upte[i] = pte[i].pt_entry &~ x;
+#if USPACE > PAGE_SIZE
+	{
+		size_t i;
+		const int x = (MIPS_HAS_R4K_MMU) ?
+		(MIPS3_PG_G | MIPS3_PG_RO | MIPS3_PG_WIRED) :
+		MIPS1_PG_G;
+		pt_entry_t *pte = kvtopte(l2->l_addr);
+		for (i = 0; i < UPAGES; i++)
+			l2->l_md.md_upte[i] = pte[i].pt_entry &~ x;
+	}
+#endif
 
 	pcb = &l2->l_addr->u_pcb;
 	pcb->pcb_context[0] = (intptr_t)func;		/* S0 */



CVS commit: src/sys/arch/evbmips/gdium

2009-08-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 17 18:57:34 UTC 2009

Modified Files:
src/sys/arch/evbmips/gdium: machdep.c

Log Message:
Use mips3_sd instead of two 32bit stores.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbmips/gdium/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbmips/gdium/machdep.c
diff -u src/sys/arch/evbmips/gdium/machdep.c:1.7 src/sys/arch/evbmips/gdium/machdep.c:1.8
--- src/sys/arch/evbmips/gdium/machdep.c:1.7	Tue Aug 11 04:46:21 2009
+++ src/sys/arch/evbmips/gdium/machdep.c	Mon Aug 17 18:57:34 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.7 2009/08/11 04:46:21 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.8 2009/08/17 18:57:34 matt Exp $	*/
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -112,7 +112,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.7 2009/08/11 04:46:21 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.8 2009/08/17 18:57:34 matt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -293,8 +293,7 @@
 	/*
 	 * Disable the 2nd PCI window since we don't need it.
 	 */
-	REGVAL(BONITO_REGBASE + 0x158) = 0xe;
-	REGVAL(BONITO_REGBASE + 0x15c) = 0;
+	mips3_sd((uint64_t *)MIPS_PHYS_TO_KSEG1(BONITO_REGBASE + 0x158), 0xe);
 	pci_conf_write(&gc->gc_pc, pci_make_tag(&gc->gc_pc, 0, 0, 0), 18, 0);
 
 	/*



CVS commit: [matt-nb5-mips64] src/gnu/dist/binutils/ld/emulparams

2009-08-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 17 19:05:59 UTC 2009

Modified Files:
src/gnu/dist/binutils/ld/emulparams [matt-nb5-mips64]:
elf32bmipn32-defs.sh

Log Message:
Make site MACHINE is set to an empty string.  This avoid generated linker
scripts have their OUTPUT_ARCH set to the wrong value since nbmake always
sets MACHINE


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.32.1 \
src/gnu/dist/binutils/ld/emulparams/elf32bmipn32-defs.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/binutils/ld/emulparams/elf32bmipn32-defs.sh
diff -u src/gnu/dist/binutils/ld/emulparams/elf32bmipn32-defs.sh:1.1.1.3 src/gnu/dist/binutils/ld/emulparams/elf32bmipn32-defs.sh:1.1.1.3.32.1
--- src/gnu/dist/binutils/ld/emulparams/elf32bmipn32-defs.sh:1.1.1.3	Thu Feb  2 21:18:38 2006
+++ src/gnu/dist/binutils/ld/emulparams/elf32bmipn32-defs.sh	Mon Aug 17 19:05:58 2009
@@ -6,6 +6,7 @@
 
 # Handle both big- and little-ended 32-bit MIPS objects.
 ARCH=mips
+MACHINE=
 OUTPUT_FORMAT="elf32-bigmips"
 BIG_OUTPUT_FORMAT="elf32-bigmips"
 LITTLE_OUTPUT_FORMAT="elf32-littlemips"



CVS commit: [matt-nb5-mips64] src/share/mk

2009-08-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug 17 19:14:16 UTC 2009

Modified Files:
src/share/mk [matt-nb5-mips64]: bsd.sys.mk

Log Message:
No SSP for mips64.
Add commented out section for sbmips which enable mips64 and tunes for sb1


To generate a diff of this commit:
cvs rdiff -u -r1.179 -r1.179.8.1 src/share/mk/bsd.sys.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.179 src/share/mk/bsd.sys.mk:1.179.8.1
--- src/share/mk/bsd.sys.mk:1.179	Sun Oct 26 23:13:24 2008
+++ src/share/mk/bsd.sys.mk	Mon Aug 17 19:14:15 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.179 2008/10/26 23:13:24 apb Exp $
+#	$NetBSD: bsd.sys.mk,v 1.179.8.1 2009/08/17 19:14:15 matt Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -50,7 +50,8 @@
 LINTFLAGS+=	${DESTDIR:D-d ${DESTDIR}/usr/include}
 
 .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "hppa") || \
-	(${MACHINE_ARCH} == "mipsel") || (${MACHINE_ARCH} == "mipseb")
+	(${MACHINE_ARCH} == "mipsel") || (${MACHINE_ARCH} == "mipseb") || [
+	(${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
 HAS_SSP=	no
 .else
 HAS_SSP=	yes
@@ -85,6 +86,10 @@
 CFLAGS+=	-Wa,-Av8plus
 .endif
 
+#.if ${MACHINE} == "sbmips"
+#CFLAGS+=	-mips64 -mtune=sb1
+#.endif
+
 CFLAGS+=	${CPUFLAGS}
 AFLAGS+=	${CPUFLAGS}
 



CVS commit: src/sys/arch/x86/x86

2009-08-17 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Aug 17 19:33:08 UTC 2009

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
pmap_page_remove(), pmap_test_attrs(), pmap_clear_attrs(): We're passed in
a vm_page, so there is little point in the DIAGNOSTIC test to see that we
have been passed a managed page.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/arch/x86/x86/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.90 src/sys/arch/x86/x86/pmap.c:1.91
--- src/sys/arch/x86/x86/pmap.c:1.90	Wed Jul 29 12:02:06 2009
+++ src/sys/arch/x86/x86/pmap.c	Mon Aug 17 19:33:07 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.90 2009/07/29 12:02:06 cegger Exp $	*/
+/*	$NetBSD: pmap.c,v 1.91 2009/08/17 19:33:07 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2007 Manuel Bouyer.
@@ -154,7 +154,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.90 2009/07/29 12:02:06 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.91 2009/08/17 19:33:07 thorpej Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -3682,14 +3682,6 @@
 	lwp_t *l;
 	int count;
 
-#ifdef DIAGNOSTIC
-	int bank, off;
-
-	bank = vm_physseg_find(atop(VM_PAGE_TO_PHYS(pg)), &off);
-	if (bank == -1)
-		panic("pmap_page_remove: unmanaged page?");
-#endif
-
 	l = curlwp;
 	pp = VM_PAGE_TO_PP(pg);
 	expect = pmap_pa2pte(VM_PAGE_TO_PHYS(pg)) | PG_V;
@@ -3787,14 +3779,6 @@
 	pt_entry_t expect;
 	u_int result;
 
-#if DIAGNOSTIC
-	int bank, off;
-
-	bank = vm_physseg_find(atop(VM_PAGE_TO_PHYS(pg)), &off);
-	if (bank == -1)
-		panic("pmap_test_attrs: unmanaged page?");
-#endif
-
 	pp = VM_PAGE_TO_PP(pg);
 	if ((pp->pp_attrs & testbits) != 0) {
 		return true;
@@ -3838,13 +3822,6 @@
 	u_int result;
 	pt_entry_t expect;
 	int count;
-#ifdef DIAGNOSTIC
-	int bank, off;
-
-	bank = vm_physseg_find(atop(VM_PAGE_TO_PHYS(pg)), &off);
-	if (bank == -1)
-		panic("pmap_change_attrs: unmanaged page?");
-#endif
 
 	pp = VM_PAGE_TO_PP(pg);
 	expect = pmap_pa2pte(VM_PAGE_TO_PHYS(pg)) | PG_V;



CVS commit: src/sys/arch/arm/arm32

2009-08-17 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Mon Aug 17 19:44:32 UTC 2009

Modified Files:
src/sys/arch/arm/arm32: kobj_machdep.c

Log Message:
Add support for R_ARM_PC24 relocations and fix R_ARM_ABS32.
Changes from PR/40309, but structure changed so there is a common error printf.
Compiles ok, but my quick kernel build failed to find module_init_md().


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/arm32/kobj_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/arm32/kobj_machdep.c
diff -u src/sys/arch/arm/arm32/kobj_machdep.c:1.2 src/sys/arch/arm/arm32/kobj_machdep.c:1.3
--- src/sys/arch/arm/arm32/kobj_machdep.c:1.2	Mon Apr 28 20:23:13 2008
+++ src/sys/arch/arm/arm32/kobj_machdep.c	Mon Aug 17 19:44:32 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: kobj_machdep.c,v 1.2 2008/04/28 20:23:13 martin Exp $	*/
+/*	$NetBSD: kobj_machdep.c,v 1.3 2009/08/17 19:44:32 dsl Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.2 2008/04/28 20:23:13 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.3 2009/08/17 19:44:32 dsl Exp $");
 
 #define	ELFSIZE		ARCH_ELFSIZE
 
@@ -91,44 +91,64 @@
 
 	switch (rtype) {
 	case R_ARM_NONE:	/* none */
-		break;
+		return 0;
 
 	case R_ARM_ABS32:
 		addr = kobj_sym_lookup(ko, symidx);
 		if (addr == 0)
-			return -1;
-		if (*where != addr)
-			*where = addr;
-
-		break;
+			break;
+		*where = addr + addend;
+		return 0;
 
 	case R_ARM_COPY:	/* none */
-		/*
-		 * There shouldn't be copy relocations in kernel
-		 * objects.
-		 */
-		printf("kobj_reloc: unexpected R_COPY relocation\n");
-		return -1;
+		/* There shouldn't be copy relocations in kernel objects. */
+		break;
 
 	case R_ARM_JUMP_SLOT:
 		addr = kobj_sym_lookup(ko, symidx);
-		if (addr) {
-			*where = addr;
-			return 0;
-		}
-		return -1;
+		if (addr == 0)
+			break;
+		*where = addr;
+		return 0;
 
 	case R_ARM_RELATIVE:	/* A + B */
 		addr = relocbase + addend;
 		if (*where != addr)
 			*where = addr;
-		break;
+		return 0;
+
+	case R_ARM_PC24:
+		if (local)
+			return 0;
+
+		/* Remove the instruction from the 24 bit offset */
+		addend &= 0x00ff;
+
+		/* Sign extend if necessary */
+		if (addend & 0x0080)
+			addend |= 0xff00;
+
+		addr = kobj_sym_lookup(ko, symidx);
+		if (addr == 0)
+			break;
+
+		addend += ((uint32_t *)addr - (uint32_t *)where);
+
+		if ((addend & 0xff80) != 0x &&
+		(addend & 0xff80) != 0xff80) {
+			printf ("Relocation %x too far @ %p\n", addend, where);
+			return -1;
+		}
+		*where = (*where & 0xff00) | (addend & 0x00ff);
+		return 0;
 
 	default:
-		printf("kobj_reloc: unexpected relocation type %d\n", rtype);
-		return -1;
+		break;
 	}
-	return 0;
+
+	printf("kobj_reloc: unexpected/invalid relocation type %d @ %p symidx %u\n",
+	rtype, where, symidx);
+	return -1;
 }
 
 int



CVS commit: src/sbin/tunefs

2009-08-17 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Aug 17 21:28:24 UTC 2009

Modified Files:
src/sbin/tunefs: tunefs.c

Log Message:
fix pasto: UFS_WAPBL_FLAGS_CREATE_LOG is "create-log" not "clear-log"


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sbin/tunefs/tunefs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/tunefs/tunefs.c
diff -u src/sbin/tunefs/tunefs.c:1.39 src/sbin/tunefs/tunefs.c:1.40
--- src/sbin/tunefs/tunefs.c:1.39	Tue Apr  7 12:25:19 2009
+++ src/sbin/tunefs/tunefs.c	Mon Aug 17 21:28:24 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: tunefs.c,v 1.39 2009/04/07 12:25:19 lukem Exp $	*/
+/*	$NetBSD: tunefs.c,v 1.40 2009/08/17 21:28:24 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)tunefs.c	8.3 (Berkeley) 5/3/95";
 #else
-__RCSID("$NetBSD: tunefs.c,v 1.39 2009/04/07 12:25:19 lukem Exp $");
+__RCSID("$NetBSD: tunefs.c,v 1.40 2009/08/17 21:28:24 bouyer Exp $");
 #endif
 #endif /* not lint */
 
@@ -309,7 +309,7 @@
 		printf("\n");
 		printf("\tjournal log flags:");
 		if (sblock.fs_journal_flags & UFS_WAPBL_FLAGS_CREATE_LOG)
-			printf(" clear-log");
+			printf(" create-log");
 		if (sblock.fs_journal_flags & UFS_WAPBL_FLAGS_CLEAR_LOG)
 			printf(" clear-log");
 		printf("\n");



CVS commit: src/crypto/external/bsd/openssh/dist

2009-08-17 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Mon Aug 17 22:58:28 UTC 2009

Modified Files:
src/crypto/external/bsd/openssh/dist: sshd_config

Log Message:
Delete trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/openssh/dist/sshd_config

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/openssh/dist/sshd_config
diff -u src/crypto/external/bsd/openssh/dist/sshd_config:1.2 src/crypto/external/bsd/openssh/dist/sshd_config:1.3
--- src/crypto/external/bsd/openssh/dist/sshd_config:1.2	Sun Jun  7 22:38:47 2009
+++ src/crypto/external/bsd/openssh/dist/sshd_config	Mon Aug 17 22:58:28 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: sshd_config,v 1.2 2009/06/07 22:38:47 christos Exp $
+#	$NetBSD: sshd_config,v 1.3 2009/08/17 22:58:28 dyoung Exp $
 #	$OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $
 
 # This is the sshd server system-wide configuration file.  See
@@ -37,7 +37,7 @@
 # Authentication:
 
 LoginGraceTime 600
-#PermitRootLogin no 
+#PermitRootLogin no
 #StrictModes yes
 #MaxAuthTries 6
 #MaxSessions 10
@@ -106,11 +106,11 @@
 # the following are HPN related configuration options
 # tcp receive buffer polling. disable in non autotuning kernels
 #TcpRcvBufPoll yes
- 
+
 # allow the use of the none cipher
 #NoneEnabled no
 
-# disable hpn performance boosts. 
+# disable hpn performance boosts.
 #HPNDisabled no
 
 # buffer size for hpn to non-hpn connections



CVS commit: xsrc/external/mit/MesaLib/dist/src/glu/sgi/libutil

2009-08-17 Thread John Nemeth
Module Name:xsrc
Committed By:   jnemeth
Date:   Mon Aug 17 23:55:26 UTC 2009

Modified Files:
xsrc/external/mit/MesaLib/dist/src/glu/sgi/libutil: mipmap.c

Log Message:
PR/41901 - Henning Petersen -- missing "("


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
xsrc/external/mit/MesaLib/dist/src/glu/sgi/libutil/mipmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/MesaLib/dist/src/glu/sgi/libutil/mipmap.c
diff -u xsrc/external/mit/MesaLib/dist/src/glu/sgi/libutil/mipmap.c:1.1.1.2 xsrc/external/mit/MesaLib/dist/src/glu/sgi/libutil/mipmap.c:1.2
--- xsrc/external/mit/MesaLib/dist/src/glu/sgi/libutil/mipmap.c:1.1.1.2	Thu Jun 11 00:50:22 2009
+++ xsrc/external/mit/MesaLib/dist/src/glu/sgi/libutil/mipmap.c	Mon Aug 17 23:55:26 2009
@@ -6643,7 +6643,7 @@
 	 pTexImage3D = (TexImage3Dproc) wglGetProcAddress("glTexImage3DEXT");
 #else
   void *libHandle = dlopen("libgl.so", RTLD_LAZY);
-  pTexImage3D = TexImage3Dproc) dlsym(libHandle, "glTexImage3D" );
+  pTexImage3D = (TexImage3Dproc) dlsym(libHandle, "glTexImage3D" );
   if (!pTexImage3D)
 	 pTexImage3D = (TexImage3Dproc) dlsym(libHandle,"glTexImage3DEXT");
   dlclose(libHandle);



CVS commit: src/sys/arch/sparc64/sparc64

2009-08-17 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Aug 18 00:15:37 UTC 2009

Modified Files:
src/sys/arch/sparc64/sparc64: netbsd32_machdep.c

Log Message:
we need sys/exec_aout.h here
CV: Enter Log.  Lines beginning with `CVS:' are removed automatically


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/sparc64/sparc64/netbsd32_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sparc64/sparc64/netbsd32_machdep.c
diff -u src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.88 src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.89
--- src/sys/arch/sparc64/sparc64/netbsd32_machdep.c:1.88	Sat Aug 15 23:45:00 2009
+++ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c	Tue Aug 18 00:15:37 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.88 2009/08/15 23:45:00 matt Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.89 2009/08/18 00:15:37 macallan Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.88 2009/08/15 23:45:00 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.89 2009/08/18 00:15:37 macallan Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -39,6 +39,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 



CVS commit: src/sys/compat/linux32/common

2009-08-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 18 02:02:58 UTC 2009

Modified Files:
src/sys/compat/linux32/common: linux32_ioctl.c

Log Message:
add the video ioctls so that the 32 bit skype works with video
more commits to come


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/compat/linux32/common/linux32_ioctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/linux32/common/linux32_ioctl.c
diff -u src/sys/compat/linux32/common/linux32_ioctl.c:1.12 src/sys/compat/linux32/common/linux32_ioctl.c:1.13
--- src/sys/compat/linux32/common/linux32_ioctl.c:1.12	Wed Nov 19 13:36:04 2008
+++ src/sys/compat/linux32/common/linux32_ioctl.c	Mon Aug 17 22:02:58 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_ioctl.c,v 1.12 2008/11/19 18:36:04 ad Exp $ */
+/*	$NetBSD: linux32_ioctl.c,v 1.13 2009/08/18 02:02:58 christos Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -32,12 +32,13 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux32_ioctl.c,v 1.12 2008/11/19 18:36:04 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_ioctl.c,v 1.13 2009/08/18 02:02:58 christos Exp $");
 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -102,6 +103,23 @@
 			break;
 		}
 		break;
+	case 'V':	/* video4linux2 */
+	case 'd':	/* drm */
+	{
+		struct sys_ioctl_args ua;
+		u_long com = 0;
+		if (SCARG(uap, com) & IOC_IN)
+			com |= IOC_OUT;
+		if (SCARG(uap, com) & IOC_OUT)
+			com |= IOC_IN;
+		SCARG(&ua, fd) = SCARG(uap, fd);
+		SCARG(&ua, com) = SCARG(uap, com);
+		SCARG(&ua, com) &= ~IOC_DIRMASK;
+		SCARG(&ua, com) |= com;
+		SCARG(&ua, data) = SCARG_P32(uap, data);
+		error = sys_ioctl(l, (const void *)&ua, retval);
+		break;
+	}
 	case 0x89:
 		error = linux32_ioctl_socket(l, uap, retval);
 		break;



CVS commit: src/sys/compat/linux/common

2009-08-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 18 02:04:14 UTC 2009

Modified Files:
src/sys/compat/linux/common: linux_oldmmap.c

Log Message:
more debugging for mmap


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/compat/linux/common/linux_oldmmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/linux/common/linux_oldmmap.c
diff -u src/sys/compat/linux/common/linux_oldmmap.c:1.71 src/sys/compat/linux/common/linux_oldmmap.c:1.72
--- src/sys/compat/linux/common/linux_oldmmap.c:1.71	Wed Dec  3 07:51:11 2008
+++ src/sys/compat/linux/common/linux_oldmmap.c	Mon Aug 17 22:04:14 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_oldmmap.c,v 1.71 2008/12/03 12:51:11 ad Exp $	*/
+/*	$NetBSD: linux_oldmmap.c,v 1.72 2009/08/18 02:04:14 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_oldmmap.c,v 1.71 2008/12/03 12:51:11 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_oldmmap.c,v 1.72 2009/08/18 02:04:14 christos Exp $");
 
 #include 
 #include 
@@ -86,8 +86,10 @@
 	if ((error = copyin(SCARG(uap, lmp), &lmap, sizeof lmap)))
 		return error;
 
-	if (lmap.lm_offset & PAGE_MASK)
+	if (lmap.lm_offset & PAGE_MASK) {
+		DPRINTF(("old_mmap: 0x%x\n", lmap.lm_offset));
 		return EINVAL;
+	}
 
 	SCARG(&nlmap,addr) = lmap.lm_addr;
 	SCARG(&nlmap,len) = lmap.lm_len;
@@ -95,9 +97,10 @@
 	SCARG(&nlmap,flags) = lmap.lm_flags;
 	SCARG(&nlmap,fd) = lmap.lm_fd;
 	SCARG(&nlmap,offset) = lmap.lm_offset;
-	DPRINTF(("old_mmap(%#x, %u, %u, %u, %d, %u)\n",
+	error = linux_sys_mmap(l, &nlmap, retval);
+	DPRINTF(("old_mmap(%#x, %u, %u, %u, %d, %u) = %d\n",
 	lmap.lm_addr, lmap.lm_len, lmap.lm_prot, lmap.lm_flags,
-	lmap.lm_fd, lmap.lm_offset));
-	return linux_sys_mmap(l, &nlmap, retval);
+	lmap.lm_fd, lmap.lm_offset, error));
+	return error;
 }
 



CVS commit: src/sys

2009-08-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 18 02:17:09 UTC 2009

Modified Files:
src/sys/dev: video.c
src/sys/sys: videoio.h

Log Message:
1. some of the video24linux structs are not as machine independent as their
   authors want them to be. For the buffer ioctls, define new ioctls with
   the 32 bit buffer sizes. For the format struct, define it as packed
   so it is the same on 32 and 64 bit. (I might need to version this)
2. the mmapped buffers need to be page aligned, otherwise mmap(2) does
   not work. Make it so.
All this makes my ricoh camera work with emul-linux and skype running on
amd64. Next is sound!


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/video.c
cvs rdiff -u -r1.5 -r1.6 src/sys/sys/videoio.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/video.c
diff -u src/sys/dev/video.c:1.21 src/sys/dev/video.c:1.22
--- src/sys/dev/video.c:1.21	Tue Jul  7 17:55:17 2009
+++ src/sys/dev/video.c	Mon Aug 17 22:17:09 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: video.c,v 1.21 2009/07/07 21:55:17 njoly Exp $ */
+/* $NetBSD: video.c,v 1.22 2009/08/18 02:17:09 christos Exp $ */
 
 /*
  * Copyright (c) 2008 Patrick Mahoney 
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: video.c,v 1.21 2009/07/07 21:55:17 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: video.c,v 1.22 2009/08/18 02:17:09 christos Exp $");
 
 #include "video.h"
 #if NVIDEO > 0
@@ -69,6 +69,8 @@
 #define DPRINTFN(n,x)
 #endif
 
+#define PAGE_ALIGN(a)		(((a) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
+
 #define VIDEO_DRIVER_VERSION 1
 
 /* TODO: move to sys/intr.h */
@@ -1237,6 +1239,50 @@
 }
 
 
+static void
+buf32tobuf(const void *data, struct v4l2_buffer *buf)
+{
+	const struct v4l2_buffer32 *b32 = data;
+
+	buf->index = b32->index;
+	buf->type = b32->type;
+	buf->bytesused = b32->bytesused;
+	buf->flags = b32->flags;
+	buf->field = b32->field;
+	buf->timestamp.tv_sec = b32->timestamp.tv_sec;
+	buf->timestamp.tv_usec = b32->timestamp.tv_usec;
+	buf->timecode = b32->timecode;
+	buf->sequence = b32->sequence;
+	buf->memory = b32->memory;
+	buf->m.offset = b32->m.offset;
+	/* XXX: Handle userptr */
+	buf->length = b32->length;
+	buf->input = b32->input;
+	buf->reserved = b32->reserved;
+}
+
+static void
+buftobuf32(void *data, const struct v4l2_buffer *buf)
+{
+	struct v4l2_buffer32 *b32 = data;
+
+	b32->index = buf->index;
+	b32->type = buf->type;
+	b32->bytesused = buf->bytesused;
+	b32->flags = buf->flags;
+	b32->field = buf->field;
+	b32->timestamp.tv_sec = (uint32_t)buf->timestamp.tv_sec;
+	b32->timestamp.tv_usec = buf->timestamp.tv_usec;
+	b32->timecode = buf->timecode;
+	b32->sequence = buf->sequence;
+	b32->memory = buf->memory;
+	b32->m.offset = buf->m.offset;
+	/* XXX: Handle userptr */
+	b32->length = buf->length;
+	b32->input = buf->input;
+	b32->reserved = buf->reserved;
+}
+
 int
 videoioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
 {
@@ -1250,10 +1296,10 @@
 	struct v4l2_control *control;
 	struct v4l2_queryctrl *query;
 	struct v4l2_requestbuffers *reqbufs;
-	struct v4l2_buffer *buf;
+	struct v4l2_buffer *buf, bufspace;
 	v4l2_std_id *stdid;
 	enum v4l2_buf_type *typep;
-	int *ip;
+	int *ip, error;
 
 	sc = device_private(device_lookup(&video_cd, VIDEOUNIT(dev)));
 
@@ -1354,14 +1400,27 @@
 	case VIDIOC_QUERYBUF:
 		buf = data;
 		return video_query_buf(sc, buf);
+	case VIDIOC_QUERYBUF32:
+		buf32tobuf(data, buf = &bufspace);
+		if ((error = video_query_buf(sc, buf)) != 0)
+			return error;
+		buftobuf32(data, buf);
+		return 0;
 	case VIDIOC_QBUF:
 		buf = data;
 		return video_queue_buf(sc, buf);
-		break;
+	case VIDIOC_QBUF32:
+		buf32tobuf(data, buf = &bufspace);
+		return video_queue_buf(sc, buf);
 	case VIDIOC_DQBUF:
 		buf = data;
 		return video_dequeue_buf(sc, buf);
-		break;
+	case VIDIOC_DQBUF32:
+		buf32tobuf(data, buf = &bufspace);
+		if ((error = video_dequeue_buf(sc, buf)) != 0)
+			return error;
+		buftobuf32(data, buf);
+		return 0;
 	case VIDIOC_STREAMON:
 		typep = data;
 		return video_stream_on(sc, *typep);
@@ -1404,6 +1463,9 @@
 	case VIDIOC_QUERYBUF:
 		str = "VIDIOC_QUERYBUF";
 		break;
+	case VIDIOC_QUERYBUF32:
+		str = "VIDIOC_QUERYBUF32";
+		break;
 	case VIDIOC_G_FBUF:
 		str = "VIDIOC_G_FBUF";
 		break;
@@ -1416,9 +1478,15 @@
 	case VIDIOC_QBUF:
 		str = "VIDIOC_QBUF";
 		break;
+	case VIDIOC_QBUF32:
+		str = "VIDIOC_QBUF32";
+		break;
 	case VIDIOC_DQBUF:
 		str = "VIDIOC_DQBUF";
 		break;
+	case VIDIOC_DQBUF32:
+		str = "VIDIOC_DQBUF32";
+		break;
 	case VIDIOC_STREAMON:
 		str = "VIDIOC_STREAMON";
 		break;
@@ -1758,7 +1826,7 @@
 	struct video_buffer **oldbuf;
 	struct v4l2_buffer *buf;
 
-	size = vs->vs_format.sample_size * nbufs;
+	size = PAGE_ALIGN(vs->vs_format.sample_size) * nbufs;
 	err = scatter_buf_set_size(&vs->vs_data, size);
 	if (err != 0)
 		return err;
@@ -1809,7 +1877,7 @@
 		buf->sequence = 0;
 		

CVS commit: src/sys/uvm

2009-08-17 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Aug 18 02:41:31 UTC 2009

Modified Files:
src/sys/uvm: uvm_mmap.c

Log Message:
uvm_mmap: remove a dead conditional.


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/sys/uvm/uvm_mmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_mmap.c
diff -u src/sys/uvm/uvm_mmap.c:1.130 src/sys/uvm/uvm_mmap.c:1.131
--- src/sys/uvm/uvm_mmap.c:1.130	Wed Jun 10 01:55:33 2009
+++ src/sys/uvm/uvm_mmap.c	Tue Aug 18 02:41:31 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_mmap.c,v 1.130 2009/06/10 01:55:33 yamt Exp $	*/
+/*	$NetBSD: uvm_mmap.c,v 1.131 2009/08/18 02:41:31 yamt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -51,7 +51,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.130 2009/06/10 01:55:33 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.131 2009/08/18 02:41:31 yamt Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_pax.h"
@@ -1166,10 +1166,10 @@
 (i & ~VM_PROT_WRITE), foff, size);
 i--;
 			} while ((uobj == NULL) && (i > 0));
+			if (uobj == NULL)
+return EINVAL;
 			advice = UVM_ADV_RANDOM;
 		}
-		if (uobj == NULL)
-			return((vp->v_type == VREG) ? ENOMEM : EINVAL);
 		if ((flags & MAP_SHARED) == 0) {
 			uvmflag |= UVM_FLAG_COPYONW;
 		}



CVS commit: src/sys/uvm

2009-08-17 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Aug 18 02:43:49 UTC 2009

Modified Files:
src/sys/uvm: uvm_extern.h uvm_pdaemon.c

Log Message:
whitespace fixes.  no functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 src/sys/uvm/uvm_extern.h
cvs rdiff -u -r1.98 -r1.99 src/sys/uvm/uvm_pdaemon.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_extern.h
diff -u src/sys/uvm/uvm_extern.h:1.158 src/sys/uvm/uvm_extern.h:1.159
--- src/sys/uvm/uvm_extern.h:1.158	Mon Aug 10 23:17:29 2009
+++ src/sys/uvm/uvm_extern.h	Tue Aug 18 02:43:49 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_extern.h,v 1.158 2009/08/10 23:17:29 haad Exp $	*/
+/*	$NetBSD: uvm_extern.h,v 1.159 2009/08/18 02:43:49 yamt Exp $	*/
 
 /*
  *
@@ -542,9 +542,9 @@
 	SLIST_ENTRY(uvm_reclaim_hook) uvm_reclaim_next;
 };
 
-voiduvm_reclaim_init(void);
-void 	uvm_reclaim_hook_add(struct uvm_reclaim_hook *);
-voiduvm_reclaim_hook_del(struct uvm_reclaim_hook *);
+void	uvm_reclaim_init(void);
+void	uvm_reclaim_hook_add(struct uvm_reclaim_hook *);
+void	uvm_reclaim_hook_del(struct uvm_reclaim_hook *);
 
 /*
  * the various kernel maps, owned by MD code

Index: src/sys/uvm/uvm_pdaemon.c
diff -u src/sys/uvm/uvm_pdaemon.c:1.98 src/sys/uvm/uvm_pdaemon.c:1.99
--- src/sys/uvm/uvm_pdaemon.c:1.98	Mon Aug 10 23:17:29 2009
+++ src/sys/uvm/uvm_pdaemon.c	Tue Aug 18 02:43:49 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pdaemon.c,v 1.98 2009/08/10 23:17:29 haad Exp $	*/
+/*	$NetBSD: uvm_pdaemon.c,v 1.99 2009/08/18 02:43:49 yamt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.98 2009/08/10 23:17:29 haad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.99 2009/08/18 02:43:49 yamt Exp $");
 
 #include "opt_uvmhist.h"
 #include "opt_readahead.h"
@@ -118,7 +118,6 @@
 
 SLIST_HEAD(uvm_reclaim_hooks, uvm_reclaim_hook) uvm_reclaim_list;
 
-
 /*
  * uvm_wait: wait (sleep) for the page daemon to free some pages
  *
@@ -353,7 +352,6 @@
 		}
 		mutex_exit(&uvm_reclaim_lock);
 		
-		
 		/*
 		 * complete draining the pools.
 		 */
@@ -1061,7 +1059,6 @@
 	/* Initialize UVM reclaim hooks. */
 	mutex_init(&uvm_reclaim_lock, MUTEX_DEFAULT, IPL_NONE);
 	SLIST_INIT(&uvm_reclaim_list);
-
 }
 
 void



CVS commit: src/sys/kern

2009-08-17 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Aug 18 02:44:37 UTC 2009

Modified Files:
src/sys/kern: subr_devsw.c

Log Message:
whitespace fixes.  no functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/kern/subr_devsw.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/subr_devsw.c
diff -u src/sys/kern/subr_devsw.c:1.26 src/sys/kern/subr_devsw.c:1.27
--- src/sys/kern/subr_devsw.c:1.26	Mon Feb  2 14:00:27 2009
+++ src/sys/kern/subr_devsw.c	Tue Aug 18 02:44:37 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_devsw.c,v 1.26 2009/02/02 14:00:27 haad Exp $	*/
+/*	$NetBSD: subr_devsw.c,v 1.27 2009/08/18 02:44:37 yamt Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_devsw.c,v 1.26 2009/02/02 14:00:27 haad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_devsw.c,v 1.27 2009/08/18 02:44:37 yamt Exp $");
 
 #include 
 #include 
@@ -461,7 +461,7 @@
 /*
  * Convert char major number to device driver name.
  */
-const char*
+const char *
 cdevsw_getname(devmajor_t major)
 {
 	const char *name;
@@ -486,7 +486,7 @@
 /*
  * Convert block major number to device driver name.
  */
-const char*
+const char *
 bdevsw_getname(devmajor_t major)
 {
 	const char *name;



CVS commit: src/sbin/savecore

2009-08-17 Thread Tom Spindler
Module Name:src
Committed By:   dogcow
Date:   Tue Aug 18 04:02:40 UTC 2009

Modified Files:
src/sbin/savecore: savecore.c

Log Message:
Instead of exiting with an obscure error message if -N /kernelname isn't
specified, blithely assume the kernel will consume around 20 megs.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sbin/savecore/savecore.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/savecore/savecore.c
diff -u src/sbin/savecore/savecore.c:1.80 src/sbin/savecore/savecore.c:1.81
--- src/sbin/savecore/savecore.c:1.80	Mon Apr  6 12:32:30 2009
+++ src/sbin/savecore/savecore.c	Tue Aug 18 04:02:39 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: savecore.c,v 1.80 2009/04/06 12:32:30 lukem Exp $	*/
+/*	$NetBSD: savecore.c,v 1.81 2009/08/18 04:02:39 dogcow Exp $	*/
 
 /*-
  * Copyright (c) 1986, 1992, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)savecore.c	8.5 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: savecore.c,v 1.80 2009/04/06 12:32:30 lukem Exp $");
+__RCSID("$NetBSD: savecore.c,v 1.81 2009/08/18 04:02:39 dogcow Exp $");
 #endif
 #endif /* not lint */
 
@@ -911,11 +911,9 @@
 	struct statvfs fsbuf;
 	char mbuf[100], path[MAXPATHLEN];
 
-	if (stat(kernel, &st) < 0) {
-		syslog(LOG_ERR, "%s: %m", kernel);
-		exit(1);
-	}
-	kernelsize = st.st_blocks * S_BLKSIZE;
+	/* XXX assume a reasonable default, unless we find a kernel. */
+	kernelsize = 20 * 1024 * 1024;
+	if (!stat(kernel, &st)) kernelsize = st.st_blocks * S_BLKSIZE;
 	if (statvfs(dirname, &fsbuf) < 0) {
 		syslog(LOG_ERR, "%s: %m", dirname);
 		exit(1);



CVS commit: src/sys/sys

2009-08-17 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Tue Aug 18 05:05:56 UTC 2009

Modified Files:
src/sys/sys: unistd.h

Log Message:
fix whitespace.  no functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/sys/unistd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/unistd.h
diff -u src/sys/sys/unistd.h:1.49 src/sys/sys/unistd.h:1.50
--- src/sys/sys/unistd.h:1.49	Mon Aug 10 22:29:29 2009
+++ src/sys/sys/unistd.h	Tue Aug 18 05:05:56 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: unistd.h,v 1.49 2009/08/10 22:29:29 haad Exp $	*/
+/*	$NetBSD: unistd.h,v 1.50 2009/08/18 05:05:56 yamt Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -162,10 +162,10 @@
 #define	_PC_FILESIZEBITS	11
 #define	_PC_SYMLINK_MAX		12
 #define	_PC_2_SYMLINKS		13
-#define _PC_ACL_EXTENDED14
+#define	_PC_ACL_EXTENDED	14
 
 /* From OpenSolaris, used by SEEK_DATA/SEEK_HOLE. */
-#define _PC_MIN_HOLE_SIZE   15
+#define	_PC_MIN_HOLE_SIZE	15
 
 /* configurable system variables; use as argument to sysconf(3) */
 /*



CVS commit: xsrc/external/mit/xf86-input-mouse/dist/src

2009-08-17 Thread matthew green
Module Name:xsrc
Committed By:   mrg
Date:   Tue Aug 18 05:34:17 UTC 2009

Modified Files:
xsrc/external/mit/xf86-input-mouse/dist/src: mouse.c mouse.h

Log Message:
fix the rest of PR 41902: make the mouse re-init wsmouse version.
the later mouse init changes the "protocol" away from "wsmouse", so
we don't bother testing for wsmouse but just try it anyway.

also, reduce (useless?) netbsd diffs to vendor.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xf86-input-mouse/dist/src/mouse.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c
diff -u xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c:1.7 xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c:1.8
--- xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c:1.7	Wed Jul  8 09:04:37 2009
+++ xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c	Tue Aug 18 05:34:17 2009
@@ -128,9 +128,8 @@
 } DragLockRec, *DragLockPtr;
 
 
-#ifdef __NetBSD__
+
 static const OptionInfoRec *MouseAvailableOptions(void *unused);
-#endif
 static InputInfoPtr MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags);
 #if 0
 static void MouseUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags);
@@ -178,7 +177,6 @@
 	0
 };
 
-#ifdef __NetBSD__
 typedef enum {
 OPTION_ALWAYS_CORE,
 OPTION_SEND_CORE_EVENTS,
@@ -263,7 +261,6 @@
 { OPTION_SENSITIVITY,  "Sensitivity", OPTV_REAL,{0}, FALSE },
 { -1,			NULL,		  OPTV_NONE,	{0}, FALSE }
 };
-#endif
 
 #define RETRY_COUNT 4
 
@@ -380,14 +377,12 @@
 { NULL,			MSE_NONE,	NULL,		PROT_UNKNOWN }
 };
 
-#ifdef __NetBSD__
 /*ARGSUSED*/
 static const OptionInfoRec *
 MouseAvailableOptions(void *unused)
 {
 return (mouseOptions);
 }
-#endif
 
 /* Process options common to all mouse types. */
 static void
@@ -876,7 +871,6 @@
 }
 }
 
-#ifdef __NetBSD__
 _X_EXPORT const char *
 xf86MouseProtocolIDToName(MouseProtocolID id)
 {
@@ -888,7 +882,6 @@
 {
 return ProtocolNameToID(name);
 }
-#endif
 
 static int
 ProtocolIDToClass(MouseProtocolID id)
@@ -1764,11 +1757,9 @@
 	xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name);
 	else {
 #if defined(__NetBSD__) && defined(WSCONS_SUPPORT) && defined(WSMOUSEIO_SETVERSION)
-	if (!strcasecmp(pMse->protocol, "wsmouse")) {
-	int version = WSMOUSE_EVENT_VERSION;
-	if (ioctl(pInfo->fd, WSMOUSEIO_SETVERSION, &version) == -1)
-	xf86Msg(X_WARNING, "%s: cannot set version\n", pInfo->name);
-}
+	 int version = WSMOUSE_EVENT_VERSION;
+	 if (ioctl(pInfo->fd, WSMOUSEIO_SETVERSION, &version) == -1)
+	 xf86Msg(X_WARNING, "%s: cannot set version\n", pInfo->name);
 #endif
 	if (pMse->xisbscale)
 		pMse->buffer = XisbNew(pInfo->fd, pMse->xisbscale * 4);
@@ -3769,7 +3760,7 @@
 / end of autoprobe stuff */
 
 
-#ifdef __NetBSD__
+
 ModuleInfoRec MouseInfo = {
 1,
 "MOUSE",
@@ -3777,7 +3768,6 @@
 0,
 MouseAvailableOptions,
 };
-#endif
 
 static void
 xf86MouseUnplug(pointer	p)

Index: xsrc/external/mit/xf86-input-mouse/dist/src/mouse.h
diff -u xsrc/external/mit/xf86-input-mouse/dist/src/mouse.h:1.2 xsrc/external/mit/xf86-input-mouse/dist/src/mouse.h:1.3
--- xsrc/external/mit/xf86-input-mouse/dist/src/mouse.h:1.2	Wed Jul  8 09:04:37 2009
+++ xsrc/external/mit/xf86-input-mouse/dist/src/mouse.h	Tue Aug 18 05:34:17 2009
@@ -7,9 +7,7 @@
 
 #include "xf86OSmouse.h"
 
-#ifdef __NetBSD__
 _X_EXPORT const char * xf86MouseProtocolIDToName(MouseProtocolID id);
 MouseProtocolID xf86MouseProtocolNameToID(const char *name);
-#endif
 
 #endif



CVS commit: src/sys/dev/pci

2009-08-17 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Aug 18 05:50:55 UTC 2009

Modified Files:
src/sys/dev/pci: if_ale.c

Log Message:
don't read/write 1000baseT specific MII registers on 10/100M only device.
from OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/if_ale.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_ale.c
diff -u src/sys/dev/pci/if_ale.c:1.5 src/sys/dev/pci/if_ale.c:1.6
--- src/sys/dev/pci/if_ale.c:1.5	Wed Aug  5 07:03:04 2009
+++ src/sys/dev/pci/if_ale.c	Tue Aug 18 05:50:55 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ale.c,v 1.5 2009/08/05 07:03:04 cegger Exp $	*/
+/*	$NetBSD: if_ale.c,v 1.6 2009/08/18 05:50:55 cegger Exp $	*/
 
 /*-
  * Copyright (c) 2008, Pyun YongHyeon 
@@ -32,7 +32,7 @@
 /* Driver for Atheros AR8121/AR8113/AR8114 PCIe Ethernet. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.5 2009/08/05 07:03:04 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.6 2009/08/18 05:50:55 cegger Exp $");
 
 #include "bpfilter.h"
 #include "vlan.h"
@@ -142,6 +142,17 @@
 	if (phy != sc->ale_phyaddr)
 		return 0;
 
+	if (sc->ale_flags & ALE_FLAG_FASTETHER) {
+		switch (reg) {
+		case MII_100T2CR:
+		case MII_100T2SR:
+		case MII_EXTSR:
+			return 0;
+		default:
+			break;
+		}
+	}
+
 	CSR_WRITE_4(sc, ALE_MDIO, MDIO_OP_EXECUTE | MDIO_OP_READ |
 	MDIO_SUP_PREAMBLE | MDIO_CLK_25_4 | MDIO_REG_ADDR(reg));
 	for (i = ALE_PHY_TIMEOUT; i > 0; i--) {
@@ -157,7 +168,7 @@
 		return 0;
 	}
 
-	return ((v & MDIO_DATA_MASK) >> MDIO_DATA_SHIFT);
+	return (v & MDIO_DATA_MASK) >> MDIO_DATA_SHIFT;
 }
 
 static void
@@ -170,6 +181,17 @@
 	if (phy != sc->ale_phyaddr)
 		return;
 
+	if (sc->ale_flags & ALE_FLAG_FASTETHER) {
+		switch (reg) {
+		case MII_100T2CR:
+		case MII_100T2SR:
+		case MII_EXTSR:
+			return;
+		default:
+			break;
+		}
+	}
+
 	CSR_WRITE_4(sc, ALE_MDIO, MDIO_OP_EXECUTE | MDIO_OP_WRITE |
 	(val & MDIO_DATA_MASK) << MDIO_DATA_SHIFT |
 	MDIO_SUP_PREAMBLE | MDIO_CLK_25_4 | MDIO_REG_ADDR(reg));



CVS commit: src/sys/dev/pci

2009-08-17 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Aug 18 06:02:36 UTC 2009

Modified Files:
src/sys/dev/pci: if_ale.c

Log Message:
fix multicast.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/if_ale.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_ale.c
diff -u src/sys/dev/pci/if_ale.c:1.6 src/sys/dev/pci/if_ale.c:1.7
--- src/sys/dev/pci/if_ale.c:1.6	Tue Aug 18 05:50:55 2009
+++ src/sys/dev/pci/if_ale.c	Tue Aug 18 06:02:36 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ale.c,v 1.6 2009/08/18 05:50:55 cegger Exp $	*/
+/*	$NetBSD: if_ale.c,v 1.7 2009/08/18 06:02:36 cegger Exp $	*/
 
 /*-
  * Copyright (c) 2008, Pyun YongHyeon 
@@ -32,7 +32,7 @@
 /* Driver for Atheros AR8121/AR8113/AR8114 PCIe Ethernet. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.6 2009/08/18 05:50:55 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.7 2009/08/18 06:02:36 cegger Exp $");
 
 #include "bpfilter.h"
 #include "vlan.h"
@@ -2026,15 +2026,15 @@
 
 	rxcfg = CSR_READ_4(sc, ALE_MAC_CFG);
 	rxcfg &= ~(MAC_CFG_ALLMULTI | MAC_CFG_BCAST | MAC_CFG_PROMISC);
+	ifp->if_flags &= ~IFF_ALLMULTI;
 
 	/*
 	 * Always accept broadcast frames.
 	 */
 	rxcfg |= MAC_CFG_BCAST;
 
-	if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC || 
-	ec->ec_multicnt > 0) {
-allmulti:
+	if (ifp->if_flags & IFF_PROMISC || ec->ec_multicnt > 0) {
+		ifp->if_flags |= IFF_ALLMULTI;
 		if (ifp->if_flags & IFF_PROMISC)
 			rxcfg |= MAC_CFG_PROMISC;
 		else
@@ -2046,13 +2046,7 @@
 
 		ETHER_FIRST_MULTI(step, ec, enm);
 		while (enm != NULL) {
-			if (memcmp(enm->enm_addrlo, enm->enm_addrhi,
-			ETHER_ADDR_LEN)) {
-				ifp->if_flags |= IFF_ALLMULTI;
-goto allmulti;
-			}
 			crc = ether_crc32_le(enm->enm_addrlo, ETHER_ADDR_LEN);
-
 			mchash[crc >> 31] |= 1 << ((crc >> 26) & 0x1f);
 			ETHER_NEXT_MULTI(step, enm);
 		}



CVS commit: [matt-nb5-mips64] src/lib/csu/mips

2009-08-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Aug 18 06:38:17 UTC 2009

Modified Files:
src/lib/csu/mips [matt-nb5-mips64]: dot_init.h

Log Message:
Fix typo in newabi non-abicalls case.


To generate a diff of this commit:
cvs rdiff -u -r1.9.10.1 -r1.9.10.2 src/lib/csu/mips/dot_init.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/csu/mips/dot_init.h
diff -u src/lib/csu/mips/dot_init.h:1.9.10.1 src/lib/csu/mips/dot_init.h:1.9.10.2
--- src/lib/csu/mips/dot_init.h:1.9.10.1	Fri Aug 14 16:57:17 2009
+++ src/lib/csu/mips/dot_init.h	Tue Aug 18 06:38:17 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: dot_init.h,v 1.9.10.1 2009/08/14 16:57:17 matt Exp $ */
+/* $NetBSD: dot_init.h,v 1.9.10.2 2009/08/18 06:38:17 matt Exp $ */
 
 /*-
  * Copyright (c) 2001 Ross Harvey
@@ -87,7 +87,7 @@
 		"sd	$ra,24($sp)""\n\t"	\
 		".set	reorder""\n\t"
 #else
-#error ABI not supported
+#error ABI not supported (__ABICALLS)
 #endif
 #else
 #if defined(__mips_o32) || defined(__mips_o64)
@@ -102,9 +102,9 @@
 #define	MD_FUNCTION_PROLOGUE(entry_pt)	\
 		"daddu	$sp,$sp,-32""\n\t"	\
 		"sd	$gp,8($sp)""\n\t"	\
-		"sd	$ra,24($sp)""\n\t"	\
+		"sd	$ra,24($sp)""\n\t"
 #else
-#error ABI not supported
+#error ABI not supported (!__ABICALLS)
 #endif
 #endif /* __ABICALLS */
 



CVS commit: [matt-nb5-mips64] src/share/mk

2009-08-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Aug 18 06:42:18 UTC 2009

Modified Files:
src/share/mk [matt-nb5-mips64]: bsd.own.mk bsd.sys.mk

Log Message:
fix a comment in vax. :)
add a commented out match for mips64 in MKPICLIB=no case


To generate a diff of this commit:
cvs rdiff -u -r1.542.2.9 -r1.542.2.9.4.1 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.179.8.1 -r1.179.8.2 src/share/mk/bsd.sys.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.542.2.9 src/share/mk/bsd.own.mk:1.542.2.9.4.1
--- src/share/mk/bsd.own.mk:1.542.2.9	Wed Mar 18 05:39:06 2009
+++ src/share/mk/bsd.own.mk	Tue Aug 18 06:42:17 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.542.2.9 2009/03/18 05:39:06 snj Exp $
+#	$NetBSD: bsd.own.mk,v 1.542.2.9.4.1 2009/08/18 06:42:17 matt Exp $
 
 .if !defined(_BSD_OWN_MK_)
 _BSD_OWN_MK_=1
@@ -516,13 +516,13 @@
 # not just shared libraries, so don't build the _pic version.
 #
 .if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
+# .${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb"
 MKPICLIB:=	no
 .endif
 
 #
 # On VAX using ELF, all objects are PIC, not just shared libraries,
-# so don't build the _pic version.  Unless we are using GCC3 which
-# doesn't support PIC yet.
+# so don't build the _pic version.
 #
 .if ${MACHINE_ARCH} == "vax"
 MKPICLIB=	no

Index: src/share/mk/bsd.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.179.8.1 src/share/mk/bsd.sys.mk:1.179.8.2
--- src/share/mk/bsd.sys.mk:1.179.8.1	Mon Aug 17 19:14:15 2009
+++ src/share/mk/bsd.sys.mk	Tue Aug 18 06:42:18 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.179.8.1 2009/08/17 19:14:15 matt Exp $
+#	$NetBSD: bsd.sys.mk,v 1.179.8.2 2009/08/18 06:42:18 matt Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -50,7 +50,7 @@
 LINTFLAGS+=	${DESTDIR:D-d ${DESTDIR}/usr/include}
 
 .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "hppa") || \
-	(${MACHINE_ARCH} == "mipsel") || (${MACHINE_ARCH} == "mipseb") || [
+	(${MACHINE_ARCH} == "mipsel") || (${MACHINE_ARCH} == "mipseb") || \
 	(${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
 HAS_SSP=	no
 .else
@@ -90,6 +90,10 @@
 #CFLAGS+=	-mips64 -mtune=sb1
 #.endif
 
+.if (${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb") && \
+${MKPIC} == "no"
+COPTS+=		-mno-abicalls -fno-PIC
+.endif
 CFLAGS+=	${CPUFLAGS}
 AFLAGS+=	${CPUFLAGS}
 



CVS commit: [matt-nb5-mips64] src/lib/libc/arch/mips

2009-08-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Aug 18 06:44:26 UTC 2009

Modified Files:
src/lib/libc/arch/mips [matt-nb5-mips64]: SYS.h

Log Message:
Remove PIC_xCALL - unused
Fix NewABI PIC_* macros (now that a NewABI toolchain mostly works).


To generate a diff of this commit:
cvs rdiff -u -r1.18.46.1 -r1.18.46.2 src/lib/libc/arch/mips/SYS.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/mips/SYS.h
diff -u src/lib/libc/arch/mips/SYS.h:1.18.46.1 src/lib/libc/arch/mips/SYS.h:1.18.46.2
--- src/lib/libc/arch/mips/SYS.h:1.18.46.1	Sun Aug 16 03:36:02 2009
+++ src/lib/libc/arch/mips/SYS.h	Tue Aug 18 06:44:26 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: SYS.h,v 1.18.46.1 2009/08/16 03:36:02 matt Exp $ */
+/*	$NetBSD: SYS.h,v 1.18.46.2 2009/08/18 06:44:26 matt Exp $ */
 
 /*-
  * Copyright (c) 1996 Jonathan Stone
@@ -80,18 +80,15 @@
 	.abicalls
 # if defined(__mips_o32) || defined(__mips_o64)
 #  define PIC_PROLOGUE(x)	SETUP_GP
-#  define PIC_xCALL(l,sr)	la sr, _C_LABEL(l); jr sr
 #  define PIC_TAILCALL(l)	la t9, _C_LABEL(l); jr t9
 #  define PIC_RETURN()		j ra
 # else
 #  define PIC_PROLOGUE(x)	SETUP_GP64(t3, x)
-#  define PIC_xCALL(l,sr)	la sr, _C_LABEL(l); jr sr
-#  define PIC_TAILCALL(l)	la t9, _C_LABEL(l); RESTORE_GP64(t3); jr t9
-#  define PIC_RETURN()		RESTORE_GP64(t3); j ra
+#  define PIC_TAILCALL(l)	la t9, _C_LABEL(l); RESTORE_GP64; jr t9
+#  define PIC_RETURN()		RESTORE_GP64; j ra
 # endif
 #else
 # define PIC_PROLOGUE(x)
-# define PIC_xCALL(l,sr)	j  _C_LABEL(l)
 # define PIC_TAILCALL(l)	j  _C_LABEL(l)
 # define PIC_RETURN()
 #endif /* __ABICALLS__ */



CVS commit: [matt-nb5-mips64] src/lib/libc/arch/mips/gen

2009-08-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Aug 18 06:46:00 UTC 2009

Modified Files:
src/lib/libc/arch/mips/gen [matt-nb5-mips64]: makecontext.c

Log Message:
Dont case pointers to __greg_t, use intptr_t (pointers on mips are signed)


To generate a diff of this commit:
cvs rdiff -u -r1.4.14.1 -r1.4.14.2 src/lib/libc/arch/mips/gen/makecontext.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/mips/gen/makecontext.c
diff -u src/lib/libc/arch/mips/gen/makecontext.c:1.4.14.1 src/lib/libc/arch/mips/gen/makecontext.c:1.4.14.2
--- src/lib/libc/arch/mips/gen/makecontext.c:1.4.14.1	Sun Aug 16 03:36:02 2009
+++ src/lib/libc/arch/mips/gen/makecontext.c	Tue Aug 18 06:45:59 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: makecontext.c,v 1.4.14.1 2009/08/16 03:36:02 matt Exp $	*/
+/*	$NetBSD: makecontext.c,v 1.4.14.2 2009/08/18 06:45:59 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: makecontext.c,v 1.4.14.1 2009/08/16 03:36:02 matt Exp $");
+__RCSID("$NetBSD: makecontext.c,v 1.4.14.2 2009/08/18 06:45:59 matt Exp $");
 #endif
 
 #include 
@@ -65,10 +65,10 @@
 	  ((uintptr_t)sp & ~0xf);	/* Align on quad-word boundary. */
 #endif
 
-	gr[_REG_SP]  = (__greg_t)sp;
-	gr[_REG_RA]  = (__greg_t)__resumecontext;
-	gr[_REG_T9]  = (__greg_t)func;	/* required for .abicalls */
-	gr[_REG_EPC] = (__greg_t)func;
+	gr[_REG_SP]  = (intptr_t)sp;
+	gr[_REG_RA]  = (intptr_t)__resumecontext;
+	gr[_REG_T9]  = (intptr_t)func;		/* required for .abicalls */
+	gr[_REG_EPC] = (intptr_t)func;
 
 	/* Construct argument list. */
 	va_start(ap, argc);



CVS commit: [matt-nb5-mips64] src/lib/libc

2009-08-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Aug 18 06:49:18 UTC 2009

Modified Files:
src/lib/libc/arch/mips/gen [matt-nb5-mips64]: _setjmp.S
src/lib/libc/compat/arch/mips/gen [matt-nb5-mips64]: compat_setjmp.S

Log Message:
Make arch/gen/_setjmp.S and compat/arch/gen/compat_setjmp.S as identical
as possible.
Use RCSID.  Use FP_L/FP_S


To generate a diff of this commit:
cvs rdiff -u -r1.20.34.1 -r1.20.34.2 src/lib/libc/arch/mips/gen/_setjmp.S
cvs rdiff -u -r1.1 -r1.1.34.1 \
src/lib/libc/compat/arch/mips/gen/compat_setjmp.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/mips/gen/_setjmp.S
diff -u src/lib/libc/arch/mips/gen/_setjmp.S:1.20.34.1 src/lib/libc/arch/mips/gen/_setjmp.S:1.20.34.2
--- src/lib/libc/arch/mips/gen/_setjmp.S:1.20.34.1	Sun Aug 16 03:36:02 2009
+++ src/lib/libc/arch/mips/gen/_setjmp.S	Tue Aug 18 06:49:17 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: _setjmp.S,v 1.20.34.1 2009/08/16 03:36:02 matt Exp $	*/
+/*	$NetBSD: _setjmp.S,v 1.20.34.2 2009/08/18 06:49:17 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -43,8 +43,11 @@
 #include "SYS.h"
 
 #if defined(LIBC_SCCS) && !defined(lint)
+#if 0
 	RCSID("from: @(#)_setjmp.s	8.1 (Berkeley) 6/4/93")
-	RCSID("$NetBSD: _setjmp.S,v 1.20.34.1 2009/08/16 03:36:02 matt Exp $")
+#else
+	RCSID("$NetBSD: _setjmp.S,v 1.20.34.2 2009/08/18 06:49:17 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -86,24 +89,24 @@
 	 * In O32, FP registers F20 .. F23 are callee-saved.
 	 */
 #if defined(__mips_n64) || defined(__mips_n32)
-	FPST	$f30, _OFFSETOF_SC_FPREGS_F30(a0)
-	FPST	$f28, _OFFSETOF_SC_FPREGS_F28(a0)
-	FPST	$f26, _OFFSETOF_SC_FPREGS_F26(a0)
-	FPST	$f24, _OFFSETOF_SC_FPREGS_F24(a0)
+	FP_S	$f30, _OFFSETOF_SC_FPREGS_F30(a0)
+	FP_S	$f28, _OFFSETOF_SC_FPREGS_F28(a0)
+	FP_S	$f26, _OFFSETOF_SC_FPREGS_F26(a0)
+	FP_S	$f24, _OFFSETOF_SC_FPREGS_F24(a0)
 #endif
 #if defined(__mips_n32) || defined(__mips_o32) || defined(__mips_o64)
-	FPST	$f22, _OFFSETOF_SC_FPREGS_F22(a0)
-	FPST	$f20, _OFFSETOF_SC_FPREGS_F20(a0)
+	FP_S	$f22, _OFFSETOF_SC_FPREGS_F22(a0)
+	FP_S	$f20, _OFFSETOF_SC_FPREGS_F20(a0)
 #endif
 #if defined(__mips_o32) || defined(__mips_o64)
-	FPST	$f21, _OFFSETOF_SC_FPREGS_F21(a0)
-	FPST	$f23, _OFFSETOF_SC_FPREGS_F23(a0)
+	FP_S	$f21, _OFFSETOF_SC_FPREGS_F21(a0)
+	FP_S	$f23, _OFFSETOF_SC_FPREGS_F23(a0)
 #endif
 #if defined(__mips_n64)
-	FPST	$f25, _OFFSETOF_SC_FPREGS_F25(a0)
-	FPST	$f27, _OFFSETOF_SC_FPREGS_F27(a0)
-	FPST	$f29, _OFFSETOF_SC_FPREGS_F29(a0)
-	FPST	$f31, _OFFSETOF_SC_FPREGS_F31(a0)
+	FP_S	$f25, _OFFSETOF_SC_FPREGS_F25(a0)
+	FP_S	$f27, _OFFSETOF_SC_FPREGS_F27(a0)
+	FP_S	$f29, _OFFSETOF_SC_FPREGS_F29(a0)
+	FP_S	$f31, _OFFSETOF_SC_FPREGS_F31(a0)
 #endif
 	INT_S	v0, _OFFSETOF_SC_FPREGS_FCSR(a0)
 	REG_EPILOGUE
@@ -145,29 +148,30 @@
 	 * In O32, FP registers F20 .. F23 are callee-saved.
 	 */
 #if defined(__mips_n64) || defined(__mips_n32)
-	FPLD	$f30, _OFFSETOF_SC_FPREGS_F30(a0)
-	FPLD	$f28, _OFFSETOF_SC_FPREGS_F28(a0)
-	FPLD	$f26, _OFFSETOF_SC_FPREGS_F26(a0)
-	FPLD	$f24, _OFFSETOF_SC_FPREGS_F24(a0)
+	FP_L	$f30, _OFFSETOF_SC_FPREGS_F30(a0)
+	FP_L	$f28, _OFFSETOF_SC_FPREGS_F28(a0)
+	FP_L	$f26, _OFFSETOF_SC_FPREGS_F26(a0)
+	FP_L	$f24, _OFFSETOF_SC_FPREGS_F24(a0)
 #endif
 #if defined(__mips_n32) || defined(__mips_o32) || defined(__mips_o64)
-	FPLD	$f22, _OFFSETOF_SC_FPREGS_F22(a0)
-	FPLD	$f20, _OFFSETOF_SC_FPREGS_F20(a0)
+	FP_L	$f22, _OFFSETOF_SC_FPREGS_F22(a0)
+	FP_L	$f20, _OFFSETOF_SC_FPREGS_F20(a0)
 #endif
 #if defined(__mips_o32) || defined(__mips_o64)
-	FPLD	$f21, _OFFSETOF_SC_FPREGS_F21(a0)
-	FPLD	$f23, _OFFSETOF_SC_FPREGS_F23(a0)
+	FP_L	$f21, _OFFSETOF_SC_FPREGS_F21(a0)
+	FP_L	$f23, _OFFSETOF_SC_FPREGS_F23(a0)
 #endif
 #if defined(__mips_n64)
-	FPLD	$f25, _OFFSETOF_SC_FPREGS_F25(a0)
-	FPLD	$f27, _OFFSETOF_SC_FPREGS_F27(a0)
-	FPLD	$f29, _OFFSETOF_SC_FPREGS_F29(a0)
-	FPLD	$f31, _OFFSETOF_SC_FPREGS_F31(a0)
+	FP_L	$f25, _OFFSETOF_SC_FPREGS_F25(a0)
+	FP_L	$f27, _OFFSETOF_SC_FPREGS_F27(a0)
+	FP_L	$f29, _OFFSETOF_SC_FPREGS_F29(a0)
+	FP_L	$f31, _OFFSETOF_SC_FPREGS_F31(a0)
 #endif
 
 	REG_EPILOGUE
+	REG_L	v0, _OFFSETOF_SC_REGS_V0(a0)
 	j	ra
-	REG_L	v0, _OFFSETOF_SC_REG_V0(a0)
+	nop
 
 botch:
 	/*

Index: src/lib/libc/compat/arch/mips/gen/compat_setjmp.S
diff -u src/lib/libc/compat/arch/mips/gen/compat_setjmp.S:1.1 src/lib/libc/compat/arch/mips/gen/compat_setjmp.S:1.1.34.1
--- src/lib/libc/compat/arch/mips/gen/compat_setjmp.S:1.1	Sat Sep 17 11:49:39 2005
+++ src/lib/libc/compat/arch/mips/gen/compat_setjmp.S	Tue Aug 18 06:49:17 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_setjmp.S,v 1.1 2005/09/17 11:49:39 tsutsui Exp $	*/
+/*	$NetBSD: compat_setjmp.S,v 1.1.34.1 2009/08/18 06:49:17 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -32,21 +32,18 @@
  * SUCH DAMAGE.
  */
 
-#include 
 #include 
-#include 
 #include 
-#include 
-#include 
 
-#if defined(LIBC_SCCS) && !defined(lint)
-	ASMSTR("from: @(#)setjmp.s	8.1

CVS commit: [matt-nb5-mips64] src/lib/libc/arch/mips/gen

2009-08-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Aug 18 06:52:09 UTC 2009

Modified Files:
src/lib/libc/arch/mips/gen [matt-nb5-mips64]: fabs.S ldexp.S modf.S
setjmp.S sigsetjmp.S swapcontext.S

Log Message:
Cleanup/Add RCSIDs.
Cleanup/fix setjmp
Cleanup includes. (assym.h is your friend)


To generate a diff of this commit:
cvs rdiff -u -r1.7.46.1 -r1.7.46.2 src/lib/libc/arch/mips/gen/fabs.S
cvs rdiff -u -r1.8.46.1 -r1.8.46.2 src/lib/libc/arch/mips/gen/ldexp.S
cvs rdiff -u -r1.10.46.1 -r1.10.46.2 src/lib/libc/arch/mips/gen/modf.S
cvs rdiff -u -r1.17.34.1 -r1.17.34.2 src/lib/libc/arch/mips/gen/setjmp.S
cvs rdiff -u -r1.8.34.1 -r1.8.34.2 src/lib/libc/arch/mips/gen/sigsetjmp.S
cvs rdiff -u -r1.3.14.1 -r1.3.14.2 src/lib/libc/arch/mips/gen/swapcontext.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/mips/gen/fabs.S
diff -u src/lib/libc/arch/mips/gen/fabs.S:1.7.46.1 src/lib/libc/arch/mips/gen/fabs.S:1.7.46.2
--- src/lib/libc/arch/mips/gen/fabs.S:1.7.46.1	Sun Aug 16 03:36:02 2009
+++ src/lib/libc/arch/mips/gen/fabs.S	Tue Aug 18 06:52:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fabs.S,v 1.7.46.1 2009/08/16 03:36:02 matt Exp $	*/
+/*	$NetBSD: fabs.S,v 1.7.46.2 2009/08/18 06:52:09 matt Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -35,8 +35,11 @@
 #include 
 
 #if defined(LIBC_SCCS) && !defined(lint)
+#if 0
 	RCSID("from: @(#)fabs.s	8.1 (Berkeley) 2/16/94")
-	RCSID("$NetBSD: fabs.S,v 1.7.46.1 2009/08/16 03:36:02 matt Exp $")
+#else
+	RCSID("$NetBSD: fabs.S,v 1.7.46.2 2009/08/18 06:52:09 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
 

Index: src/lib/libc/arch/mips/gen/ldexp.S
diff -u src/lib/libc/arch/mips/gen/ldexp.S:1.8.46.1 src/lib/libc/arch/mips/gen/ldexp.S:1.8.46.2
--- src/lib/libc/arch/mips/gen/ldexp.S:1.8.46.1	Sun Aug 16 03:36:02 2009
+++ src/lib/libc/arch/mips/gen/ldexp.S	Tue Aug 18 06:52:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ldexp.S,v 1.8.46.1 2009/08/16 03:36:02 matt Exp $	*/
+/*	$NetBSD: ldexp.S,v 1.8.46.2 2009/08/18 06:52:09 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -35,8 +35,11 @@
 #include 
 
 #if defined(LIBC_SCCS) && !defined(lint)
+#if 0
 	RCSID("from: @(#)ldexp.s	8.1 (Berkeley) 6/4/93")
-	RCSID("$NetBSD: ldexp.S,v 1.8.46.1 2009/08/16 03:36:02 matt Exp $")
+#else
+	RCSID("$NetBSD: ldexp.S,v 1.8.46.2 2009/08/18 06:52:09 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
 #define DEXP_INF	0x7ff

Index: src/lib/libc/arch/mips/gen/modf.S
diff -u src/lib/libc/arch/mips/gen/modf.S:1.10.46.1 src/lib/libc/arch/mips/gen/modf.S:1.10.46.2
--- src/lib/libc/arch/mips/gen/modf.S:1.10.46.1	Sun Aug 16 03:36:02 2009
+++ src/lib/libc/arch/mips/gen/modf.S	Tue Aug 18 06:52:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: modf.S,v 1.10.46.1 2009/08/16 03:36:02 matt Exp $	*/
+/*	$NetBSD: modf.S,v 1.10.46.2 2009/08/18 06:52:09 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993, 1995
@@ -35,8 +35,11 @@
 #include 
 
 #if defined(LIBC_SCCS) && !defined(lint)
+#if 0
 	RCSID("from: @(#)modf.s	8.1 (Berkeley) 6/4/93")
-	RCSID("$NetBSD: modf.S,v 1.10.46.1 2009/08/16 03:36:02 matt Exp $")
+#else
+	RCSID("$NetBSD: modf.S,v 1.10.46.2 2009/08/18 06:52:09 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
 /*

Index: src/lib/libc/arch/mips/gen/setjmp.S
diff -u src/lib/libc/arch/mips/gen/setjmp.S:1.17.34.1 src/lib/libc/arch/mips/gen/setjmp.S:1.17.34.2
--- src/lib/libc/arch/mips/gen/setjmp.S:1.17.34.1	Sun Aug 16 03:36:02 2009
+++ src/lib/libc/arch/mips/gen/setjmp.S	Tue Aug 18 06:52:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: setjmp.S,v 1.17.34.1 2009/08/16 03:36:02 matt Exp $	*/
+/*	$NetBSD: setjmp.S,v 1.17.34.2 2009/08/18 06:52:09 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -32,17 +32,17 @@
  * SUCH DAMAGE.
  */
 
-#include 
 #include 
 #include 
-#include 
-#include 
 
 #include "assym.h"
 
 #if defined(LIBC_SCCS) && !defined(lint)
+#if 0
 	RCSID("from: @(#)setjmp.s	8.1 (Berkeley) 6/4/93")
-	RCSID("$NetBSD: setjmp.S,v 1.17.34.1 2009/08/16 03:36:02 matt Exp $")
+#else
+	RCSID("$NetBSD: setjmp.S,v 1.17.34.2 2009/08/18 06:52:09 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -67,33 +67,33 @@
 
 	REG_S		ra, CALLFRAME_RA(sp)		# save RA
 	REG_S		s0, CALLFRAME_S0(sp)		# save S0
-	move		a0, s0# squirrel away sc
+	move		s0, a0# save sigcontext
 
 	/* Get the signal mask. */
 	PTR_ADDU	a2, a0, _OFFSETOF_SC_MASK	# &sc.sc_mask
 	move		a1, zero
 	jal		_C_LABEL(__sigprocmask14)	# get current signal mask
-	move		a0, zero			# (in delay slot)
 
 	/* Get the signal stack. */
 	move		a0, zero
-	PTR_ADDU	a1, sp, CALLFRAME_SIZ	# pointer to struct sigaltstack
+	PTR_ADDU	a1, sp, CALLFRAME_SIZ		# pointer to stack_t
 	jal		_C_LABEL(__sigaltstack14)
-	nop
+
+	move		a0, s0# restore jmpbuf
 	INT_L		v1, CALLFRAME_SIZ+_OFFSETOF_STACK_T_FLAGS(sp)
 			# get old ss_onstack
 	and		v1, v1, SS_ONSTACK		# extract onstack flag
-	INT_S		v1, _OFFSETOF_SC_ONSTACK(s0)	# save it in sc

CVS commit: [matt-nb5-mips64] src/lib/libc/arch/mips/string

2009-08-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Aug 18 06:55:09 UTC 2009

Modified Files:
src/lib/libc/arch/mips/string [matt-nb5-mips64]: bzero.S

Log Message:
Checkin a fix for 8byte access even though we are now using the C version.


To generate a diff of this commit:
cvs rdiff -u -r1.8.46.1 -r1.8.46.2 src/lib/libc/arch/mips/string/bzero.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/mips/string/bzero.S
diff -u src/lib/libc/arch/mips/string/bzero.S:1.8.46.1 src/lib/libc/arch/mips/string/bzero.S:1.8.46.2
--- src/lib/libc/arch/mips/string/bzero.S:1.8.46.1	Sun Aug 16 03:36:02 2009
+++ src/lib/libc/arch/mips/string/bzero.S	Tue Aug 18 06:55:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bzero.S,v 1.8.46.1 2009/08/16 03:36:02 matt Exp $	*/
+/*	$NetBSD: bzero.S,v 1.8.46.2 2009/08/18 06:55:09 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -35,8 +35,11 @@
 #include 
 
 #if defined(LIBC_SCCS) && !defined(lint)
-	/* RCSID("from: @(#)bzero.s	8.1 (Berkeley) 6/4/93") */
-	RCSID("$NetBSD: bzero.S,v 1.8.46.1 2009/08/16 03:36:02 matt Exp $")
+#if 0
+	RCSID("from: @(#)bzero.s	8.1 (Berkeley) 6/4/93")
+#else
+	RCSID("$NetBSD: bzero.S,v 1.8.46.2 2009/08/18 06:55:09 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
 
@@ -51,14 +54,26 @@
 	PTR_SUBU	a3, zero, a0	# compute # bytes to word align address
 	and		a3, a3, SZREG-1
 	beq		a3, zero, 1f	# skip if word aligned
+#if SZREG == 4
 	PTR_SUBU	a1, a1, a3	# subtract from remaining count
 	SWHI		zero, 0(a0)	# clear 1, 2, or 3 bytes to align
 	PTR_ADDU	a0, a0, a3
+#endif
 #if SZREG == 8
-	andi		a3, a3, 4
-	beq		a3, zero, 1f
-	nop
-	sw		zero, -SZREG(a0)
+	PTR_SUBU	a1, a1, a3	# subtract from remaining count
+	PTR_ADDU	a0, a0, a3	# align dst to next word
+	sll		a3, a3, 3	# bits to bytes
+	li		a2, -1		# make a mask
+#if _BYTE_ORDER == _BIG_ENDIAN
+	REG_SRLV	a2, a2, a3	# we want to keep the MSB bytes
+#endif
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+	REG_SLLV	a2, a2, a3	# we want to keep the LSB bytes
+#endif
+	nor		a2, zero, a2	# complement the mask
+	REL_L		v0, -SZREG(a0)	# load the word to partially clear
+	and		v0, v0, a2	# clear the bytes
+	REG_S		v0, -SZREG(a0)	# store it back
 #endif
 1:
 	and		v0, a1, SZREG-1	# compute number of words left



CVS commit: [matt-nb5-mips64] src/lib/libc/arch/mips/string

2009-08-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Aug 18 06:55:48 UTC 2009

Modified Files:
src/lib/libc/arch/mips/string [matt-nb5-mips64]: Makefile.inc bcmp.S
index.S rindex.S

Log Message:
Enable use of memset2.c/bzero2.c
Cleanup RCSIDs


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.50.1 src/lib/libc/arch/mips/string/Makefile.inc
cvs rdiff -u -r1.8.46.1 -r1.8.46.2 src/lib/libc/arch/mips/string/bcmp.S
cvs rdiff -u -r1.8.34.1 -r1.8.34.2 src/lib/libc/arch/mips/string/index.S
cvs rdiff -u -r1.7.46.1 -r1.7.46.2 src/lib/libc/arch/mips/string/rindex.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/mips/string/Makefile.inc
diff -u src/lib/libc/arch/mips/string/Makefile.inc:1.2 src/lib/libc/arch/mips/string/Makefile.inc:1.2.50.1
--- src/lib/libc/arch/mips/string/Makefile.inc:1.2	Tue Oct 10 21:51:54 2000
+++ src/lib/libc/arch/mips/string/Makefile.inc	Tue Aug 18 06:55:48 2009
@@ -1,7 +1,9 @@
-#	$NetBSD: Makefile.inc,v 1.2 2000/10/10 21:51:54 jeffs Exp $
+#	$NetBSD: Makefile.inc,v 1.2.50.1 2009/08/18 06:55:48 matt Exp $
 
-SRCS+=	bcmp.S bcopy.S bzero.S  ffs.S index.S memchr.c memcmp.c memset.c \
-	memcpy.S memmove.S \
-	rindex.S strcat.c strcmp.S strcpy.c strcspn.c strlen.S \
+SRCS+=	bcmp.S bcopy.S bzero2.c \
+	ffs.S index.S \
+	memchr.c memcmp.c memset2.c memcpy.S memmove.S \
+	rindex.S \
+	strcat.c strcmp.S strcpy.c strcspn.c strlen.S \
 	strncat.c strncmp.c strncpy.c strpbrk.c strsep.c \
 	strspn.c strstr.c swab.c

Index: src/lib/libc/arch/mips/string/bcmp.S
diff -u src/lib/libc/arch/mips/string/bcmp.S:1.8.46.1 src/lib/libc/arch/mips/string/bcmp.S:1.8.46.2
--- src/lib/libc/arch/mips/string/bcmp.S:1.8.46.1	Sun Aug 16 03:36:02 2009
+++ src/lib/libc/arch/mips/string/bcmp.S	Tue Aug 18 06:55:48 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcmp.S,v 1.8.46.1 2009/08/16 03:36:02 matt Exp $	*/
+/*	$NetBSD: bcmp.S,v 1.8.46.2 2009/08/18 06:55:48 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,8 +37,11 @@
 #include 	/* LWLO/LWHI, SWLO/SWHI */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-	/* RCSID("from: @(#)bcmp.s	8.1 (Berkeley) 6/4/93") */
-	RCSID("$NetBSD: bcmp.S,v 1.8.46.1 2009/08/16 03:36:02 matt Exp $")
+#if 0
+	RCSID("from: @(#)bcmp.s	8.1 (Berkeley) 6/4/93")
+#else
+	RCSID("$NetBSD: bcmp.S,v 1.8.46.2 2009/08/18 06:55:48 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
 /* bcmp(s1, s2, n) */

Index: src/lib/libc/arch/mips/string/index.S
diff -u src/lib/libc/arch/mips/string/index.S:1.8.34.1 src/lib/libc/arch/mips/string/index.S:1.8.34.2
--- src/lib/libc/arch/mips/string/index.S:1.8.34.1	Sun Aug 16 03:36:02 2009
+++ src/lib/libc/arch/mips/string/index.S	Tue Aug 18 06:55:48 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: index.S,v 1.8.34.1 2009/08/16 03:36:02 matt Exp $	*/
+/*	$NetBSD: index.S,v 1.8.34.2 2009/08/18 06:55:48 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -35,8 +35,11 @@
 #include 
 
 #if defined(LIBC_SCCS) && !defined(lint)
-	/* RCSID("from: @(#)index.s	8.1 (Berkeley) 6/4/93") */
-	RCSID("$NetBSD: index.S,v 1.8.34.1 2009/08/16 03:36:02 matt Exp $")
+#if 0
+	RCSID("from: @(#)index.s	8.1 (Berkeley) 6/4/93")
+#else
+	RCSID("$NetBSD: index.S,v 1.8.34.2 2009/08/18 06:55:48 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
 LEAF(index)

Index: src/lib/libc/arch/mips/string/rindex.S
diff -u src/lib/libc/arch/mips/string/rindex.S:1.7.46.1 src/lib/libc/arch/mips/string/rindex.S:1.7.46.2
--- src/lib/libc/arch/mips/string/rindex.S:1.7.46.1	Sun Aug 16 03:36:02 2009
+++ src/lib/libc/arch/mips/string/rindex.S	Tue Aug 18 06:55:48 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rindex.S,v 1.7.46.1 2009/08/16 03:36:02 matt Exp $	*/
+/*	$NetBSD: rindex.S,v 1.7.46.2 2009/08/18 06:55:48 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -35,8 +35,11 @@
 #include 
 
 #if defined(LIBC_SCCS) && !defined(lint)
-	/* RCSID("from: @(#)rindex.s	8.1 (Berkeley) 6/4/93") */
-	RCSID("$NetBSD: rindex.S,v 1.7.46.1 2009/08/16 03:36:02 matt Exp $")
+#if 0
+	RCSID("from: @(#)rindex.s	8.1 (Berkeley) 6/4/93")
+#else
+	RCSID("$NetBSD: rindex.S,v 1.7.46.2 2009/08/18 06:55:48 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
 LEAF(rindex)



CVS commit: [matt-nb5-mips64] src/lib/libc/arch/mips/sys

2009-08-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Aug 18 06:56:52 UTC 2009

Modified Files:
src/lib/libc/arch/mips/sys [matt-nb5-mips64]: __vfork14.S brk.S
cerror.S exect.S fork.S pipe.S ptrace.S sbrk.S syscall.S

Log Message:
Cleanup RCSIDs.
Use SYSTRAP instead li v0, SYS_*; syscall since that's what SYSTRAP does.


To generate a diff of this commit:
cvs rdiff -u -r1.5.46.1 -r1.5.46.2 src/lib/libc/arch/mips/sys/__vfork14.S \
src/lib/libc/arch/mips/sys/syscall.S
cvs rdiff -u -r1.16.46.1 -r1.16.46.2 src/lib/libc/arch/mips/sys/brk.S
cvs rdiff -u -r1.13.46.1 -r1.13.46.2 src/lib/libc/arch/mips/sys/cerror.S
cvs rdiff -u -r1.9.46.1 -r1.9.46.2 src/lib/libc/arch/mips/sys/exect.S \
src/lib/libc/arch/mips/sys/ptrace.S
cvs rdiff -u -r1.11.46.1 -r1.11.46.2 src/lib/libc/arch/mips/sys/fork.S
cvs rdiff -u -r1.11.34.1 -r1.11.34.2 src/lib/libc/arch/mips/sys/pipe.S
cvs rdiff -u -r1.16.34.1 -r1.16.34.2 src/lib/libc/arch/mips/sys/sbrk.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/mips/sys/__vfork14.S
diff -u src/lib/libc/arch/mips/sys/__vfork14.S:1.5.46.1 src/lib/libc/arch/mips/sys/__vfork14.S:1.5.46.2
--- src/lib/libc/arch/mips/sys/__vfork14.S:1.5.46.1	Sun Aug 16 03:36:02 2009
+++ src/lib/libc/arch/mips/sys/__vfork14.S	Tue Aug 18 06:56:52 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: __vfork14.S,v 1.5.46.1 2009/08/16 03:36:02 matt Exp $	*/
+/*	$NetBSD: __vfork14.S,v 1.5.46.2 2009/08/18 06:56:52 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -35,8 +35,11 @@
 #include "SYS.h"
 
 #if defined(LIBC_SCCS) && !defined(lint)
-	/* RCSID("from: @(#)Ovfork.s	8.1 (Berkeley) 6/4/93") */
-	RCSID("$NetBSD: __vfork14.S,v 1.5.46.1 2009/08/16 03:36:02 matt Exp $")
+#if 0
+	RCSID("from: @(#)Ovfork.s	8.1 (Berkeley) 6/4/93")
+#else
+	RCSID("$NetBSD: __vfork14.S,v 1.5.46.2 2009/08/18 06:56:52 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
 /*
Index: src/lib/libc/arch/mips/sys/syscall.S
diff -u src/lib/libc/arch/mips/sys/syscall.S:1.5.46.1 src/lib/libc/arch/mips/sys/syscall.S:1.5.46.2
--- src/lib/libc/arch/mips/sys/syscall.S:1.5.46.1	Sun Aug 16 03:36:03 2009
+++ src/lib/libc/arch/mips/sys/syscall.S	Tue Aug 18 06:56:52 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: syscall.S,v 1.5.46.1 2009/08/16 03:36:03 matt Exp $	*/
+/*	$NetBSD: syscall.S,v 1.5.46.2 2009/08/18 06:56:52 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -35,8 +35,11 @@
 #include "SYS.h"
 
 #if defined(LIBC_SCCS) && !defined(lint)
-	/* RCSID("from: @(#)syscall.s	8.1 (Berkeley) 6/4/93") */
-	RCSID("$NetBSD: syscall.S,v 1.5.46.1 2009/08/16 03:36:03 matt Exp $")
+#if 0
+	RCSID("from: @(#)syscall.s	8.1 (Berkeley) 6/4/93")
+#else
+	RCSID("$NetBSD: syscall.S,v 1.5.46.2 2009/08/18 06:56:52 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
 RSYSCALL(syscall)

Index: src/lib/libc/arch/mips/sys/brk.S
diff -u src/lib/libc/arch/mips/sys/brk.S:1.16.46.1 src/lib/libc/arch/mips/sys/brk.S:1.16.46.2
--- src/lib/libc/arch/mips/sys/brk.S:1.16.46.1	Sun Aug 16 03:36:02 2009
+++ src/lib/libc/arch/mips/sys/brk.S	Tue Aug 18 06:56:52 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: brk.S,v 1.16.46.1 2009/08/16 03:36:02 matt Exp $	*/
+/*	$NetBSD: brk.S,v 1.16.46.2 2009/08/18 06:56:52 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -35,8 +35,11 @@
 #include "SYS.h"
 
 #if defined(LIBC_SCCS) && !defined(lint)
-	/* RCDID("from: @(#)brk.s	8.1 (Berkeley) 6/4/93") */
-	RCSID("$NetBSD: brk.S,v 1.16.46.1 2009/08/16 03:36:02 matt Exp $")
+#if 0
+	RCSID("from: @(#)brk.s	8.1 (Berkeley) 6/4/93")
+#else
+	RCSID("$NetBSD: brk.S,v 1.16.46.2 2009/08/18 06:56:52 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
 	.globl	_C_LABEL(__minbrk)

Index: src/lib/libc/arch/mips/sys/cerror.S
diff -u src/lib/libc/arch/mips/sys/cerror.S:1.13.46.1 src/lib/libc/arch/mips/sys/cerror.S:1.13.46.2
--- src/lib/libc/arch/mips/sys/cerror.S:1.13.46.1	Sun Aug 16 03:36:02 2009
+++ src/lib/libc/arch/mips/sys/cerror.S	Tue Aug 18 06:56:52 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cerror.S,v 1.13.46.1 2009/08/16 03:36:02 matt Exp $	*/
+/*	$NetBSD: cerror.S,v 1.13.46.2 2009/08/18 06:56:52 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -35,8 +35,11 @@
 #include "SYS.h"
 
 #if defined(LIBC_SCCS) && !defined(lint)
-	/* RCSID("from: @(#)cerror.s	8.1 (Berkeley) 6/16/93") */
-	RCSID("$NetBSD: cerror.S,v 1.13.46.1 2009/08/16 03:36:02 matt Exp $")
+#if 0
+	RCSID("from: @(#)cerror.s	8.1 (Berkeley) 6/16/93")
+#else
+	RCSID("$NetBSD: cerror.S,v 1.13.46.2 2009/08/18 06:56:52 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
 #ifdef _REENTRANT

Index: src/lib/libc/arch/mips/sys/exect.S
diff -u src/lib/libc/arch/mips/sys/exect.S:1.9.46.1 src/lib/libc/arch/mips/sys/exect.S:1.9.46.2
--- src/lib/libc/arch/mips/sys/exect.S:1.9.46.1	Sun Aug 16 03:36:02 2009
+++ src/lib/libc/arch/mips/sys/exect.S	Tue Aug 18 06:56:52 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: exect.S,v 1.9.46.1 2009/08/16 03:36:02 matt Exp $	*/
+/*	$Net

CVS commit: [matt-nb5-mips64] src/lib/libc/arch/mips

2009-08-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Aug 18 06:57:52 UTC 2009

Modified Files:
src/lib/libc/arch/mips [matt-nb5-mips64]: genassym.cf

Log Message:
Add _OFFSETOF_SC_MASK13 for compat setjmp/longjmp.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/lib/libc/arch/mips/genassym.cf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/mips/genassym.cf
diff -u src/lib/libc/arch/mips/genassym.cf:1.1.2.1 src/lib/libc/arch/mips/genassym.cf:1.1.2.2
--- src/lib/libc/arch/mips/genassym.cf:1.1.2.1	Sun Aug 16 03:36:02 2009
+++ src/lib/libc/arch/mips/genassym.cf	Tue Aug 18 06:57:52 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.1.2.1 2009/08/16 03:36:02 matt Exp $
+#	$NetBSD: genassym.cf,v 1.1.2.2 2009/08/18 06:57:52 matt Exp $
 
 #
 # Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -72,6 +72,7 @@
 define _OFFSETOF_SC_FPREGS_FCSR	offsetof(struct sigcontext, sc_fpregs[32])
 define _OFFSETOF_SC_PC		offsetof(struct sigcontext, sc_pc)
 define _OFFSETOF_SC_MASK	offsetof(struct sigcontext, sc_mask)
+define _OFFSETOF_SC_MASK13	offsetof(struct sigcontext, __sc_mask13)
 define _OFFSETOF_SC_ONSTACK	offsetof(struct sigcontext, sc_onstack)
 define _OFFSETOF_SC_FPUSED	offsetof(struct sigcontext, sc_fpused)
 



CVS commit: [matt-nb5-mips64] src/lib/libc/compat/arch/mips

2009-08-17 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Aug 18 06:58:55 UTC 2009

Modified Files:
src/lib/libc/compat/arch/mips/gen [matt-nb5-mips64]: compat_sigsetjmp.S
src/lib/libc/compat/arch/mips/sys [matt-nb5-mips64]: compat_Ovfork.S
compat___semctl.S compat___sigreturn14.S compat___sigtramp1.S
compat_msgctl.S compat_shmctl.S compat_sigaction.S
compat_sigpending.S compat_sigprocmask.S compat_sigreturn.S
compat_sigsuspend.S

Log Message:
Adapt to be ABI agnostic.  Fix RCSIDs.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.34.1 \
src/lib/libc/compat/arch/mips/gen/compat_sigsetjmp.S
cvs rdiff -u -r1.1 -r1.1.34.1 \
src/lib/libc/compat/arch/mips/sys/compat_Ovfork.S \
src/lib/libc/compat/arch/mips/sys/compat___sigreturn14.S \
src/lib/libc/compat/arch/mips/sys/compat_sigpending.S \
src/lib/libc/compat/arch/mips/sys/compat_sigprocmask.S \
src/lib/libc/compat/arch/mips/sys/compat_sigreturn.S \
src/lib/libc/compat/arch/mips/sys/compat_sigsuspend.S
cvs rdiff -u -r1.2 -r1.2.14.1 \
src/lib/libc/compat/arch/mips/sys/compat___semctl.S \
src/lib/libc/compat/arch/mips/sys/compat___sigtramp1.S \
src/lib/libc/compat/arch/mips/sys/compat_msgctl.S \
src/lib/libc/compat/arch/mips/sys/compat_shmctl.S \
src/lib/libc/compat/arch/mips/sys/compat_sigaction.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/compat/arch/mips/gen/compat_sigsetjmp.S
diff -u src/lib/libc/compat/arch/mips/gen/compat_sigsetjmp.S:1.1 src/lib/libc/compat/arch/mips/gen/compat_sigsetjmp.S:1.1.34.1
--- src/lib/libc/compat/arch/mips/gen/compat_sigsetjmp.S:1.1	Sat Sep 17 11:49:39 2005
+++ src/lib/libc/compat/arch/mips/gen/compat_sigsetjmp.S	Tue Aug 18 06:58:54 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_sigsetjmp.S,v 1.1 2005/09/17 11:49:39 tsutsui Exp $	*/
+/*	$NetBSD: compat_sigsetjmp.S,v 1.1.34.1 2009/08/18 06:58:54 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993, 1995,
@@ -33,18 +33,18 @@
  */
 
 #include 
-#include 
 #include 
-#include 
+#include 
+
+#include "assym.h"
 
 #if defined(LIBC_SCCS) && !defined(lint)
+#if 0
 	ASMSTR("from: @(#)setjmp.s	8.1 (Berkeley) 6/4/93")
-	ASMSTR("$NetBSD: compat_sigsetjmp.S,v 1.1 2005/09/17 11:49:39 tsutsui Exp $")
-#endif /* LIBC_SCCS and not lint */
-
-#ifdef __ABICALLS__
-	.abicalls
+#else
+	ASMSTR("$NetBSD: compat_sigsetjmp.S,v 1.1.34.1 2009/08/18 06:58:54 matt Exp $")
 #endif
+#endif /* LIBC_SCCS and not lint */
 
 /*
  * C library -- sigsetjmp, siglongjmp
@@ -59,30 +59,25 @@
  */
 
 LEAF(sigsetjmp)
-#ifdef __ABICALLS__
-	.set	noreorder
-	.cpload	t9
-	.set	reorder
-#endif
-	sw	a1, (_JBLEN*4)(a0)		# save "savemask"
+	SETUP_GP
+	SETUP_GP64(t0, sigsetjmp)
+	INT_S	a1, _OFFSETOF_SC_MASK13(a0)	# save "savemask"
 	bne	a1, 0x0, 1f			# do saving of signal mask?
-	la	t9, _setjmp
-	jr t9
+	la	t9, _C_LABEL(_setjmp)
+	jr	t9
 
-1:	la	t9, setjmp
-	jr t9
+1:	la	t9, _C_LABEL(setjmp)
+	jr	t9
 END(sigsetjmp)
 
 LEAF(siglongjmp)
-#ifdef __ABICALLS__
-	.set	noreorder
-	.cpload	t9
-	.set	reorder
-#endif
-	lw	t0, (_JBLEN * 4)(a0)		# get "savemask"
-	bne	t0, 0x0, 1f			# restore signal mask?
-	la	t9, _longjmp
+	SETUP_GP
+	SETUP_GP64(t0, siglongjmp)
+	INT_L	t1, _OFFSETOF_SC_MASK13(a0)	# get "savemask"
+	bne	t1, 0x0, 1f			# restore signal mask?
+	la	t9, _C_LABEL(_longjmp)
 	jr	t9
-1:	la	t9, longjmp
+
+1:	la	t9, _C_LABEL(longjmp)
 	jr	t9
 END(siglongjmp)

Index: src/lib/libc/compat/arch/mips/sys/compat_Ovfork.S
diff -u src/lib/libc/compat/arch/mips/sys/compat_Ovfork.S:1.1 src/lib/libc/compat/arch/mips/sys/compat_Ovfork.S:1.1.34.1
--- src/lib/libc/compat/arch/mips/sys/compat_Ovfork.S:1.1	Sat Sep 17 11:49:39 2005
+++ src/lib/libc/compat/arch/mips/sys/compat_Ovfork.S	Tue Aug 18 06:58:55 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_Ovfork.S,v 1.1 2005/09/17 11:49:39 tsutsui Exp $	*/
+/*	$NetBSD: compat_Ovfork.S,v 1.1.34.1 2009/08/18 06:58:55 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -35,8 +35,11 @@
 #include "SYS.h"
 
 #if defined(LIBC_SCCS) && !defined(lint)
-	ASMSTR("from: @(#)Ovfork.s	8.1 (Berkeley) 6/4/93")
-	ASMSTR("$NetBSD: compat_Ovfork.S,v 1.1 2005/09/17 11:49:39 tsutsui Exp $")
+#if 0
+	RCSID("from: @(#)Ovfork.s	8.1 (Berkeley) 6/4/93")
+#else
+	RCSID("$NetBSD: compat_Ovfork.S,v 1.1.34.1 2009/08/18 06:58:55 matt Exp $")
+#endif
 #endif /* LIBC_SCCS and not lint */
 
 WARN_REFERENCES(vfork, \
@@ -50,19 +53,16 @@
  */
 
 LEAF(vfork)
-#ifdef __ABICALLS__
-	.set	noreorder
-	.cpload	t9
-	.set	reorder
-#endif
-	li	v0, SYS_vfork		# system call number for vfork
-	syscall
+	PIC_PROLOGUE(vfork)
+
+	SYSTRAP(vfork)			# system call number for vfork
 	beq	a3, zero, 1f		# jump if no errors
-	la	t9, __cerror
-	jr	t9
+
+	PIC_TAILCALL(__cerror)
+
 1:
 	beq	v1, zero, 2f		# parent process ?
 	move	v0, zero		# return zero in child
 2:
-	j	ra
+	PIC_RETURN()
 END(vfork)
Index: src/lib/libc/compat/arch/mips/sys/compat___sigre