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

2011-07-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Jul 10 06:24:19 UTC 2011

Modified Files:
src/sys/arch/mips/atheros: ar5315.c ar5315_board.c ar_intr.c
src/sys/arch/mips/atheros/dev: argpio.c arspi.c if_ae.c if_ath_arbus.c

Log Message:
Cleanup machine includes


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/atheros/ar5315.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/atheros/ar5315_board.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/atheros/ar_intr.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/atheros/dev/argpio.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/atheros/dev/arspi.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/mips/atheros/dev/if_ae.c \
src/sys/arch/mips/atheros/dev/if_ath_arbus.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/atheros/ar5315.c
diff -u src/sys/arch/mips/atheros/ar5315.c:1.8 src/sys/arch/mips/atheros/ar5315.c:1.9
--- src/sys/arch/mips/atheros/ar5315.c:1.8	Thu Jul  7 05:06:44 2011
+++ src/sys/arch/mips/atheros/ar5315.c	Sun Jul 10 06:24:18 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ar5315.c,v 1.8 2011/07/07 05:06:44 matt Exp $ */
+/* $NetBSD: ar5315.c,v 1.9 2011/07/10 06:24:18 matt Exp $ */
 
 /*
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -48,7 +48,7 @@
  * family.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ar5315.c,v 1.8 2011/07/07 05:06:44 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ar5315.c,v 1.9 2011/07/10 06:24:18 matt Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -77,7 +77,7 @@
 #include mips/atheros/include/platform.h
 #include mips/atheros/include/arbusvar.h
 
-#include machine/locore.h
+#include mips/locore.h
 
 /* helper macro for accessing system registers without bus space */
 #define	REGVAL(x)	*((volatile uint32_t *)(MIPS_PHYS_TO_KSEG1((x

Index: src/sys/arch/mips/atheros/ar5315_board.c
diff -u src/sys/arch/mips/atheros/ar5315_board.c:1.3 src/sys/arch/mips/atheros/ar5315_board.c:1.4
--- src/sys/arch/mips/atheros/ar5315_board.c:1.3	Thu Jul  7 05:06:44 2011
+++ src/sys/arch/mips/atheros/ar5315_board.c	Sun Jul 10 06:24:18 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ar5315_board.c,v 1.3 2011/07/07 05:06:44 matt Exp $ */
+/* $NetBSD: ar5315_board.c,v 1.4 2011/07/10 06:24:18 matt Exp $ */
 
 /*
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -46,7 +46,7 @@
  * information data in flash for the AR5315.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ar5315_board.c,v 1.3 2011/07/07 05:06:44 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ar5315_board.c,v 1.4 2011/07/10 06:24:18 matt Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -72,7 +72,7 @@
 #include mips/atheros/include/arbusvar.h
 #include mips/atheros/include/platform.h
 
-#include machine/locore.h
+#include mips/locore.h
 #include com.h
 
 /*

Index: src/sys/arch/mips/atheros/ar_intr.c
diff -u src/sys/arch/mips/atheros/ar_intr.c:1.2 src/sys/arch/mips/atheros/ar_intr.c:1.3
--- src/sys/arch/mips/atheros/ar_intr.c:1.2	Fri Jul  8 18:49:27 2011
+++ src/sys/arch/mips/atheros/ar_intr.c	Sun Jul 10 06:24:18 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ar_intr.c,v 1.2 2011/07/08 18:49:27 dyoung Exp $ */
+/* $NetBSD: ar_intr.c,v 1.3 2011/07/10 06:24:18 matt Exp $ */
 /*
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
  * Copyright (c) 2006 Garrett D'Amore.
@@ -41,19 +41,14 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ar_intr.c,v 1.2 2011/07/08 18:49:27 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: ar_intr.c,v 1.3 2011/07/10 06:24:18 matt Exp $);
 
 #define __INTR_PRIVATE
 
 #include sys/param.h
-#include sys/queue.h
-#include sys/malloc.h
-#include sys/systm.h
-#include sys/device.h
+#include sys/intr.h
 #include sys/kernel.h
-#include sys/bus.h
-
-#include machine/intr.h
+#include sys/malloc.h
 
 #include mips/locore.h
 #include mips/atheros/include/platform.h

Index: src/sys/arch/mips/atheros/dev/argpio.c
diff -u src/sys/arch/mips/atheros/dev/argpio.c:1.4 src/sys/arch/mips/atheros/dev/argpio.c:1.5
--- src/sys/arch/mips/atheros/dev/argpio.c:1.4	Fri Jul  1 18:40:00 2011
+++ src/sys/arch/mips/atheros/dev/argpio.c	Sun Jul 10 06:24:19 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: argpio.c,v 1.4 2011/07/01 18:40:00 dyoung Exp $ */
+/* $NetBSD: argpio.c,v 1.5 2011/07/10 06:24:19 matt Exp $ */
 
 /*-
  * Copyright (c) 2006 Garrett D'Amore
@@ -32,17 +32,16 @@
  */ 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: argpio.c,v 1.4 2011/07/01 18:40:00 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: argpio.c,v 1.5 2011/07/10 06:24:19 matt Exp $);
 
 #include sys/param.h
+#include sys/bus.h
 #include sys/conf.h
-#include sys/kernel.h
-#include sys/types.h
 #include sys/device.h
 #include sys/gpio.h
-
-#include sys/bus.h
-#include machine/intr.h
+#include sys/intr.h
+#include sys/kernel.h
+#include sys/types.h
 
 #include mips/atheros/include/arbusvar.h
 
@@ -60,7 +59,7 @@
  */
 
 struct argpio_softc {
-	struct device		

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

2011-07-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Jul 10 06:26:02 UTC 2011

Modified Files:
src/sys/arch/mips/atheros: ar9344.c ar_conf.c ar_console.c arbus.c
src/sys/arch/mips/atheros/include: arbusvar.h platform.h
Added Files:
src/sys/arch/mips/atheros: arbusle.c
src/sys/arch/mips/atheros/dev: ehci_arbus.c

Log Message:
Add athers_get_uart_freq() (since AR7240 uses the ref_clk, not the bus_clk).
Add little endian bus_space_tag for arbus.
Add EHCI attachment for arbus.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/atheros/ar9344.c \
src/sys/arch/mips/atheros/ar_conf.c \
src/sys/arch/mips/atheros/ar_console.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/mips/atheros/arbus.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/mips/atheros/arbusle.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/mips/atheros/dev/ehci_arbus.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/atheros/include/arbusvar.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/atheros/include/platform.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/arch/mips/atheros/ar9344.c
diff -u src/sys/arch/mips/atheros/ar9344.c:1.1 src/sys/arch/mips/atheros/ar9344.c:1.2
--- src/sys/arch/mips/atheros/ar9344.c:1.1	Thu Jul  7 05:06:44 2011
+++ src/sys/arch/mips/atheros/ar9344.c	Sun Jul 10 06:26:02 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ar9344.c,v 1.1 2011/07/07 05:06:44 matt Exp $ */
+/* $NetBSD: ar9344.c,v 1.2 2011/07/10 06:26:02 matt Exp $ */
 
 /*
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -48,7 +48,7 @@
  * family.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ar9344.c,v 1.1 2011/07/07 05:06:44 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ar9344.c,v 1.2 2011/07/10 06:26:02 matt Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -183,6 +183,11 @@
 	} else {
 		freqs-freq_mem = cpu_pll_freq / (post_div + 1);
 	}
+
+	/*
+	 * Console is off the reference clock, not the bus clock.
+	 */
+	freqs-freq_uart = freqs-freq_ref;
 }
 
 #if 0
@@ -285,26 +290,22 @@
 static int
 ar9344_enable_device(const struct atheros_device *adv)
 {
-#if 0
-	if (adv-adv_addr == AR9344_WLAN_BASE) {
-		/* enable arbitration for wlan */
-		PUTRESET(AR9344_RESET_AHB_ARB_CTL,
-		GETRESET(AR9344_RESET_AHB_ARB_CTL) | AR9344_ARB_WLAN);
-
-		/* set WLAN for big endian */
-		PUTRESET(AR9344_RESET_ENDIAN,
-		GETRESET(AR9344_RESET_ENDIAN) | AR9344_ENDIAN_WLAN);
-
-		/* wake up the mac */
-		PUTPCIREG(AR9344_PCI_MAC_SCR,
-		(GETPCIREG(AR9344_PCI_MAC_SCR)  ~PCI_MAC_SCR_SLM_MASK) |
-		PCI_MAC_SCR_SLM_FWAKE);
-
-		/* wait for it to wake up */
-		while (GETPCIREG(AR9344_PCI_MAC_PCICFG) 
-		PCI_MAC_PCICFG_SPWR_DN);
+	if (adv-adv_reset) {
+		/* put device into reset */
+		PUTRESETREG(AR9344_RESET_RESETCTL,
+		GETRESETREG(AR9344_RESET_RESETCTL) | adv-adv_reset);
+
+		delay(15000);	/* XXX: tsleep? */
+
+		/* take it out of reset */
+		PUTRESETREG(AR9344_RESET_RESETCTL,
+		GETRESETREG(AR9344_RESET_RESETCTL)  ~adv-adv_reset);
+
+		delay(25);
 	}
-#endif
+	if (adv-adv_enable)
+		panic(%s: %s: enable not supported!, __func__, adv-adv_name);
+
 	return 0;
 }
 
@@ -392,10 +393,13 @@
 		.adv_mirq = AR9344_MISC_IRQ_UART0,
 	}, {
 		.adv_name = ehci,
-		.adv_addr = AR9344_USB_BASE,
+		.adv_addr = AR9344_USB_BASE + 0x100,
 		.adv_size = 0x1000,
 		.adv_cirq = ARCHIP_CPU_IRQ_USB,
 		.adv_mirq = -1,
+		.adv_reset = AR9344_RESETCTL_USB_PHY_SUSPEND_OVERRIDE
+		| ARCHIP_RESETCTL_USB_PHY_RESET
+		| ARCHIP_RESETCTL_USB_HOST_RESET,
 	}, {
 		.adv_name = age,
 		.adv_addr = AR9344_GMAC0_BASE,
Index: src/sys/arch/mips/atheros/ar_conf.c
diff -u src/sys/arch/mips/atheros/ar_conf.c:1.1 src/sys/arch/mips/atheros/ar_conf.c:1.2
--- src/sys/arch/mips/atheros/ar_conf.c:1.1	Thu Jul  7 05:06:44 2011
+++ src/sys/arch/mips/atheros/ar_conf.c	Sun Jul 10 06:26:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ar_conf.c,v 1.1 2011/07/07 05:06:44 matt Exp $	*/
+/*	$NetBSD: ar_conf.c,v 1.2 2011/07/10 06:26:02 matt Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -30,7 +30,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: ar_conf.c,v 1.1 2011/07/07 05:06:44 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ar_conf.c,v 1.2 2011/07/10 06:26:02 matt Exp $);
 
 #include sys/param.h
 
@@ -102,6 +102,13 @@
 #ifdef WISOC_AR9344
 	{
 		.ac_platformsw =	ar9344_platformsw,
+		.ac_chipid =		0x20,	/* 7240? */
+		.ac_chipmask =		0xff,
+		.ac_cid =		MIPS_PRID_CID_MTI,
+		.ac_pid =		MIPS_74K,
+		.ac_name =		AR7240
+	}, {
+		.ac_platformsw =	ar9344_platformsw,
 		.ac_chipid =		ARCHIP_AR9344,
 		.ac_chipmask =		0xff,
 		.ac_cid =		MIPS_PRID_CID_MTI,
@@ -132,6 +139,15 @@
 }
 
 uint32_t
+atheros_get_uart_freq(void)
+{
+	if (chip_freqs.freq_uart)
+		return chip_freqs.freq_uart;
+
+	return chip_freqs.freq_bus;
+}
+
+uint32_t
 atheros_get_bus_freq(void)
 {
 	return chip_freqs.freq_bus;
@@ -172,6 +188,12 @@
 			

CVS commit: src/usr.sbin/edquota

2011-07-10 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 10 07:19:24 UTC 2011

Modified Files:
src/usr.sbin/edquota: edquota.c

Log Message:
use __dead


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/usr.sbin/edquota/edquota.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.sbin/edquota/edquota.c
diff -u src/usr.sbin/edquota/edquota.c:1.32 src/usr.sbin/edquota/edquota.c:1.33
--- src/usr.sbin/edquota/edquota.c:1.32	Thu Mar 24 17:05:47 2011
+++ src/usr.sbin/edquota/edquota.c	Sun Jul 10 07:19:24 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: edquota.c,v 1.32 2011/03/24 17:05:47 bouyer Exp $ */
+/*  $NetBSD: edquota.c,v 1.33 2011/07/10 07:19:24 dholland Exp $ */
 /*
  * Copyright (c) 1980, 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = from: @(#)edquota.c	8.3 (Berkeley) 4/27/95;
 #else
-__RCSID($NetBSD: edquota.c,v 1.32 2011/03/24 17:05:47 bouyer Exp $);
+__RCSID($NetBSD: edquota.c,v 1.33 2011/07/10 07:19:24 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -96,7 +96,7 @@
 
 #define MAX_TMPSTR	(100+MAXPATHLEN)
 
-static void	usage(void) __attribute__((__noreturn__));
+static void	usage(void) __dead;
 static int	getentry(const char *, int);
 static struct quotause * getprivs(long, int, const char *, int);
 static struct quotause * getprivs2(long, int, const char *, int);



CVS commit: src/usr.sbin/edquota

2011-07-10 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 10 07:54:49 UTC 2011

Modified Files:
src/usr.sbin/edquota: edquota.c pathnames.h

Log Message:
Minor cosmetic fixes, no semantic changes. (object file diffs have been
checked)


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/edquota/edquota.c
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/edquota/pathnames.h

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

Modified files:

Index: src/usr.sbin/edquota/edquota.c
diff -u src/usr.sbin/edquota/edquota.c:1.34 src/usr.sbin/edquota/edquota.c:1.35
--- src/usr.sbin/edquota/edquota.c:1.34	Sun Jul 10 07:31:48 2011
+++ src/usr.sbin/edquota/edquota.c	Sun Jul 10 07:54:49 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: edquota.c,v 1.34 2011/07/10 07:31:48 dholland Exp $ */
+/*  $NetBSD: edquota.c,v 1.35 2011/07/10 07:54:49 dholland Exp $ */
 /*
  * Copyright (c) 1980, 1990, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = from: @(#)edquota.c	8.3 (Berkeley) 4/27/95;
 #else
-__RCSID($NetBSD: edquota.c,v 1.34 2011/07/10 07:31:48 dholland Exp $);
+__RCSID($NetBSD: edquota.c,v 1.35 2011/07/10 07:54:49 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -81,7 +81,7 @@
 #include pathnames.h
 
 static const char *quotagroup = QUOTAGROUP;
-static char tmpfil[] = _PATH_TMP;
+static char tmpfil[] = _PATH_TMPFILE;
 
 struct quotause {
 	struct	quotause *next;
@@ -97,7 +97,6 @@
 #define MAX_TMPSTR	(100+MAXPATHLEN)
 
 static void	usage(void) __dead;
-static int	getentry(const char *, int);
 static struct quotause * getprivs(long, int, const char *, int);
 static struct quotause * getprivs2(long, int, const char *, int);
 static struct quotause * getprivs1(long, int, const char *);
@@ -107,7 +106,6 @@
 static int	editit(const char *);
 static int	writeprivs(struct quotause *, int, const char *, int);
 static int	readprivs(struct quotause *, int);
-static void	freeq(struct quotause *);
 static void	freeprivs(struct quotause *);
 static void clearpriv(int, char **, const char *, int);
 
@@ -123,12 +121,12 @@
 // support code
 
 /*
- * This routine converts a name for a particular quota type to
+ * This routine converts a name for a particular quota class to
  * an identifier. This routine must agree with the kernel routine
- * getinoquota as to the interpretation of quota types.
+ * getinoquota as to the interpretation of quota classes.
  */
 static int
-getentry(const char *name, int quotaclass)
+getidbyname(const char *name, int quotaclass)
 {
 	struct passwd *pw;
 	struct group *gr;
@@ -161,7 +159,7 @@
  * Free a quotause structure.
  */
 static void
-freeq(struct quotause *qup)
+quotause_destroy(struct quotause *qup)
 {
 	free(qup-qfname);
 	free(qup);
@@ -177,7 +175,7 @@
 
 	for (qup = quplist; qup; qup = nextqup) {
 		nextqup = qup-next;
-		freeq(qup);
+		quotause_destroy(qup);
 	}
 }
 
@@ -236,13 +234,13 @@
 		fd = open(qfpathname, O_RDWR|O_CREAT, 0640);
 		if (fd  0  errno != ENOENT) {
 			warnx(open `%s', qfpathname);
-			freeq(qup);
+			quotause_destroy(qup);
 			return NULL;
 		}
 		warnx(Creating quota file %s, qfpathname);
 		sleep(3);
 		(void)fchown(fd, getuid(),
-		getentry(quotagroup, QUOTA_CLASS_GROUP));
+		getidbyname(quotagroup, QUOTA_CLASS_GROUP));
 		(void)fchmod(fd, 0640);
 	}
 	(void)lseek(fd, (off_t)(id * sizeof(struct dqblk)),
@@ -262,7 +260,7 @@
 	default:		/* ERROR */
 		warn(read error in `%s', qfpathname);
 		close(fd);
-		freeq(qup);
+		quotause_destroy(qup);
 		return NULL;
 	}
 	close(fd);
@@ -470,7 +468,7 @@
 	}
 
 	for ( ; argc  0; argc--, argv++) {
-		if ((id = getentry(*argv, quotaclass)) == -1)
+		if ((id = getidbyname(*argv, quotaclass)) == -1)
 			continue;
 		data = prop_dictionary_create();
 		if (data == NULL)
@@ -996,7 +994,7 @@
 	if (pflag) {
 		if (soft || hard || grace || dflag || cflag)
 			usage();
-		if ((protoid = getentry(protoname, quotaclass)) == -1)
+		if ((protoid = getidbyname(protoname, quotaclass)) == -1)
 			return 1;
 		protoprivs = getprivs(protoid, quotaclass, fs, 0);
 		for (qup = protoprivs; qup; qup = qup-next) {
@@ -1004,7 +1002,7 @@
 			qup-qe[QL_FL].ufsqe_time = 0;
 		}
 		while (argc--  0) {
-			if ((id = getentry(*argv++, quotaclass))  0)
+			if ((id = getidbyname(*argv++, quotaclass))  0)
 continue;
 			putprivs(id, quotaclass, protoprivs);
 		}
@@ -1070,7 +1068,7 @@
 			return 0;
 		}
 		for ( ; argc  0; argc--, argv++) {
-			if ((id = getentry(*argv, quotaclass)) == -1)
+			if ((id = getidbyname(*argv, quotaclass)) == -1)
 continue;
 			curprivs = getprivs(id, quotaclass, fs, 0);
 			for (lqup = curprivs; lqup; lqup = lqup-next) {
@@ -1121,7 +1119,7 @@
 		freeprivs(curprivs);
 	}
 	for ( ; argc  0; argc--, argv++) {
-		if ((id = getentry(*argv, quotaclass)) == -1)
+		if ((id = getidbyname(*argv, quotaclass)) == -1)
 			continue;
 		curprivs = getprivs(id, quotaclass, fs, 

CVS commit: src/sys/arch

2011-07-10 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jul 10 08:42:56 UTC 2011

Modified Files:
src/sys/arch/cobalt/stand/boot: Makefile
src/sys/arch/pmax/stand: Makefile.booters

Log Message:
don't set MACHINE_ARCH.  the CPUFLAGS/etc. is enough, and otherwise this
doesn't work with an isolated $TOOLDIR from the mipse[lb] toolchain.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/cobalt/stand/boot/Makefile
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/pmax/stand/Makefile.booters

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/cobalt/stand/boot/Makefile
diff -u src/sys/arch/cobalt/stand/boot/Makefile:1.24 src/sys/arch/cobalt/stand/boot/Makefile:1.25
--- src/sys/arch/cobalt/stand/boot/Makefile:1.24	Sat Jul  9 15:50:38 2011
+++ src/sys/arch/cobalt/stand/boot/Makefile	Sun Jul 10 08:42:55 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.24 2011/07/09 15:50:38 matt Exp $
+#	$NetBSD: Makefile,v 1.25 2011/07/10 08:42:55 mrg Exp $
 
 NOMAN= # defined
 
@@ -58,7 +58,6 @@
 AFLAGS+=	-mips3 -mabi=32
 CFLAGS+=	-mips3 -mabi=32
 LINKFORMAT=	-m elf32ltsmip
-MACHINE_ARCH=	mipsel
 .endif
 
 CFLAGS+=	-Wall -Werror

Index: src/sys/arch/pmax/stand/Makefile.booters
diff -u src/sys/arch/pmax/stand/Makefile.booters:1.56 src/sys/arch/pmax/stand/Makefile.booters:1.57
--- src/sys/arch/pmax/stand/Makefile.booters:1.56	Sun Feb 20 07:50:25 2011
+++ src/sys/arch/pmax/stand/Makefile.booters	Sun Jul 10 08:42:55 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.booters,v 1.56 2011/02/20 07:50:25 matt Exp $
+# $NetBSD: Makefile.booters,v 1.57 2011/07/10 08:42:55 mrg Exp $
 
 NOMAN=		# defined
 
@@ -31,7 +31,6 @@
 AFLAGS+=	-mips3 -mabi=32
 CFLAGS+=	-mips3 -mabi=32
 LDBUG+=		-m elf32ltsmip
-MACHINE_ARCH=	mipsel
 .endif
 
 NETBSD_VERS!=	${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh



CVS commit: src

2011-07-10 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jul 10 08:43:51 UTC 2011

Modified Files:
src/tools: Makefile
src/usr.bin/elf2ecoff: Makefile

Log Message:
install elf2ecoff for all mips64 systems.  it's needed for stand.


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/tools/Makefile
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/elf2ecoff/Makefile

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

Modified files:

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.146 src/tools/Makefile:1.147
--- src/tools/Makefile:1.146	Tue Jun 21 02:15:41 2011
+++ src/tools/Makefile	Sun Jul 10 08:43:51 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.146 2011/06/21 02:15:41 mrg Exp $
+#	$NetBSD: Makefile,v 1.147 2011/07/10 08:43:51 mrg Exp $
 
 .include bsd.own.mk
 
@@ -107,7 +107,8 @@
 SUBDIR+=	powerpc-mkbootimage
 .endif
 
-.if (${MACHINE_ARCH} == mipsel || ${MACHINE_ARCH} == mipseb)
+.if (${MACHINE_ARCH} == mipsel || ${MACHINE_ARCH} == mipseb || \
+ ${MACHINE_ARCH} == mips64el || ${MACHINE_ARCH} == mips64eb)
 SUBDIR+=	mips-elf2ecoff
 .endif
 

Index: src/usr.bin/elf2ecoff/Makefile
diff -u src/usr.bin/elf2ecoff/Makefile:1.11 src/usr.bin/elf2ecoff/Makefile:1.12
--- src/usr.bin/elf2ecoff/Makefile:1.11	Mon Dec 14 00:43:05 2009
+++ src/usr.bin/elf2ecoff/Makefile	Sun Jul 10 08:43:50 2011
@@ -1,16 +1,11 @@
-#	$NetBSD: Makefile,v 1.11 2009/12/14 00:43:05 matt Exp $
+#	$NetBSD: Makefile,v 1.12 2011/07/10 08:43:50 mrg Exp $
 #	from: @(#)Makefile	5.4 (Berkeley) 5/11/90
 
 .include bsd.own.mk
 
-ABI64:=  ${CPUFLAGS:M-mabi=64:M-mabi=o64}
-# Build ELF to {ecoff, aout} tools on mips, for old bootblocks/PROMs.
-.if (${MACHINE_ARCH} == mipsel || ${MACHINE_ARCH} == mipseb || \
- ((${MACHINE_ARCH} == mips64el || ${MACHINE_ARCH} == mips64eb)  \
-  !defined(HOSTPROG)  empty(ABI64)))
-
+# Build ELF to ecoff tools on mips, for old bootblocks/PROMs.
+.if ${MACHINE_CPU} == mips
 PROG=	elf2ecoff
-
 .endif
 
 MAN=	elf2ecoff.1



CVS commit: src

2011-07-10 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jul 10 08:51:24 UTC 2011

Modified Files:
src/distrib/sparc64/instfs: Makefile
src/sys/arch/sparc64/conf: INSTALL

Log Message:
sparc64 with GCC 4.5 has about a 2% code bloat, unfortunately.

bump the instfs size to 9MB.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/distrib/sparc64/instfs/Makefile
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/sparc64/conf/INSTALL

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

Modified files:

Index: src/distrib/sparc64/instfs/Makefile
diff -u src/distrib/sparc64/instfs/Makefile:1.14 src/distrib/sparc64/instfs/Makefile:1.15
--- src/distrib/sparc64/instfs/Makefile:1.14	Fri Mar 12 23:07:13 2010
+++ src/distrib/sparc64/instfs/Makefile	Sun Jul 10 08:51:24 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2010/03/12 23:07:13 martin Exp $
+#	$NetBSD: Makefile,v 1.15 2011/07/10 08:51:24 mrg Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
@@ -7,7 +7,7 @@
 
 .include ${.CURDIR}/../instfs/Makefile.instfs
 IMAGE=			install.fs
-IMAGESIZE=		8m
+IMAGESIZE=		9m
 
 IMAGETAR=		instfs.tgz
 IMAGETAR_RELEASEDIR=	installation/misc

Index: src/sys/arch/sparc64/conf/INSTALL
diff -u src/sys/arch/sparc64/conf/INSTALL:1.27 src/sys/arch/sparc64/conf/INSTALL:1.28
--- src/sys/arch/sparc64/conf/INSTALL:1.27	Sat May 22 15:55:41 2010
+++ src/sys/arch/sparc64/conf/INSTALL	Sun Jul 10 08:51:24 2011
@@ -1,4 +1,4 @@
-# 	$NetBSD: INSTALL,v 1.27 2010/05/22 15:55:41 tsutsui Exp $
+# 	$NetBSD: INSTALL,v 1.28 2011/07/10 08:51:24 mrg Exp $
 #
 #	NOTE: this file only needs *additional* things for the install
 #	kernel, that are not already included in GENERIC!
@@ -6,7 +6,7 @@
 
 include arch/sparc64/conf/GENERIC
 
-#ident 		INSTALL-$Revision: 1.27 $
+#ident 		INSTALL-$Revision: 1.28 $
 
 makeoptions	COPTS=-Os
 
@@ -21,6 +21,6 @@
 options 	MEMORY_DISK_SERVER=0	# no userspace memory disk support
 ## The miniroot size must be kept in sync manually with the size of
 ## the `miniroot' image (which is built in distrib/sparc64/miniroot).
-options 	MEMORY_DISK_ROOT_SIZE=16384	# size of memory disk, in blocks
+options 	MEMORY_DISK_ROOT_SIZE=18432	# size of memory disk, in blocks
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 



CVS commit: src/doc

2011-07-10 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Jul 10 08:52:19 UTC 2011

Modified Files:
src/doc: 3RDPARTY

Log Message:
tmux-1.5 out.


To generate a diff of this commit:
cvs rdiff -u -r1.851 -r1.852 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.851 src/doc/3RDPARTY:1.852
--- src/doc/3RDPARTY:1.851	Tue Jul  5 14:41:13 2011
+++ src/doc/3RDPARTY	Sun Jul 10 08:52:18 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.851 2011/07/05 14:41:13 taca Exp $
+#	$NetBSD: 3RDPARTY,v 1.852 2011/07/10 08:52:18 wiz Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1050,7 +1050,7 @@
 
 Package:	tmux
 Version:	1.4
-Current Vers:	1.4
+Current Vers:	1.5
 Maintainer:	Nicholas Marriott n...@users.sourceforge.net
 Archive site:	http://downloads.sourceforge.net/tmux/
 Home page:	http://tmux.sourceforge.net/



CVS commit: src/lib/libcurses

2011-07-10 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Sun Jul 10 12:11:49 UTC 2011

Modified Files:
src/lib/libcurses: erase.c

Log Message:
Set the background attributes when erasing.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/lib/libcurses/erase.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/libcurses/erase.c
diff -u src/lib/libcurses/erase.c:1.24 src/lib/libcurses/erase.c:1.25
--- src/lib/libcurses/erase.c:1.24	Wed Jul 22 16:57:14 2009
+++ src/lib/libcurses/erase.c	Sun Jul 10 12:11:49 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: erase.c,v 1.24 2009/07/22 16:57:14 roy Exp $	*/
+/*	$NetBSD: erase.c,v 1.25 2011/07/10 12:11:49 blymn Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)erase.c	8.2 (Berkeley) 5/4/94;
 #else
-__RCSID($NetBSD: erase.c,v 1.24 2009/07/22 16:57:14 roy Exp $);
+__RCSID($NetBSD: erase.c,v 1.25 2011/07/10 12:11:49 blymn Exp $);
 #endif
 #endif/* not lint */
 
@@ -72,8 +72,8 @@
 #ifdef DEBUG
 	__CTRACE(__CTRACE_ERASE, werase: (%p)\n, win);
 #endif
-	if (__using_color  win != curscr)
-		attr = win-battr  __COLOR;
+	if (win != curscr)
+		attr = win-battr  __ATTRIBUTES;
 	else
 		attr = 0;
 	for (y = 0; y  win-maxy; y++) {
@@ -86,7 +86,10 @@
 			if (sp-ch != ( wchar_t )btowc(( int ) win-bch ) ||
 			(sp-attr  WA_ATTRIBUTES) != 0 || sp-nsp) {
 #endif /* HAVE_WCHAR */
-sp-attr = attr;
+if (sp-attr  __ALTCHARSET)
+	sp-attr = attr | __ALTCHARSET;
+else
+	sp-attr = attr;
 #ifdef HAVE_WCHAR
 sp-ch = ( wchar_t )btowc(( int ) win-bch);
 if (_cursesi_copy_nsp(win-bnsp, sp) == ERR)



CVS commit: src/sbin/newfs_v7fs

2011-07-10 Thread UCHIYAMA Yasushi
Module Name:src
Committed By:   uch
Date:   Sun Jul 10 12:14:01 UTC 2011

Modified Files:
src/sbin/newfs_v7fs: main.c

Log Message:
fix freeblock count bug.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sbin/newfs_v7fs/main.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/newfs_v7fs/main.c
diff -u src/sbin/newfs_v7fs/main.c:1.1 src/sbin/newfs_v7fs/main.c:1.2
--- src/sbin/newfs_v7fs/main.c:1.1	Mon Jun 27 11:52:58 2011
+++ src/sbin/newfs_v7fs/main.c	Sun Jul 10 12:14:01 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.1 2011/06/27 11:52:58 uch Exp $	*/
+/*	$NetBSD: main.c,v 1.2 2011/07/10 12:14:01 uch Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: main.c,v 1.1 2011/06/27 11:52:58 uch Exp $);
+__RCSID($NetBSD: main.c,v 1.2 2011/07/10 12:14:01 uch Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -146,11 +146,11 @@
 		{
 			VPRINTF(\nlast freeblock #%d\n,
 			(*val32)(fb-freeblock[i + 1]));
-			fb-nfreeblock = (*val16)(k);
 
 			memmove(fb-freeblock + 1, fb-freeblock + i + 1, k *
 			sizeof(v7fs_daddr_t));
 			fb-freeblock[0] = 0; /* Terminate link; */
+			fb-nfreeblock = (*val16)(k + 1);
 			VPRINTF(last freeblock contains #%d\n,
 			(*val16)(fb-nfreeblock));
 			fs-io.write(fs-io.cookie, buf, listblk);
@@ -211,7 +211,8 @@
 	for (i = V7FS_MAX_FREEBLOCK - 1, j = sb-datablock_start_sector; i = 0;
 	i--, j++)
 		sb-freeblock[i] = j;
-	sb-total_freeblock = volume_size - sb-datablock_start_sector - 1;
+
+	sb-total_freeblock = volume_size - sb-datablock_start_sector;
 
 	/* Write superblock. */
 	sb-modified = 1;



CVS commit: src

2011-07-10 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sun Jul 10 13:42:50 UTC 2011

Modified Files:
src/share/man/man5: locate.conf.5
src/usr.bin/locate/locate: updatedb.sh

Log Message:
Allow quoting of embedded shell metacharacters in locate.conf(5).

The shell_quote function here is identical to that in postinstall
and etcupdate.

This should fix PR 45130 from Greg Woods.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man5/locate.conf.5
cvs rdiff -u -r1.11 -r1.12 src/usr.bin/locate/locate/updatedb.sh

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

Modified files:

Index: src/share/man/man5/locate.conf.5
diff -u src/share/man/man5/locate.conf.5:1.8 src/share/man/man5/locate.conf.5:1.9
--- src/share/man/man5/locate.conf.5:1.8	Mon Feb 21 02:31:57 2011
+++ src/share/man/man5/locate.conf.5	Sun Jul 10 13:42:49 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: locate.conf.5,v 1.8 2011/02/21 02:31:57 itohy Exp $
+.\	$NetBSD: locate.conf.5,v 1.9 2011/07/10 13:42:49 apb Exp $
 .\
 .\ Copyright (c) 2004 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd October 1, 2005
+.Dd July 10, 2011
 .Dt LOCATE.CONF 5
 .Os
 .Sh NAME
@@ -47,12 +47,15 @@
 file contains a list of newline separated records,
 each of which is composed of a keyword and arguments,
 which are separated by white space.
+Arguments with embedded shell metacharacters must be quoted in
+.Xr sh 1
+style.
 Lines beginning with
 .Dq #
 are treated as comments and ignored.
 However, a
 .Dq #
-in the middle of a line does not start comment.
+in the middle of a line does not start a comment.
 .Pp
 The configuration options are as follows:
 .Bl -tag -width XX

Index: src/usr.bin/locate/locate/updatedb.sh
diff -u src/usr.bin/locate/locate/updatedb.sh:1.11 src/usr.bin/locate/locate/updatedb.sh:1.12
--- src/usr.bin/locate/locate/updatedb.sh:1.11	Sun Apr 23 03:04:08 2006
+++ src/usr.bin/locate/locate/updatedb.sh	Sun Jul 10 13:42:49 2011
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: updatedb.sh,v 1.11 2006/04/23 03:04:08 christos Exp $
+#	$NetBSD: updatedb.sh,v 1.12 2011/07/10 13:42:49 apb Exp $
 #
 # Copyright (c) 1989, 1993
 #	The Regents of the University of California.  All rights reserved.
@@ -51,47 +51,78 @@
 ignore=
 SRCHPATHS=
 
+# Quote args to make them safe in the shell.
+# Usage: quotedlist=$(shell_quote args...)
+#
+# After building up a quoted list, use it by evaling it inside
+# double quotes, like this:
+#eval set -- $quotedlist
+# or like this:
+#eval \$command $quotedlist \$filename
+#
+shell_quote()
+{
+	local result=''
+	local arg
+	for arg in $@ ; do
+		# Append a space if necessary
+		result=${result}${result:+ }
+		# Convert each embedded ' to '\'',
+		# then insert ' at the beginning of the first line,
+		# and append ' at the end of the last line.
+		result=${result}$(printf %s\n $arg | \
+			sed -e s/'/'''/g -e 1s/^/'/ -e \$s/\$/'/)
+	done
+	printf %s\n $result
+}
+
 # read configuration file
 if [ -f $CONF ]; then
-	exec 50  $CONF
-	while read com args; do
-		case $com/$args in /) continue;; esac	# skip blank lines
+	while read -r com args; do
+		case $com in
+		''|'#'*)
+			continue ;;	# skip blank lines and comment lines
+		esac
+		eval set -- $args
 		case $com in
-		'#'*)	;;			# lines start with # is comment
 		searchpath)
-			SRCHPATHS=$SRCHPATHS $args;;
+			SRCHPATHS=${SRCHPATHS}${SRCHPATHS:+ }$(shell_quote $@);;
 		ignorefs)
-			for i in $args; do
+			for i in $@; do
+fs=
 case $i in
 none)	ignorefs=;;
-*)	fs=`echo $i | sed -e 's/^!/! -fstype /' -e t -e 's/^/-fstype /'`
-	ignorefs=${ignorefs:+${ignorefs} -o }${fs}
+\!*)	fs=! -fstype $(shell_quote $i);;
+*)	fs=-fstype $(shell_quote ${i#?});;
+esac
+case $fs in
+'')	;;
+*)	ignorefs=${ignorefs:+${ignorefs} -o }${fs};;
 esac
 			done;;
 		ignore)
-			set -f
-			for i in $args; do
-ignore=${ignore:+${ignore} -o }-path ${i}
-			done
-			set +f;;
+			for i in $@; do
+q=$(shell_quote $i)
+ignore=${ignore:+${ignore} -o }-path ${q}
+			done;;
 		ignorecontents)
-			set -f
-			for i in $args; do
-ignore=${ignore:+${ignore} -o }-path ${i} -print
-			done
-			set +f;;
+			for i in $@; do
+q=$(shell_quote $i)
+ignore=${ignore:+${ignore} -o }-path ${q} -print
+			done;;
 		workdir)
-			if [ -d $args ]; then
-TMPDIR=$args
+			if [ $# -ne 1 ]; then
+echo $CONF: workdir takes exactly one argument 2
+			elif [ -d $1 ]; then
+TMPDIR=$1
 			else
-echo $CONF: workdir: $args nonexistent 2
+echo $CONF: workdir: $1 nonexistent 2
 			fi;;
 		*)
-			echo $CONF: $com: unknown config command	2
+			echo $CONF: $com: unknown config command 2
 			exit 1;;
 		esac
-	done
-	exec 5 5-
+	done  $CONF
 fi
 
 : ${SRCHPATHS:=/}			# directories to be put in the database
@@ -99,7 +130,7 @@
 

CVS commit: src/sys/arch/macppc/dev

2011-07-10 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jul 10 14:41:34 UTC 2011

Modified Files:
src/sys/arch/macppc/dev: battery.c smartbat.c

Log Message:
Initialize sensor state.  (Missed the commit for this in my last
roto-till.)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/macppc/dev/battery.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/macppc/dev/smartbat.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/macppc/dev/battery.c
diff -u src/sys/arch/macppc/dev/battery.c:1.13 src/sys/arch/macppc/dev/battery.c:1.14
--- src/sys/arch/macppc/dev/battery.c:1.13	Fri Jul  1 18:41:51 2011
+++ src/sys/arch/macppc/dev/battery.c	Sun Jul 10 14:41:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: battery.c,v 1.13 2011/07/01 18:41:51 dyoung Exp $ */
+/*	$NetBSD: battery.c,v 1.14 2011/07/10 14:41:34 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: battery.c,v 1.13 2011/07/01 18:41:51 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: battery.c,v 1.14 2011/07/10 14:41:34 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -229,6 +229,7 @@
 
 #define INITDATA(index, unit, string)	\
 	sc-sc_sensor[index].units = unit; \
+	sc-sc_sensor[index].state = ENVSYS_SINVALID;			\
 	snprintf(sc-sc_sensor[index].desc,\
 	sizeof(sc-sc_sensor[index].desc), %s, string);
 

Index: src/sys/arch/macppc/dev/smartbat.c
diff -u src/sys/arch/macppc/dev/smartbat.c:1.6 src/sys/arch/macppc/dev/smartbat.c:1.7
--- src/sys/arch/macppc/dev/smartbat.c:1.6	Fri Jul  1 18:41:52 2011
+++ src/sys/arch/macppc/dev/smartbat.c	Sun Jul 10 14:41:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: smartbat.c,v 1.6 2011/07/01 18:41:52 dyoung Exp $ */
+/*	$NetBSD: smartbat.c,v 1.7 2011/07/10 14:41:34 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: smartbat.c,v 1.6 2011/07/01 18:41:52 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: smartbat.c,v 1.7 2011/07/10 14:41:34 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -131,6 +131,7 @@
 
 #define INITDATA(index, unit, string)	\
 	sc-sc_sensor[index].units = unit; \
+	sc-sc_sensor[index].state = ENVSYS_SINVALID;			\
 	snprintf(sc-sc_sensor[index].desc,\
 	sizeof(sc-sc_sensor[index].desc), %s, string);
 



CVS commit: src

2011-07-10 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jul 10 15:28:26 UTC 2011

Modified Files:
src/external/gpl3/gcc/usr.bin/gcc/arch/sparc64: auto-host.h
src/tools/gcc: Makefile

Log Message:
force HAVE_AS_SPARC_GOTDATA_OP to false, since those relocs seem
busted with our binutils.  now sparc64 seems to work fine.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gcc/usr.bin/gcc/arch/sparc64/auto-host.h
cvs rdiff -u -r1.43 -r1.44 src/tools/gcc/Makefile

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

Modified files:

Index: src/external/gpl3/gcc/usr.bin/gcc/arch/sparc64/auto-host.h
diff -u src/external/gpl3/gcc/usr.bin/gcc/arch/sparc64/auto-host.h:1.1 src/external/gpl3/gcc/usr.bin/gcc/arch/sparc64/auto-host.h:1.2
--- src/external/gpl3/gcc/usr.bin/gcc/arch/sparc64/auto-host.h:1.1	Wed Jun 29 06:25:34 2011
+++ src/external/gpl3/gcc/usr.bin/gcc/arch/sparc64/auto-host.h	Sun Jul 10 15:28:26 2011
@@ -436,7 +436,7 @@
 
 /* Define if your assembler and linker support GOTDATA_OP relocs. */
 #ifndef USED_FOR_TARGET
-#define HAVE_AS_SPARC_GOTDATA_OP 1
+/* #define HAVE_AS_SPARC_GOTDATA_OP 1 */
 #endif
 
 

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.43 src/tools/gcc/Makefile:1.44
--- src/tools/gcc/Makefile:1.43	Sun Jul  3 12:11:32 2011
+++ src/tools/gcc/Makefile	Sun Jul 10 15:28:26 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.43 2011/07/03 12:11:32 mrg Exp $
+#	$NetBSD: Makefile,v 1.44 2011/07/10 15:28:26 mrg Exp $
 
 .include bsd.own.mk
 
@@ -64,7 +64,8 @@
 		EXTRA_PARTS= CPPFLAGS=${GCC_CPPFLAGS:Q} \
 		AR=${HOST_AR:Q} RANLIB=${HOST_RANLIB:Q}
 
-CONFIGURE_ENV+= gcc_cv_libc_provides_ssp=yes
+CONFIGURE_ENV+= gcc_cv_libc_provides_ssp=yes \
+		gcc_cv_as_sparc_gotdata_op=no
 
 MKNATIVE_ENV=	${BINENV} ${CONFIGURE_ENV:NC*:NLD*} \
 			CC_FOR_BUILD=${HOST_CC:Q} \
@@ -84,7 +85,8 @@
 			gcc_cv_libc_provides_ssp=yes \
 			gdb_cv_printf_has_long_double=yes \
 			gdb_cv_printf_has_long_long=yes \
-			gdb_cv_scanf_has_long_double=yes
+			gdb_cv_scanf_has_long_double=yes \
+			gcc_cv_as_sparc_gotdata_op=no
 
 ALL_TARGET=	all-gcc
 INSTALL_TARGET=	install-gcc



CVS commit: src/sys/dev/dtv

2011-07-10 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jul 10 15:50:48 UTC 2011

Modified Files:
src/sys/dev/dtv: dtvio_demux.h

Log Message:
add DMX_PES_foo - DMX_PES_foo0 aliases for dmx_pes_type_t types


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/dtv/dtvio_demux.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/dtv/dtvio_demux.h
diff -u src/sys/dev/dtv/dtvio_demux.h:1.1 src/sys/dev/dtv/dtvio_demux.h:1.2
--- src/sys/dev/dtv/dtvio_demux.h:1.1	Sat Jul  9 14:46:56 2011
+++ src/sys/dev/dtv/dtvio_demux.h	Sun Jul 10 15:50:48 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: dtvio_demux.h,v 1.1 2011/07/09 14:46:56 jmcneill Exp $ */
+/* $NetBSD: dtvio_demux.h,v 1.2 2011/07/10 15:50:48 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill jmcne...@invisible.ca
@@ -81,6 +81,12 @@
 	DMX_PES_OTHER,
 } dmx_pes_type_t;
 
+#define	DMX_PES_AUDIO		DMX_PES_AUDIO0
+#define	DMX_PES_VIDEO		DMX_PES_VIDEO0
+#define	DMX_PES_TELETEXT	DMX_PES_TELETEXT0
+#define	DMX_PES_SUBTITLE	DMX_PES_SUBTITLE0
+#define	DMX_PES_PCR		DMX_PES_PCR0
+
 #define	DMX_FILTER_SIZE	16
 
 typedef struct dmx_filter {



CVS commit: src/distrib/sets/lists/comp

2011-07-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Jul 10 16:54:04 UTC 2011

Modified Files:
src/distrib/sets/lists/comp: ad.mips64eb ad.mips64el

Log Message:
Fix set lists for COMPAT + GCC=45


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/distrib/sets/lists/comp/ad.mips64eb \
src/distrib/sets/lists/comp/ad.mips64el

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

Modified files:

Index: src/distrib/sets/lists/comp/ad.mips64eb
diff -u src/distrib/sets/lists/comp/ad.mips64eb:1.42 src/distrib/sets/lists/comp/ad.mips64eb:1.43
--- src/distrib/sets/lists/comp/ad.mips64eb:1.42	Thu Jul  7 08:46:21 2011
+++ src/distrib/sets/lists/comp/ad.mips64eb	Sun Jul 10 16:54:04 2011
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.42 2011/07/07 08:46:21 mrg Exp $
+# $NetBSD: ad.mips64eb,v 1.43 2011/07/10 16:54:04 matt Exp $
 ./usr/bin/elf2aoutcomp-obsolete		obsolete
 ./usr/bin/elf2ecoffcomp-sysutil-bin
 ./usr/include/gcc-4.5/loongson.h		comp-c-include		gcccmds,gcc=45
@@ -1244,7 +1244,7 @@
 ./usr/libdata/debug/usr/lib/64/libdes.so.8.1.debug		comp-crypto-debug	crypto,debug,compat
 ./usr/libdata/debug/usr/lib/64/libdevmapper.so.1.0.debug	comp-lvm-debug	lvm,debug,compat
 ./usr/libdata/debug/usr/lib/64/libdm.so.0.0.debug 		comp-sys-debug	debug,compat
-./usr/libdata/debug/usr/lib/64/libdns.so.5.4.debug		comp-bind-debug	debug,compat
+./usr/libdata/debug/usr/lib/64/libdns.so.5.5.debug		comp-bind-debug	debug,compat
 ./usr/libdata/debug/usr/lib/64/libdns_sd.so.0.0.debug	comp-mdns-debug	mdns,debug,compat
 ./usr/libdata/debug/usr/lib/64/libdtrace.so.2.0.debug	comp-sys-debug	dtrace,debug,compat
 ./usr/libdata/debug/usr/lib/64/libdwarf.so.0.0.debug	comp-sys-debug	debug,compat
@@ -1255,6 +1255,7 @@
 ./usr/libdata/debug/usr/lib/64/libform.so.6.0.debug	comp-sys-debug	debug,compat
 ./usr/libdata/debug/usr/lib/64/libg2c.so.2.0.debug		comp-sys-debug	gcc=3,debug,compat
 ./usr/libdata/debug/usr/lib/64/libgcc_s.so.1.0.debug	comp-sys-debug	gcc,debug,compat
+./usr/libdata/debug/usr/lib/64/libgmp.so.10.2.debug	comp-sys-debug	gcc=45,debug,compat
 ./usr/libdata/debug/usr/lib/64/libgnumalloc.so.1.0.debug	comp-sys-debug	debug,compat
 ./usr/libdata/debug/usr/lib/64/libgssapi.so.10.0.debug	comp-compat-shlib	 compat,pic,kerberos,debug
 ./usr/libdata/debug/usr/lib/64/libgssapi.so.9.0.debug	comp-compat-shlib	 compat,pic,kerberos,debug,obsolete
@@ -1292,11 +1293,14 @@
 ./usr/libdata/debug/usr/lib/64/libmagic.so.3.1.debug	comp-sys-debug	debug,compat
 ./usr/libdata/debug/usr/lib/64/libmenu.so.6.0.debug	comp-sys-debug	debug,compat
 ./usr/libdata/debug/usr/lib/64/libmj.so.1.0.debug		comp-crypto-debug	debug,compat
+./usr/libdata/debug/usr/lib/64/libmpc.so.2.0.debug	comp-sys-debug	gcc=45,debug,compat
+./usr/libdata/debug/usr/lib/64/libmpfr.so.4.1.debug	comp-sys-debug	gcc=45,debug,compat
 ./usr/libdata/debug/usr/lib/64/libnetpgp.so.3.0.debug	comp-crypto-debug	crypto,debug,compat
 ./usr/libdata/debug/usr/lib/64/libnpf.so.0.0.debug		comp-npf-debug	npf,debug,compat
 ./usr/libdata/debug/usr/lib/64/libnvpair.so.0.0.debug	comp-zfs-debug	zfs,dynamicroot,debug,compat
 ./usr/libdata/debug/usr/lib/64/libobjc.so.2.0.debug	comp-sys-debug	gcc=3,debug,compat
 ./usr/libdata/debug/usr/lib/64/libobjc.so.3.0.debug	comp-sys-debug	gcc=4,debug,compat
+./usr/libdata/debug/usr/lib/64/libobjc.so.3.0.debug	comp-sys-debug	gcc=45,debug,compat
 ./usr/libdata/debug/usr/lib/64/libopcodes.so.4.0.debug	comp-c-debug	binutils,debug,compat
 ./usr/libdata/debug/usr/lib/64/libossaudio.so.1.0.debug	comp-sys-debug	debug,compat
 ./usr/libdata/debug/usr/lib/64/libp2k.so.2.0.debug		comp-puffs-debug	debug,compat
@@ -1388,7 +1392,7 @@
 ./usr/libdata/debug/usr/lib/o32/libdes.so.8.1.debug		comp-crypto-debug	crypto,debug,compat
 ./usr/libdata/debug/usr/lib/o32/libdevmapper.so.1.0.debug	comp-lvm-debug	lvm,debug,compat
 ./usr/libdata/debug/usr/lib/o32/libdm.so.0.0.debug 		comp-sys-debug	debug,compat
-./usr/libdata/debug/usr/lib/o32/libdns.so.5.4.debug		comp-bind-debug	debug,compat
+./usr/libdata/debug/usr/lib/o32/libdns.so.5.5.debug		comp-bind-debug	debug,compat
 ./usr/libdata/debug/usr/lib/o32/libdns_sd.so.0.0.debug	comp-mdns-debug	mdns,debug,compat
 ./usr/libdata/debug/usr/lib/o32/libdtrace.so.2.0.debug	comp-sys-debug	dtrace,debug,compat
 ./usr/libdata/debug/usr/lib/o32/libdwarf.so.0.0.debug	comp-sys-debug	debug,compat
@@ -1400,6 +1404,7 @@
 ./usr/libdata/debug/usr/lib/o32/libg2c.so.2.0.debug		comp-sys-debug	gcc=3,debug,compat
 ./usr/libdata/debug/usr/lib/o32/libgcc_s.so.1.0.debug	comp-sys-debug	gcc,debug,compat
 ./usr/libdata/debug/usr/lib/o32/libgnumalloc.so.1.0.debug	comp-sys-debug	debug,compat
+./usr/libdata/debug/usr/lib/o32/libgmp.so.10.2.debug	comp-sys-debug	gcc=45,debug,compat
 ./usr/libdata/debug/usr/lib/o32/libgssapi.so.10.0.debug	comp-compat-shlib	 compat,pic,kerberos,debug
 ./usr/libdata/debug/usr/lib/o32/libgssapi.so.9.0.debug	comp-compat-shlib	 compat,pic,kerberos,debug,obsolete
 

CVS commit: src/sys/dev/pci

2011-07-10 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Jul 10 20:01:37 UTC 2011

Modified Files:
src/sys/dev/pci: pciide_apollo_reg.h viaide.c

Log Message:
Add complete support for all channels on VT6421A SATA/PATA controller to
viaide(4).


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/pciide_apollo_reg.h
cvs rdiff -u -r1.75 -r1.76 src/sys/dev/pci/viaide.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/pciide_apollo_reg.h
diff -u src/sys/dev/pci/pciide_apollo_reg.h:1.19 src/sys/dev/pci/pciide_apollo_reg.h:1.20
--- src/sys/dev/pci/pciide_apollo_reg.h:1.19	Thu Jun 30 20:09:40 2011
+++ src/sys/dev/pci/pciide_apollo_reg.h	Sun Jul 10 20:01:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pciide_apollo_reg.h,v 1.19 2011/06/30 20:09:40 wiz Exp $	*/
+/*	$NetBSD: pciide_apollo_reg.h,v 1.20 2011/07/10 20:01:37 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1998 Manuel Bouyer.
@@ -91,6 +91,7 @@
 #define APO_VIA_REGBASE			0x40
 #define APO_AMD_REGBASE			0x40
 #define APO_NVIDIA_REGBASE		0x50
+#define APO_VIA_VT6421_REGBASE		0xa0
 
 /* misc. configuration registers */
 #define APO_IDECONF(sc) ((sc)-sc_apo_regbase + 0x00)
@@ -110,7 +111,7 @@
 #define APO_IDECONF_FIFO_CONF_MASK 0x6000
 
 /* Misc. controls register - VIA only */
-#define APO_CTLMISC(sc) 0x44
+#define APO_CTLMISC(sc) ((sc)-sc_apo_regbase + 0x04)
 #define APO_CTLMISC_BM_STS_RTY	0x0008
 #define APO_CTLMISC_FIFO_HWS	0x0010
 #define APO_CTLMISC_WR_IRDY_WS	0x0020
@@ -129,7 +130,7 @@
 	(((1 - (channel))  4) + ((1 - (drive))  3) + 4))
 
 /* misc timings control - VIA only */
-#define APO_MISCTIM(sc) 0x4c
+#define APO_MISCTIM(sc) ((sc)-sc_apo_regbase + 0x0c)
 
 /* Ultra-DMA control (586A/B only, amd and nvidia ) */
 #define APO_UDMA(sc) ((sc)-sc_apo_regbase + 0x10)

Index: src/sys/dev/pci/viaide.c
diff -u src/sys/dev/pci/viaide.c:1.75 src/sys/dev/pci/viaide.c:1.76
--- src/sys/dev/pci/viaide.c:1.75	Tue May 17 17:34:54 2011
+++ src/sys/dev/pci/viaide.c	Sun Jul 10 20:01:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: viaide.c,v 1.75 2011/05/17 17:34:54 dyoung Exp $	*/
+/*	$NetBSD: viaide.c,v 1.76 2011/07/10 20:01:37 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -26,10 +26,11 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: viaide.c,v 1.75 2011/05/17 17:34:54 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: viaide.c,v 1.76 2011/07/10 20:01:37 jakllsch Exp $);
 
 #include sys/param.h
 #include sys/systm.h
+#include sys/malloc.h
 
 #include dev/pci/pcivar.h
 #include dev/pci/pcidevs.h
@@ -46,7 +47,7 @@
 static void	via_mapregs_compat_native(const struct pci_attach_args *,
 		struct pciide_channel *);
 static int	via_sata_chip_map_common(struct pciide_softc *,
-		struct pci_attach_args *);
+		const struct pci_attach_args *);
 static void	via_sata_chip_map(struct pciide_softc *,
 		const struct pci_attach_args *, int);
 static void	via_sata_chip_map_6(struct pciide_softc *,
@@ -311,7 +312,7 @@
 	},
 	{ PCI_PRODUCT_VIATECH_VT6421_RAID,
 	  0,
-	  VIA Technologies VT6421 Serial RAID Controller,
+	  VIA Technologies VT6421 Serial ATA RAID Controller,
 	  via_sata_chip_map_new,
 	},
 	{ PCI_PRODUCT_VIATECH_VT8237_SATA,
@@ -366,7 +367,7 @@
 static int
 viaide_match(device_t parent, cfdata_t match, void *aux)
 {
-	struct pci_attach_args *pa = aux;
+	const struct pci_attach_args *pa = aux;
 
 	if (viaide_lookup(pa-pa_id) != NULL)
 		return (2);
@@ -376,7 +377,7 @@
 static void
 viaide_attach(device_t parent, device_t self, void *aux)
 {
-	struct pci_attach_args *pa = aux;
+	const struct pci_attach_args *pa = aux;
 	struct pciide_softc *sc = device_private(self);
 	const struct pciide_product_desc *pp;
 
@@ -835,10 +836,14 @@
 }
 
 static int
-via_sata_chip_map_common(struct pciide_softc *sc, struct pci_attach_args *pa)
+via_sata_chip_map_common(struct pciide_softc *sc,
+const struct pci_attach_args *cpa)
 {
 	pcireg_t csr;
 	int maptype, ret;
+	struct pci_attach_args pac, *pa = pac;
+
+	pac = *cpa;
 
 	if (pciide_chipen(sc, pa) == 0)
 		return 0;
@@ -908,18 +913,15 @@
 }
 
 static void
-via_sata_chip_map(struct pciide_softc *sc, const struct pci_attach_args *pa0,
+via_sata_chip_map(struct pciide_softc *sc, const struct pci_attach_args *pa,
 int satareg_shift)
 {
 	struct pciide_channel *cp;
 	struct ata_channel *wdc_cp;
 	struct wdc_regs *wdr;
-	struct pci_attach_args pacopy, *pa;
 	pcireg_t interface;
 	int channel;
 
-	pacopy = *pa0;
-	pa = pacopy;
 	interface = PCI_INTERFACE(pa-pa_class);
 
 	if (via_sata_chip_map_common(sc, pa) == 0)
@@ -983,33 +985,118 @@
 }
 
 static void
+via_vt6421_mapreg_dma(struct pciide_softc *sc, const struct pci_attach_args *pa)
+{
+	struct pciide_channel *pc;
+	int chan, reg;
+	bus_size_t size;
+
+	sc-sc_dma_ok = (pci_mapreg_map(pa, PCIIDE_REG_BUS_MASTER_DMA,
+	PCI_MAPREG_TYPE_IO, 0, sc-sc_dma_iot, sc-sc_dma_ioh,
+	NULL, sc-sc_dma_ios) 

CVS commit: src/sys/arch/amiga

2011-07-10 Thread Michael L. Hitch
Module Name:src
Committed By:   mhitch
Date:   Sun Jul 10 21:02:39 UTC 2011

Modified Files:
src/sys/arch/amiga/amiga: amiga_init.c
src/sys/arch/amiga/stand/bootblock/boot: main.c
src/sys/arch/amiga/stand/loadbsd: loadbsd.c

Log Message:
Add a serial console flag passed from the boot loader to the kernel to
allow enabling the serial console with the boot command.  Loadbsd has
the option added, but I am not able to buid a new loadbsd binary at this
time, so only the bootxx loader can set the option.


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/arch/amiga/amiga/amiga_init.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amiga/stand/bootblock/boot/main.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/amiga/stand/loadbsd/loadbsd.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/amiga/amiga/amiga_init.c
diff -u src/sys/arch/amiga/amiga/amiga_init.c:1.123 src/sys/arch/amiga/amiga/amiga_init.c:1.124
--- src/sys/arch/amiga/amiga/amiga_init.c:1.123	Sun Jun 12 03:35:38 2011
+++ src/sys/arch/amiga/amiga/amiga_init.c	Sun Jul 10 21:02:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: amiga_init.c,v 1.123 2011/06/12 03:35:38 rmind Exp $	*/
+/*	$NetBSD: amiga_init.c,v 1.124 2011/07/10 21:02:37 mhitch Exp $	*/
 
 /*
  * Copyright (c) 1994 Michael L. Hitch
@@ -35,9 +35,10 @@
 #include opt_p5ppc68kboard.h
 #include opt_devreload.h
 #include opt_m68k_arch.h
+#include ser.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: amiga_init.c,v 1.123 2011/06/12 03:35:38 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: amiga_init.c,v 1.124 2011/07/10 21:02:37 mhitch Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -83,6 +84,10 @@
 extern u_long aga_enable;
 #endif
 
+#if NSER  0
+extern int serconsole;
+#endif 
+
 extern u_long noncontig_enable;
 
 /*
@@ -257,6 +262,10 @@
 #endif
 	if (flags  (3  1))
 		RELOC(noncontig_enable, u_long) = (flags  1)  3;
+#if NSER  0
+	if (flags  (1  3))
+		RELOC(serconsole, int) = 0;
+#endif
 
 	RELOC(scsi_nosync, u_long) = inh_sync;
 

Index: src/sys/arch/amiga/stand/bootblock/boot/main.c
diff -u src/sys/arch/amiga/stand/bootblock/boot/main.c:1.27 src/sys/arch/amiga/stand/bootblock/boot/main.c:1.28
--- src/sys/arch/amiga/stand/bootblock/boot/main.c:1.27	Sat Jan 22 19:19:16 2011
+++ src/sys/arch/amiga/stand/bootblock/boot/main.c	Sun Jul 10 21:02:38 2011
@@ -1,5 +1,5 @@
 /*
- * $NetBSD: main.c,v 1.27 2011/01/22 19:19:16 joerg Exp $
+ * $NetBSD: main.c,v 1.28 2011/07/10 21:02:38 mhitch Exp $
  *
  *
  * Copyright (c) 1996,1999 Ignatios Souvatzis
@@ -217,6 +217,9 @@
 case 'A':	/* enable AGA modes */
 	amiga_flags |= 1;
 	break;
+case 'C':	/* Serial Console */
+	amiga_flags |= (1  3);
+	break;
 case 'D':	/* enter Debugger */
 	boothowto |= RB_KDB;
 	break;

Index: src/sys/arch/amiga/stand/loadbsd/loadbsd.c
diff -u src/sys/arch/amiga/stand/loadbsd/loadbsd.c:1.34 src/sys/arch/amiga/stand/loadbsd/loadbsd.c:1.35
--- src/sys/arch/amiga/stand/loadbsd/loadbsd.c:1.34	Wed Oct 21 23:53:38 2009
+++ src/sys/arch/amiga/stand/loadbsd/loadbsd.c	Sun Jul 10 21:02:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: loadbsd.c,v 1.34 2009/10/21 23:53:38 snj Exp $	*/
+/*	$NetBSD: loadbsd.c,v 1.35 2011/07/10 21:02:39 mhitch Exp $	*/
 
 /*
  * Copyright (c) 1994 Michael L. Hitch
@@ -198,7 +198,7 @@
 	if ((ExpansionBase=(void *)OpenLibrary(EXPANSIONNAME, 0)) == NULL)
 		err(20, can't open expansion library);
 
-	while ((ch = getopt(argc, argv, aAbc:DhI:km:n:qptsSvVZ)) != -1) {
+	while ((ch = getopt(argc, argv, aAbCc:DhI:km:n:qptsSvVZ)) != -1) {
 		switch (ch) {
 		case 'k':
 			k_flag = 1;
@@ -251,6 +251,9 @@
 			else
 err(20, -n option must be 0, 1, 2, or 3);
 			break;
+		case 'C':
+			amiga_flags |= (1  3);
+			break;
 		case 'I':
 			I_flag = strtoul(optarg, NULL, 16);
 			break;
@@ -835,7 +838,7 @@
 void
 usage(void)
 {
-	fprintf(stderr, usage: %s [-abhkpstADSVZ] [-c machine] [-m mem] [-n mode] [-I sync-inhibit] kernel\n,
+	fprintf(stderr, usage: %s [-abhkpstACDSVZ] [-c machine] [-m mem] [-n mode] [-I sync-inhibit] kernel\n,
 	program_name);
 	exit(1);
 }
@@ -854,6 +857,7 @@
 \t-b  Ask for which root device.
 \tIts possible to have multiple roots and choose between them.
 \t-c  Set machine type. [e.g 3000; use 32000+N for DraCo rev. N]
+\t-C  Use Serial Console.
 \t-D  Enter debugger
 \t-h  This help message.
 \t-I  Inhibit sync negotiation. Option value is bit-encoded targets.



CVS commit: src/lib/libc/arch/powerpc/gen

2011-07-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Jul 10 21:18:47 UTC 2011

Modified Files:
src/lib/libc/arch/powerpc/gen: flt_rounds.c fpgetmask.c fpgetround.c
fpgetsticky.c fpsetmask.c fpsetround.c fpsetsticky.c

Log Message:
Don't use f with non-fp types.  Use a union to go between
double and uint64_t.  Makes clang happy.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/powerpc/gen/flt_rounds.c \
src/lib/libc/arch/powerpc/gen/fpsetsticky.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/powerpc/gen/fpgetmask.c \
src/lib/libc/arch/powerpc/gen/fpgetround.c \
src/lib/libc/arch/powerpc/gen/fpgetsticky.c \
src/lib/libc/arch/powerpc/gen/fpsetmask.c \
src/lib/libc/arch/powerpc/gen/fpsetround.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/powerpc/gen/flt_rounds.c
diff -u src/lib/libc/arch/powerpc/gen/flt_rounds.c:1.10 src/lib/libc/arch/powerpc/gen/flt_rounds.c:1.11
--- src/lib/libc/arch/powerpc/gen/flt_rounds.c:1.10	Sat Dec 24 23:10:08 2005
+++ src/lib/libc/arch/powerpc/gen/flt_rounds.c	Sun Jul 10 21:18:47 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: flt_rounds.c,v 1.10 2005/12/24 23:10:08 perry Exp $	*/
+/*	$NetBSD: flt_rounds.c,v 1.11 2011/07/10 21:18:47 matt Exp $	*/
 
 /*
  * Copyright (c) 1996 Mark Brinicombe
@@ -33,7 +33,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: flt_rounds.c,v 1.10 2005/12/24 23:10:08 perry Exp $);
+__RCSID($NetBSD: flt_rounds.c,v 1.11 2011/07/10 21:18:47 matt Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include ieeefp.h
@@ -54,9 +54,12 @@
 #ifdef _SOFT_FLOAT
 	return map[fpgetround()];
 #else
-	uint64_t fpscr;
+	union {
+		double u_d;
+		uint64_t u_fpscr;
+	} ud;
 
-	__asm volatile(mffs %0 : =f(fpscr));
-	return map[((uint32_t)fpscr  FPSCR_RN)];
+	__asm volatile(mffs %0 : =f(ud.u_d));
+	return map[((uint32_t)ud.u_fpscr  FPSCR_RN)];
 #endif
 }
Index: src/lib/libc/arch/powerpc/gen/fpsetsticky.c
diff -u src/lib/libc/arch/powerpc/gen/fpsetsticky.c:1.10 src/lib/libc/arch/powerpc/gen/fpsetsticky.c:1.11
--- src/lib/libc/arch/powerpc/gen/fpsetsticky.c:1.10	Mon Apr 28 20:22:57 2008
+++ src/lib/libc/arch/powerpc/gen/fpsetsticky.c	Sun Jul 10 21:18:47 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpsetsticky.c,v 1.10 2008/04/28 20:22:57 martin Exp $	*/
+/*	$NetBSD: fpsetsticky.c,v 1.11 2011/07/10 21:18:47 matt Exp $	*/
 
 /*
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: fpsetsticky.c,v 1.10 2008/04/28 20:22:57 martin Exp $);
+__RCSID($NetBSD: fpsetsticky.c,v 1.11 2011/07/10 21:18:47 matt Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -53,32 +53,35 @@
 fp_except
 fpsetsticky(fp_except mask)
 {
-	uint64_t fpscr;
+	union {
+		double u_d;
+		uint64_t u_fpscr;
+	} ud;
 	fp_except old;
 
-	__asm volatile(mffs %0 : =f(fpscr));
-	old = ((uint32_t)fpscr  STICKYBITS)  STICKYSHFT;
+	__asm volatile(mffs %0 : =f(ud.u_d));
+	old = ((uint32_t)ud.u_fpscr  STICKYBITS)  STICKYSHFT;
 	/*
 	 * FPSCR_VX (aka FP_X_INV) is not a sticky bit but a summary of the
 	 * all the FPSCR_VX* sticky bits.  So when FP_X_INV is cleared then
 	 * clear all of those bits, likewise when it's set, set them all.
 	 */
 	if ((mask  FP_X_INV) == 0)
-		fpscr = ~INVBITS;
+		ud.u_fpscr = ~INVBITS;
 	else 
-		fpscr |= INVBITS;
-	fpscr = ~STICKYBITS;
-	fpscr |= ((uint32_t)mask  STICKYSHFT)  STICKYBITS;
+		ud.u_fpscr |= INVBITS;
+	ud.u_fpscr = ~STICKYBITS;
+	ud.u_fpscr |= ((uint32_t)mask  STICKYSHFT)  STICKYBITS;
 	/*
 	 * Make FPSCR_FX reflect the presence of a set sticky bit (or not).
 	 */
-	if (fpscr  (STICKYBITS|INVBITS))
-		fpscr |= FPSCR_FX;
+	if (ud.u_fpscr  (STICKYBITS|INVBITS))
+		ud.u_fpscr |= FPSCR_FX;
 	else
-		fpscr = ~FPSCR_FX;
+		ud.u_fpscr = ~FPSCR_FX;
 	/*
 	 * Write back the fpscr.
 	 */
-	__asm volatile(mtfsf 0xff,%0 :: f(fpscr));
+	__asm volatile(mtfsf 0xff,%0 :: f(ud.u_d));
 	return (old);
 }

Index: src/lib/libc/arch/powerpc/gen/fpgetmask.c
diff -u src/lib/libc/arch/powerpc/gen/fpgetmask.c:1.9 src/lib/libc/arch/powerpc/gen/fpgetmask.c:1.10
--- src/lib/libc/arch/powerpc/gen/fpgetmask.c:1.9	Mon Apr 28 20:22:56 2008
+++ src/lib/libc/arch/powerpc/gen/fpgetmask.c	Sun Jul 10 21:18:47 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpgetmask.c,v 1.9 2008/04/28 20:22:56 martin Exp $	*/
+/*	$NetBSD: fpgetmask.c,v 1.10 2011/07/10 21:18:47 matt Exp $	*/
 
 /*
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: fpgetmask.c,v 1.9 2008/04/28 20:22:56 martin Exp $);
+__RCSID($NetBSD: fpgetmask.c,v 1.10 2011/07/10 21:18:47 matt Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -50,8 +50,11 @@
 fp_except
 fpgetmask(void)
 {
-	uint64_t fpscr;
+	union {
+		double	u_d;
+		uint64_t u_fpscr;
+	} ud;
 

CVS commit: src/sys/arch/mips

2011-07-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Jul 10 23:13:23 UTC 2011

Modified Files:
src/sys/arch/mips/adm5120: adm5120_intr.c
src/sys/arch/mips/adm5120/dev: admpci.c if_admsw.c if_admswvar.h uart.c
wdc_extio.c
src/sys/arch/mips/alchemy: au1000.c au1100.c au1500.c au1550.c
au_chipdep.c au_himem_space.c au_icu.c au_wired_space.c aubus.c
src/sys/arch/mips/alchemy/dev: auspi.c if_aumac.c
src/sys/arch/mips/alchemy/include: auvar.h
src/sys/arch/mips/atheros: ar9344.c
src/sys/arch/mips/atheros/dev: arpci.c
src/sys/arch/mips/atheros/include: ar9344reg.h
src/sys/arch/mips/bonito: bonito_iobc.c bonito_pci.c
src/sys/arch/mips/conf: files.atheros
src/sys/arch/mips/mips: bus_dma.c bus_space_alignstride_chipdep.c
in_cksum.c mips3_clock.c mips3_clockintr.c mips_softint.c
src/sys/arch/mips/rmi: rmixl_gpio.c rmixl_intr.c rmixl_obio.c
rmixl_pcie.c rmixl_pcix.c

Log Message:
Fix machine/ includes


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/adm5120/adm5120_intr.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/adm5120/dev/admpci.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/mips/adm5120/dev/if_admsw.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/adm5120/dev/if_admswvar.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/adm5120/dev/uart.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/adm5120/dev/wdc_extio.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/mips/alchemy/au1000.c \
src/sys/arch/mips/alchemy/au1100.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/alchemy/au1500.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/mips/alchemy/au1550.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/alchemy/au_chipdep.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/mips/alchemy/au_himem_space.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/mips/alchemy/au_icu.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/alchemy/au_wired_space.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/mips/alchemy/aubus.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/alchemy/dev/auspi.c
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/mips/alchemy/dev/if_aumac.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/alchemy/include/auvar.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/atheros/ar9344.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/atheros/dev/arpci.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/atheros/include/ar9344reg.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/bonito/bonito_iobc.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/bonito/bonito_pci.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/mips/conf/files.atheros
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/mips/mips/bus_dma.c
cvs rdiff -u -r1.14 -r1.15 \
src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c \
src/sys/arch/mips/mips/in_cksum.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/mips/mips/mips3_clock.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mips/mips/mips3_clockintr.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/mips/mips_softint.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/rmi/rmixl_gpio.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/rmi/rmixl_intr.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/rmi/rmixl_obio.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/rmi/rmixl_pcie.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/rmi/rmixl_pcix.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/adm5120/adm5120_intr.c
diff -u src/sys/arch/mips/adm5120/adm5120_intr.c:1.5 src/sys/arch/mips/adm5120/adm5120_intr.c:1.6
--- src/sys/arch/mips/adm5120/adm5120_intr.c:1.5	Fri Jul  1 18:38:48 2011
+++ src/sys/arch/mips/adm5120/adm5120_intr.c	Sun Jul 10 23:13:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: adm5120_intr.c,v 1.5 2011/07/01 18:38:48 dyoung Exp $	*/
+/*	$NetBSD: adm5120_intr.c,v 1.6 2011/07/10 23:13:23 matt Exp $	*/
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -67,20 +67,14 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: adm5120_intr.c,v 1.5 2011/07/01 18:38:48 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: adm5120_intr.c,v 1.6 2011/07/10 23:13:23 matt Exp $);
 
 #include opt_ddb.h
 #define __INTR_PRIVATE
 
 #include sys/param.h
-#include sys/queue.h
+#include sys/intr.h
 #include sys/malloc.h
-#include sys/systm.h
-#include sys/device.h
-#include sys/kernel.h
-
-#include sys/bus.h
-#include machine/intr.h
 
 #include mips/locore.h
 #include mips/adm5120/include/adm5120reg.h

Index: src/sys/arch/mips/adm5120/dev/admpci.c
diff -u src/sys/arch/mips/adm5120/dev/admpci.c:1.7 src/sys/arch/mips/adm5120/dev/admpci.c:1.8
--- src/sys/arch/mips/adm5120/dev/admpci.c:1.7	Fri Jul  1 18:38:49 2011
+++ src/sys/arch/mips/adm5120/dev/admpci.c	Sun Jul 10 23:13:23 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: admpci.c,v 1.7 2011/07/01 18:38:49 dyoung Exp $ */
+/* $NetBSD: admpci.c,v 1.8 2011/07/10 23:13:23 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 David Young.  All rights reserved.
@@ -61,9 +61,12 @@
 #include 

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

2011-07-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Jul 10 23:21:59 UTC 2011

Modified Files:
src/sys/arch/mips/mips: cpu_exec.c db_disasm.c lock_stubs_llsc.S
locore_mips3.S mipsX_subr.S sig_machdep.c svr4_machdep.c syscall.c
Removed Files:
src/sys/arch/mips/mips: lock_stubs.S

Log Message:
More machine/ include cleanup


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/mips/mips/cpu_exec.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/mips/mips/db_disasm.c \
src/sys/arch/mips/mips/sig_machdep.c
cvs rdiff -u -r1.14 -r0 src/sys/arch/mips/mips/lock_stubs.S
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/mips/lock_stubs_llsc.S
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/mips/mips/locore_mips3.S
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/mips/mips/mipsX_subr.S
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/mips/mips/svr4_machdep.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/mips/mips/syscall.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/mips/cpu_exec.c
diff -u src/sys/arch/mips/mips/cpu_exec.c:1.63 src/sys/arch/mips/mips/cpu_exec.c:1.64
--- src/sys/arch/mips/mips/cpu_exec.c:1.63	Fri Apr 29 22:12:22 2011
+++ src/sys/arch/mips/mips/cpu_exec.c	Sun Jul 10 23:21:58 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_exec.c,v 1.63 2011/04/29 22:12:22 matt Exp $	*/
+/*	$NetBSD: cpu_exec.c,v 1.64 2011/07/10 23:21:58 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v 1.63 2011/04/29 22:12:22 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu_exec.c,v 1.64 2011/07/10 23:21:58 matt Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_compat_ultrix.h
@@ -58,9 +58,9 @@
 #include sys/exec_ecoff.h
 #endif
 #include sys/exec_elf.h			/* mandatory */
-#include machine/reg.h
-#include mips/regnum.h			/* symbolic register indices */
 #include mips/locore.h
+#include mips/reg.h
+#include mips/regnum.h			/* symbolic register indices */
 
 #include compat/common/compat_util.h
 

Index: src/sys/arch/mips/mips/db_disasm.c
diff -u src/sys/arch/mips/mips/db_disasm.c:1.22 src/sys/arch/mips/mips/db_disasm.c:1.23
--- src/sys/arch/mips/mips/db_disasm.c:1.22	Fri Apr 29 22:06:12 2011
+++ src/sys/arch/mips/mips/db_disasm.c	Sun Jul 10 23:21:58 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_disasm.c,v 1.22 2011/04/29 22:06:12 matt Exp $	*/
+/*	$NetBSD: db_disasm.c,v 1.23 2011/07/10 23:21:58 matt Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -35,16 +35,15 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_disasm.c,v 1.22 2011/04/29 22:06:12 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_disasm.c,v 1.23 2011/07/10 23:21:58 matt Exp $);
 
-#include sys/types.h
-#include sys/systm.h
 #include sys/param.h
+#include sys/cpu.h
+#include sys/systm.h
 
-#include machine/reg.h
-#include machine/cpu.h
+#include mips/reg.h
 #include mips/mips_opcode.h
-/*#include machine/param.h*/
+
 #include machine/db_machdep.h
 
 #include ddb/db_interface.h
Index: src/sys/arch/mips/mips/sig_machdep.c
diff -u src/sys/arch/mips/mips/sig_machdep.c:1.22 src/sys/arch/mips/mips/sig_machdep.c:1.23
--- src/sys/arch/mips/mips/sig_machdep.c:1.22	Fri Apr 29 22:09:41 2011
+++ src/sys/arch/mips/mips/sig_machdep.c	Sun Jul 10 23:21:59 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: sig_machdep.c,v 1.22 2011/04/29 22:09:41 matt Exp $	*/
+/*	$NetBSD: sig_machdep.c,v 1.23 2011/07/10 23:21:59 matt Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -31,12 +31,12 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 	
-__KERNEL_RCSID(0, $NetBSD: sig_machdep.c,v 1.22 2011/04/29 22:09:41 matt Exp $); 
+__KERNEL_RCSID(0, $NetBSD: sig_machdep.c,v 1.23 2011/07/10 23:21:59 matt Exp $); 
 
 #include opt_cputype.h
 
 #include sys/param.h
-#include sys/systm.h
+#include sys/cpu.h
 #include sys/kernel.h
 #include sys/proc.h
 #include sys/signal.h
@@ -44,8 +44,6 @@
 #include sys/mount.h
 #include sys/syscallargs.h
 
-#include machine/cpu.h
-
 #include mips/frame.h
 #include mips/regnum.h
 #include mips/locore.h

Index: src/sys/arch/mips/mips/lock_stubs_llsc.S
diff -u src/sys/arch/mips/mips/lock_stubs_llsc.S:1.1 src/sys/arch/mips/mips/lock_stubs_llsc.S:1.2
--- src/sys/arch/mips/mips/lock_stubs_llsc.S:1.1	Sun Feb 20 07:45:47 2011
+++ src/sys/arch/mips/mips/lock_stubs_llsc.S	Sun Jul 10 23:21:59 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: lock_stubs_llsc.S,v 1.1 2011/02/20 07:45:47 matt Exp $	*/
+/*	$NetBSD: lock_stubs_llsc.S,v 1.2 2011/07/10 23:21:59 matt Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 #include sys/errno.h
 
 #include machine/asm.h
-#include machine/cpu.h
+#include machine/cpu.h		/* MIPS_CURLWP */
 
 #include assym.h
 

Index: src/sys/arch/mips/mips/locore_mips3.S
diff -u src/sys/arch/mips/mips/locore_mips3.S:1.99 src/sys/arch/mips/mips/locore_mips3.S:1.100
--- src/sys/arch/mips/mips/locore_mips3.S:1.99	Tue Apr 12 22:50:33 2011

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

2011-07-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Jul 10 23:32:03 UTC 2011

Modified Files:
src/sys/arch/mips/sibyte/dev: sbgbus.c sbjcn.c sbmac.c sbobio.c sbscn.c
sbsmbus.c sbwdog.c
src/sys/arch/mips/sibyte/pci: sbbrz_pci.c sbpcihb.c

Log Message:
cleanup machine/*.h includes


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/mips/sibyte/dev/sbgbus.c \
src/sys/arch/mips/sibyte/dev/sbwdog.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/mips/sibyte/dev/sbjcn.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/mips/sibyte/dev/sbmac.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/mips/sibyte/dev/sbobio.c
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/mips/sibyte/dev/sbscn.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/mips/sibyte/dev/sbsmbus.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/sibyte/pci/sbbrz_pci.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/sibyte/pci/sbpcihb.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/sibyte/dev/sbgbus.c
diff -u src/sys/arch/mips/sibyte/dev/sbgbus.c:1.12 src/sys/arch/mips/sibyte/dev/sbgbus.c:1.13
--- src/sys/arch/mips/sibyte/dev/sbgbus.c:1.12	Tue Feb  1 03:16:54 2011
+++ src/sys/arch/mips/sibyte/dev/sbgbus.c	Sun Jul 10 23:32:03 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: sbgbus.c,v 1.12 2011/02/01 03:16:54 matt Exp $ */
+/* $NetBSD: sbgbus.c,v 1.13 2011/07/10 23:32:03 matt Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sbgbus.c,v 1.12 2011/02/01 03:16:54 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: sbgbus.c,v 1.13 2011/07/10 23:32:03 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -41,9 +41,11 @@
 
 #include ioconf.h
 
-#include machine/locore.h
-#include machine/sb1250/sb1250_regs.h
-#include machine/sb1250/sb1250_genbus.h
+#include mips/locore.h
+
+#include sbmips/sb1250/sb1250_regs.h
+#include sbmips/sb1250/sb1250_genbus.h
+
 #include sbmips/dev/sbobio/sbobiovar.h
 #include sbmips/dev/sbgbus/sbgbusvar.h
 
Index: src/sys/arch/mips/sibyte/dev/sbwdog.c
diff -u src/sys/arch/mips/sibyte/dev/sbwdog.c:1.12 src/sys/arch/mips/sibyte/dev/sbwdog.c:1.13
--- src/sys/arch/mips/sibyte/dev/sbwdog.c:1.12	Sun Feb 20 07:47:39 2011
+++ src/sys/arch/mips/sibyte/dev/sbwdog.c	Sun Jul 10 23:32:03 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: sbwdog.c,v 1.12 2011/02/20 07:47:39 matt Exp $ */
+/* $NetBSD: sbwdog.c,v 1.13 2011/07/10 23:32:03 matt Exp $ */
 
 /*
  * Copyright (c) 2002 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sbwdog.c,v 1.12 2011/02/20 07:47:39 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: sbwdog.c,v 1.13 2011/07/10 23:32:03 matt Exp $);
 
 #include locators.h
 
@@ -51,7 +51,7 @@
 
 #include dev/sysmon/sysmonvar.h
 
-#include machine/locore.h
+#include mips/locore.h
 
 #include mips/sibyte/include/sb1250_regs.h
 #include mips/sibyte/include/sb1250_scd.h

Index: src/sys/arch/mips/sibyte/dev/sbjcn.c
diff -u src/sys/arch/mips/sibyte/dev/sbjcn.c:1.27 src/sys/arch/mips/sibyte/dev/sbjcn.c:1.28
--- src/sys/arch/mips/sibyte/dev/sbjcn.c:1.27	Sun Apr 24 16:26:56 2011
+++ src/sys/arch/mips/sibyte/dev/sbjcn.c	Sun Jul 10 23:32:03 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: sbjcn.c,v 1.27 2011/04/24 16:26:56 rmind Exp $ */
+/* $NetBSD: sbjcn.c,v 1.28 2011/07/10 23:32:03 matt Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -103,7 +103,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sbjcn.c,v 1.27 2011/04/24 16:26:56 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: sbjcn.c,v 1.28 2011/07/10 23:32:03 matt Exp $);
 
 #define	SBJCN_DEBUG
 
@@ -129,8 +129,10 @@
 
 #include sbmips/dev/sbscd/sbscdvar.h
 #include sbmips/dev/sbscd/sbjcnvar.h
+
 #include dev/cons.h
-#include machine/locore.h
+
+#include mips/locore.h
 
 void	sbjcn_attach_channel(struct sbjcn_softc *sc, int chan, int intr);
 static void sbjcncn_grabdword(struct sbjcn_channel *ch);

Index: src/sys/arch/mips/sibyte/dev/sbmac.c
diff -u src/sys/arch/mips/sibyte/dev/sbmac.c:1.40 src/sys/arch/mips/sibyte/dev/sbmac.c:1.41
--- src/sys/arch/mips/sibyte/dev/sbmac.c:1.40	Sun Feb 20 07:47:39 2011
+++ src/sys/arch/mips/sibyte/dev/sbmac.c	Sun Jul 10 23:32:03 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: sbmac.c,v 1.40 2011/02/20 07:47:39 matt Exp $ */
+/* $NetBSD: sbmac.c,v 1.41 2011/07/10 23:32:03 matt Exp $ */
 
 /*
  * Copyright 2000, 2001, 2004
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sbmac.c,v 1.40 2011/02/20 07:47:39 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: sbmac.c,v 1.41 2011/07/10 23:32:03 matt Exp $);
 
 #include opt_inet.h
 #include opt_ns.h
@@ -61,12 +61,7 @@
 #include netinet/if_inarp.h
 #endif
 
-#ifdef NS
-#include netns/ns.h
-#include netns/ns_if.h
-#endif
-
-#include machine/locore.h
+#include mips/locore.h
 
 #include sbobiovar.h
 
@@ -1957,22 +1952,6 @@
 			arp_ifinit(ifp, ifa);
 			break;
 #endif
-#ifdef NS
-		case AF_NS:
-		{
-			struct ns_addr *ina = IA_SNS(ifa)-sns_addr;
-
-			

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

2011-07-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Jul 10 23:33:59 UTC 2011

Modified Files:
src/sys/arch/evbmips/conf: Makefile.evbmips.inc

Log Message:
Enhance NEED_UBOOTIMAGE so that NEED_UBOOTIMAGE=gz inserts a gzipp'ed image.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbmips/conf/Makefile.evbmips.inc

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/conf/Makefile.evbmips.inc
diff -u src/sys/arch/evbmips/conf/Makefile.evbmips.inc:1.3 src/sys/arch/evbmips/conf/Makefile.evbmips.inc:1.4
--- src/sys/arch/evbmips/conf/Makefile.evbmips.inc:1.3	Sat Jul  9 21:45:45 2011
+++ src/sys/arch/evbmips/conf/Makefile.evbmips.inc	Sun Jul 10 23:33:59 2011
@@ -29,11 +29,23 @@
 MKUBOOTIMAGEARGS+=  -a ${TEXTADDR:C/$//} -e $(TEXTADDR)
 MKUBOOTIMAGEARGS+=  -n $(MACHINE) ${_OSRELEASE} ($(KERNEL_BUILD:T))
 
+.if ${NEED_UBOOTIMAGE} == gz
+MKUBOOTIMAGEARGS+=	-C gz
+
+SYSTEM_LD_TAIL_EXTRA+=; \
+	echo ${TOOL_GZIP} -9cn $@.bin '' $@.bin.gz; \
+	${TOOL_GZIP} -9cn $@.bin  $@.bin.gz; \
+	echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin.gz $@.ub; \
+	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin.gz $@.ub
+
+EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.bin.gz@}
+.else
 SYSTEM_LD_TAIL_EXTRA+=; \
 	echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin $@.ub; \
 	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin $@.ub; \
 
+.endif
+
 EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.ub@}
 .endif
 .endif
-



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

2011-07-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Jul 10 23:34:37 UTC 2011

Modified Files:
src/sys/arch/evbmips/conf: DB120

Log Message:
Enable a few more devices (not all work).


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbmips/conf/DB120

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/conf/DB120
diff -u src/sys/arch/evbmips/conf/DB120:1.3 src/sys/arch/evbmips/conf/DB120:1.4
--- src/sys/arch/evbmips/conf/DB120:1.3	Sun Jul 10 00:03:12 2011
+++ src/sys/arch/evbmips/conf/DB120	Sun Jul 10 23:34:37 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: DB120,v 1.3 2011/07/10 00:03:12 matt Exp $
+#	$NetBSD: DB120,v 1.4 2011/07/10 23:34:37 matt Exp $
 #
 # Qualcomm Atheros AR9344 DB120 evaluation board.
 #
@@ -7,7 +7,7 @@
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		DB120-$Revision: 1.3 $
+#ident 		DB120-$Revision: 1.4 $
 
 maxusers	32
 
@@ -17,7 +17,7 @@
 makeoptions	CPUFLAGS+=-mips32r2
 makeoptions	NEED_MDSETIMAGE=yes
 makeoptions	NEED_BINARY=yes
-makeoptions	NEED_UBOOTIMAGE=yes
+makeoptions	NEED_UBOOTIMAGE=gz
 options 	NOFPU# No FPU
 options 	FPEMUL# emulate FPU insn
 options		WISOC_AR9344			# WiSoC select
@@ -145,15 +145,17 @@
 arbus0		at mainbus?
 
 com*		at arbus? addr ?
-#arpci*		at arbus? addr ?
-#pci*		at arpci?
-#ehci*		at arbus? addr ?
-#usb*		at ohci?
-#uhub*		at usb?
-#uhub*		at uhub? port ?
-#umass*		at uhub? port ? configuration ? interface ?
-#scsibus*	at umass? channel ?
-#sd*		at scsibus? target ? lun ?
+arpcie*		at arbus? addr ?
+pci*		at arpcie?
+arpci*		at arbus? addr ?
+pci*		at arpci?
+ehci*		at arbus? addr ?
+usb*		at ehci?
+uhub*		at usb?
+uhub*		at uhub? port ?
+umass*		at uhub? port ? configuration ? interface ?
+scsibus*	at umass? channel ?
+sd*		at scsibus? target ? lun ?
 #ae*		at arbus? addr ?
 #ath*		at arbus? addr ?
 #athflash*	at arbus? addr ?



CVS commit: src/sys/arch/ews4800mips/stand/boot

2011-07-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Jul 10 23:35:12 UTC 2011

Modified Files:
src/sys/arch/ews4800mips/stand/boot: Makefile

Log Message:
Use TOOL_GZIP


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/ews4800mips/stand/boot/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/ews4800mips/stand/boot/Makefile
diff -u src/sys/arch/ews4800mips/stand/boot/Makefile:1.13 src/sys/arch/ews4800mips/stand/boot/Makefile:1.14
--- src/sys/arch/ews4800mips/stand/boot/Makefile:1.13	Thu Jul  7 06:01:30 2011
+++ src/sys/arch/ews4800mips/stand/boot/Makefile	Sun Jul 10 23:35:12 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2011/07/07 06:01:30 mrg Exp $
+#	$NetBSD: Makefile,v 1.14 2011/07/10 23:35:12 matt Exp $
 
 WARNS		?= 1
 NOMAN		=
@@ -138,7 +138,7 @@
 	${BINKERNEL_O}
 	mv ${BOOT_KERNEL}.elf ${BOOT_KERNEL}
 	${OBJDUMP} -h ${BOOT_KERNEL}
-	gzip -9c ${BOOT_KERNEL}  ${.TARGET}.tmp
+	${TOOL_GZIP} -9c ${BOOT_KERNEL}  ${.TARGET}.tmp
 	mv ${.TARGET}.tmp ${.TARGET}
 	ls -al ${.TARGET}
 



CVS commit: src/etc/etc.evbmips

2011-07-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Jul 10 23:49:31 UTC 2011

Modified Files:
src/etc/etc.evbmips: Makefile.inc

Log Message:
Add algor kernels


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/etc/etc.evbmips/Makefile.inc

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

Modified files:

Index: src/etc/etc.evbmips/Makefile.inc
diff -u src/etc/etc.evbmips/Makefile.inc:1.13 src/etc/etc.evbmips/Makefile.inc:1.14
--- src/etc/etc.evbmips/Makefile.inc:1.13	Sun Feb 20 08:27:32 2011
+++ src/etc/etc.evbmips/Makefile.inc	Sun Jul 10 23:49:31 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.13 2011/02/20 08:27:32 matt Exp $
+#	$NetBSD: Makefile.inc,v 1.14 2011/07/10 23:49:31 matt Exp $
 #
 #	etc.evbmips/Makefile.inc -- evbmips-specific etc Makefile targets
 #
@@ -12,14 +12,19 @@
 KERNEL_SETS=		ALCHEMY DBAU1500 DBAU1550 MALTA MTX-1 OMSAL400
 BUILD_KERNELS=		INSTALL_OMSAL400 INSTALL_MALTA
 
+KERNEL_SETS+=		P4032 P5064-64 P6032
+
 .elif ${MACHINE_ARCH} == mips64eb || ${MACHINE_ARCH} == mips64el
 KERNEL_SETS=		MALTA32 MALTA64 XLSATX32 XLSATX64
 BUILD_KERNELS=		INSTALL_MALTA32 INSTALL_MALTA64
 BUILD_KERNELS+=		INSTALL_XLSATX32 INSTALL_XLSATX64
 
+.if ${MACHINE_ARCH} == mips64el
+KERNEL_SETS+=		P5064-64
+.endif
 .else
-KERNEL_SETS=		ALCHEMY DBAU1500 DBAU1550 MALTA
-BUILD_KERNELS=		INSTALL_OMSAL400 INSTALL_MALTA
+KERNEL_SETS=		ALCHEMY DB120 DBAU1500 DBAU1550 MALTA RB433UAH
+BUILD_KERNELS=		INSTALL_MALTA
 
 .endif
 



CVS commit: src/share/mk

2011-07-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Jul 10 23:50:24 UTC 2011

Modified Files:
src/share/mk: bsd.klinks.mk

Log Message:
Add more links for evbmips
Add ${MACHINE} link


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/mk/bsd.klinks.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.klinks.mk
diff -u src/share/mk/bsd.klinks.mk:1.8 src/share/mk/bsd.klinks.mk:1.9
--- src/share/mk/bsd.klinks.mk:1.8	Sun Feb 20 04:05:14 2011
+++ src/share/mk/bsd.klinks.mk	Sun Jul 10 23:50:24 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.klinks.mk,v 1.8 2011/02/20 04:05:14 jmcneill Exp $
+#	$NetBSD: bsd.klinks.mk,v 1.9 2011/07/10 23:50:24 matt Exp $
 #
 
 .include bsd.own.mk
@@ -14,7 +14,7 @@
 .endif
 .endif
 
-CLEANFILES+=	machine ${MACHINE_CPU}
+CLEANFILES+=	machine ${MACHINE_CPU} ${MACHINE}
 .if ${MACHINE} == sun2 || ${MACHINE} == sun3
 CLEANFILES+=	sun68k
 .elif ${MACHINE} == sparc64
@@ -23,6 +23,8 @@
 CLEANFILES+=	x86
 .elif ${MACHINE} == amd64
 CLEANFILES+=	x86 i386
+.elif ${MACHINE} == evbmips
+CLEANFILES+=	algor sbmips
 .endif
 
 .if defined(XEN_BUILD) || ${MACHINE} == xen
@@ -39,6 +41,8 @@
 .BEGIN:
 	@rm -f machine  \
 	ln -s $S/arch/${MACHINE}/include machine
+	@rm -f ${MACHINE}  \
+	ln -s $S/arch/${MACHINE}/include ${MACHINE}
 	@if [ -d $S/arch/${MACHINE_CPU} ]; then \
 	rm -f ${MACHINE_CPU}  \
 	ln -s $S/arch/${MACHINE_CPU}/include ${MACHINE_CPU}; \
@@ -68,4 +72,10 @@
 	@rm -rf xen-ma  mkdir xen-ma  \
 	ln -s ../${XEN_BUILD:U${MACHINE_ARCH}} xen-ma/machine
 .endif
+.if ${MACHINE} == evbmips
+	@rm -f algor  \
+	ln -s $S/arch/algor/include algor
+	@rm -f sbmips  \
+	ln -s $S/arch/sbmips/include sbmips
+.endif
 .endif



CVS commit: src/sys/dev/i2c

2011-07-10 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Jul 11 00:30:23 UTC 2011

Modified Files:
src/sys/dev/i2c: files.i2c
Added Files:
src/sys/dev/i2c: nxt2k.c nxt2kvar.h

Log Message:
Add subdriver for Nextwave (subsequently acquired by ATI, then AMD, and
finally Broadcom) NXT200x series of 8VSB/QAM demodulator.

Still a bit crude and only supports the NXT2004 at this point.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/i2c/files.i2c
cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/nxt2k.c src/sys/dev/i2c/nxt2kvar.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/i2c/files.i2c
diff -u src/sys/dev/i2c/files.i2c:1.35 src/sys/dev/i2c/files.i2c:1.36
--- src/sys/dev/i2c/files.i2c:1.35	Mon Jul 11 00:01:51 2011
+++ src/sys/dev/i2c/files.i2c	Mon Jul 11 00:30:23 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.i2c,v 1.35 2011/07/11 00:01:51 jakllsch Exp $
+#	$NetBSD: files.i2c,v 1.36 2011/07/11 00:30:23 jakllsch Exp $
 
 defflag	opt_i2cbus.hI2C_SCAN
 define	i2cbus { }
@@ -26,6 +26,10 @@
 file	dev/i2c/tvpll.ctvpll
 file	dev/i2c/tvpll_tuners.c			tvpll
 
+# Nextwave NXT200x demodulator
+define	nxt2k: i2cexec
+file	dev/i2c/nxt2k.cnxt2k
+
 #
 # I2C master devices
 #

Added files:

Index: src/sys/dev/i2c/nxt2k.c
diff -u /dev/null src/sys/dev/i2c/nxt2k.c:1.1
--- /dev/null	Mon Jul 11 00:30:23 2011
+++ src/sys/dev/i2c/nxt2k.c	Mon Jul 11 00:30:23 2011
@@ -0,0 +1,830 @@
+/* $NetBSD: nxt2k.c,v 1.1 2011/07/11 00:30:23 jakllsch Exp $ */
+
+/*
+ * Copyright (c) 2008, 2011 Jonathan A. Kollasch
+ * All rights reserved.
+ *
+ * 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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 sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: nxt2k.c,v 1.1 2011/07/11 00:30:23 jakllsch Exp $);
+
+#include sys/param.h
+#include sys/kernel.h
+#include sys/systm.h
+#include sys/device.h
+#include sys/kmem.h
+#include sys/condvar.h
+#include sys/mutex.h
+
+#include dev/firmload.h
+
+#include dev/i2c/nxt2kvar.h
+
+struct nxt2k {
+	device_tparent;
+	i2c_tag_t   tag;
+	i2c_addr_t  addr;
+	kcondvar_t  cv;
+	kmutex_tmtx;
+	boolloaded; /* firmware is loaded? */
+};
+
+static int nxt2k_init(struct nxt2k *);
+
+static int nxt2k_writedata(struct nxt2k *, uint8_t, uint8_t *, size_t);
+static int nxt2k_readdata(struct nxt2k *, uint8_t, uint8_t *, size_t);
+static int nxt2k_writereg(struct nxt2k *, uint8_t, uint8_t *, size_t);
+static int nxt2k_readreg(struct nxt2k*, uint8_t, uint8_t *, size_t);
+
+static int nxt2k4_init(struct nxt2k *);
+static bool nxt2k4_load_firmware(struct nxt2k *);
+static void nxt2k4_mc_init(struct nxt2k *);
+static void nxt2k_mc_start(struct nxt2k *);
+static void nxt2k_mc_stop(struct nxt2k *);
+static void nxt2k_agc_reset(struct nxt2k *);
+static uint16_t nxt2k_crc_ccit(uint16_t, uint8_t);
+
+static int
+nxt2k_writedata(struct nxt2k *nxt, uint8_t reg, uint8_t *data, size_t len)
+{
+	uint8_t buffer[384];
+	int error;
+
+	KASSERT((len + 1) = 384);
+
+	if (iic_acquire_bus(nxt-tag, I2C_F_POLL) != 0)
+		return false;
+
+	buffer[0] = reg;
+	memcpy(buffer[1], data, len);
+	
+	error = iic_exec(nxt-tag, I2C_OP_WRITE_WITH_STOP, nxt-addr,
+			 buffer, len + 1, NULL, 0, I2C_F_POLL);
+	
+	iic_release_bus(nxt-tag, I2C_F_POLL);
+
+	return error;
+}
+
+static int
+nxt2k_readdata(struct nxt2k *nxt, uint8_t reg, uint8_t *data, size_t len)
+{
+	int error;
+
+	if (iic_acquire_bus(nxt-tag, I2C_F_POLL) != 0)
+		return false;
+
+	error = iic_exec(nxt-tag, I2C_OP_READ_WITH_STOP, nxt-addr,
+			 reg, 1, data, len, I2C_F_POLL);
+
+	iic_release_bus(nxt-tag, I2C_F_POLL);
+
+	return error;
+}
+
+static int
+nxt2k_writereg(struct 

CVS commit: src/sys/dev/pci

2011-07-10 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Jul 11 00:46:04 UTC 2011

Modified Files:
src/sys/dev/pci: files.pci
Added Files:
src/sys/dev/pci: cxdtv.c cxdtv_boards.c cxdtv_boards.h cxdtvreg.h
cxdtvvar.h

Log Message:
Add cxdtv(4), a dtv(4) driver for Conexant CX23880-series DTV interface chips.

Initially supports digital reception on ATI HDTV Wonder card.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/dev/pci/cxdtv.c src/sys/dev/pci/cxdtv_boards.c \
src/sys/dev/pci/cxdtv_boards.h src/sys/dev/pci/cxdtvreg.h \
src/sys/dev/pci/cxdtvvar.h
cvs rdiff -u -r1.340 -r1.341 src/sys/dev/pci/files.pci

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/files.pci
diff -u src/sys/dev/pci/files.pci:1.340 src/sys/dev/pci/files.pci:1.341
--- src/sys/dev/pci/files.pci:1.340	Mon Apr  4 14:33:51 2011
+++ src/sys/dev/pci/files.pci	Mon Jul 11 00:46:04 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.pci,v 1.340 2011/04/04 14:33:51 bouyer Exp $
+#	$NetBSD: files.pci,v 1.341 2011/07/11 00:46:04 jakllsch Exp $
 #
 # Config file and device description for machine-independent PCI code.
 # Included by ports that need it.  Requires that the SCSI files be
@@ -1047,3 +1047,9 @@
 device	vte: ether, ifnet, arp, mii, mii_phy
 attach	vte at pci
 file	dev/pci/if_vte.c		vte
+
+# Conexant CX23880-series DTV interface
+device	cxdtv: dtvbus, firmload, i2c_bitbang, i2cbus, i2cexec, tvpll, nxt2k
+attach	cxdtv at pci
+file	dev/pci/cxdtv.c		cxdtv
+file	dev/pci/cxdtv_boards.c	cxdtv

Added files:

Index: src/sys/dev/pci/cxdtv.c
diff -u /dev/null src/sys/dev/pci/cxdtv.c:1.1
--- /dev/null	Mon Jul 11 00:46:04 2011
+++ src/sys/dev/pci/cxdtv.c	Mon Jul 11 00:46:03 2011
@@ -0,0 +1,1071 @@
+/* $NetBSD: cxdtv.c,v 1.1 2011/07/11 00:46:03 jakllsch Exp $ */
+
+/*
+ * Copyright (c) 2008, 2011 Jonathan A. Kollasch
+ * All rights reserved.
+ *
+ * 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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 sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: cxdtv.c,v 1.1 2011/07/11 00:46:03 jakllsch Exp $);
+
+#include sys/param.h
+#include sys/kernel.h
+#include sys/device.h
+#include sys/kmem.h
+#include sys/mutex.h
+#include sys/condvar.h
+
+#include sys/bus.h
+
+#include dev/pci/pcivar.h
+#include dev/pci/pcireg.h
+#include dev/pci/pcidevs.h
+#include dev/i2c/i2cvar.h
+#include dev/i2c/i2c_bitbang.h
+
+#include dev/i2c/tvpllvar.h
+#include dev/i2c/tvpll_tuners.h
+
+#include dev/i2c/nxt2kvar.h
+
+#include dev/pci/cxdtvreg.h
+#include dev/pci/cxdtvvar.h
+#include dev/pci/cxdtv_boards.h
+
+#include dev/dtv/dtvif.h
+
+#define CXDTV_MMBASE		0x10
+
+#define CXDTV_SRAM_CH_MPEG	0
+#define CXDTV_TS_PKTSIZE	(188 * 8)
+
+
+static int cxdtv_match(struct device *, struct cfdata *, void *);
+static void cxdtv_attach(struct device *, struct device *, void *);
+static int cxdtv_intr(void *);
+
+static bool cxdtv_resume(device_t, const pmf_qual_t *);
+
+static int	cxdtv_iic_acquire_bus(void *, int);
+static void	cxdtv_iic_release_bus(void *, int);
+static int	cxdtv_iic_send_start(void *, int);
+static int	cxdtv_iic_send_stop(void *, int);
+static int	cxdtv_iic_initiate_xfer(void *, i2c_addr_t, int);
+static int	cxdtv_iic_read_byte(void *, uint8_t *, int);
+static int	cxdtv_iic_write_byte(void *, uint8_t, int);
+
+static void	cxdtv_i2cbb_set_bits(void *, uint32_t);
+static void	cxdtv_i2cbb_set_dir(void *, uint32_t);
+static uint32_t	cxdtv_i2cbb_read_bits(void *);
+
+static int	cxdtv_sram_ch_setup(struct cxdtv_softc *,
+struct cxdtv_sram_ch *, uint32_t);
+static int	cxdtv_allocmem(struct cxdtv_softc *, size_t, size_t,
+struct cxdtv_dma *);
+static int	

CVS commit: src/sys/arch/amiga/stand/bootblock

2011-07-10 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Jul 11 01:24:34 UTC 2011

Modified Files:
src/sys/arch/amiga/stand/bootblock/boot: Makefile
src/sys/arch/amiga/stand/bootblock/bootxx_ffs: Makefile
src/sys/arch/amiga/stand/bootblock/elf2bb: elf2bb.c

Log Message:
improve the error message if elf2bb finds we are too large.  if elf2bb
fails, make sure that the following nm -u's success doesn't cause make
to believe the target was built.  now amiga builds with HAVE_GCC=45
actually fail here, rather than fail at sets time due to missing files.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/amiga/stand/bootblock/boot/Makefile
cvs rdiff -u -r1.15 -r1.16 \
src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.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/amiga/stand/bootblock/boot/Makefile
diff -u src/sys/arch/amiga/stand/bootblock/boot/Makefile:1.44 src/sys/arch/amiga/stand/bootblock/boot/Makefile:1.45
--- src/sys/arch/amiga/stand/bootblock/boot/Makefile:1.44	Sat Jan 22 19:19:15 2011
+++ src/sys/arch/amiga/stand/bootblock/boot/Makefile	Mon Jul 11 01:24:34 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.44 2011/01/22 19:19:15 joerg Exp $
+#	$NetBSD: Makefile,v 1.45 2011/07/11 01:24:34 mrg Exp $
 
 .include bsd.own.mk
 .include bsd.sys.mk		# for HOST_SH
@@ -98,10 +98,10 @@
 .S.o: ; ${CC} ${CAFLAGS} ${COPTS} -x assembler-with-cpp -o $@ -c $
 
 boot.amiga: x.out
-	${RELOC2BB} -S x.out $@ || ${NM} -u x.out
+	${RELOC2BB} -S x.out $@ || ${NM} -u x.out  false
 
 x.out: xxstart.o libboot.a ${LIBZ}
-	${LD} ${LDFLAGS} -r -dc -e _start -o $@ $
+	${LD} ${LDFLAGS} -r -dc -e start -o $@ $
 	${SIZE} $@
 	${NM} -u $@
 

Index: src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile
diff -u src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile:1.15 src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile:1.16
--- src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile:1.15	Sat Jan 22 19:19:16 2011
+++ src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile	Mon Jul 11 01:24:34 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2011/01/22 19:19:16 joerg Exp $
+#	$NetBSD: Makefile,v 1.16 2011/07/11 01:24:34 mrg Exp $
 
 ### what we need:
 
@@ -73,10 +73,10 @@
 .S.o: ; ${CC} ${CAFLAGS} ${COPTS} -x assembler-with-cpp -o $@ -c $
 
 bootxx_ffs: x.out
-	${RELOC2BB} x.out $@ || ${NM} -u x.out
+	${RELOC2BB} x.out $@ || ${NM} -u x.out  false
 
 bootxx_fd: f.out
-	${RELOC2BB} -F f.out $@ || ${NM} -u f.out
+	${RELOC2BB} -F f.out $@ || ${NM} -u f.out  false
 
 x.out: xxstart.o libboot.a
 	${LD} ${LDFLAGS} -r -dc -e _start -o $@ $

Index: src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c
diff -u src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.15 src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.16
--- src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c:1.15	Mon Apr 28 20:23:13 2008
+++ src/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c	Mon Jul 11 01:24:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: elf2bb.c,v 1.15 2008/04/28 20:23:13 martin Exp $	*/
+/*	$NetBSD: elf2bb.c,v 1.16 2011/07/11 01:24:34 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1996,2006 The NetBSD Foundation, Inc.
@@ -208,7 +208,8 @@
 		 */
 		bbsize = 32768;
 		if (bbsize  (tsz + dsz + bsz)) {
-			err(1, %s: too big., argv[0]);
+			errx(1, %s: too big (%d  (%d + %d + %d)),
+			argv[0], bbsize, tsz, dsz, bsz);
 		}
 		sumsize = bbsize / 512;
 	}



CVS commit: src/sys/dev/ic

2011-07-10 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jul 11 02:30:49 UTC 2011

Modified Files:
src/sys/dev/ic: sti.c stivar.h

Log Message:
Fix
error: new qualifiers in middle of multi-level non-const cast are unsafe
by defining the type correctly thereby avoid the cast.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/ic/sti.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/stivar.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/ic/sti.c
diff -u src/sys/dev/ic/sti.c:1.15 src/sys/dev/ic/sti.c:1.16
--- src/sys/dev/ic/sti.c:1.15	Sat May 21 12:02:55 2011
+++ src/sys/dev/ic/sti.c	Mon Jul 11 02:30:49 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: sti.c,v 1.15 2011/05/21 12:02:55 tsutsui Exp $	*/
+/*	$NetBSD: sti.c,v 1.16 2011/07/11 02:30:49 matt Exp $	*/
 
 /*	$OpenBSD: sti.c,v 1.61 2009/09/05 14:09:35 miod Exp $	*/
 
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sti.c,v 1.15 2011/05/21 12:02:55 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: sti.c,v 1.16 2011/07/11 02:30:49 matt Exp $);
 
 #include wsdisplay.h
 
@@ -640,8 +640,7 @@
 
 	scr-scr_scrlist[0] = scr-scr_wsd;
 	scr-scr_screenlist.nscreens = 1;
-	scr-scr_screenlist.screens =
-	(const struct wsscreen_descr **)scr-scr_scrlist;
+	scr-scr_screenlist.screens = scr-scr_scrlist;
 
 	return 0;
 

Index: src/sys/dev/ic/stivar.h
diff -u src/sys/dev/ic/stivar.h:1.6 src/sys/dev/ic/stivar.h:1.7
--- src/sys/dev/ic/stivar.h:1.6	Tue Nov  9 12:24:48 2010
+++ src/sys/dev/ic/stivar.h	Mon Jul 11 02:30:49 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: stivar.h,v 1.6 2010/11/09 12:24:48 skrll Exp $	*/
+/*	$NetBSD: stivar.h,v 1.7 2011/07/11 02:30:49 matt Exp $	*/
 
 /*	$OpenBSD: stivar.h,v 1.24 2009/02/06 22:51:04 miod Exp $	*/
 
@@ -96,7 +96,7 @@
 	int			 scr_nscreens;
 	u_int			 scr_wsmode;
 	struct	wsscreen_descr	 scr_wsd;
-	struct	wsscreen_descr	*scr_scrlist[1];
+	const struct wsscreen_descr	*scr_scrlist[1];
 	struct	wsscreen_list	 scr_screenlist;
 };