CVS commit: src/external/gpl3/gcc/dist/gcc/config

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 21 06:54:27 UTC 2011

Modified Files:
src/external/gpl3/gcc/dist/gcc/config: netbsd.h

Log Message:
pull across these revisions from gcc 4.1:

revision 1.9
date: 2011/04/15 13:42:22;  author: joerg;  state: Exp;  lines: +2 -1
Move the headers for compiler and platform specific intrinsincs from
/usr/include to /usr/include/gcc-4.1.

revision 1.8
date: 2011/04/10 21:25:56;  author: joerg;  state: Exp;  lines: +1 -0
Add back a stylish new line.

revision 1.7
date: 2011/04/10 16:50:18;  author: joerg;  state: Exp;  lines: +20 -12
Reduce difference between src/tools/gcc and src/gnu/usr.bin/gcc4
configuration. All but the target to helper programs should be the same.
Mark include directories as sysroot-relative.

adjust the paths to gcc-4.5, and add an XXX note about this ugliness.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/dist/gcc/config/netbsd.h

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/dist/gcc/config/netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.2 src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.3
--- src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.2	Tue Jun 21 02:41:36 2011
+++ src/external/gpl3/gcc/dist/gcc/config/netbsd.h	Tue Jun 21 06:54:27 2011
@@ -37,9 +37,13 @@
 
 /* NETBSD_NATIVE is defined when gcc is integrated into the NetBSD
source tree so it can be configured appropriately without using
-   the GNU configure/build mechanism.  */
+   the GNU configure/build mechanism.
 
-#ifdef NETBSD_NATIVE
+   NETBSD_TOOLS is defined when gcc is built as cross-compiler for
+   the in-tree toolchain.
+ */
+
+#if defined(NETBSD_NATIVE) || defined(NETBSD_TOOLS)
 
 /* Look for the include files in the system-defined places.  */
 
@@ -49,29 +53,38 @@
 #undef GPLUSPLUS_BACKWARD_INCLUDE_DIR
 #define GPLUSPLUS_BACKWARD_INCLUDE_DIR "/usr/include/g++/backward"
 
+/*
+ * XXX figure out a better way to do this
+ */
 #undef GCC_INCLUDE_DIR
-#define GCC_INCLUDE_DIR "/usr/include"
+#define GCC_INCLUDE_DIR "/usr/include/gcc-4.5"
 
 #undef INCLUDE_DEFAULTS
 #define INCLUDE_DEFAULTS\
   {			\
-{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },		\
-{ GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1 },	\
-{ GCC_INCLUDE_DIR, "GCC", 0, 0 },			\
+{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 1 },		\
+{ GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 1 },	\
+{ GCC_INCLUDE_DIR, "GCC", 0, 0, 1 },		\
+{ "/usr/include", "GCC", 0, 0, 1 },			\
 { 0, 0, 0, 0 }	\
   }
 
-/* Under NetBSD, the normal location of the compiler back ends is the
-   /usr/libexec directory.  */
-
-#undef STANDARD_EXEC_PREFIX
-#define STANDARD_EXEC_PREFIX		"/usr/libexec/"
-
 /* Under NetBSD, the normal location of the various *crt*.o files is the
/usr/lib directory.  */
 
 #undef STANDARD_STARTFILE_PREFIX
 #define STANDARD_STARTFILE_PREFIX	"/usr/lib/"
+#undef STANDARD_STARTFILE_PREFIX_1
+#define STANDARD_STARTFILE_PREFIX_1	"/usr/lib/"
+
+#endif /* NETBSD_NATIVE || NETBSD_TOOLS */
+
+#if defined(NETBSD_NATIVE)
+/* Under NetBSD, the normal location of the compiler back ends is the
+   /usr/libexec directory.  */
+
+#undef STANDARD_EXEC_PREFIX
+#define STANDARD_EXEC_PREFIX		"/usr/libexec/"
 
 #undef TOOLDIR_BASE_PREFIX
 #define TOOLDIR_BASE_PREFIX		"/usr/"



CVS commit: src/sys/common/pmap/tlb

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun 21 06:43:38 UTC 2011

Modified Files:
src/sys/common/pmap/tlb: pmap_segtab.c

Log Message:
Add #define __PMAP_PRIVATE


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/common/pmap/tlb/pmap_segtab.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/common/pmap/tlb/pmap_segtab.c
diff -u src/sys/common/pmap/tlb/pmap_segtab.c:1.2 src/sys/common/pmap/tlb/pmap_segtab.c:1.3
--- src/sys/common/pmap/tlb/pmap_segtab.c:1.2	Tue Jan 18 01:11:50 2011
+++ src/sys/common/pmap/tlb/pmap_segtab.c	Tue Jun 21 06:43:38 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_segtab.c,v 1.2 2011/01/18 01:11:50 matt Exp $	*/
+/*	$NetBSD: pmap_segtab.c,v 1.3 2011/06/21 06:43:38 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.2 2011/01/18 01:11:50 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.3 2011/06/21 06:43:38 matt Exp $");
 
 /*
  *	Manages physical address maps.
@@ -95,6 +95,8 @@
  *	and to when physical maps must be made correct.
  */
 
+#define __PMAP_PRIVATE
+
 #include 
 #include 
 #include 



CVS commit: src/sys/arch/powerpc

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun 21 06:38:51 UTC 2011

Modified Files:
src/sys/arch/powerpc/booke: trap.c
src/sys/arch/powerpc/ibm4xx: trap.c
src/sys/arch/powerpc/powerpc: trap.c

Log Message:
Switch to use new common cpu_ast routine.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/booke/trap.c
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/powerpc/ibm4xx/trap.c
cvs rdiff -u -r1.143 -r1.144 src/sys/arch/powerpc/powerpc/trap.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/powerpc/booke/trap.c
diff -u src/sys/arch/powerpc/booke/trap.c:1.11 src/sys/arch/powerpc/booke/trap.c:1.12
--- src/sys/arch/powerpc/booke/trap.c:1.11	Mon Jun 20 20:24:28 2011
+++ src/sys/arch/powerpc/booke/trap.c	Tue Jun 21 06:38:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.11 2011/06/20 20:24:28 matt Exp $	*/
+/*	$NetBSD: trap.c,v 1.12 2011/06/21 06:38:50 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -39,7 +39,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.11 2011/06/20 20:24:28 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.12 2011/06/21 06:38:50 matt Exp $");
 
 #include 
 #include 
@@ -793,15 +793,7 @@
 		break;
 	case T_AST:
 		KASSERT(usertrap);
-		l->l_md.md_astpending = 0;	/* we are about to do it */
-		ci->ci_data.cpu_nsoft++;
-		if (l->l_pflag & LP_OWEUPC) {
-			l->l_pflag &= ~LP_OWEUPC;
-			ADDUPROF(l);
-		}
-		/* Check whether we are being preempted. */
-		if (ci->ci_want_resched)
-			preempt();
+		cpu_ast(l, ci);
 		if (tf->tf_fixreg[1] & 0x8000) {
 			printf("%s(ast-exit): pid %d.%d (%s): invalid sp %#lx\n",
 			__func__, p->p_pid, l->l_lid, p->p_comm,

Index: src/sys/arch/powerpc/ibm4xx/trap.c
diff -u src/sys/arch/powerpc/ibm4xx/trap.c:1.61 src/sys/arch/powerpc/ibm4xx/trap.c:1.62
--- src/sys/arch/powerpc/ibm4xx/trap.c:1.61	Sat Jun 18 06:41:41 2011
+++ src/sys/arch/powerpc/ibm4xx/trap.c	Tue Jun 21 06:38:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.61 2011/06/18 06:41:41 matt Exp $	*/
+/*	$NetBSD: trap.c,v 1.62 2011/06/21 06:38:50 matt Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.61 2011/06/18 06:41:41 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.62 2011/06/21 06:38:50 matt Exp $");
 
 #include "opt_altivec.h"
 #include "opt_ddb.h"
@@ -297,18 +297,9 @@
 		break;
 
 	case EXC_AST|EXC_USER:
-		l->l_md.md_astpending = 0;	/* we are about to do it */
-		//curcpu()->ci_data.cpu_nast++;
-		if (l->l_pflag & LP_OWEUPC) {
-			l->l_pflag &= ~LP_OWEUPC;
-			ADDUPROF(l);
-		}
-		/* Check whether we are being preempted. */
-		if (curcpu()->ci_want_resched)
-			preempt();
+		cpu_ast(l, curcpu());
 		break;
 
-
 	case EXC_ALI|EXC_USER:
 		if (fix_unaligned(l, tf) != 0) {
 			KSI_INIT_TRAP(&ksi);

Index: src/sys/arch/powerpc/powerpc/trap.c
diff -u src/sys/arch/powerpc/powerpc/trap.c:1.143 src/sys/arch/powerpc/powerpc/trap.c:1.144
--- src/sys/arch/powerpc/powerpc/trap.c:1.143	Mon Jun 20 05:59:06 2011
+++ src/sys/arch/powerpc/powerpc/trap.c	Tue Jun 21 06:38:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.143 2011/06/20 05:59:06 matt Exp $	*/
+/*	$NetBSD: trap.c,v 1.144 2011/06/21 06:38:50 matt Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.143 2011/06/20 05:59:06 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.144 2011/06/21 06:38:50 matt Exp $");
 
 #include "opt_altivec.h"
 #include "opt_ddb.h"
@@ -345,15 +345,7 @@
 		break;
 
 	case EXC_AST|EXC_USER:
-		l->l_md.md_astpending = 0;	/* we are about to do it */
-		//ci->ci_data.cpu_nast++;
-		if (l->l_pflag & LP_OWEUPC) {
-			l->l_pflag &= ~LP_OWEUPC;
-			ADDUPROF(l);
-		}
-		/* Check whether we are being preempted. */
-		if (ci->ci_want_resched)
-			preempt();
+		cpu_ast(l, ci);
 		break;
 
 	case EXC_ALI|EXC_USER:



CVS commit: src/sys/arch/powerpc

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun 21 06:32:36 UTC 2011

Modified Files:
src/sys/arch/powerpc/include: cpu.h
src/sys/arch/powerpc/powerpc: powerpc_machdep.c

Log Message:
Add a common cpu_ast(l, ci) routine.
Add a ci_pmap_asid_cur for BOOKE debugging.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/powerpc/include/cpu.h
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/powerpc/powerpc/powerpc_machdep.c

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

Modified files:

Index: src/sys/arch/powerpc/include/cpu.h
diff -u src/sys/arch/powerpc/include/cpu.h:1.85 src/sys/arch/powerpc/include/cpu.h:1.86
--- src/sys/arch/powerpc/include/cpu.h:1.85	Tue Jun 21 04:21:17 2011
+++ src/sys/arch/powerpc/include/cpu.h	Tue Jun 21 06:32:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.85 2011/06/21 04:21:17 matt Exp $	*/
+/*	$NetBSD: cpu.h,v 1.86 2011/06/21 06:32:36 matt Exp $	*/
 
 /*
  * Copyright (C) 1999 Wolfgang Solfrank.
@@ -113,6 +113,7 @@
 #define	CPUSAVE_SRR1	7		/* where SRR1 gets saved */
 	register_t ci_savearea[CPUSAVE_SIZE];
 #if defined(PPC_BOOKE) || defined(MODULAR) || defined(_MODULE)
+	uint32_t ci_pmap_asid_cur;
 	struct pmap_segtab *ci_pmap_segtabs[2];
 #define	ci_pmap_kern_segtab	ci_pmap_segtabs[0]
 #define	ci_pmap_user_segtab	ci_pmap_segtabs[1]
@@ -370,6 +371,7 @@
 
 vaddr_t	cpu_lwp_pc(struct lwp *);
 
+void	cpu_ast(struct lwp *, struct cpu_info *);
 void *	cpu_uarea_alloc(bool);
 bool	cpu_uarea_free(void *);
 void	cpu_need_resched(struct cpu_info *, int);

Index: src/sys/arch/powerpc/powerpc/powerpc_machdep.c
diff -u src/sys/arch/powerpc/powerpc/powerpc_machdep.c:1.56 src/sys/arch/powerpc/powerpc/powerpc_machdep.c:1.57
--- src/sys/arch/powerpc/powerpc/powerpc_machdep.c:1.56	Mon Jun 20 08:47:13 2011
+++ src/sys/arch/powerpc/powerpc/powerpc_machdep.c	Tue Jun 21 06:32:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: powerpc_machdep.c,v 1.56 2011/06/20 08:47:13 matt Exp $	*/
+/*	$NetBSD: powerpc_machdep.c,v 1.57 2011/06/21 06:32:36 matt Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: powerpc_machdep.c,v 1.56 2011/06/20 08:47:13 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: powerpc_machdep.c,v 1.57 2011/06/21 06:32:36 matt Exp $");
 
 #include "opt_altivec.h"
 #include "opt_modular.h"
@@ -68,6 +68,10 @@
 #include 
 #endif
 
+#ifdef MULTIPROCESOR
+#include 
+#endif
+
 int cpu_timebase;
 int cpu_printfataltraps = 1;
 #if !defined(PPC_IBM4XX)
@@ -367,6 +371,22 @@
 }
 
 void
+cpu_ast(struct lwp *l, struct cpu_info *ci)
+{
+	l->l_md.md_astpending = 0;	/* we are about to do it */
+
+	if (l->l_pflag & LP_OWEUPC) {
+		l->l_pflag &= ~LP_OWEUPC;
+		ADDUPROF(l);
+	}
+
+	/* Check whether we are being preempted. */
+	if (ci->ci_want_resched) {
+		preempt();
+	}
+}
+
+void
 cpu_need_resched(struct cpu_info *ci, int flags)
 {
 	struct lwp * const l = ci->ci_data.cpu_onproc;



CVS commit: src/sys/arch/powerpc/booke/dev

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun 21 06:25:19 UTC 2011

Modified Files:
src/sys/arch/powerpc/booke/dev: pq3etsec.c

Log Message:
Add DEBUG around a variable.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/booke/dev/pq3etsec.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/powerpc/booke/dev/pq3etsec.c
diff -u src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.5 src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.6
--- src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.5	Fri Jun 17 19:03:03 2011
+++ src/sys/arch/powerpc/booke/dev/pq3etsec.c	Tue Jun 21 06:25:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pq3etsec.c,v 1.5 2011/06/17 19:03:03 matt Exp $	*/
+/*	$NetBSD: pq3etsec.c,v 1.6 2011/06/21 06:25:19 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -2385,6 +2385,8 @@
 		softint_schedule(sc->sc_soft_ih);
 	splx(s);
 	callout_schedule(&sc->sc_mii_callout, hz);
+#ifdef DEBUG
 	sc->sc_mii_last_tick = now;
+#endif
 	mutex_exit(sc->sc_lock);
 }



CVS commit: src/sys/arch/powerpc/booke

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun 21 06:24:25 UTC 2011

Modified Files:
src/sys/arch/powerpc/booke: e500_intr.c

Log Message:
In e500_spl0, grab ci after disabling interrupts.
Consolidate a KASSERT.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/booke/e500_intr.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/powerpc/booke/e500_intr.c
diff -u src/sys/arch/powerpc/booke/e500_intr.c:1.11 src/sys/arch/powerpc/booke/e500_intr.c:1.12
--- src/sys/arch/powerpc/booke/e500_intr.c:1.11	Wed Jun 15 15:11:50 2011
+++ src/sys/arch/powerpc/booke/e500_intr.c	Tue Jun 21 06:24:25 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: e500_intr.c,v 1.11 2011/06/15 15:11:50 matt Exp $	*/
+/*	$NetBSD: e500_intr.c,v 1.12 2011/06/21 06:24:25 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -454,11 +454,8 @@
 	u_int ctpr = (ipl >= IPL_VM ? 15 : ipl);
 	KASSERT(openpic_read(cpu, OPENPIC_CTPR) == old_ctpr);
 #else
-#ifdef DIAGNOSTIC
-	u_int old_ctpr = IPL2CTPR(ci->ci_cpl);
-#endif
 	u_int ctpr = IPL2CTPR(ipl);
-	KASSERT(openpic_read(cpu, OPENPIC_CTPR) == old_ctpr);
+	KASSERT(openpic_read(cpu, OPENPIC_CTPR) == IPL2CTPR(ci->ci_cpl));
 #endif
 	openpic_write(cpu, OPENPIC_CTPR, ctpr);
 	KASSERT(openpic_read(cpu, OPENPIC_CTPR) == ctpr);
@@ -468,10 +465,10 @@
 static void
 e500_spl0(void)
 {
-	struct cpu_info * const ci = curcpu();
-
 	wrtee(0);
 
+	struct cpu_info * const ci = curcpu();
+
 #ifdef __HAVE_FAST_SOFTINTS
 	if (__predict_false(ci->ci_data.cpu_softints != 0)) {
 		e500_splset(ci, IPL_HIGH);



CVS commit: src/sys/dev

2011-06-20 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Jun 21 06:23:38 UTC 2011

Modified Files:
src/sys/dev: ccd.c cgd.c

Log Message:
Adjust the #ifdefs such that ccd(4) and cgd(4) show in
modstat(8) even if built into the kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/sys/dev/ccd.c
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/cgd.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/ccd.c
diff -u src/sys/dev/ccd.c:1.139 src/sys/dev/ccd.c:1.140
--- src/sys/dev/ccd.c:1.139	Sun Jun 12 03:35:51 2011
+++ src/sys/dev/ccd.c	Tue Jun 21 06:23:38 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ccd.c,v 1.139 2011/06/12 03:35:51 rmind Exp $	*/
+/*	$NetBSD: ccd.c,v 1.140 2011/06/21 06:23:38 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc.
@@ -88,7 +88,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.139 2011/06/12 03:35:51 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.140 2011/06/21 06:23:38 jruoho Exp $");
 
 #include 
 #include 
@@ -98,6 +98,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1532,27 +1533,29 @@
 }
 #endif
 
-#ifdef _MODULE
-
-#include 
-
 MODULE(MODULE_CLASS_DRIVER, ccd, NULL);
 
 static int
 ccd_modcmd(modcmd_t cmd, void *arg)
 {
-	int bmajor = -1, cmajor = -1,  error = 0;
-	
+	int bmajor, cmajor, error = 0;
+
+	bmajor = cmajor = -1;
+
 	switch (cmd) {
 	case MODULE_CMD_INIT:
+#ifdef _MODULE
 		ccdattach(4);
-		
+
 		return devsw_attach("ccd", &ccd_bdevsw, &bmajor,
 		&ccd_cdevsw, &cmajor);
+#endif
 		break;
 
 	case MODULE_CMD_FINI:
+#ifdef _MODULE
 		return devsw_detach(&ccd_bdevsw, &ccd_cdevsw);
+#endif
 		break;
 
 	case MODULE_CMD_STAT:
@@ -1564,5 +1567,3 @@
 
 	return error;
 }
-
-#endif

Index: src/sys/dev/cgd.c
diff -u src/sys/dev/cgd.c:1.73 src/sys/dev/cgd.c:1.74
--- src/sys/dev/cgd.c:1.73	Sun Jun 12 03:35:51 2011
+++ src/sys/dev/cgd.c	Tue Jun 21 06:23:38 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.73 2011/06/12 03:35:51 rmind Exp $ */
+/* $NetBSD: cgd.c,v 1.74 2011/06/21 06:23:38 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.73 2011/06/12 03:35:51 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.74 2011/06/21 06:23:38 jruoho Exp $");
 
 #include 
 #include 
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -939,20 +940,22 @@
 }
 #endif
 
-#ifdef _MODULE
-
-#include 
-
 MODULE(MODULE_CLASS_DRIVER, cgd, NULL);
+
+#ifdef _MODULE
 CFDRIVER_DECL(cgd, DV_DISK, NULL);
+#endif
 
 static int
 cgd_modcmd(modcmd_t cmd, void *arg)
 {
-	int bmajor = -1, cmajor = -1,  error = 0;
-	
+	int bmajor, cmajor, error = 0;
+
+	bmajor = cmajor = -1;
+
 	switch (cmd) {
 	case MODULE_CMD_INIT:
+#ifdef _MODULE
 		error = config_cfdriver_attach(&cgd_cd);
 		if (error)
 			break;
@@ -964,7 +967,7 @@
 			cgd_cd.cd_name);
 			break;
 		}
-		
+
 		error = devsw_attach("cgd", &cgd_bdevsw, &bmajor,
 		&cgd_cdevsw, &cmajor);
 		if (error) {
@@ -972,15 +975,17 @@
 			config_cfdriver_detach(&cgd_cd);
 			break;
 		}
-		
+#endif
 		break;
 
 	case MODULE_CMD_FINI:
+#ifdef _MODULE
 		error = config_cfattach_detach(cgd_cd.cd_name, &cgd_ca);
 		if (error)
 			break;
 		config_cfdriver_detach(&cgd_cd);
 		devsw_detach(&cgd_bdevsw, &cgd_cdevsw);
+#endif
 		break;
 
 	case MODULE_CMD_STAT:
@@ -992,5 +997,3 @@
 
 	return error;
 }
-
-#endif



CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3/include/ext

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 21 06:22:06 UTC 2011

Modified Files:
src/external/gpl3/gcc/dist/libstdc++-v3/include/ext: ropeimpl.h

Log Message:
pull across from gcc 4.1:

revision 1.2
date: 2011/02/05 00:37:40;  author: joerg;  state: Exp;  lines: +2 -2
Explicitly use template to allow building with the more strict
template lookup in clang. From FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libstdc++-v3/include/ext/ropeimpl.h

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/dist/libstdc++-v3/include/ext/ropeimpl.h
diff -u src/external/gpl3/gcc/dist/libstdc++-v3/include/ext/ropeimpl.h:1.1.1.1 src/external/gpl3/gcc/dist/libstdc++-v3/include/ext/ropeimpl.h:1.2
--- src/external/gpl3/gcc/dist/libstdc++-v3/include/ext/ropeimpl.h:1.1.1.1	Tue Jun 21 01:24:44 2011
+++ src/external/gpl3/gcc/dist/libstdc++-v3/include/ext/ropeimpl.h	Tue Jun 21 06:22:06 2011
@@ -428,7 +428,7 @@
 {
   size_t __old_len = __r->_M_size;
   _CharT* __new_data = (_CharT*)
-	_Data_allocate(_S_rounded_up_size(__old_len + __len));
+	_Rope_rep_base<_CharT, _Alloc>::_Data_allocate(_S_rounded_up_size(__old_len + __len));
   _RopeLeaf* __result;
 
   uninitialized_copy_n(__r->_M_data, __old_len, __new_data);
@@ -812,7 +812,7 @@
 	if (__result_len > __lazy_threshold)
 	  goto lazy;
 	__section = (_CharT*)
-	  _Data_allocate(_S_rounded_up_size(__result_len));
+	  _Rope_rep_base<_CharT, _Alloc>::_Data_allocate(_S_rounded_up_size(__result_len));
 	__try
 	  {	(*(__f->_M_fn))(__start, __result_len, __section); }
 	__catch(...)



CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3/src

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 21 06:18:56 UTC 2011

Modified Files:
src/external/gpl3/gcc/dist/libstdc++-v3/src: locale-inst.cc

Log Message:
pull across from gcc 4.1:

revision 1.2
date: 2011/05/25 15:51:55;  author: joerg;  state: Exp;  lines: +2 -2
Don't define explicit instantiation as inline.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gcc/dist/libstdc++-v3/src/locale-inst.cc

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/dist/libstdc++-v3/src/locale-inst.cc
diff -u src/external/gpl3/gcc/dist/libstdc++-v3/src/locale-inst.cc:1.1.1.1 src/external/gpl3/gcc/dist/libstdc++-v3/src/locale-inst.cc:1.2
--- src/external/gpl3/gcc/dist/libstdc++-v3/src/locale-inst.cc:1.1.1.1	Tue Jun 21 01:24:05 2011
+++ src/external/gpl3/gcc/dist/libstdc++-v3/src/locale-inst.cc	Tue Jun 21 06:18:56 2011
@@ -175,11 +175,11 @@
   template class messages_byname;
   
   // ctype
-  inline template class __ctype_abstract_base;
+  template class __ctype_abstract_base;
   template class ctype_byname;
   
   // codecvt
-  inline template class __codecvt_abstract_base;
+  template class __codecvt_abstract_base;
   template class codecvt_byname;
 
   // collate



CVS commit: src/external/gpl3/gcc/usr.bin

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 21 06:03:15 UTC 2011

Added Files:
src/external/gpl3/gcc/usr.bin: Makefile Makefile.backend
Makefile.frontend Makefile.inc Makefile.libcpp
src/external/gpl3/gcc/usr.bin/backend: Makefile
src/external/gpl3/gcc/usr.bin/cc1: Makefile
src/external/gpl3/gcc/usr.bin/cc1obj: Makefile
src/external/gpl3/gcc/usr.bin/cc1plus: Makefile
src/external/gpl3/gcc/usr.bin/cpp: Makefile
src/external/gpl3/gcc/usr.bin/frontend: Makefile
src/external/gpl3/gcc/usr.bin/g++: Makefile
src/external/gpl3/gcc/usr.bin/gcc: Makefile
src/external/gpl3/gcc/usr.bin/gcov: Makefile
src/external/gpl3/gcc/usr.bin/host-libiberty: Makefile
src/external/gpl3/gcc/usr.bin/include: Makefile
src/external/gpl3/gcc/usr.bin/libcpp: Makefile
src/external/gpl3/gcc/usr.bin/protoize: Makefile
src/external/gpl3/gcc/usr.bin/unprotoize: Makefile

Log Message:
move the gcc 4.5 usr.bin build makefiles to the right place.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/Makefile \
src/external/gpl3/gcc/usr.bin/Makefile.backend \
src/external/gpl3/gcc/usr.bin/Makefile.frontend \
src/external/gpl3/gcc/usr.bin/Makefile.inc \
src/external/gpl3/gcc/usr.bin/Makefile.libcpp
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/backend/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/cc1/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/cc1obj/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/cc1plus/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/cpp/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/frontend/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/g++/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/gcc/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/gcov/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/host-libiberty/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/include/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/libcpp/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/protoize/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/usr.bin/unprotoize/Makefile

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

Added files:

Index: src/external/gpl3/gcc/usr.bin/Makefile
diff -u /dev/null src/external/gpl3/gcc/usr.bin/Makefile:1.1
--- /dev/null	Tue Jun 21 06:03:15 2011
+++ src/external/gpl3/gcc/usr.bin/Makefile	Tue Jun 21 06:03:13 2011
@@ -0,0 +1,23 @@
+#	$NetBSD: Makefile,v 1.1 2011/06/21 06:03:13 mrg Exp $
+
+NOOBJ=# defined
+
+.include 
+
+.if ${MKGCC} != "no" && exists(${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk)
+
+# We keep libcpp here since it depends upon frontend.
+
+SUBDIR+=	host-libiberty .WAIT \
+		backend .WAIT \
+		frontend .WAIT \
+		libcpp gcov .WAIT \
+		cc1 cc1obj cc1plus cpp g++ gcc \
+		include protoize unprotoize
+
+.include 
+
+.else
+# Do nothing. (PROG undefined)
+.include 
+.endif
Index: src/external/gpl3/gcc/usr.bin/Makefile.backend
diff -u /dev/null src/external/gpl3/gcc/usr.bin/Makefile.backend:1.1
--- /dev/null	Tue Jun 21 06:03:15 2011
+++ src/external/gpl3/gcc/usr.bin/Makefile.backend	Tue Jun 21 06:03:13 2011
@@ -0,0 +1,44 @@
+#	$NetBSD: Makefile.backend,v 1.1 2011/06/21 06:03:13 mrg Exp $
+
+NOMAN=		# defined
+BINDIR=		/usr/libexec
+
+CPPFLAGS+=	-I${GCCARCH} -I${BACKENDOBJ} \
+		${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*}
+
+.include 
+
+DPADD=		${BACKENDOBJ}/libbackend.a ${LIBIBERTYOBJ}/libiberty.a
+LDADD=		-L${BACKENDOBJ} -lbackend -L${LIBIBERTYOBJ} -liberty
+
+CLEANFILES+=	${PROG}-checksum.c ${PROG}-dummy dummy-checksum.d \
+		dummy-checksum.o genchecksum genchecksum.lo
+
+.include 
+
+# Don't auto-frob .y or .l files.
+.l.c .y.c .y.h:
+	@true
+
+CPPFLAGS.genchecksum.c+=	-DGENERATOR_FILE -I${GCCARCH} -I${DIST}/include -I${BACKENDOBJ}
+
+genchecksum.lo:
+genchecksum: genchecksum.lo
+	${_MKTARGET_LINK}
+	${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
+# This is a copy of the ${PROG} target from bsd.prog.mk.
+DUMMYOBJS=	${SRCS:N${PROG}-checksum.c:.c=.o} dummy-checksum.o
+${PROG}-dummy: ${DUMMYOBJS}
+	${_MKTARGET_LINK}
+.if defined(DESTDIR)
+	${_CCLINK} -Wl,-nostdlib \
+	${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${_PROGLDOPTS} \
+	-B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/  \
+	${DUMMYOBJS} ${LDADD} \
+	-L${_GCC_LIBGCCDIR} -L${DESTDIR}/usr/lib
+.else
+	${_CCLINK} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${_PROGLDOPTS} ${DUMMYOBJS} ${LDADD}
+.endif	# defined(DESTDIR)
+${PROG}-checksum.c: genchecksum ${PROG}-dummy
+	${_MKTARGET_CREATE}
+	./genchecksum ${PROG}-dummy >${.TARGET}
Index: src/external/gpl3/gcc/usr.bin/Makefile.frontend
diff -u /dev/null src/external/gpl3/gcc/usr.bin/Makefile.frontend:1.1
--- /dev/null	Tue Jun 21 06:03:15 2011
+++ sr

CVS commit: src/external/gpl3/gcc/lib

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 21 06:02:29 UTC 2011

Added Files:
src/external/gpl3/gcc/lib/crtstuff: Makefile crtbegin.c crtbeginS.c
crtbeginT.c crtend.c crtendS.c
src/external/gpl3/gcc/lib/libgcc: Makefile Makefile.inc Makefile.srcs
Makefile.wrapper
src/external/gpl3/gcc/lib/libgcc/libgcc: Makefile
src/external/gpl3/gcc/lib/libgcc/libgcc_eh: Makefile
src/external/gpl3/gcc/lib/libgcc/libgcc_s: Makefile
src/external/gpl3/gcc/lib/libgcc/libgcov: Makefile
src/external/gpl3/gcc/lib/libiberty: Makefile defs.mk
src/external/gpl3/gcc/lib/libobjc: Makefile
src/external/gpl3/gcc/lib/libstdc++-v3: Makefile
src/external/gpl3/gcc/lib/libstdc++-v3/include: Makefile
src/external/gpl3/gcc/lib/libstdc++-v3/include/backward: Makefile
src/external/gpl3/gcc/lib/libstdc++-v3/include/bits: Makefile
src/external/gpl3/gcc/lib/libstdc++-v3/include/debug: Makefile
src/external/gpl3/gcc/lib/libstdc++-v3/include/ext: Makefile
src/external/gpl3/gcc/lib/libstdc++-v3/include/tr1: Makefile
src/external/gpl3/gcc/lib/libsupc++: Makefile Makefile.common
Removed Files:
src/external/gpl3/gcc/lib/crtstuff4: Makefile crtbegin.c crtbeginS.c
crtbeginT.c crtend.c crtendS.c
src/external/gpl3/gcc/lib/libgcc4: Makefile Makefile.inc Makefile.srcs
Makefile.wrapper
src/external/gpl3/gcc/lib/libgcc4/libgcc: Makefile
src/external/gpl3/gcc/lib/libgcc4/libgcc_eh: Makefile
src/external/gpl3/gcc/lib/libgcc4/libgcc_s: Makefile
src/external/gpl3/gcc/lib/libgcc4/libgcov: Makefile
src/external/gpl3/gcc/lib/libobjc4: Makefile
src/external/gpl3/gcc/lib/libstdc++-v3_4: Makefile
src/external/gpl3/gcc/lib/libstdc++-v3_4/include: Makefile
src/external/gpl3/gcc/lib/libstdc++-v3_4/include/backward: Makefile
src/external/gpl3/gcc/lib/libstdc++-v3_4/include/bits: Makefile
src/external/gpl3/gcc/lib/libstdc++-v3_4/include/debug: Makefile
src/external/gpl3/gcc/lib/libstdc++-v3_4/include/ext: Makefile
src/external/gpl3/gcc/lib/libstdc++-v3_4/include/tr1: Makefile
src/external/gpl3/gcc/lib/libsupc++4: Makefile Makefile.common

Log Message:
*sigh* move these files into the directories i meant for them to exist in.
start actually porting to gcc 4.5 in the process.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/lib/crtstuff/Makefile \
src/external/gpl3/gcc/lib/crtstuff/crtbegin.c \
src/external/gpl3/gcc/lib/crtstuff/crtbeginS.c \
src/external/gpl3/gcc/lib/crtstuff/crtbeginT.c \
src/external/gpl3/gcc/lib/crtstuff/crtend.c \
src/external/gpl3/gcc/lib/crtstuff/crtendS.c
cvs rdiff -u -r1.1.1.1 -r0 src/external/gpl3/gcc/lib/crtstuff4/Makefile \
src/external/gpl3/gcc/lib/crtstuff4/crtbegin.c \
src/external/gpl3/gcc/lib/crtstuff4/crtbeginS.c \
src/external/gpl3/gcc/lib/crtstuff4/crtbeginT.c \
src/external/gpl3/gcc/lib/crtstuff4/crtend.c \
src/external/gpl3/gcc/lib/crtstuff4/crtendS.c
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/lib/libgcc/Makefile \
src/external/gpl3/gcc/lib/libgcc/Makefile.inc \
src/external/gpl3/gcc/lib/libgcc/Makefile.srcs \
src/external/gpl3/gcc/lib/libgcc/Makefile.wrapper
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/lib/libgcc/libgcc_eh/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/lib/libgcc/libgcov/Makefile
cvs rdiff -u -r1.1.1.1 -r0 src/external/gpl3/gcc/lib/libgcc4/Makefile \
src/external/gpl3/gcc/lib/libgcc4/Makefile.inc \
src/external/gpl3/gcc/lib/libgcc4/Makefile.srcs \
src/external/gpl3/gcc/lib/libgcc4/Makefile.wrapper
cvs rdiff -u -r1.1.1.1 -r0 src/external/gpl3/gcc/lib/libgcc4/libgcc/Makefile
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/gpl3/gcc/lib/libgcc4/libgcc_eh/Makefile
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/gpl3/gcc/lib/libgcc4/libgcc_s/Makefile
cvs rdiff -u -r1.1.1.1 -r0 src/external/gpl3/gcc/lib/libgcc4/libgcov/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/lib/libiberty/Makefile \
src/external/gpl3/gcc/lib/libiberty/defs.mk
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/lib/libobjc/Makefile
cvs rdiff -u -r1.1.1.1 -r0 src/external/gpl3/gcc/lib/libobjc4/Makefile
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/lib/libstdc++-v3/include/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/lib/libstdc++-v3/include/backward/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/lib/libstdc++-v3/include/debug/Makefile
cvs rdiff -u -r0 -r1.1 \
src/external/gpl3/gcc/lib/libstdc++-v3/include

CVS commit: src/external/gpl3/gcc/usr.bin/gcc4

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 21 05:34:52 UTC 2011

Removed Files:
src/external/gpl3/gcc/usr.bin/gcc4: Makefile Makefile.backend
Makefile.frontend Makefile.inc Makefile.libcpp
src/external/gpl3/gcc/usr.bin/gcc4/backend: Makefile
src/external/gpl3/gcc/usr.bin/gcc4/cc1: Makefile
src/external/gpl3/gcc/usr.bin/gcc4/cc1obj: Makefile
src/external/gpl3/gcc/usr.bin/gcc4/cc1plus: Makefile
src/external/gpl3/gcc/usr.bin/gcc4/cpp: Makefile
src/external/gpl3/gcc/usr.bin/gcc4/frontend: Makefile
src/external/gpl3/gcc/usr.bin/gcc4/g++: Makefile
src/external/gpl3/gcc/usr.bin/gcc4/gcc: Makefile
src/external/gpl3/gcc/usr.bin/gcc4/gcov: Makefile
src/external/gpl3/gcc/usr.bin/gcc4/host-libiberty: Makefile
src/external/gpl3/gcc/usr.bin/gcc4/include: Makefile
src/external/gpl3/gcc/usr.bin/gcc4/libcpp: Makefile
src/external/gpl3/gcc/usr.bin/gcc4/libiberty: Makefile defs.mk
src/external/gpl3/gcc/usr.bin/gcc4/protoize: Makefile
src/external/gpl3/gcc/usr.bin/gcc4/unprotoize: Makefile

Log Message:
remove stuff from the wrong directory.  oops.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 src/external/gpl3/gcc/usr.bin/gcc4/Makefile \
src/external/gpl3/gcc/usr.bin/gcc4/Makefile.backend \
src/external/gpl3/gcc/usr.bin/gcc4/Makefile.frontend \
src/external/gpl3/gcc/usr.bin/gcc4/Makefile.inc \
src/external/gpl3/gcc/usr.bin/gcc4/Makefile.libcpp
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/gpl3/gcc/usr.bin/gcc4/backend/Makefile
cvs rdiff -u -r1.1.1.1 -r0 src/external/gpl3/gcc/usr.bin/gcc4/cc1/Makefile
cvs rdiff -u -r1.1.1.1 -r0 src/external/gpl3/gcc/usr.bin/gcc4/cc1obj/Makefile
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/gpl3/gcc/usr.bin/gcc4/cc1plus/Makefile
cvs rdiff -u -r1.1.1.1 -r0 src/external/gpl3/gcc/usr.bin/gcc4/cpp/Makefile
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/gpl3/gcc/usr.bin/gcc4/frontend/Makefile
cvs rdiff -u -r1.1.1.1 -r0 src/external/gpl3/gcc/usr.bin/gcc4/g++/Makefile
cvs rdiff -u -r1.1.1.1 -r0 src/external/gpl3/gcc/usr.bin/gcc4/gcc/Makefile
cvs rdiff -u -r1.1.1.1 -r0 src/external/gpl3/gcc/usr.bin/gcc4/gcov/Makefile
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/gpl3/gcc/usr.bin/gcc4/host-libiberty/Makefile
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/gpl3/gcc/usr.bin/gcc4/include/Makefile
cvs rdiff -u -r1.1.1.1 -r0 src/external/gpl3/gcc/usr.bin/gcc4/libcpp/Makefile
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/gpl3/gcc/usr.bin/gcc4/libiberty/Makefile \
src/external/gpl3/gcc/usr.bin/gcc4/libiberty/defs.mk
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/gpl3/gcc/usr.bin/gcc4/protoize/Makefile
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/gpl3/gcc/usr.bin/gcc4/unprotoize/Makefile

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



CVS commit: src/sys/arch/powerpc/booke

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun 21 05:33:05 UTC 2011

Modified Files:
src/sys/arch/powerpc/booke: trap_subr.S

Log Message:
Nuke the mfsprg2 %r3 after sctrapexit.  curlwp is already in %r13 and the
value fetched to %r3 isn't used.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/booke/trap_subr.S

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/powerpc/booke/trap_subr.S
diff -u src/sys/arch/powerpc/booke/trap_subr.S:1.5 src/sys/arch/powerpc/booke/trap_subr.S:1.6
--- src/sys/arch/powerpc/booke/trap_subr.S:1.5	Sat Jun 18 06:37:38 2011
+++ src/sys/arch/powerpc/booke/trap_subr.S	Tue Jun 21 05:33:04 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap_subr.S,v 1.5 2011/06/18 06:37:38 matt Exp $	*/
+/*	$NetBSD: trap_subr.S,v 1.6 2011/06/21 05:33:04 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -34,7 +34,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-RCSID("$NetBSD: trap_subr.S,v 1.5 2011/06/18 06:37:38 matt Exp $")
+RCSID("$NetBSD: trap_subr.S,v 1.6 2011/06/21 05:33:04 matt Exp $")
 
 	.globl	_C_LABEL(sctrapexit), _C_LABEL(trapexit), _C_LABEL(intrcall)
 
@@ -466,7 +466,6 @@
 	blrl	/* syscall(tf) */
 _C_LABEL(sctrapexit):
 	wrteei	0/* disable interrupts */
-	mfsprg2	%r3/* get curlwp */
 	lwz	%r4, L_MD_ASTPENDING(%r13)	/* get ast pending */
 	cmplwi	%r4, 0/* is there an ast pending */
 	beq+	trapdone			/*nope, proceed to exit */



CVS commit: src/etc/root

2011-06-20 Thread Eric Haszlakiewicz
Module Name:src
Committed By:   erh
Date:   Tue Jun 21 05:31:29 UTC 2011

Modified Files:
src/etc/root: dot.cshrc dot.profile

Log Message:
There is no .../5.99 path to use for PKG_PATH, so change it to 5.1 instead.
Also refer the reader to pkg_install.conf as an alternative.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/etc/root/dot.cshrc
cvs rdiff -u -r1.24 -r1.25 src/etc/root/dot.profile

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

Modified files:

Index: src/etc/root/dot.cshrc
diff -u src/etc/root/dot.cshrc:1.21 src/etc/root/dot.cshrc:1.22
--- src/etc/root/dot.cshrc:1.21	Wed Aug 26 11:15:25 2009
+++ src/etc/root/dot.cshrc	Tue Jun 21 05:31:29 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: dot.cshrc,v 1.21 2009/08/26 11:15:25 tsutsui Exp $
+#	$NetBSD: dot.cshrc,v 1.22 2011/06/21 05:31:29 erh Exp $
 
 alias	h	history
 alias	j	jobs -l
@@ -21,9 +21,9 @@
 setenv BLOCKSIZE 1k
 
 # Uncomment the following line(s) to install binary packages
-# from ftp.NetBSD.org via pkg_add.
-#setenv PKG_PATH ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/5.99/All
-#setenv PKG_PATH "${PKG_PATH};ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/5.0/All"
+# from ftp.NetBSD.org via pkg_add.  (See also pkg_install.conf)
+#setenv PKG_PATH "ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/5.1/All"
+#setenv PKG_PATH "${PKG_PATH};ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/5.0/All"
 
 set history=1000
 set path=(/sbin /usr/sbin /bin /usr/bin /usr/pkg/sbin /usr/pkg/bin /usr/X11R7/bin /usr/X11R6/bin /usr/local/sbin /usr/local/bin)

Index: src/etc/root/dot.profile
diff -u src/etc/root/dot.profile:1.24 src/etc/root/dot.profile:1.25
--- src/etc/root/dot.profile:1.24	Mon Dec 27 03:38:53 2010
+++ src/etc/root/dot.profile	Tue Jun 21 05:31:29 2011
@@ -1,11 +1,11 @@
-#	$NetBSD: dot.profile,v 1.24 2010/12/27 03:38:53 christos Exp $
+#	$NetBSD: dot.profile,v 1.25 2011/06/21 05:31:29 erh Exp $
 
 export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin
 export PATH=${PATH}:/usr/X11R7/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin
 
 # Uncomment the following line(s) to install binary packages
-# from ftp.NetBSD.org via pkg_add.
-#export PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/5.99/All
+# from ftp.NetBSD.org via pkg_add.  (See also pkg_install.conf)
+#export PKG_PATH="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/5.1/All"
 #export PKG_PATH="${PKG_PATH};ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/5.0/All"
 
 export BLOCKSIZE=1k



CVS commit: src/sys/arch/powerpc/powerpc

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun 21 05:15:44 UTC 2011

Modified Files:
src/sys/arch/powerpc/powerpc: trap_subr.S

Log Message:
Remove #if 0 block


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/powerpc/powerpc/trap_subr.S

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/powerpc/powerpc/trap_subr.S
diff -u src/sys/arch/powerpc/powerpc/trap_subr.S:1.70 src/sys/arch/powerpc/powerpc/trap_subr.S:1.71
--- src/sys/arch/powerpc/powerpc/trap_subr.S:1.70	Fri Jun 17 05:10:53 2011
+++ src/sys/arch/powerpc/powerpc/trap_subr.S	Tue Jun 21 05:15:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap_subr.S,v 1.70 2011/06/17 05:10:53 matt Exp $	*/
+/*	$NetBSD: trap_subr.S,v 1.71 2011/06/21 05:15:44 matt Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -962,13 +962,7 @@
 /* Test AST pending: */
 	mtcr	%r31
 	bf	MSR_PR,trapleave	/* branch if PSL_PR is false */
-#if 0
-	GET_CPUINFO(%r3)
-	ldptr	%r3,CI_CURLWP(%r3)
-	ldint	%r4,L_MD_ASTPENDING(%r3)
-#else
 	ldint	%r4,L_MD_ASTPENDING(%r13)
-#endif
 	andi.	%r4,%r4,1
 	beq	trapleave
 



CVS commit: src/sys/arch/powerpc/powerpc

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun 21 05:14:26 UTC 2011

Modified Files:
src/sys/arch/powerpc/powerpc: locore_subr.S

Log Message:
remove a #if 0 block


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/powerpc/powerpc/locore_subr.S

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/powerpc/powerpc/locore_subr.S
diff -u src/sys/arch/powerpc/powerpc/locore_subr.S:1.45 src/sys/arch/powerpc/powerpc/locore_subr.S:1.46
--- src/sys/arch/powerpc/powerpc/locore_subr.S:1.45	Mon Jun 20 08:18:28 2011
+++ src/sys/arch/powerpc/powerpc/locore_subr.S	Tue Jun 21 05:14:26 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore_subr.S,v 1.45 2011/06/20 08:18:28 matt Exp $	*/
+/*	$NetBSD: locore_subr.S,v 1.46 2011/06/21 05:14:26 matt Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -517,13 +517,7 @@
 	tweqi	%r0,0
 #endif
 	li	%r4, 1			/* make sure userret gets called */
-#if 0
-	GET_CPUINFO(%r3)
-	ldptr	%r3, CI_CURLWP(%r3)
-	stint	%r4, L_MD_ASTPENDING(%r3)
-#else
 	stint	%r4, L_MD_ASTPENDING(%r13)
-#endif
 	b	trapexit
 
 #if defined(MULTIPROCESSOR) && (defined(PPC_OEA) || defined (PPC_OEA64_BRIDGE))



CVS commit: src/sys/arch

2011-06-20 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Jun 21 05:01:18 UTC 2011

Modified Files:
src/sys/arch/amd64/conf: GENERIC
src/sys/arch/i386/conf: GENERIC

Log Message:
By default, enable wmihp(4) instead of hpqlb(4), as it has a better chance
of working with a greater number of HP laptops. Ok cegger@.


To generate a diff of this commit:
cvs rdiff -u -r1.320 -r1.321 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.1033 -r1.1034 src/sys/arch/i386/conf/GENERIC

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/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.320 src/sys/arch/amd64/conf/GENERIC:1.321
--- src/sys/arch/amd64/conf/GENERIC:1.320	Tue Jun 14 13:59:23 2011
+++ src/sys/arch/amd64/conf/GENERIC	Tue Jun 21 05:01:18 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.320 2011/06/14 13:59:23 jruoho Exp $
+# $NetBSD: GENERIC,v 1.321 2011/06/21 05:01:18 jruoho Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.320 $"
+#ident 		"GENERIC-$Revision: 1.321 $"
 
 maxusers	64		# estimated number of users
 
@@ -300,7 +300,7 @@
 #fdc*		at acpi?		# Floppy disk controller
 fujbp*		at acpi?		# Fujitsu Brightness & Pointer
 fujhk*		at acpi?		# Fujitsu Hotkeys
-hpqlb*		at acpi?		# HP Quick Launch Buttons
+#hpqlb*		at acpi?		# HP Quick Launch Buttons
 hpet*		at acpihpetbus?		# High Precision Event Timer (table)
 hpet*		at acpinodebus?		# High Precision Event Timer (device)
 joy*		at acpi?		# Joystick/Game port
@@ -316,7 +316,7 @@
 wb*		at acpi?		# Winbond W83L518D SD/MMC reader
 sdmmc*		at wb?			# SD/MMC bus
 wmidell*	at acpiwmibus?		# Dell WMI mappings
-#wmihp*		at acpiwmibus?		# HP WMI mappings
+wmihp*		at acpiwmibus?		# HP WMI mappings
 wmimsi* 	at acpiwmibus?		# MSI WMI mappings
 
 # Basic Bus Support

Index: src/sys/arch/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1033 src/sys/arch/i386/conf/GENERIC:1.1034
--- src/sys/arch/i386/conf/GENERIC:1.1033	Tue Jun 14 13:59:23 2011
+++ src/sys/arch/i386/conf/GENERIC	Tue Jun 21 05:01:17 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1033 2011/06/14 13:59:23 jruoho Exp $
+# $NetBSD: GENERIC,v 1.1034 2011/06/21 05:01:17 jruoho Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.1033 $"
+#ident 		"GENERIC-$Revision: 1.1034 $"
 
 maxusers	64		# estimated number of users
 
@@ -365,7 +365,7 @@
 #fdc*		at acpi?		# Floppy disk controller
 fujbp*		at acpi?		# Fujitsu Brightness & Pointer
 fujhk*		at acpi?		# Fujitsu Hotkeys
-hpqlb*		at acpi?		# HP Quick Launch Buttons
+#hpqlb*		at acpi?		# HP Quick Launch Buttons
 hpet*		at acpihpetbus?		# High Precision Event Timer (table)
 hpet*		at acpinodebus?		# High Precision Event Timer (device)
 joy*		at acpi?		# Joystick/Game port
@@ -382,7 +382,7 @@
 sdmmc*		at wb?			# SD/MMC bus
 wmidell*	at acpiwmibus?		# Dell WMI mappings
 wmieeepc*	at acpiwmibus?		# Asus Eee PC WMI mappings
-#wmihp*		at acpiwmibus?		# HP WMI mappings
+wmihp*		at acpiwmibus?		# HP WMI mappings
 wmimsi* 	at acpiwmibus?		# MSI WMI mappings
 wss*		at acpi?		# NeoMagic 256AV in wss mode
 ym*		at acpi?		# Yamaha OPL3-SA[23] audio



CVS commit: src/sys/common/pmap/tlb

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun 21 04:55:01 UTC 2011

Added Files:
src/sys/common/pmap/tlb: tlb.h

Log Message:
Add a common struct containing tlb ops needed by the tlb pmap.c


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/common/pmap/tlb/tlb.h

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

Added files:

Index: src/sys/common/pmap/tlb/tlb.h
diff -u /dev/null src/sys/common/pmap/tlb/tlb.h:1.1
--- /dev/null	Tue Jun 21 04:55:01 2011
+++ src/sys/common/pmap/tlb/tlb.h	Tue Jun 21 04:55:01 2011
@@ -0,0 +1,71 @@
+/*	$NetBSD: tlb.h,v 1.1 2011/06/21 04:55:01 matt Exp $	*/
+/*-
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef _COMMON_PMAP_TLB_TLB_H_
+#define	_COMMON_PMAP_TLB_TLB_H_
+
+#if defined(_KERNEL) || defined(_KMEMUSER)
+
+struct tlbmask;
+
+struct tlb_md_ops {
+	void	(*md_tlb_set_asid)(tlb_asid_t);
+	tlb_asid_t
+		(*md_tlb_get_asid)(void);
+	void	(*md_tlb_invalidate_all)(void);
+	void	(*md_tlb_invalidate_globals)(void);
+	void	(*md_tlb_invalidate_asids)(tlb_asid_t, tlb_asid_t);
+	void	(*md_tlb_invalidate_addr)(vaddr_t, tlb_asid_t);
+	bool	(*md_tlb_update_addr)(vaddr_t, tlb_asid_t, pt_entry_t, bool);
+	void	(*md_tlb_read_entry)(size_t, struct tlbmask *);
+	void	(*md_tlb_write_entry)(size_t, const struct tlbmask *);
+	u_int	(*md_tlb_record_asids)(u_long *);
+	void	(*md_tlb_dump)(void (*)(const char *, ...));
+	void	(*md_tlb_walk)(void *, bool (*)(void *, vaddr_t, tlb_asid_t,
+		pt_entry_t));
+};
+
+tlb_asid_t
+	tlb_get_asid(void);
+void	tlb_set_asid(tlb_asid_t);
+void	tlb_invalidate_all(void);
+void	tlb_invalidate_globals(void);
+void	tlb_invalidate_asids(tlb_asid_t, tlb_asid_t);
+void	tlb_invalidate_addr(vaddr_t, tlb_asid_t);
+bool	tlb_update_addr(vaddr_t, tlb_asid_t, pt_entry_t, bool);
+u_int	tlb_record_asids(u_long *);
+void	tlb_enter_addr(size_t, const struct tlbmask *);
+void	tlb_read_entry(size_t, struct tlbmask *);
+void	tlb_write_entry(size_t, const struct tlbmask *);
+void	tlb_walk(void *, bool (*)(void *, vaddr_t, tlb_asid_t, pt_entry_t));
+void	tlb_dump(void (*)(const char *, ...));
+
+#endif /* _KERNEL || _KMEMUSER */
+
+#endif /* !_COMMON_PMAP_TLB_TLB_H_ */



CVS commit: src/external/gpl3/gcc

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 21 04:53:34 UTC 2011

Added Files:
src/external/gpl3/gcc: Makefile

Log Message:
front end to build gcc 4.5 components


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/Makefile

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

Added files:

Index: src/external/gpl3/gcc/Makefile
diff -u /dev/null src/external/gpl3/gcc/Makefile:1.1
--- /dev/null	Tue Jun 21 04:53:34 2011
+++ src/external/gpl3/gcc/Makefile	Tue Jun 21 04:53:33 2011
@@ -0,0 +1,5 @@
+#	$NetBSD: Makefile,v 1.1 2011/06/21 04:53:33 mrg Exp $
+
+SUBDIR+= lib .WAIT usr.bin
+
+.include 



CVS commit: src

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 21 04:52:50 UTC 2011

Modified Files:
src/external/gpl3: Makefile
src/gnu/usr.bin: Makefile

Log Message:
prepare to build native gcc 4.5, don't build native gcc 4.1, for HAVE_GCC=45


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/Makefile
cvs rdiff -u -r1.134 -r1.135 src/gnu/usr.bin/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/Makefile
diff -u src/external/gpl3/Makefile:1.2 src/external/gpl3/Makefile:1.3
--- src/external/gpl3/Makefile:1.2	Tue Sep  8 07:08:02 2009
+++ src/external/gpl3/Makefile	Tue Jun 21 04:52:49 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2009/09/08 07:08:02 skrll Exp $
+#	$NetBSD: Makefile,v 1.3 2011/06/21 04:52:49 mrg Exp $
 
 .include 
 
@@ -6,4 +6,10 @@
 SUBDIR+=	binutils
 .endif
 
+.if ${HAVE_GCC} == 45
+.if ${MKGCCCMDS} != "no"
+#SUBDIR+=	gcc
+.endif
+.endif
+
 .include 

Index: src/gnu/usr.bin/Makefile
diff -u src/gnu/usr.bin/Makefile:1.134 src/gnu/usr.bin/Makefile:1.135
--- src/gnu/usr.bin/Makefile:1.134	Thu Apr 21 14:26:34 2011
+++ src/gnu/usr.bin/Makefile	Tue Jun 21 04:52:50 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.134 2011/04/21 14:26:34 joerg Exp $
+#	$NetBSD: Makefile,v 1.135 2011/06/21 04:52:50 mrg Exp $
 
 .include 
 
@@ -23,8 +23,10 @@
 .endif
 .endif
 
+.if ${HAVE_GCC} == 4
 .if ${MKGCCCMDS} != "no"
 SUBDIR+=	gcc4
 .endif
+.endif
 
 .include 



CVS commit: src/sys/arch/powerpc/powerpc

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun 21 04:22:25 UTC 2011

Modified Files:
src/sys/arch/powerpc/powerpc: softint_machdep.c

Log Message:
Add an extra assert to verify we aren't trying to process softints while
interrupts are being serviced.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/powerpc/powerpc/softint_machdep.c

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

Modified files:

Index: src/sys/arch/powerpc/powerpc/softint_machdep.c
diff -u src/sys/arch/powerpc/powerpc/softint_machdep.c:1.1 src/sys/arch/powerpc/powerpc/softint_machdep.c:1.2
--- src/sys/arch/powerpc/powerpc/softint_machdep.c:1.1	Tue Jun 14 22:36:13 2011
+++ src/sys/arch/powerpc/powerpc/softint_machdep.c	Tue Jun 21 04:22:25 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: softint_machdep.c,v 1.1 2011/06/14 22:36:13 matt Exp $	*/
+/*	$NetBSD: softint_machdep.c,v 1.2 2011/06/21 04:22:25 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -69,6 +69,9 @@
 	const u_int softint_mask = (IPL_SOFTMASK << old_ipl) & IPL_SOFTMASK;
 	u_int softints;
 
+	KASSERTMSG(ci->ci_idepth == -1,
+	("%s: cpu%u: idepth (%d) != -1", __func__,
+	 cpu_index(ci), ci->ci_idepth));
 	KASSERT(ci->ci_mtx_count == 0);
 	KASSERT(ci->ci_cpl == IPL_HIGH);
 	while ((softints = (ci->ci_data.cpu_softints & softint_mask)) != 0) {



CVS commit: src/sys/arch/powerpc/ibm4xx

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun 21 04:21:45 UTC 2011

Modified Files:
src/sys/arch/powerpc/ibm4xx: pmap.c

Log Message:
Switch to using dcache_wbinv_page


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/powerpc/ibm4xx/pmap.c

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

Modified files:

Index: src/sys/arch/powerpc/ibm4xx/pmap.c
diff -u src/sys/arch/powerpc/ibm4xx/pmap.c:1.68 src/sys/arch/powerpc/ibm4xx/pmap.c:1.69
--- src/sys/arch/powerpc/ibm4xx/pmap.c:1.68	Mon Jun 20 08:13:17 2011
+++ src/sys/arch/powerpc/ibm4xx/pmap.c	Tue Jun 21 04:21:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.68 2011/06/20 08:13:17 matt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.69 2011/06/21 04:21:44 matt Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.68 2011/06/20 08:13:17 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.69 2011/06/21 04:21:44 matt Exp $");
 
 #include 
 #include 
@@ -702,7 +702,7 @@
 {
 
 	memcpy((void *)dst, (void *)src, PAGE_SIZE);
-	dcache_flush_page(dst);
+	dcache_wbinv_page(dst);
 }
 
 /*



CVS commit: othersrc/external/bsd/mat

2011-06-20 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Tue Jun 21 04:21:25 UTC 2011

Modified Files:
othersrc/external/bsd/mat/dist: frontends.c main.c mat.1 mat.c mat.h
matpax.1
othersrc/external/bsd/mat/mat: Makefile

Log Message:
Add a separate "audit" comment to the tar and pax frontends for mat, which
compare each component of the archive with its entry in the file system.
Sizes, all digests, oweners, group owners, mtimes and symbolic link targets
are all compared.

Add a test for the new audit command:

cd d && env LD_LIBRARY_PATH=${LIBMATDIR} ../${PROG} avvf 
../archive2.mat > archive2.audit
cd d && env LD_LIBRARY_PATH=${LIBMATDIR} ../${PROG} tvvf 
../archive2.mat > archive2.list
-diff d/archive2.list d/archive2.audit

(from the testing target in the mat Makefile).

Update the matpax(1) manual page, per wiz, to describe the pax arguments,
rather than the tar arguments.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/mat/dist/frontends.c
cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/mat/dist/main.c \
othersrc/external/bsd/mat/dist/mat.h \
othersrc/external/bsd/mat/dist/matpax.1
cvs rdiff -u -r1.4 -r1.5 othersrc/external/bsd/mat/dist/mat.1
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/mat/dist/mat.c
cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/mat/mat/Makefile

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

Modified files:

Index: othersrc/external/bsd/mat/dist/frontends.c
diff -u othersrc/external/bsd/mat/dist/frontends.c:1.1 othersrc/external/bsd/mat/dist/frontends.c:1.2
--- othersrc/external/bsd/mat/dist/frontends.c:1.1	Mon Jun 20 14:58:53 2011
+++ othersrc/external/bsd/mat/dist/frontends.c	Tue Jun 21 04:21:24 2011
@@ -66,7 +66,8 @@
 reading(const char *action)
 {
 	return (strcmp(action, "verify") == 0 ||
-		strcmp(action, "list")  == 0 ||
+		strcmp(action, "audit") == 0 ||
+		strcmp(action, "list") == 0 ||
 		strcmp(action, "extract") == 0);
 }
 
@@ -137,7 +138,7 @@
 		(void) snprintf(newarg, sizeof(newarg), "-%s", argv[1]);
 		argv[1] = newarg;
 	}
-	while ((i = getopt(argc, argv, "C:T:Vcf:ptvx")) != -1) {
+	while ((i = getopt(argc, argv, "C:T:Vacf:ptvx")) != -1) {
 		switch(i) {
 		case 'C':
 			dir = optarg;
@@ -148,6 +149,9 @@
 		case 'V':
 			action = "verify";
 			break;
+		case 'a':
+			action = "audit";
+			break;
 		case 'c':
 			action = "create";
 			break;
@@ -200,6 +204,8 @@
 			ok = mat_verify(&mat);
 		} else if (strcmp(action, "extract") == 0) {
 			ok = mat_extract(&mat, NULL);
+		} else if (strcmp(action, "audit") == 0) {
+			ok = mat_audit(&mat, NULL, stdout);
 		} else {
 			(void) fprintf(stderr, "unknown action specified (%s)\n", action);
 			return 0;
@@ -218,6 +224,10 @@
 if (!mat_list(&mat, argv[i], stdout)) {
 	ok = 0;
 }
+			} else if (strcmp(action, "audit") == 0) {
+if (!mat_audit(&mat, argv[i], stdout)) {
+	ok = 0;
+}
 			}
 		}
 	}
@@ -276,11 +286,17 @@
 	ok = 1;
 	action = "list";
 	deltemp = 0;
-	while ((i = getopt(argc, argv, "Vaf:ilrvw")) != -1) {
+	while ((i = getopt(argc, argv, "C:Vaf:lrwv")) != -1) {
 		switch(i) {
+		case 'C':
+			dir = optarg;
+			break;
 		case 'V':
 			action = "verify";
 			break;
+		case 'a':
+			action = "audit";
+			break;
 		case 'f':
 			archive = optarg;
 			break;
@@ -293,6 +309,9 @@
 		case 'w':
 			action = "create";
 			break;
+		case 'v':
+			mat.verbose += 1;
+			break;
 		default:
 			(void) fprintf(stderr, "Unknown flag \"%c\"\n", i);
 		}
@@ -371,4 +390,3 @@
 	va_end(args);
 	return mat_pax(argc, argv);
 }
-

Index: othersrc/external/bsd/mat/dist/main.c
diff -u othersrc/external/bsd/mat/dist/main.c:1.2 othersrc/external/bsd/mat/dist/main.c:1.3
--- othersrc/external/bsd/mat/dist/main.c:1.2	Mon Jun 20 14:58:53 2011
+++ othersrc/external/bsd/mat/dist/main.c	Tue Jun 21 04:21:24 2011
@@ -37,14 +37,14 @@
 } map_t;
 
 static map_t	mappings[] = {
-	{ "tar",	mat_tar	},
-	{ "mtar",	mat_tar	},
-	{ "mattar",	mat_tar	},
-	{ "mat",	mat_tar	},
-	{ "pax",	mat_pax	},
-	{ "mpax",	mat_pax	},
-	{ "matpax",	mat_pax	},
-	{ NULL,		NULL	}
+	{ "tar",	mat_tar		},
+	{ "mtar",	mat_tar		},
+	{ "mattar",	mat_tar		},
+	{ "mat",	mat_tar		},
+	{ "pax",	mat_pax		},
+	{ "mpax",	mat_pax		},
+	{ "matpax",	mat_pax		},
+	{ NULL,		NULL		}
 };
 
 int
Index: othersrc/external/bsd/mat/dist/mat.h
diff -u othersrc/external/bsd/mat/dist/mat.h:1.2 othersrc/external/bsd/mat/dist/mat.h:1.3
--- othersrc/external/bsd/mat/dist/mat.h:1.2	Mon Jun 20 14:58:53 2011
+++ othersrc/external/bsd/mat/dist/mat.h	Tue Jun 21 04:21:24 2011
@@ -99,6 +99,7 @@
 int mat_list(mat_t */*mat*/, const char */*pat*/, FILE */*fp*/);
 int mat_verify(mat_t */*mat*/);
 int mat_extract(mat_t */*mat*/, const char */*pat*/);
+int mat_audit(mat_t */*mat*/, const char */*pat*/, FILE */*fp*/);
 
 int mat_tar(int /*argc*/, char **/*argv*/);
 int mat_vtar(char */*arg*/, ...);
Index: othersrc/external/bsd/mat/dist/

CVS commit: src/sys/arch/powerpc

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun 21 04:21:17 UTC 2011

Modified Files:
src/sys/arch/powerpc/booke: booke_machdep.c
src/sys/arch/powerpc/ibm4xx: cpu.c
src/sys/arch/powerpc/include: cpu.h
src/sys/arch/powerpc/oea: cpu_subr.c

Log Message:
Reap the ci_ev_soft* evcnts since every variant implements __HAVE_FAST_SOFTINTS


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/booke/booke_machdep.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/powerpc/ibm4xx/cpu.c
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/powerpc/include/cpu.h
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/powerpc/oea/cpu_subr.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/powerpc/booke/booke_machdep.c
diff -u src/sys/arch/powerpc/booke/booke_machdep.c:1.9 src/sys/arch/powerpc/booke/booke_machdep.c:1.10
--- src/sys/arch/powerpc/booke/booke_machdep.c:1.9	Mon Jun 20 07:23:36 2011
+++ src/sys/arch/powerpc/booke/booke_machdep.c	Tue Jun 21 04:21:16 2011
@@ -341,14 +341,6 @@
 		NULL, xname, "late clock");
 	evcnt_attach_dynamic_nozero(&cpu->cpu_ev_exec_trap_sync, EVCNT_TYPE_TRAP,
 		NULL, xname, "exec pages synced (trap)");
-#ifndef __HAVE_FAST_SOFTINTS
-	evcnt_attach_dynamic_nozero(&ci->ci_ev_softclock, EVCNT_TYPE_INTR,
-		NULL, xname, "soft clock");
-	evcnt_attach_dynamic_nozero(&ci->ci_ev_softnet, EVCNT_TYPE_INTR,
-		NULL, xname, "soft net");
-	evcnt_attach_dynamic_nozero(&ci->ci_ev_softserial, EVCNT_TYPE_INTR,
-		NULL, xname, "soft serial");
-#endif
 	evcnt_attach_dynamic_nozero(&ci->ci_ev_traps, EVCNT_TYPE_TRAP,
 		NULL, xname, "traps");
 	evcnt_attach_dynamic_nozero(&ci->ci_ev_kdsi, EVCNT_TYPE_TRAP,

Index: src/sys/arch/powerpc/ibm4xx/cpu.c
diff -u src/sys/arch/powerpc/ibm4xx/cpu.c:1.31 src/sys/arch/powerpc/ibm4xx/cpu.c:1.32
--- src/sys/arch/powerpc/ibm4xx/cpu.c:1.31	Sat Jun 18 08:21:20 2011
+++ src/sys/arch/powerpc/ibm4xx/cpu.c	Tue Jun 21 04:21:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.31 2011/06/18 08:21:20 matt Exp $	*/
+/*	$NetBSD: cpu.c,v 1.32 2011/06/21 04:21:16 matt Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.31 2011/06/18 08:21:20 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.32 2011/06/21 04:21:16 matt Exp $");
 
 #include 
 #include 
@@ -55,29 +55,160 @@
 	u_int version;
 	u_int mask;
 	const char *name;
+	struct cache_info ci;
 };
+
 static const struct cputab models[] = {
-	{ PVR_401A1, 	0x,	"401A1" 	},
-	{ PVR_401B2, 	0x,	"401B21" 	},
-	{ PVR_401C2, 	0x,	"401C2" 	},
-	{ PVR_401D2, 	0x,	"401D2" 	},
-	{ PVR_401E2, 	0x,	"401E2" 	},
-	{ PVR_401F2, 	0x,	"401F2" 	},
-	{ PVR_401G2, 	0x,	"401G2" 	},
-	{ PVR_403, 	0x,	"403" 		},
-	{ PVR_405GP, 	0x,	"405GP" 	},
-	{ PVR_405GPR, 	0x,	"405GPr" 	},
-	{ PVR_405D5X1, 	0xf000, 	"Xilinx Virtex II Pro" 	},
-	{ PVR_405D5X2, 	0xf000, 	"Xilinx Virtex 4 FX" 	},
-	{ PVR_405EX, 	0x, 	"405EX" 	},
-	{ 0, 		0,		NULL 		}
+	{
+		.version = PVR_401A1, 
+		.mask = 0x,
+		.name = "401A1",
+		.ci = {
+			.dcache_size = 1024,
+			.dcache_line_size = 16,
+			.icache_size = 2848,
+			.icache_line_size = 16,
+		}
+	}, {
+		.version = PVR_401B2, 
+		.mask = 0x,
+		.name = "401B21",
+		.ci = {
+			.dcache_size = 8192,
+			.dcache_line_size = 16,
+			.icache_size = 16384,
+			.icache_line_size = 16,
+		}
+	}, {
+		.version = PVR_401C2, 
+		.mask = 0x,
+		.name = "401C2",
+		.ci = {
+			.dcache_size = 8192,
+			.dcache_line_size = 16,
+			.icache_size = 0,
+			.icache_line_size = 16,
+		}
+	}, {
+		.version = PVR_401D2, 
+		.mask = 0x,
+		.name = "401D2",
+		.ci = {
+			.dcache_size = 2848,
+			.dcache_line_size = 16,
+			.icache_size = 4096,
+			.icache_line_size = 16,
+		}
+	}, {
+		.version = PVR_401E2, 
+		.mask = 0x,
+		.name = "401E2",
+		.ci = {
+			.dcache_size = 0,
+			.dcache_line_size = 16,
+			.icache_size = 0,
+			.icache_line_size = 16,
+		}
+	}, {
+		.version = PVR_401F2, 
+		.mask = 0x,
+		.name = "401F2",
+		.ci = {
+			.dcache_size = 2048,
+			.dcache_line_size = 16,
+			.icache_size = 2848,
+			.icache_line_size = 16,
+		}
+	}, {
+		.version = PVR_401G2, 
+		.mask = 0x,
+		.name = "401G2",
+		.ci = {
+			.dcache_size = 2848,
+			.dcache_line_size = 16,
+			.icache_size = 8192,
+			.icache_line_size = 16,
+		}
+	}, {
+		.version = PVR_403, 
+		.mask = 0x,
+		.name = "403",
+		.ci = {
+			.dcache_size = 8192,
+			.dcache_line_size = 16,
+			.icache_size = 16384,
+			.icache_line_size = 16,
+		}
+	}, {
+		.version = PVR_405GP, 
+		.mask = 0x,
+		.name = "405GP",
+		.ci = {
+			.dcache_size = 8192,
+			.dcache_line_size = 32,
+			.icache_size = 8192,
+			.icache_line_size = 32,
+		}
+	}, {
+		.version = PVR_405GPR, 
+		.mask = 0x,
+		.name = "405GPr",
+		.ci = {

CVS commit: src/sys/arch/powerpc/include/booke

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Jun 21 04:19:22 UTC 2011

Modified Files:
src/sys/arch/powerpc/include/booke: intr.h

Log Message:
forward declare cpu_info and trapframe.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/include/booke/intr.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/powerpc/include/booke/intr.h
diff -u src/sys/arch/powerpc/include/booke/intr.h:1.5 src/sys/arch/powerpc/include/booke/intr.h:1.6
--- src/sys/arch/powerpc/include/booke/intr.h:1.5	Wed Jun 15 15:11:50 2011
+++ src/sys/arch/powerpc/include/booke/intr.h	Tue Jun 21 04:19:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.5 2011/06/15 15:11:50 matt Exp $	*/
+/*	$NetBSD: intr.h,v 1.6 2011/06/21 04:19:22 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -79,6 +79,8 @@
 
 #ifndef _LOCORE
 
+struct cpu_info;
+
 void 	*intr_establish(int, int, int, int (*)(void *), void *);
 void 	intr_disestablish(void *);
 void	intr_cpu_attach(struct cpu_info *);
@@ -111,6 +113,8 @@
 
 #ifdef __INTR_PRIVATE
 
+struct trapframe;
+
 struct intrsw {
 	void *(*intrsw_establish)(int, int, int, int (*)(void *), void *);
 	void (*intrsw_disestablish)(void *);



CVS commit: src/external/gpl3/gcc/dist/gcc/cp

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 21 04:14:34 UTC 2011

Modified Files:
src/external/gpl3/gcc/dist/gcc/cp: Make-lang.in

Log Message:
add a NetBSD_DISABLED rule for cfns.h.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/gcc/cp/Make-lang.in

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/dist/gcc/cp/Make-lang.in
diff -u src/external/gpl3/gcc/dist/gcc/cp/Make-lang.in:1.1.1.1 src/external/gpl3/gcc/dist/gcc/cp/Make-lang.in:1.2
--- src/external/gpl3/gcc/dist/gcc/cp/Make-lang.in:1.1.1.1	Tue Jun 21 01:21:48 2011
+++ src/external/gpl3/gcc/dist/gcc/cp/Make-lang.in	Tue Jun 21 04:14:34 2011
@@ -107,6 +107,8 @@
 
 # Special build rules.
 $(srcdir)/cp/cfns.h: $(srcdir)/cp/cfns.gperf
+	@echo "NOT REBUILDING $@"
+NetBSD_DISABLED_cfns.h:
 	gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
 		$(srcdir)/cp/cfns.gperf > $(srcdir)/cp/cfns.h
 



CVS commit: src/tools/gcc

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 21 04:11:13 UTC 2011

Modified Files:
src/tools/gcc: Makefile README.mknative mknative-gcc

Log Message:
initial port to HAVE_GCC = 45.  mknative-gcc parts are from me
and are largely untested, most of the rest is from chuq.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/tools/gcc/Makefile
cvs rdiff -u -r1.7 -r1.8 src/tools/gcc/README.mknative
cvs rdiff -u -r1.45 -r1.46 src/tools/gcc/mknative-gcc

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

Modified files:

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.36 src/tools/gcc/Makefile:1.37
--- src/tools/gcc/Makefile:1.36	Fri Jun 10 16:31:18 2011
+++ src/tools/gcc/Makefile	Tue Jun 21 04:11:12 2011
@@ -1,10 +1,15 @@
-#	$NetBSD: Makefile,v 1.36 2011/06/10 16:31:18 matt Exp $
+#	$NetBSD: Makefile,v 1.37 2011/06/21 04:11:12 mrg Exp $
 
 .include 
 
 GCC_LANGUAGES=c c++ objc
 MODULE=			gcc4
+.if ${HAVE_GCC} == 45
+MKNATIVE_TARGET=	gcc45
+GNUHOSTDIST=		${.CURDIR}/../../external/gpl3/gcc/dist
+.else
 MKNATIVE_TARGET=	gcc4
+.endif
 MKNATIVE_CONFIG_TARGET_LIBS=
 BINENV=		/usr/bin/env -i
 
@@ -23,6 +28,8 @@
 COMMON_CONFIGURE_ARGS=	--target=${MACHINE_GNU_PLATFORM} \
 			--enable-long-long \
 			--enable-threads \
+			--with-bugurl=http://www.NetBSD.org/Misc/send-pr.html \
+			--with-pkgversion="NetBSD nb1 20110620" \
 			${VAX_CONFIGURE_ARGS} \
 			--enable-__cxa_atexit
 .if defined(GCC_CONFIG_ARCH.${MACHINE_ARCH})
@@ -32,7 +39,14 @@
 COMMON_CONFIGURE_ARGS+=	--with-tune=${GCC_CONFIG_TUNE.${MACHINE_ARCH}}
 .endif
 
-CONFIGURE_ARGS=	${COMMON_CONFIGURE_ARGS} \
+CONFIGURE_ARGS=	${COMMON_CONFIGURE_ARGS}
+.if ${HAVE_GCC} >= 45
+CONFIGURE_ARGS+= \
+		--with-mpc=${TOOLDIR} \
+		--with-mpfr=${TOOLDIR} \
+		--with-gmp=${TOOLDIR}
+.endif
+CONFIGURE_ARGS+= \
 		--disable-nls \
 		${MULTILIB_ARGS} \
 		${SOFTFLOAT_ARGS} \
@@ -74,6 +88,16 @@
 .include "${.CURDIR}/../Makefile.gmakehost"
 BUILD_MAKE=${TOOL_GMAKE}
 
+#
+# mknative-gcc specific stuff
+#
+
+.if ${HAVE_GCC} >= 45
+GCCSRCDIR=${.CURDIR}/../../gnu/dist/gcc4
+.else
+GCCSRCDIR=${.CURDIR}/../../external/gpl3/gcc/dist
+.endif
+
 CXXADDFLAGS=	${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++
 CCADDFLAGS=	${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
 
@@ -90,10 +114,17 @@
 	@MAKE=${BUILD_MAKE:Q} ${HOST_SH} ${MKNATIVE} ${MKNATIVE_TARGET} \
 		${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM}
 
-NATIVE_CONFIGURE_ARGS=	${COMMON_CONFIGURE_ARGS} \
+NATIVE_CONFIGURE_ARGS=	${COMMON_CONFIGURE_ARGS}
+.if ${HAVE_GCC} >= 45
+NATIVE_CONFIGURE_ARGS+=	\
+			--with-mpc=${DESTDIR}/usr \
+			--with-mpfr=${DESTDIR}/usr \
+			--with-gmp=${DESTDIR}/usr
+.endif
+NATIVE_CONFIGURE_ARGS+=	\
 			--disable-multilib \
 			--disable-symvers \
-			--build=`${.CURDIR}/../../gnu/dist/${MODULE}/config.guess` \
+			--build=`${GCCSRCDIR}/config.guess` \
 			--host=${MACHINE_GNU_PLATFORM}
 
 .native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile
@@ -103,7 +134,6 @@
 			${HOST_SH} ${GNUHOSTDIST}/configure \
 			${NATIVE_CONFIGURE_ARGS}) && \
 		(cd .native && ${MKNATIVE_ENV} ${BUILD_MAKE} all-build-libiberty)
-.if ${HAVE_GCC} == 4
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
 		(cd .native && ${MKNATIVE_ENV} ${BUILD_MAKE} configure-gcc configure-libcpp) && \
 		(cd .native && ${MKNATIVE_ENV} ${BUILD_MAKE} configure-libiberty)
@@ -112,11 +142,6 @@
 			${TOOL_SED} -e 's/\(maybe-all-gcc:\) all-gcc/\1/' \
 < Makefile.config > Makefile) && \
 		(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e tree-check.h config.h multilib.h gcov-iov.h)
-.else
-	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
-		(cd .native && ${MKNATIVE_ENV} ${BUILD_MAKE} all-libiberty) && \
-		(cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} tree-check.h config.h)
-.endif
 	PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
 		(cd .native && touch gcc/cc1obj gcc/cc1plus gcc/f771 gcc/libgcc.a gcc/libgcc_s.so && \
 			${MKNATIVE_ENV} ${BUILD_MAKE} configure-target-libiberty \

Index: src/tools/gcc/README.mknative
diff -u src/tools/gcc/README.mknative:1.7 src/tools/gcc/README.mknative:1.8
--- src/tools/gcc/README.mknative:1.7	Tue Sep  8 07:08:03 2009
+++ src/tools/gcc/README.mknative	Tue Jun 21 04:11:12 2011
@@ -1,4 +1,4 @@
-$NetBSD: README.mknative,v 1.7 2009/09/08 07:08:03 skrll Exp $
+$NetBSD: README.mknative,v 1.8 2011/06/21 04:11:12 mrg Exp $
 
 This file describes how to bootstrap the native toolchain on a new NetBSD
 platform (and how to update the new toolchain files, if needed).  These
@@ -36,10 +36,11 @@
 
 5. In src/gnu/lib/libgcc4, do "nbmake-MACHINE obj includes".
 
-6. In src/gnu/lib/crtstuff4 do "nbmake-MACHINE depend all install"
+6. If the platform sets USE_COMPILERCRTSTUFF=yes, then in src/gnu/l

CVS commit: src/lib

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 21 04:04:14 UTC 2011

Modified Files:
src/lib: Makefile

Log Message:
add HAVE_GCC=45 support.


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/lib/Makefile

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

Modified files:

Index: src/lib/Makefile
diff -u src/lib/Makefile:1.167 src/lib/Makefile:1.168
--- src/lib/Makefile:1.167	Mon May  9 08:51:18 2011
+++ src/lib/Makefile	Tue Jun 21 04:04:13 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.167 2011/05/09 08:51:18 manu Exp $
+#	$NetBSD: Makefile,v 1.168 2011/06/21 04:04:13 mrg Exp $
 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
 
 .include 
@@ -64,7 +64,15 @@
 SUBDIR+=	../gnu/lib/libmalloc
 
 .if (${MKGCC} != "no")
+. if ${HAVE_GCC} == 4
 SUBDIR+=	../gnu/lib/libobjc4
+. endif
+.endif
+
+. if ${HAVE_GCC} >= 45
+SUBDIR+=	../external/lgpl3/gmp/lib/libgmp
+SUBDIR+=	../external/lgpl3/mpfr/lib/libmpfr
+SUBDIR+=	../external/lgpl2/mpc/lib/libmpc
 .endif
 
 #
@@ -107,8 +115,10 @@
 .endif
 
 .if (${MKGCC} != "no" && ${MKCXX} != "no")
+. if ${HAVE_GCC} == 4
 SUBDIR+=	../gnu/lib/libstdc++-v3_4	# depends on libm
 SUBDIR+=	../gnu/lib/libsupc++4
+. endif
 .endif
 
 # 2nd library dependency barrier 



CVS commit: src/external/lgpl3/mpfr/dist

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 21 04:03:34 UTC 2011

Modified Files:
src/external/lgpl3/mpfr/dist: Makefile.in

Log Message:
add some "NetBSD_Disabled*" rules to avoid r/o src tree build issues.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/lgpl3/mpfr/dist/Makefile.in

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

Modified files:

Index: src/external/lgpl3/mpfr/dist/Makefile.in
diff -u src/external/lgpl3/mpfr/dist/Makefile.in:1.1.1.1 src/external/lgpl3/mpfr/dist/Makefile.in:1.2
--- src/external/lgpl3/mpfr/dist/Makefile.in:1.1.1.1	Mon Jun 20 05:53:06 2011
+++ src/external/lgpl3/mpfr/dist/Makefile.in	Tue Jun 21 04:03:33 2011
@@ -464,8 +464,12 @@
 	$(SHELL) ./config.status --recheck
 
 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	@echo "NOT REBUILDING $@"
+NetBSD_DISABLED_configure:
 	$(am__cd) $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	@echo "NOT REBUILDING $@"
+NetBSD_DISABLED_aclocal:
 	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 $(am__aclocal_m4_deps):
 mparam.h: $(top_builddir)/config.status $(srcdir)/mparam_h.in
@@ -2048,6 +2052,8 @@
 # should not be a problem in practice, in particular because "make dist"
 # automatically rebuilds get_patches.c before generating the archives.
 $(srcdir)/get_patches.c: PATCHES get_patches.sh
+	@echo "NOT REBUILDING $@"
+NetBSD_DISABLED_get_patches.c:
 	(cd $(srcdir) && ./get_patches.sh) > $@ || rm -f $@
 
 tune:



CVS commit: src/sys/dev/acpi

2011-06-20 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Jun 21 03:37:21 UTC 2011

Modified Files:
src/sys/dev/acpi: acpi.c acpi_cpu.c acpi_pmtr.c acpi_power.c
acpi_util.c acpi_util.h acpivar.h

Log Message:
Rename acpi_get_node() to acpi_match_node() for consistency.


To generate a diff of this commit:
cvs rdiff -u -r1.245 -r1.246 src/sys/dev/acpi/acpi.c
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/acpi/acpi_cpu.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/acpi_pmtr.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/acpi/acpi_power.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/acpi/acpi_util.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/acpi/acpi_util.h
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/acpi/acpivar.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/acpi/acpi.c
diff -u src/sys/dev/acpi/acpi.c:1.245 src/sys/dev/acpi/acpi.c:1.246
--- src/sys/dev/acpi/acpi.c:1.245	Tue Jun 14 13:59:23 2011
+++ src/sys/dev/acpi/acpi.c	Tue Jun 21 03:37:21 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi.c,v 1.245 2011/06/14 13:59:23 jruoho Exp $	*/
+/*	$NetBSD: acpi.c,v 1.246 2011/06/21 03:37:21 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.245 2011/06/14 13:59:23 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.246 2011/06/21 03:37:21 jruoho Exp $");
 
 #include "opt_acpi.h"
 #include "opt_pcifixup.h"
@@ -685,7 +685,7 @@
 		ad->ad_root = sc->sc_dev;
 		ad->ad_parent = awc->aw_parent;
 
-		acpi_set_node(ad);
+		acpi_match_node_init(ad);
 		acpi_make_name(ad, devinfo->Name);
 
 		/*

Index: src/sys/dev/acpi/acpi_cpu.c
diff -u src/sys/dev/acpi/acpi_cpu.c:1.42 src/sys/dev/acpi/acpi_cpu.c:1.43
--- src/sys/dev/acpi/acpi_cpu.c:1.42	Mon Jun 20 15:33:49 2011
+++ src/sys/dev/acpi/acpi_cpu.c	Tue Jun 21 03:37:21 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu.c,v 1.42 2011/06/20 15:33:49 jruoho Exp $ */
+/* $NetBSD: acpi_cpu.c,v 1.43 2011/06/21 03:37:21 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010, 2011 Jukka Ruohonen 
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu.c,v 1.42 2011/06/20 15:33:49 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu.c,v 1.43 2011/06/21 03:37:21 jruoho Exp $");
 
 #include 
 #include 
@@ -147,7 +147,7 @@
 		return;
 	}
 
-	sc->sc_node = acpi_get_node(hdl);
+	sc->sc_node = acpi_match_node(hdl);
 
 	if (acpicpu_once_attach() != 0) {
 		aprint_normal(": failed to initialize\n");

Index: src/sys/dev/acpi/acpi_pmtr.c
diff -u src/sys/dev/acpi/acpi_pmtr.c:1.5 src/sys/dev/acpi/acpi_pmtr.c:1.6
--- src/sys/dev/acpi/acpi_pmtr.c:1.5	Mon Jun 20 17:21:50 2011
+++ src/sys/dev/acpi/acpi_pmtr.c	Tue Jun 21 03:37:21 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_pmtr.c,v 1.5 2011/06/20 17:21:50 pgoyette Exp $ */
+/*	$NetBSD: acpi_pmtr.c,v 1.6 2011/06/21 03:37:21 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 Jukka Ruohonen 
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_pmtr.c,v 1.5 2011/06/20 17:21:50 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_pmtr.c,v 1.6 2011/06/21 03:37:21 jruoho Exp $");
 
 #include 
 #include 
@@ -292,7 +292,7 @@
 		if (ACPI_FAILURE(rv))
 			continue;
 
-		ad = acpi_get_node(hdl);
+		ad = acpi_match_node(hdl);
 
 		if (ad == NULL)
 			continue;

Index: src/sys/dev/acpi/acpi_power.c
diff -u src/sys/dev/acpi/acpi_power.c:1.31 src/sys/dev/acpi/acpi_power.c:1.32
--- src/sys/dev/acpi/acpi_power.c:1.31	Sun May 22 22:13:33 2011
+++ src/sys/dev/acpi/acpi_power.c	Tue Jun 21 03:37:21 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_power.c,v 1.31 2011/05/22 22:13:33 joerg Exp $ */
+/* $NetBSD: acpi_power.c,v 1.32 2011/06/21 03:37:21 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2009, 2010, 2011 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_power.c,v 1.31 2011/05/22 22:13:33 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_power.c,v 1.32 2011/06/21 03:37:21 jruoho Exp $");
 
 #include 
 #include 
@@ -199,7 +199,7 @@
 void
 acpi_power_deregister(ACPI_HANDLE hdl)
 {
-	struct acpi_devnode *ad = acpi_get_node(hdl);
+	struct acpi_devnode *ad = acpi_match_node(hdl);
 	struct acpi_power_res *res;
 
 	if (ad == NULL)
@@ -218,7 +218,7 @@
 bool
 acpi_power_get(ACPI_HANDLE hdl, int *state)
 {
-	struct acpi_devnode *ad = acpi_get_node(hdl);
+	struct acpi_devnode *ad = acpi_match_node(hdl);
 	ACPI_STATUS rv;
 
 	if (ad == NULL)
@@ -331,7 +331,7 @@
 bool
 acpi_power_set(ACPI_HANDLE hdl, int state)
 {
-	struct acpi_devnode *ad = acpi_get_node(hdl);
+	struct acpi_devnode *ad = acpi_match_node(hdl);
 	ACPI_STATUS rv;
 	char path[5];
 	int old;

Index: src/sys/dev/acpi/acpi_util.c
diff -u src/sys/dev/acpi/acpi_util.c:1.7 src/sys/dev/acpi/acpi_util.c:1.8
--- src/sys/dev/acpi/acpi_util.c:1.7	Mon Jun 20 15:31:52 2011
+++ src/sys/dev/acpi/acpi_util.c	Tue Jun 21 03:37:21 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_util.c,v 1.7

CVS commit: src/lib/libc/stdlib

2011-06-20 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Jun 21 03:02:58 UTC 2011

Modified Files:
src/lib/libc/stdlib: jemalloc.3

Log Message:
Note the potential danger in the options. Fixes PR lib/31112.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/stdlib/jemalloc.3

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/stdlib/jemalloc.3
diff -u src/lib/libc/stdlib/jemalloc.3:1.6 src/lib/libc/stdlib/jemalloc.3:1.7
--- src/lib/libc/stdlib/jemalloc.3:1.6	Wed Jun  8 18:09:57 2011
+++ src/lib/libc/stdlib/jemalloc.3	Tue Jun 21 03:02:57 2011
@@ -34,7 +34,7 @@
 .\" @(#)malloc.3	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.73 2007/06/15 22:32:33 jasone Exp $
 .\"
-.Dd May 14, 2010
+.Dd June 21, 2011
 .Dt JEMALLOC 3
 .Os
 .Sh NAME
@@ -172,8 +172,11 @@
 This is intended for debugging and will impact performance negatively.
 .El
 .Pp
+Extra care should be taken when enabling
+any of the options in production environments.
 The
-.Em J
+.Em A ,
+.Em J ,
 and
 .Em Z
 options are intended for testing and debugging.



CVS commit: src/external/gpl3/gcc

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 21 02:48:28 UTC 2011

Update of /cvsroot/src/external/gpl3/gcc
In directory ivanova.netbsd.org:/tmp/cvs-serv4997

Log Message:
import the non-arch specific makefiles we use to build GCC 4.1
as a base reference.

Status:

Vendor Tag: netbsd
Release Tags:   netbsd-20110620

N src/external/gpl3/gcc/lib/crtstuff4/Makefile
N src/external/gpl3/gcc/lib/crtstuff4/crtbegin.c
N src/external/gpl3/gcc/lib/crtstuff4/crtbeginS.c
N src/external/gpl3/gcc/lib/crtstuff4/crtbeginT.c
N src/external/gpl3/gcc/lib/crtstuff4/crtend.c
N src/external/gpl3/gcc/lib/crtstuff4/crtendS.c
N src/external/gpl3/gcc/lib/libgcc4/Makefile
N src/external/gpl3/gcc/lib/libgcc4/Makefile.inc
N src/external/gpl3/gcc/lib/libgcc4/Makefile.srcs
N src/external/gpl3/gcc/lib/libgcc4/Makefile.wrapper
N src/external/gpl3/gcc/lib/libgcc4/libgcc/Makefile
N src/external/gpl3/gcc/lib/libgcc4/libgcc_eh/Makefile
N src/external/gpl3/gcc/lib/libgcc4/libgcc_s/Makefile
N src/external/gpl3/gcc/lib/libgcc4/libgcov/Makefile
N src/external/gpl3/gcc/lib/libobjc4/Makefile
N src/external/gpl3/gcc/lib/libstdc++-v3_4/Makefile
N src/external/gpl3/gcc/lib/libstdc++-v3_4/include/Makefile
N src/external/gpl3/gcc/lib/libstdc++-v3_4/include/backward/Makefile
N src/external/gpl3/gcc/lib/libstdc++-v3_4/include/bits/Makefile
N src/external/gpl3/gcc/lib/libstdc++-v3_4/include/debug/Makefile
N src/external/gpl3/gcc/lib/libstdc++-v3_4/include/ext/Makefile
N src/external/gpl3/gcc/lib/libstdc++-v3_4/include/tr1/Makefile
N src/external/gpl3/gcc/lib/libsupc++4/Makefile
N src/external/gpl3/gcc/lib/libsupc++4/Makefile.common
N src/external/gpl3/gcc/usr.bin/gcc4/Makefile
N src/external/gpl3/gcc/usr.bin/gcc4/Makefile.backend
N src/external/gpl3/gcc/usr.bin/gcc4/Makefile.frontend
N src/external/gpl3/gcc/usr.bin/gcc4/Makefile.inc
N src/external/gpl3/gcc/usr.bin/gcc4/Makefile.libcpp
N src/external/gpl3/gcc/usr.bin/gcc4/backend/Makefile
N src/external/gpl3/gcc/usr.bin/gcc4/cc1/Makefile
N src/external/gpl3/gcc/usr.bin/gcc4/cc1obj/Makefile
N src/external/gpl3/gcc/usr.bin/gcc4/cc1plus/Makefile
N src/external/gpl3/gcc/usr.bin/gcc4/cpp/Makefile
N src/external/gpl3/gcc/usr.bin/gcc4/frontend/Makefile
N src/external/gpl3/gcc/usr.bin/gcc4/g++/Makefile
N src/external/gpl3/gcc/usr.bin/gcc4/gcc/Makefile
N src/external/gpl3/gcc/usr.bin/gcc4/gcov/Makefile
N src/external/gpl3/gcc/usr.bin/gcc4/host-libiberty/Makefile
N src/external/gpl3/gcc/usr.bin/gcc4/include/Makefile
N src/external/gpl3/gcc/usr.bin/gcc4/libcpp/Makefile
N src/external/gpl3/gcc/usr.bin/gcc4/libiberty/Makefile
N src/external/gpl3/gcc/usr.bin/gcc4/libiberty/defs.mk
N src/external/gpl3/gcc/usr.bin/gcc4/protoize/Makefile
N src/external/gpl3/gcc/usr.bin/gcc4/unprotoize/Makefile

No conflicts created by this import



CVS commit: src

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 21 02:32:56 UTC 2011

Modified Files:
src/external/bsd/fetch/lib: Makefile
src/lib/libc: Makefile
src/lib/libedit: Makefile
src/lib/libisns: Makefile
src/lib/libpam/libpam: Makefile

Log Message:
add some XXX'd -Wno-foo if HAVE_GCC >= 45.

XXX: someone should look at these.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/fetch/lib/Makefile
cvs rdiff -u -r1.146 -r1.147 src/lib/libc/Makefile
cvs rdiff -u -r1.41 -r1.42 src/lib/libedit/Makefile
cvs rdiff -u -r1.1.1.1 -r1.2 src/lib/libisns/Makefile
cvs rdiff -u -r1.11 -r1.12 src/lib/libpam/libpam/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/bsd/fetch/lib/Makefile
diff -u src/external/bsd/fetch/lib/Makefile:1.5 src/external/bsd/fetch/lib/Makefile:1.6
--- src/external/bsd/fetch/lib/Makefile:1.5	Tue Oct 20 01:21:28 2009
+++ src/external/bsd/fetch/lib/Makefile	Tue Jun 21 02:32:55 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2009/10/20 01:21:28 joerg Exp $
+# $NetBSD: Makefile,v 1.6 2011/06/21 02:32:55 mrg Exp $
 
 LIB=		fetch
 SRCS=		fetch.c common.c ftp.c http.c file.c
@@ -37,3 +37,8 @@
 	${LIBFETCHDIR}/http.errors > ${.TARGET}
 
 .include 
+
+.if ${HAVE_GCC} == 45
+# XXX
+COPTS.ftp.c+=	-Wno-array-bounds
+.endif

Index: src/lib/libc/Makefile
diff -u src/lib/libc/Makefile:1.146 src/lib/libc/Makefile:1.147
--- src/lib/libc/Makefile:1.146	Sun Jun 19 11:31:55 2011
+++ src/lib/libc/Makefile	Tue Jun 21 02:32:55 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.146 2011/06/19 11:31:55 nakayama Exp $
+#	$NetBSD: Makefile,v 1.147 2011/06/21 02:32:55 mrg Exp $
 #	@(#)Makefile	8.2 (Berkeley) 2/3/94
 #
 # All library objects contain sccsid strings by default; they may be
@@ -147,3 +147,10 @@
 # force the dynamic linker to initialize libc first
 SHLIB_SHFLAGS+=	-Wl,-z,initfirst
 
+# XXX
+.if ${HAVE_GCC} >= 45
+COPTS.res_comp.c+= -Wno-cast-qual
+COPTS.vfwprintf.c+= -Wno-cast-qual
+COPTS.vfprintf.c+= -Wno-cast-qual
+COPTS.vswprintf.c+= -Wno-cast-qual
+.endif

Index: src/lib/libedit/Makefile
diff -u src/lib/libedit/Makefile:1.41 src/lib/libedit/Makefile:1.42
--- src/lib/libedit/Makefile:1.41	Wed Feb  3 15:34:43 2010
+++ src/lib/libedit/Makefile	Tue Jun 21 02:32:55 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.41 2010/02/03 15:34:43 roy Exp $
+#	$NetBSD: Makefile,v 1.42 2011/06/21 02:32:55 mrg Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/4/93
 
 USE_SHLIBDIR=	yes
@@ -113,10 +113,17 @@
 	mv ${.TARGET}.tmp ${.TARGET}
 
 tc1.o:	${LIBEDITDIR}/TEST/tc1.c
-	
+
 tc1:	libedit.a tc1.o 
 	${_MKTARGET_LINK}
 	${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} -ltermlib
 
 .include 
 .include 
+
+# XXX
+.if ${HAVE_GCC} >= 45
+COPTS.editline.c+=	-Wno-cast-qual
+COPTS.tokenizer.c+=	-Wno-cast-qual
+COPTS.tokenizern.c+=	-Wno-cast-qual
+.endif

Index: src/lib/libisns/Makefile
diff -u src/lib/libisns/Makefile:1.1.1.1 src/lib/libisns/Makefile:1.2
--- src/lib/libisns/Makefile:1.1.1.1	Sun Jan 16 01:22:50 2011
+++ src/lib/libisns/Makefile	Tue Jun 21 02:32:55 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1.1.1 2011/01/16 01:22:50 agc Exp $
+#	$NetBSD: Makefile,v 1.2 2011/06/21 02:32:55 mrg Exp $
 
 .include 
 
@@ -14,3 +14,7 @@
 WARNS=	4
 
 .include 
+
+.if ${HAVE_GCC} >= 45
+COPTS.isns_pdu.c+=	-fno-strict-aliasing
+.endif

Index: src/lib/libpam/libpam/Makefile
diff -u src/lib/libpam/libpam/Makefile:1.11 src/lib/libpam/libpam/Makefile:1.12
--- src/lib/libpam/libpam/Makefile:1.11	Fri Dec 10 20:06:17 2010
+++ src/lib/libpam/libpam/Makefile	Tue Jun 21 02:32:55 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2010/12/10 20:06:17 joerg Exp $
+# $NetBSD: Makefile,v 1.12 2011/06/21 02:32:55 mrg Exp $
 #-
 # Copyright (c) 1998 Juniper Networks, Inc.
 # All rights reserved.
@@ -191,3 +191,8 @@
 .PATH.h: ${DIST}/include
 .PATH.c: ${DIST}/lib
 .PATH.3: ${DIST}/doc/man
+
+# XXX
+.if ${HAVE_GCC} >= 45
+COPTS.openpam_dispatch.c+=	-Wno-cast-qual
+.endif



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 21 02:19:30 UTC 2011

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto: Makefile

Log Message:
adjust a grep pattern to (only) match the right line with GCC 4.5.
from chuq.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/Makefile

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/Makefile:1.4	Mon Jun  6 06:44:57 2011
+++ src/crypto/external/bsd/openssl/lib/libcrypto/Makefile	Tue Jun 21 02:19:30 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2011/06/06 06:44:57 spz Exp $
+#	$NetBSD: Makefile,v 1.5 2011/06/21 02:19:30 mrg Exp $
 
 # RCSid:
 #	Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@@ -50,7 +50,7 @@
 ${SRCS}: buildinf.h
 buildinf.h: Makefile
 	@echo "#ifndef MK1MF_BUILD" >buildinf.h
-	@echo "#define CFLAGS \"`${CC} -v 2>&1 | grep version`\"" >>buildinf.h
+	@echo "#define CFLAGS \"`${CC} -v 2>&1 | grep 'gcc version'`\"" >>buildinf.h
 	@echo "#define PLATFORM \"NetBSD-${MACHINE_ARCH}\"" >>buildinf.h
 	@echo "#define DATE \"NetBSD ${OS_VERSION}\"" >>buildinf.h
 	@echo "#endif" >>buildinf.h



CVS commit: src/tools

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 21 02:15:41 UTC 2011

Modified Files:
src/tools: Makefile

Log Message:
always build gmake if HAVE_GCC.
build gmp, mpfr and then mpc if HAVE_GCC >= 45.


To generate a diff of this commit:
cvs rdiff -u -r1.145 -r1.146 src/tools/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.145 src/tools/Makefile:1.146
--- src/tools/Makefile:1.145	Fri Apr 15 18:05:45 2011
+++ src/tools/Makefile	Tue Jun 21 02:15:41 2011
@@ -1,12 +1,15 @@
-#	$NetBSD: Makefile,v 1.145 2011/04/15 18:05:45 elric Exp $
+#	$NetBSD: Makefile,v 1.146 2011/06/21 02:15:41 mrg Exp $
 
 .include 
 
 .if defined(HAVE_GCC)
-.if ${HAVE_GCC} == "4"
 TOOLCHAIN_BITS= gmake .WAIT
-.endif
 .if ${TOOLCHAIN_MISSING} == "no"
+.if ${HAVE_GCC} >= 45
+TOOLCHAIN_BITS+= gmp .WAIT
+TOOLCHAIN_BITS+= mpfr .WAIT
+TOOLCHAIN_BITS+= mpc .WAIT
+.endif
 TOOLCHAIN_BITS+= binutils .WAIT
 TOOLCHAIN_BITS+= gcc
 .  if ${MKCROSSGDB:Uno} != "no"



CVS commit: src/doc

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Jun 21 01:53:19 UTC 2011

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
note mpc 0.9, mpfr 3.0.1, GNU MP 5.0.2 and GCC 4.5.3 imports.


To generate a diff of this commit:
cvs rdiff -u -r1.846 -r1.847 src/doc/3RDPARTY
cvs rdiff -u -r1.1569 -r1.1570 src/doc/CHANGES

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.846 src/doc/3RDPARTY:1.847
--- src/doc/3RDPARTY:1.846	Tue Jun 14 15:29:11 2011
+++ src/doc/3RDPARTY	Tue Jun 21 01:53:18 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.846 2011/06/14 15:29:11 jmmv Exp $
+#	$NetBSD: 3RDPARTY,v 1.847 2011/06/21 01:53:18 mrg Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -332,14 +332,14 @@
 There is a flex2netbsd script to help newer imports.
 
 Package:	gcc
-Version:	4.1.3-20080831
-Current Vers:	4.5.1
+Version:	4.1.3-20080831/4.5.3
+Current Vers:	4.6.0
 Maintainer:	FSF
 Archive Site:	ftp://ftp.gnu.org/gnu/gcc/
 Home Page:	http://www.gnu.org/software/gcc/
 Mailing List:	gcc-b...@gnu.org
 Responsible:	thorpej, mrg
-License:	GPLv2, LGPLv2.1
+License:	GPLv3, LGPLv3.1
 Notes:
 before importing:
 	- delete all .cvsignore and .brik files
@@ -348,6 +348,12 @@
 for GCC4:
 	- delete all fortran and testsuites
 	- update gcc/version.c for the NetBSD GCC date
+for GCC 4.5:
+	- use core/c++/objc/testsuite tarballs
+	- delete:
+		gcc/testsuite/ada
+		gcc/testsuite/gfortran*
+		gcc/testsuite/gnat.dg
 
 Package:	gdb
 Version:	6.5
@@ -1178,3 +1184,36 @@
 1. See prepare-import script for stripping down the distribution.
 2. Update configure.ac and use it to generate include/config.h.
 3. Carefully check for GPL components leaked into the dist area.
+
+Package:	mpc
+Version:	0.9
+Current Vers:	0.9
+Maintainer:	
+Archive Site:	http://www.multiprecision.org/mpc/download/
+Home Page:	http://www.multiprecision.org/mpc/
+Mailing List:	http://www.multiprecision.org/index.php?prog=mpc&page=development
+Responsible:	mrg
+License:	LGPL2
+Notes:
+
+Package:	mpfr
+Version:	3.0.1
+Current Vers:	3.0.1
+Maintainer:	
+Archive Site:	http://www.mpfr.org/mpfr-current/
+Home Page:	http://www.mpfr.org/
+Mailing List:	http://websympa.loria.fr/wwsympa/arc/mpfr-announce
+Responsible:	mrg
+License:	LGPL3
+Notes:
+
+Package:	GNU MP
+Version:	5.0.2
+Current Vers:	5.0.2
+Maintainer:	http://gmplib.org/mailman/listinfo/gmp-devel
+Archive Site:	http://gmplib.org/
+Home Page:	http://gmplib.org/
+Mailing List:	http://gmplib.org/mailman/listinfo/gmp-announce
+Responsible:	mrg
+License:	LGPL3
+Notes:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1569 src/doc/CHANGES:1.1570
--- src/doc/CHANGES:1.1569	Mon Jun 20 19:48:28 2011
+++ src/doc/CHANGES	Tue Jun 21 01:53:18 2011
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1569 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1570 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1041,4 +1041,8 @@
 	alpha: support for Avalon A12 removed [matt 20110617]
 	sparc64: Add fast softint(9) support. [nakayama 20110618]
 	zaurus: Add ioexp driver for SL-C1000. [nonaka 20110619]
+	mpc: Import mpc 0.9.  [mrg 20110619]
+	mpfr: Import mpfr 3.0.1.  [mrg 20110619]
+	GMP: Import GNU MP 5.0.2.  [mrg 20110619]
 	sandpoint: Add support for booting from RAID 1 [jdc 20110620]
+	GCC: Import version 4.5.3.  [mrg 20110620]



CVS commit: src/tests/syscall

2011-06-20 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue Jun 21 01:45:26 UTC 2011

Modified Files:
src/tests/syscall: t_truncate.c

Log Message:
Require unprivileged runs when appropriate.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/syscall/t_truncate.c

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

Modified files:

Index: src/tests/syscall/t_truncate.c
diff -u src/tests/syscall/t_truncate.c:1.1 src/tests/syscall/t_truncate.c:1.2
--- src/tests/syscall/t_truncate.c:1.1	Mon Jun 20 18:03:41 2011
+++ src/tests/syscall/t_truncate.c	Tue Jun 21 01:45:26 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_truncate.c,v 1.1 2011/06/20 18:03:41 jruoho Exp $ */
+/* $NetBSD: t_truncate.c,v 1.2 2011/06/21 01:45:26 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_truncate.c,v 1.1 2011/06/20 18:03:41 jruoho Exp $");
+__RCSID("$NetBSD: t_truncate.c,v 1.2 2011/06/21 01:45:26 jruoho Exp $");
 
 #include 
 
@@ -84,6 +84,7 @@
 ATF_TC_HEAD(ftruncate_err, tc)
 {
 	atf_tc_set_md_var(tc, "descr", "Test errors from ftruncate(2)");
+	atf_tc_set_md_var(tc, "require.user", "unprivileged");
 }
 
 ATF_TC_BODY(ftruncate_err, tc)
@@ -143,6 +144,7 @@
 ATF_TC_HEAD(truncate_err, tc)
 {
 	atf_tc_set_md_var(tc, "descr", "Test errors from truncate(2)");
+	atf_tc_set_md_var(tc, "require.user", "unprivileged");
 }
 
 ATF_TC_BODY(truncate_err, tc)



CVS commit: src/sys/uvm

2011-06-20 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Mon Jun 20 23:18:58 UTC 2011

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

Log Message:
band-aid fix after the merge of rmind-uvmplock branch.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/uvm/uvm_pdpolicy_clockpro.c

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

Modified files:

Index: src/sys/uvm/uvm_pdpolicy_clockpro.c
diff -u src/sys/uvm/uvm_pdpolicy_clockpro.c:1.16 src/sys/uvm/uvm_pdpolicy_clockpro.c:1.17
--- src/sys/uvm/uvm_pdpolicy_clockpro.c:1.16	Sat Feb  5 13:33:47 2011
+++ src/sys/uvm/uvm_pdpolicy_clockpro.c	Mon Jun 20 23:18:58 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pdpolicy_clockpro.c,v 1.16 2011/02/05 13:33:47 yamt Exp $	*/
+/*	$NetBSD: uvm_pdpolicy_clockpro.c,v 1.17 2011/06/20 23:18:58 yamt Exp $	*/
 
 /*-
  * Copyright (c)2005, 2006 YAMAMOTO Takashi,
@@ -43,7 +43,7 @@
 #else /* defined(PDSIM) */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_pdpolicy_clockpro.c,v 1.16 2011/02/05 13:33:47 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pdpolicy_clockpro.c,v 1.17 2011/06/20 23:18:58 yamt Exp $");
 
 #include "opt_ddb.h"
 
@@ -54,6 +54,7 @@
 #include 
 
 #include 
+#include 	/* for uvmpd_trylockowner */
 #include 
 #include 
 
@@ -117,6 +118,9 @@
 PDPOL_EVCNT_DEFINE(speculativehit2)
 PDPOL_EVCNT_DEFINE(speculativemiss)
 
+PDPOL_EVCNT_DEFINE(locksuccess)
+PDPOL_EVCNT_DEFINE(lockfail)
+
 #define	PQ_REFERENCED	PQ_PRIVATE1
 #define	PQ_HOT		PQ_PRIVATE2
 #define	PQ_TEST		PQ_PRIVATE3
@@ -630,21 +634,37 @@
 }
 
 static void
-clockpro_movereferencebit(struct vm_page *pg)
+clockpro_movereferencebit(struct vm_page *pg, bool locked)
 {
+	kmutex_t *lock;
 	bool referenced;
 
+	KASSERT(!locked || uvm_page_locked_p(pg));
+	if (!locked) {
+		lock = uvmpd_trylockowner(pg);
+		if (lock == NULL) {
+			/*
+			 * XXXuvmplock
+			 */
+			PDPOL_EVCNT_INCR(lockfail);
+			return;
+		}
+		PDPOL_EVCNT_INCR(locksuccess);
+	}
 	referenced = pmap_clear_reference(pg);
+	if (!locked) {
+		mutex_exit(lock);
+	}
 	if (referenced) {
 		pg->pqflags |= PQ_REFERENCED;
 	}
 }
 
 static void
-clockpro_clearreferencebit(struct vm_page *pg)
+clockpro_clearreferencebit(struct vm_page *pg, bool locked)
 {
 
-	clockpro_movereferencebit(pg);
+	clockpro_movereferencebit(pg, locked);
 	pg->pqflags &= ~PQ_REFERENCED;
 }
 
@@ -660,7 +680,7 @@
 		KASSERT(pg != NULL);
 		KASSERT(clockpro_getq(pg) == CLOCKPRO_NEWQ);
 		if ((pg->pqflags & PQ_INITIALREF) != 0) {
-			clockpro_clearreferencebit(pg);
+			clockpro_clearreferencebit(pg, false);
 			pg->pqflags &= ~PQ_INITIALREF;
 		}
 		/* place at the list head */
@@ -763,7 +783,7 @@
 		pg->pqflags |= PQ_TEST;
 	}
 	s->s_ncold++;
-	clockpro_clearreferencebit(pg);
+	clockpro_clearreferencebit(pg, false);
 	clockpro___enqueuetail(pg);
 #else /* defined(USEONCE2) */
 	if (speculative) {
@@ -929,7 +949,7 @@
 		dump("hot done");
 		return;
 	}
-	clockpro_movereferencebit(pg);
+	clockpro_movereferencebit(pg, false);
 	if ((pg->pqflags & PQ_REFERENCED) == 0) {
 		PDPOL_EVCNT_INCR(hhotunref);
 		uvmexp.pddeact++;
@@ -1016,7 +1036,7 @@
 #endif /* defined(LISTQ) */
 		KASSERT((pg->pqflags & PQ_HOT) == 0);
 		uvmexp.pdscans++;
-		clockpro_movereferencebit(pg);
+		clockpro_movereferencebit(pg, false);
 		if ((pg->pqflags & PQ_SPECULATIVE) != 0) {
 			KASSERT((pg->pqflags & PQ_TEST) == 0);
 			if ((pg->pqflags & PQ_REFERENCED) != 0) {
@@ -1088,7 +1108,7 @@
 uvmpdpol_pagedeactivate(struct vm_page *pg)
 {
 
-	clockpro_clearreferencebit(pg);
+	clockpro_clearreferencebit(pg, true);
 }
 
 void
@@ -1110,7 +1130,7 @@
 	if (uvmpdpol_pageisqueued_p(pg)) {
 		return;
 	}
-	clockpro_clearreferencebit(pg);
+	clockpro_clearreferencebit(pg, true);
 	pg->pqflags |= PQ_SPECULATIVE;
 	clockpro_pageenqueue(pg);
 #else
@@ -1267,6 +1287,12 @@
 
 #if defined(DDB)
 
+#if 0 /* XXXuvmplock */
+#define	_pmap_is_referenced(pg)	pmap_is_referenced(pg)
+#else
+#define	_pmap_is_referenced(pg)	false
+#endif
+
 void clockpro_dump(void);
 
 void
@@ -1299,7 +1325,7 @@
 		if ((pg->pqflags & PQ_INITIALREF) != 0) { \
 			ninitialref++; \
 		} else if ((pg->pqflags & PQ_REFERENCED) != 0 || \
-		pmap_is_referenced(pg)) { \
+		_pmap_is_referenced(pg)) { \
 			nref++; \
 		} \
 	}
@@ -1381,7 +1407,7 @@
 		(pg->pqflags & PQ_HOT) ? "H" : "",
 		(pg->pqflags & PQ_TEST) ? "T" : "",
 		(pg->pqflags & PQ_REFERENCED) ? "R" : "",
-		pmap_is_referenced(pg) ? "r" : "",
+		_pmap_is_referenced(pg) ? "r" : "",
 		(pg->pqflags & PQ_INITIALREF) ? "I" : "",
 		(pg->pqflags & PQ_SPECULATIVE) ? "S" : ""
 		);



CVS commit: src/distrib/alpha/instkernel/ramdisk

2011-06-20 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Jun 20 23:00:53 UTC 2011

Modified Files:
src/distrib/alpha/instkernel/ramdisk: list

Log Message:
Add -lbz2 and -llzma so that this links again.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/distrib/alpha/instkernel/ramdisk/list

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

Modified files:

Index: src/distrib/alpha/instkernel/ramdisk/list
diff -u src/distrib/alpha/instkernel/ramdisk/list:1.41 src/distrib/alpha/instkernel/ramdisk/list:1.42
--- src/distrib/alpha/instkernel/ramdisk/list:1.41	Mon Jun 20 13:09:38 2011
+++ src/distrib/alpha/instkernel/ramdisk/list	Mon Jun 20 23:00:53 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.41 2011/06/20 13:09:38 tsutsui Exp $
+#	$NetBSD: list,v 1.42 2011/06/20 23:00:53 he Exp $
 
 SRCDIRS	bin sbin usr.bin/less usr.bin usr.sbin
 
@@ -60,7 +60,7 @@
 SPECIAL	gzip		srcdir	distrib/utils/x_gzip
 SPECIAL	ping		srcdir	distrib/utils/x_ping
 
-LIBS	-ledit -lutil -lcurses -lterminfo -lrmt -lcrypt -ll -lm -lz -lprop
+LIBS	-ledit -lutil -lcurses -lterminfo -lrmt -lcrypt -ll -lm -lz -lbz2 -llzma -lprop
 
 # we need the boot blocks /usr/mdec
 COPY	${DESTDIR}/usr/mdec/boot		usr/mdec/boot



CVS commit: src/sys/dev/pci

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 22:03:16 UTC 2011

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

Log Message:
Initialize current value for ENVSYS_DRIVE sensors


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/pci/arcmsr.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/arcmsr.c
diff -u src/sys/dev/pci/arcmsr.c:1.29 src/sys/dev/pci/arcmsr.c:1.30
--- src/sys/dev/pci/arcmsr.c:1.29	Mon Jun 20 17:29:06 2011
+++ src/sys/dev/pci/arcmsr.c	Mon Jun 20 22:03:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: arcmsr.c,v 1.29 2011/06/20 17:29:06 pgoyette Exp $ */
+/*	$NetBSD: arcmsr.c,v 1.30 2011/06/20 22:03:16 pgoyette Exp $ */
 /*	$OpenBSD: arc.c,v 1.68 2007/10/27 03:28:27 dlg Exp $ */
 
 /*
@@ -21,7 +21,7 @@
 #include "bio.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: arcmsr.c,v 1.29 2011/06/20 17:29:06 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arcmsr.c,v 1.30 2011/06/20 22:03:16 pgoyette Exp $");
 
 #include 
 #include 
@@ -1747,6 +1747,8 @@
 
 		sc->sc_arc_sensors[count].arc_sensor.units = ENVSYS_DRIVE;
 		sc->sc_arc_sensors[count].arc_sensor.state = ENVSYS_SINVALID;
+		sc->sc_arc_sensors[count].arc_sensor.value_cur =
+		ENVSYS_DRIVE_EMPTY;
 		sc->sc_arc_sensors[count].arc_sensor.flags =
 		ENVSYS_FMONSTCHANGED;
 
@@ -1778,6 +1780,8 @@
 			ENVSYS_SINVALID;
 			sc->sc_arc_sensors[count].arc_sensor.units =
 			ENVSYS_DRIVE;
+			sc->sc_arc_sensors[count].arc_sensor.value_cur =
+			ENVSYS_DRIVE_EMPTY;
 			sc->sc_arc_sensors[count].arc_sensor.flags =
 			ENVSYS_FMONSTCHANGED;
 



CVS commit: src/sys/dev/ic

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 22:02:55 UTC 2011

Modified Files:
src/sys/dev/ic: cac.c ciss.c mfi.c

Log Message:
Initialize current value for ENVSYS_DRIVE sensors


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/ic/cac.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/ic/ciss.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/ic/mfi.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/ic/cac.c
diff -u src/sys/dev/ic/cac.c:1.52 src/sys/dev/ic/cac.c:1.53
--- src/sys/dev/ic/cac.c:1.52	Mon Jun 20 17:48:45 2011
+++ src/sys/dev/ic/cac.c	Mon Jun 20 22:02:55 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cac.c,v 1.52 2011/06/20 17:48:45 pgoyette Exp $	*/
+/*	$NetBSD: cac.c,v 1.53 2011/06/20 22:02:55 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2006, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.52 2011/06/20 17:48:45 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.53 2011/06/20 22:02:55 pgoyette Exp $");
 
 #include "bio.h"
 
@@ -684,6 +684,7 @@
 	for (i = 0; i < nsensors; i++) {
 		sc->sc_sensor[i].units = ENVSYS_DRIVE;
 		sc->sc_sensor[i].state = ENVSYS_SINVALID;
+		sc->sc_sensor[i].value_cur = ENVSYS_DRIVE_EMPTY;
 		/* Enable monitoring for drive state changes */
 		sc->sc_sensor[i].flags |= ENVSYS_FMONSTCHANGED;
 		/* logical drives */

Index: src/sys/dev/ic/ciss.c
diff -u src/sys/dev/ic/ciss.c:1.26 src/sys/dev/ic/ciss.c:1.27
--- src/sys/dev/ic/ciss.c:1.26	Mon Jun 20 17:48:45 2011
+++ src/sys/dev/ic/ciss.c	Mon Jun 20 22:02:55 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ciss.c,v 1.26 2011/06/20 17:48:45 pgoyette Exp $	*/
+/*	$NetBSD: ciss.c,v 1.27 2011/06/20 22:02:55 pgoyette Exp $	*/
 /*	$OpenBSD: ciss.c,v 1.14 2006/03/13 16:02:23 mickey Exp $	*/
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.26 2011/06/20 17:48:45 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.27 2011/06/20 22:02:55 pgoyette Exp $");
 
 #include "bio.h"
 
@@ -1422,6 +1422,7 @@
 	for (i = 0; i < nsensors; i++) {
 		sc->sc_sensor[i].units = ENVSYS_DRIVE;
 		sc->sc_sensor[i].state = ENVSYS_SINVALID;
+		sc->sc_sensor[i].value_cur = ENVSYS_DRIVE_EMPTY;
 		/* Enable monitoring for drive state changes */
 		sc->sc_sensor[i].flags |= ENVSYS_FMONSTCHANGED;
 		/* logical drives */

Index: src/sys/dev/ic/mfi.c
diff -u src/sys/dev/ic/mfi.c:1.35 src/sys/dev/ic/mfi.c:1.36
--- src/sys/dev/ic/mfi.c:1.35	Mon Jun 20 17:48:46 2011
+++ src/sys/dev/ic/mfi.c	Mon Jun 20 22:02:55 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mfi.c,v 1.35 2011/06/20 17:48:46 pgoyette Exp $ */
+/* $NetBSD: mfi.c,v 1.36 2011/06/20 22:02:55 pgoyette Exp $ */
 /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */
 /*
  * Copyright (c) 2006 Marco Peereboom 
@@ -17,7 +17,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.35 2011/06/20 17:48:46 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.36 2011/06/20 22:02:55 pgoyette Exp $");
 
 #include "bio.h"
 
@@ -2022,6 +2022,7 @@
 	for (i = 0; i < nsensors; i++) {
 		sc->sc_sensor[i].units = ENVSYS_DRIVE;
 		sc->sc_sensor[i].state = ENVSYS_SINVALID;
+		sc->sc_sensor[i].value_cur = ENVSYS_DRIVE_EMPTY;
 		/* Enable monitoring for drive state changes */
 		sc->sc_sensor[i].flags |= ENVSYS_FMONSTCHANGED;
 		/* logical drives */



CVS commit: src

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jun 20 21:45:17 UTC 2011

Modified Files:
src/distrib/sets/lists/comp: ad.powerpc
src/sys/arch/powerpc/include: Makefile pmap.h vmparam.h

Log Message:
Readd powerpc/include/vmparam.h to the set lists
Export it to powerpc/include.h
Protect pmap.h and vmparam.h from getting an #error when included
from userland.
Export safe definitions of VM_MAXUSER_ADDRESS, VM_MIN_ADDRESS,
VM_MAX_ADDRESS when _RUMPKERNEL is defined.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/distrib/sets/lists/comp/ad.powerpc
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/powerpc/include/Makefile
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/powerpc/include/pmap.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/include/vmparam.h

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.powerpc
diff -u src/distrib/sets/lists/comp/ad.powerpc:1.50 src/distrib/sets/lists/comp/ad.powerpc:1.51
--- src/distrib/sets/lists/comp/ad.powerpc:1.50	Sun Jun  5 16:52:22 2011
+++ src/distrib/sets/lists/comp/ad.powerpc	Mon Jun 20 21:45:16 2011
@@ -1,4 +1,4 @@
-# $NetBSD: ad.powerpc,v 1.50 2011/06/05 16:52:22 matt Exp $
+# $NetBSD: ad.powerpc,v 1.51 2011/06/20 21:45:16 matt Exp $
 ./usr/bin/elf2aoutcomp-sysutil-bin
 ./usr/bin/psim	comp-debug-bin		gdb,gdb=6
 ./usr/include/altivec.hcomp-obsolete		obsolete
@@ -79,7 +79,7 @@
 ./usr/include/powerpc/types.h			comp-c-include
 ./usr/include/powerpc/va-ppc.h			comp-obsolete		obsolete
 ./usr/include/powerpc/varargs.h			comp-c-include
-./usr/include/powerpc/vmparam.h			comp-obsolete		obsolete
+./usr/include/powerpc/vmparam.h			comp-c-include
 ./usr/include/powerpc/wchar_limits.h		comp-c-include
 ./usr/libdata/debug/usr/bin/elf2aout.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/bin/fdformat.debug	comp-util-debug		debug

Index: src/sys/arch/powerpc/include/Makefile
diff -u src/sys/arch/powerpc/include/Makefile:1.36 src/sys/arch/powerpc/include/Makefile:1.37
--- src/sys/arch/powerpc/include/Makefile:1.36	Sun Jun  5 16:52:25 2011
+++ src/sys/arch/powerpc/include/Makefile	Mon Jun 20 21:45:16 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.36 2011/06/05 16:52:25 matt Exp $
+#	$NetBSD: Makefile,v 1.37 2011/06/20 21:45:16 matt Exp $
 
 .if !defined(INCSDIR)
 INCSDIR?= /usr/include/powerpc
@@ -19,7 +19,7 @@
 	reg.h reloc.h rwlock.h \
 	setjmp.h signal.h stdarg.h \
 	trap.h types.h \
-	varargs.h \
+	varargs.h vmparam.h \
 	wchar_limits.h
 
 .include 

Index: src/sys/arch/powerpc/include/pmap.h
diff -u src/sys/arch/powerpc/include/pmap.h:1.37 src/sys/arch/powerpc/include/pmap.h:1.38
--- src/sys/arch/powerpc/include/pmap.h:1.37	Mon Jun 20 20:24:28 2011
+++ src/sys/arch/powerpc/include/pmap.h	Mon Jun 20 21:45:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.37 2011/06/20 20:24:28 matt Exp $	*/
+/*	$NetBSD: pmap.h,v 1.38 2011/06/20 21:45:16 matt Exp $	*/
 
 #ifndef _POWERPC_PMAP_H_
 #define _POWERPC_PMAP_H_
@@ -16,7 +16,7 @@
 #include 
 #elif defined(PPC_OEA) || defined (PPC_OEA64) || defined (PPC_OEA64_BRIDGE)
 #include 
-#else
+#elif defined(_KERNEL)
 #error unknown PPC variant
 #endif
 

Index: src/sys/arch/powerpc/include/vmparam.h
diff -u src/sys/arch/powerpc/include/vmparam.h:1.15 src/sys/arch/powerpc/include/vmparam.h:1.16
--- src/sys/arch/powerpc/include/vmparam.h:1.15	Mon Jun 20 20:24:28 2011
+++ src/sys/arch/powerpc/include/vmparam.h	Mon Jun 20 21:45:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.15 2011/06/20 20:24:28 matt Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.16 2011/06/20 21:45:16 matt Exp $	*/
 
 #ifndef _POWERPC_VMPARAM_H_
 #define _POWERPC_VMPARAM_H_
@@ -36,6 +36,17 @@
 #define	MIN_PAGE_SIZE	4096		/* BOOKE/OEA */
 #define	MAX_PAGE_SIZE	16384		/* IBM4XX */
 
+#if defined(_RUMPKERNEL)
+/*
+ * Safe definitions for RUMP kernels
+ */
+#define	VM_MAXUSER_ADDRESS	0x7fff8000
+#define	VM_MIN_ADDRESS		0x
+#define	VM_MAX_ADDRESS		VM_MAXUSER_ADDRESS
+#define	MAXDSIZ			(1024*1024*1024)
+#define	MAXSSIZ			(32*1024*1024)
+#define	MAXTSIZ			(256*1024*1024)
+#else /* !_RUMPKERNEL */
 /*
  * Some modules need some of the constants but those vary between the variants
  * so those constants are exported as linker symbols so they don't take up any
@@ -44,6 +55,7 @@
 extern const char __USRSTACK;		/* let the linker resolve it */
 
 #define USRSTACK	((vaddr_t)(uintptr_t)&__USRSTACK)
+#endif /* !_RUMPKERNEL */
 
 #else /* !_MODULE */
 
@@ -53,7 +65,7 @@
 #include 
 #elif defined(PPC_OEA) || defined (PPC_OEA64) || defined (PPC_OEA64_BRIDGE)
 #include 
-#else
+#elif defined(_KERNEL)
 #error unknown PPC variant
 #endif
 



CVS commit: src/distrib/evbppc/ramdisk

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jun 20 21:39:19 UTC 2011

Modified Files:
src/distrib/evbppc/ramdisk: Makefile

Log Message:
Make sure to build -fno-pie -fno-pic in case MKPIE=yes


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/distrib/evbppc/ramdisk/Makefile

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

Modified files:

Index: src/distrib/evbppc/ramdisk/Makefile
diff -u src/distrib/evbppc/ramdisk/Makefile:1.9 src/distrib/evbppc/ramdisk/Makefile:1.10
--- src/distrib/evbppc/ramdisk/Makefile:1.9	Tue Jan 18 01:25:29 2011
+++ src/distrib/evbppc/ramdisk/Makefile	Mon Jun 20 21:39:18 2011
@@ -1,14 +1,14 @@
-#	$NetBSD: Makefile,v 1.9 2011/01/18 01:25:29 matt Exp $
+#	$NetBSD: Makefile,v 1.10 2011/06/20 21:39:18 matt Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 IMAGE=		ramdisk.fs
-IMAGESIZE=	2048k
+IMAGESIZE=	2304k
 MAKEFS_FLAGS=	-f 15
 
 WARNS=		1
-DBG=		-Os -mmultiple -mno-string
+DBG=		-Os -mmultiple -mno-string -fno-pie -fno-pic
 
 CRUNCHBIN=	ramdiskbin
 CRUNCHGEN_FLAGS=-d "${DBG}"



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

2011-06-20 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Mon Jun 20 20:25:47 UTC 2011

Modified Files:
src/sys/arch/amiga/stand/bootblock/txlt: txlt.l

Log Message:
Include  for strncmp() prototype.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/amiga/stand/bootblock/txlt/txlt.l

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/txlt/txlt.l
diff -u src/sys/arch/amiga/stand/bootblock/txlt/txlt.l:1.4 src/sys/arch/amiga/stand/bootblock/txlt/txlt.l:1.5
--- src/sys/arch/amiga/stand/bootblock/txlt/txlt.l:1.4	Mon Dec 17 05:45:08 2001
+++ src/sys/arch/amiga/stand/bootblock/txlt/txlt.l	Mon Jun 20 20:25:47 2011
@@ -7,7 +7,9 @@
 \ [._A-Za-z][A-Za-z0-9_.]*/\,		munchit(yytext);
 .	putchar(*yytext);
 %%
-/*	$NetBSD: txlt.l,v 1.4 2001/12/17 05:45:08 mhitch Exp $	*/
+/*	$NetBSD: txlt.l,v 1.5 2011/06/20 20:25:47 he Exp $	*/
+
+#include 
 
 void
 munchit(s)



CVS commit: src/sys/dev/acpi

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 20:25:00 UTC 2011

Modified Files:
src/sys/dev/acpi: acpi_bat.c

Log Message:
Initialize battery capacity sensor value before registering.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sys/dev/acpi/acpi_bat.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/acpi/acpi_bat.c
diff -u src/sys/dev/acpi/acpi_bat.c:1.109 src/sys/dev/acpi/acpi_bat.c:1.110
--- src/sys/dev/acpi/acpi_bat.c:1.109	Wed Feb 16 09:05:12 2011
+++ src/sys/dev/acpi/acpi_bat.c	Mon Jun 20 20:24:59 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_bat.c,v 1.109 2011/02/16 09:05:12 jruoho Exp $	*/
+/*	$NetBSD: acpi_bat.c,v 1.110 2011/06/20 20:24:59 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.109 2011/02/16 09:05:12 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.110 2011/06/20 20:24:59 pgoyette Exp $");
 
 #include 
 #include 
@@ -729,6 +729,9 @@
 
 #undef INITDATA
 
+	sc->sc_sensor[ACPIBAT_CHARGE_STATE].value_cur =
+		ENVSYS_BATTERY_CAPACITY_NORMAL;
+
 	sc->sc_sensor[ACPIBAT_CAPACITY].flags |=
 	ENVSYS_FPERCENT | ENVSYS_FVALID_MAX | ENVSYS_FMONLIMITS;
 



CVS commit: src/sys

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jun 20 20:24:29 UTC 2011

Modified Files:
src/sys/arch/powerpc/booke: booke_pmap.c trap.c
src/sys/arch/powerpc/include: intr.h pmap.h vmparam.h
src/sys/arch/powerpc/include/booke: pmap.h pte.h vmparam.h
src/sys/arch/powerpc/include/ibm4xx: pmap.h vmparam.h
src/sys/arch/powerpc/include/oea: pmap.h vmparam.h
src/sys/common/pmap/tlb: pmap.c pmap.h

Log Message:
PowerPC now exports a common view of cpu.h, vmparam.h and pmap.h
when building a MODULAR kernel or compiling _MODULE.
It should be noted that MODULAR or _MODULE export a view of the kernel
as being MULTIPROCESSOR (even if isn't).
The shared pmap TLB uses mdpg in places where it used mdpg to avoid
deadly embrance inclusion problems.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/booke/booke_pmap.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/powerpc/booke/trap.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/include/intr.h
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/powerpc/include/pmap.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/powerpc/include/vmparam.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/include/booke/pmap.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/include/booke/pte.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/include/booke/vmparam.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/include/ibm4xx/pmap.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/include/ibm4xx/vmparam.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/include/oea/pmap.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/powerpc/include/oea/vmparam.h
cvs rdiff -u -r1.5 -r1.6 src/sys/common/pmap/tlb/pmap.c
cvs rdiff -u -r1.4 -r1.5 src/sys/common/pmap/tlb/pmap.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/powerpc/booke/booke_pmap.c
diff -u src/sys/arch/powerpc/booke/booke_pmap.c:1.5 src/sys/arch/powerpc/booke/booke_pmap.c:1.6
--- src/sys/arch/powerpc/booke/booke_pmap.c:1.5	Sun Jun 12 05:32:38 2011
+++ src/sys/arch/powerpc/booke/booke_pmap.c	Mon Jun 20 20:24:28 2011
@@ -37,13 +37,13 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: booke_pmap.c,v 1.5 2011/06/12 05:32:38 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: booke_pmap.c,v 1.6 2011/06/20 20:24:28 matt Exp $");
 
 #include 
 #include 
 #include 
 
-#include 
+#include 
 
 #include 
 
@@ -265,7 +265,7 @@
 {
 	dcache_zero_page(pa);
 
-	KASSERT(!VM_PAGE_MD_EXECPAGE_P(PHYS_TO_VM_PAGE(pa)));
+	KASSERT(!VM_PAGEMD_EXECPAGE_P(VM_PAGE_TO_MD(PHYS_TO_VM_PAGE(pa;
 }
 
 void
@@ -291,7 +291,7 @@
 		}
 	}
 
-	KASSERT(!VM_PAGE_MD_EXECPAGE_P(PHYS_TO_VM_PAGE(dst - PAGE_SIZE)));
+	KASSERT(!VM_PAGEMD_EXECPAGE_P(VM_PAGE_TO_MD(PHYS_TO_VM_PAGE(dst - PAGE_SIZE;
 }
 
 void

Index: src/sys/arch/powerpc/booke/trap.c
diff -u src/sys/arch/powerpc/booke/trap.c:1.10 src/sys/arch/powerpc/booke/trap.c:1.11
--- src/sys/arch/powerpc/booke/trap.c:1.10	Tue Jun 14 05:50:24 2011
+++ src/sys/arch/powerpc/booke/trap.c	Mon Jun 20 20:24:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.10 2011/06/14 05:50:24 matt Exp $	*/
+/*	$NetBSD: trap.c,v 1.11 2011/06/20 20:24:28 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -39,7 +39,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.10 2011/06/14 05:50:24 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.11 2011/06/20 20:24:28 matt Exp $");
 
 #include 
 #include 
@@ -233,9 +233,10 @@
 		const paddr_t pa = pte_to_paddr(pte);
 		struct vm_page * const pg = PHYS_TO_VM_PAGE(pa);
 		KASSERT(pg);
+		struct vm_page_md * const mdpg = VM_PAGE_TO_MD(pg);
 
-		if (!VM_PAGE_MD_MODIFIED_P(pg)) {
-			pmap_page_set_attributes(pg, VM_PAGE_MD_MODIFIED);
+		if (!VM_PAGEMD_MODIFIED_P(mdpg)) {
+			pmap_page_set_attributes(mdpg, VM_PAGEMD_MODIFIED);
 		}
 		pte &= ~PTE_UNMODIFIED;
 		*ptep = pte;
@@ -294,19 +295,20 @@
 		const paddr_t pa = pte_to_paddr(pte);
 		struct vm_page * const pg = PHYS_TO_VM_PAGE(pa);
 		KASSERT(pg);
+		struct vm_page_md * const mdpg = VM_PAGE_TO_MD(pg);
 
 		UVMHIST_LOG(pmapexechist,
 		"srr0=%#x pg=%p (pa %#"PRIxPADDR"): %s", 
 		tf->tf_srr0, pg, pa, 
-		(VM_PAGE_MD_EXECPAGE_P(pg)
+		(VM_PAGEMD_EXECPAGE_P(mdpg)
 			? "no syncicache (already execpage)"
 			: "performed syncicache (now execpage)"));
 
-		if (!VM_PAGE_MD_EXECPAGE_P(pg)) {
+		if (!VM_PAGEMD_EXECPAGE_P(mdpg)) {
 			ci->ci_softc->cpu_ev_exec_trap_sync.ev_count++;
 			dcache_wb_page(pa);
 			icache_inv_page(pa);
-			pmap_page_set_attributes(pg, VM_PAGE_MD_EXECPAGE);
+			pmap_page_set_attributes(mdpg, VM_PAGEMD_EXECPAGE);
 		}
 		pte &= ~PTE_UNSYNCED;
 		pte |= PTE_xX;

Index: src/sys/arch/powerpc/include/intr.h
diff -u src/sys/arch/powerpc/include/intr.h:1.8 src/sys/arch/powerpc/include/intr.h:1.9
--- src/sys/arch/powerpc/include/intr.h:1.8	Fri Jun 17 23:36:17 2011
+++ src/sys/arch/powerpc/include/intr.h	Mon Jun 20 20:24:28 2011
@@ -1,4 +1

CVS commit: src/sys/modules/arch/powerpc/powerpc-4xx

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jun 20 20:18:43 UTC 2011

Modified Files:
src/sys/modules/arch/powerpc/powerpc-4xx: bsd.powerpc-4xx.mk

Log Message:
IBM4xx now uses the pic-based intr.h


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/sys/modules/arch/powerpc/powerpc-4xx/bsd.powerpc-4xx.mk

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

Modified files:

Index: src/sys/modules/arch/powerpc/powerpc-4xx/bsd.powerpc-4xx.mk
diff -u src/sys/modules/arch/powerpc/powerpc-4xx/bsd.powerpc-4xx.mk:1.1 src/sys/modules/arch/powerpc/powerpc-4xx/bsd.powerpc-4xx.mk:1.2
--- src/sys/modules/arch/powerpc/powerpc-4xx/bsd.powerpc-4xx.mk:1.1	Wed Jun 15 09:45:59 2011
+++ src/sys/modules/arch/powerpc/powerpc-4xx/bsd.powerpc-4xx.mk	Mon Jun 20 20:18:43 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.powerpc-4xx.mk,v 1.1 2011/06/15 09:45:59 mrg Exp $
+#	$NetBSD: bsd.powerpc-4xx.mk,v 1.2 2011/06/20 20:18:43 matt Exp $
 
 .ifndef _BSD_POWERPC_4XX_MK_
 _BSD_POWERPC_4XX_MK_=1
@@ -9,7 +9,7 @@
 PPC_IBM4XX=	1
 
 # hack into bsd.kmodule.mk
-PPC_INTR_IMPL=\"powerpc/ibm4xx/ibm4xx_intr.h\"
+PPC_INTR_IMPL=\"powerpc/intr.h\"
 PPC_PCI_MACHDEP_IMPL=\"powerpc/ibm4xx/pci_machdep.h\"
 
 AFLAGS+=	-mcpu=403



CVS commit: src/sys/dev/i2c

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 20:16:19 UTC 2011

Modified Files:
src/sys/dev/i2c: adm1021.c dbcool.c g760a.c lm75.c pic16lc.c smscmon.c

Log Message:
Initialize sensor state before registering.

XXX Still need to fix i2c/ibmhawk.c


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/i2c/adm1021.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/i2c/dbcool.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/g760a.c src/sys/dev/i2c/smscmon.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/i2c/lm75.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/i2c/pic16lc.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/i2c/adm1021.c
diff -u src/sys/dev/i2c/adm1021.c:1.6 src/sys/dev/i2c/adm1021.c:1.7
--- src/sys/dev/i2c/adm1021.c:1.6	Sun Jun 19 11:44:03 2011
+++ src/sys/dev/i2c/adm1021.c	Mon Jun 20 20:16:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: adm1021.c,v 1.6 2011/06/19 11:44:03 martin Exp $ */
+/*	$NetBSD: adm1021.c,v 1.7 2011/06/20 20:16:19 pgoyette Exp $ */
 /*	$OpenBSD: adm1021.c,v 1.27 2007/06/24 05:34:35 dlg Exp $	*/
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: adm1021.c,v 1.6 2011/06/19 11:44:03 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adm1021.c,v 1.7 2011/06/20 20:16:19 pgoyette Exp $");
 
 #include 
 #include 
@@ -157,6 +157,8 @@
 	sc->sc_sensor[ADMTEMP_INT].units = ENVSYS_STEMP;
 	sc->sc_sensor[ADMTEMP_EXT].state = ENVSYS_SINVALID;
 	sc->sc_sensor[ADMTEMP_EXT].units = ENVSYS_STEMP;
+	sc->sc_sensor[ADMTEMP_INT].state = ENVSYS_SINVALID;
+	sc->sc_sensor[ADMTEMP_EXT].state = ENVSYS_SINVALID;
 	strlcpy(sc->sc_sensor[ADMTEMP_INT].desc, "internal",sizeof("internal"));
 	strlcpy(sc->sc_sensor[ADMTEMP_EXT].desc, "external",sizeof("external"));
 	sc->sc_sme = sysmon_envsys_create();

Index: src/sys/dev/i2c/dbcool.c
diff -u src/sys/dev/i2c/dbcool.c:1.29 src/sys/dev/i2c/dbcool.c:1.30
--- src/sys/dev/i2c/dbcool.c:1.29	Sat Mar 12 13:33:18 2011
+++ src/sys/dev/i2c/dbcool.c	Mon Jun 20 20:16:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: dbcool.c,v 1.29 2011/03/12 13:33:18 pgoyette Exp $ */
+/*	$NetBSD: dbcool.c,v 1.30 2011/06/20 20:16:19 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dbcool.c,v 1.29 2011/03/12 13:33:18 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dbcool.c,v 1.30 2011/06/20 20:16:19 pgoyette Exp $");
 
 #include 
 #include 
@@ -1601,6 +1601,7 @@
 		switch (chip->table[i].type) {
 		case DBC_TEMP:
 			sc->sc_sensor[i].units = ENVSYS_STEMP;
+			sc->sc_sensor[i].state = ENVSYS_SINVALID;
 			sc->sc_sensor[i].flags |= ENVSYS_FMONLIMITS;
 			error = dbcool_attach_sensor(sc, i);
 			break;
@@ -1616,16 +1617,19 @@
 break;
 
 			sc->sc_sensor[i].units = ENVSYS_SVOLTS_DC;
+			sc->sc_sensor[i].state = ENVSYS_SINVALID;
 			sc->sc_sensor[i].flags |= ENVSYS_FMONLIMITS;
 			error = dbcool_attach_sensor(sc, i);
 			break;
 		case DBC_FAN:
 			sc->sc_sensor[i].units = ENVSYS_SFANRPM;
+			sc->sc_sensor[i].state = ENVSYS_SINVALID;
 			sc->sc_sensor[i].flags |= ENVSYS_FMONLIMITS;
 			error = dbcool_attach_sensor(sc, i);
 			break;
 		case DBC_VID:
 			sc->sc_sensor[i].units = ENVSYS_INTEGER;
+			sc->sc_sensor[i].state = ENVSYS_SINVALID;
 			sc->sc_sensor[i].flags |= ENVSYS_FMONNOTSUPP;
 
 			/* retrieve 5- or 6-bit value */

Index: src/sys/dev/i2c/g760a.c
diff -u src/sys/dev/i2c/g760a.c:1.1 src/sys/dev/i2c/g760a.c:1.2
--- src/sys/dev/i2c/g760a.c:1.1	Sat Oct  2 06:07:37 2010
+++ src/sys/dev/i2c/g760a.c	Mon Jun 20 20:16:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: g760a.c,v 1.1 2010/10/02 06:07:37 kiyohara Exp $	*/
+/*	$NetBSD: g760a.c,v 1.2 2011/06/20 20:16:19 pgoyette Exp $	*/
 
 /*-
  * Copyright (C) 2008 A.Leo.
@@ -32,7 +32,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: g760a.c,v 1.1 2010/10/02 06:07:37 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: g760a.c,v 1.2 2011/06/20 20:16:19 pgoyette Exp $");
 
 #include 
 #include 
@@ -231,6 +231,7 @@
 	(void)strlcpy(sc->sc_sensor.desc, "sysfan rpm",
 			sizeof(sc->sc_sensor.desc));
 	sc->sc_sensor.units = ENVSYS_SFANRPM;
+	sc->sc_sensor.state = ENVSYS_SINVALID;
 
 	if (sysmon_envsys_sensor_attach(sc->sc_sme, &sc->sc_sensor))
 		goto out;
Index: src/sys/dev/i2c/smscmon.c
diff -u src/sys/dev/i2c/smscmon.c:1.1 src/sys/dev/i2c/smscmon.c:1.2
--- src/sys/dev/i2c/smscmon.c:1.1	Mon Feb 22 03:50:56 2010
+++ src/sys/dev/i2c/smscmon.c	Mon Jun 20 20:16:19 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: smscmon.c,v 1.1 2010/02/22 03:50:56 pgoyette Exp $ */
+/* $NetBSD: smscmon.c,v 1.2 2011/06/20 20:16:19 pgoyette Exp $ */
 
 /*
  * Copyright (c) 2009 Takahiro Hayashi
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: smscmon.c,v 1.1 2010/02/22 03:50:56 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smscmon.c,v 1.2 2011/06/20 20:16:19 pgoyette Exp $");
 
 #include 
 #include 
@@ -285,6 +285,7 @@
 		strlcpy(sc->sensors[i].desc, sens[i].desc,
 		sizeof(sc-

CVS commit: src/sys/arch

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jun 20 19:56:13 UTC 2011

Modified Files:
src/sys/arch/amigappc/amigappc: locore.S
src/sys/arch/bebox/bebox: locore.S
src/sys/arch/evbppc/ev64260: ev64260_locore.S
src/sys/arch/evbppc/explora: explora_start.S
src/sys/arch/evbppc/obs405: obs200_locore.S obs600_locore.S
src/sys/arch/evbppc/pmppc: pmppc_locore.S
src/sys/arch/evbppc/virtex: virtex_start.S
src/sys/arch/evbppc/walnut: walnut_start.S
src/sys/arch/ibmnws/ibmnws: locore.S
src/sys/arch/macppc/macppc: locore.S
src/sys/arch/mvmeppc/mvmeppc: locore.S
src/sys/arch/ofppc/ofppc: locore.S
src/sys/arch/powerpc/ibm4xx: genassym.cf
src/sys/arch/powerpc/ibm4xx/openbios: locore.S
src/sys/arch/powerpc/oea: genassym.cf
src/sys/arch/prep/prep: locore.S
src/sys/arch/rs6000/rs6000: locore.S
src/sys/arch/sandpoint/sandpoint: locore.S

Log Message:
Don't include *pmap.h in assembly files.  Get the needed definitions
from "assym.h".


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amigappc/amigappc/locore.S
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/bebox/bebox/locore.S
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/evbppc/ev64260/ev64260_locore.S
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbppc/explora/explora_start.S
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbppc/obs405/obs200_locore.S
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbppc/obs405/obs600_locore.S
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbppc/pmppc/pmppc_locore.S
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbppc/virtex/virtex_start.S
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/evbppc/walnut/walnut_start.S
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ibmnws/ibmnws/locore.S
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/macppc/macppc/locore.S
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/mvmeppc/mvmeppc/locore.S
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/ofppc/ofppc/locore.S
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/ibm4xx/genassym.cf
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/ibm4xx/openbios/locore.S
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/powerpc/oea/genassym.cf
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/prep/prep/locore.S
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/rs6000/rs6000/locore.S
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sandpoint/sandpoint/locore.S

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/amigappc/amigappc/locore.S
diff -u src/sys/arch/amigappc/amigappc/locore.S:1.23 src/sys/arch/amigappc/amigappc/locore.S:1.24
--- src/sys/arch/amigappc/amigappc/locore.S:1.23	Sat Jun 18 21:17:28 2011
+++ src/sys/arch/amigappc/amigappc/locore.S	Mon Jun 20 19:56:10 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: locore.S,v 1.23 2011/06/18 21:17:28 matt Exp $   */
+/*  $NetBSD: locore.S,v 1.24 2011/06/20 19:56:10 matt Exp $   */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -46,7 +46,6 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 #include 

Index: src/sys/arch/bebox/bebox/locore.S
diff -u src/sys/arch/bebox/bebox/locore.S:1.23 src/sys/arch/bebox/bebox/locore.S:1.24
--- src/sys/arch/bebox/bebox/locore.S:1.23	Sat Jun 18 21:17:28 2011
+++ src/sys/arch/bebox/bebox/locore.S	Mon Jun 20 19:56:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.23 2011/06/18 21:17:28 matt Exp $	*/
+/*	$NetBSD: locore.S,v 1.24 2011/06/20 19:56:11 matt Exp $	*/
 /*	$OpenBSD: locore.S,v 1.4 1997/01/26 09:06:38 rahnds Exp $	*/
 
 /*
@@ -44,7 +44,6 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 #include 

Index: src/sys/arch/evbppc/ev64260/ev64260_locore.S
diff -u src/sys/arch/evbppc/ev64260/ev64260_locore.S:1.18 src/sys/arch/evbppc/ev64260/ev64260_locore.S:1.19
--- src/sys/arch/evbppc/ev64260/ev64260_locore.S:1.18	Sat Jun 18 21:17:28 2011
+++ src/sys/arch/evbppc/ev64260/ev64260_locore.S	Mon Jun 20 19:56:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ev64260_locore.S,v 1.18 2011/06/18 21:17:28 matt Exp $	*/
+/*	$NetBSD: ev64260_locore.S,v 1.19 2011/06/20 19:56:11 matt Exp $	*/
 /*	$OpenBSD: locore.S,v 1.4 1997/01/26 09:06:38 rahnds Exp $	*/
 
 /*
@@ -43,7 +43,6 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 #include 

Index: src/sys/arch/evbppc/explora/explora_start.S
diff -u src/sys/arch/evbppc/explora/explora_start.S:1.9 src/sys/arch/evbppc/explora/explora_start.S:1.10
--- src/sys/arch/evbppc/explora/explora_start.S:1.9	Mon Jun 20 17:44:33 2011
+++ src/sys/arch/evbppc/explora/explora_start.S	Mon Jun 20 19:56:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: explora_start.S,v 1.9 2011/06/20 17:44:33 matt Exp $	*/
+/*	$NetBSD: explora_start.S,v 1.10 2011/06/20 19:56:11 matt Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -49,7 +49,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include "opt_ddb.h"
 #include "opt_ppcparam.h"

Index: src/sys/arch/evbppc/obs405/obs200_locore.S
diff -u src/sys/arch/evbppc/obs4

CVS commit: src/doc

2011-06-20 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Mon Jun 20 19:48:28 UTC 2011

Modified Files:
src/doc: CHANGES

Log Message:
Note sandpoint RAID 1 boot support.


To generate a diff of this commit:
cvs rdiff -u -r1.1568 -r1.1569 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1568 src/doc/CHANGES:1.1569
--- src/doc/CHANGES:1.1568	Sun Jun 19 16:26:57 2011
+++ src/doc/CHANGES	Mon Jun 20 19:48:28 2011
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1568 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1569 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1041,3 +1041,4 @@
 	alpha: support for Avalon A12 removed [matt 20110617]
 	sparc64: Add fast softint(9) support. [nakayama 20110618]
 	zaurus: Add ioexp driver for SL-C1000. [nonaka 20110619]
+	sandpoint: Add support for booting from RAID 1 [jdc 20110620]



CVS commit: src/sys/arch/sandpoint/stand/altboot

2011-06-20 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Mon Jun 20 19:48:05 UTC 2011

Modified Files:
src/sys/arch/sandpoint/stand/altboot: dsk.c

Log Message:
Add support for booting from RAID 1.
Note, that the RAID partition must be the first partition of the disk.
Reviewed by phx@.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sandpoint/stand/altboot/dsk.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/sandpoint/stand/altboot/dsk.c
diff -u src/sys/arch/sandpoint/stand/altboot/dsk.c:1.6 src/sys/arch/sandpoint/stand/altboot/dsk.c:1.7
--- src/sys/arch/sandpoint/stand/altboot/dsk.c:1.6	Wed Jun  8 18:06:02 2011
+++ src/sys/arch/sandpoint/stand/altboot/dsk.c	Mon Jun 20 19:48:05 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: dsk.c,v 1.6 2011/06/08 18:06:02 phx Exp $ */
+/* $NetBSD: dsk.c,v 1.7 2011/06/20 19:48:05 jdc Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -43,6 +43,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -296,7 +298,7 @@
 	struct disklabel *dlp;
 	struct partition *pp;
 	char *dp;
-	int i, first;
+	int i, first, rf_offset;
 
 	bsdp = NULL;
 	(*d->lba_read)(d, 0, 1, iobuf);
@@ -310,24 +312,39 @@
 		}
 	}
   skip:
+	rf_offset = 0;
 	first = (bsdp) ? bswap32(bsdp->mbrp_start) : 0;
 	(*d->lba_read)(d, first + LABELSECTOR, 1, iobuf);
 	dp = iobuf /* + LABELOFFSET */;
 	for (i = 0; i < 512 - sizeof(struct disklabel); i++, dp += 4) {
 		dlp = (struct disklabel *)dp;
 		if (dlp->d_magic == DISKMAGIC && dlp->d_magic2 == DISKMAGIC) {
-			goto found;
+			if (dlp->d_partitions[0].p_fstype == FS_RAID) {
+printf("%s%c: raid\n", d->xname, i + 'a');
+snprintf(d->xname, sizeof(d->xname), "raid.");
+rf_offset = dlp->d_partitions[0].p_offset +
+RF_PROTECTED_SECTORS;
+(*d->lba_read)(d, rf_offset + LABELSECTOR, 1,
+iobuf);
+dp = iobuf /* + LABELOFFSET */;
+for (i = 0; i < 512 - sizeof(struct disklabel); i++, dp += 4) {
+	dlp = (struct disklabel *)dp;
+	if (dlp->d_magic == DISKMAGIC &&
+	dlp->d_magic2 == DISKMAGIC)
+		goto found;
+}
+			} else	/* Not RAID */
+goto found;
 		}
 	}
 	d->dlabel = NULL;
 	printf("%s: no disklabel\n", d->xname);
 	return;
   found:
-	d->dlabel = allocaligned(sizeof(struct disklabel), 4);
-	memcpy(d->dlabel, dlp, sizeof(struct disklabel));
 	for (i = 0; i < dlp->d_npartitions; i += 1) {
 		const char *type;
 		pp = &dlp->d_partitions[i];
+		pp->p_offset += rf_offset;
 		type = NULL;
 		switch (pp->p_fstype) {
 		case FS_SWAP: /* swap */
@@ -341,8 +358,11 @@
 			break;
 		}
 		if (type != NULL)
-			printf("%s%c: %s\n", d->xname, i + 'a', type);
+			printf("%s%c: %s\t(%u)\n", d->xname, i + 'a', type,
+			pp->p_offset);
 	}
+	d->dlabel = allocaligned(sizeof(struct disklabel), 4);
+	memcpy(d->dlabel, dlp, sizeof(struct disklabel));
 }
 
 static void



CVS commit: src/sys/common/pmap/tlb

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jun 20 19:31:58 UTC 2011

Added Files:
src/sys/common/pmap/tlb: vmpagemd.h

Log Message:
Make the vm_page_md definition common for all users of the shared tlb pmap.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/common/pmap/tlb/vmpagemd.h

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

Added files:

Index: src/sys/common/pmap/tlb/vmpagemd.h
diff -u /dev/null src/sys/common/pmap/tlb/vmpagemd.h:1.1
--- /dev/null	Mon Jun 20 19:31:58 2011
+++ src/sys/common/pmap/tlb/vmpagemd.h	Mon Jun 20 19:31:58 2011
@@ -0,0 +1,112 @@
+/*	$NetBSD: vmpagemd.h,v 1.1 2011/06/20 19:31:58 matt Exp $	*/
+
+/*-
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Raytheon BBN Technologies Corp and Defense Advanced Research Projects
+ * Agency and which was developed by Matt Thomas of 3am Software Foundry.
+ *
+ * This material is based upon work supported by the Defense Advanced Research
+ * Projects Agency and Space and Naval Warfare Systems Center, Pacific, under
+ * Contract No. N66001-09-C-2073.
+ * Approved for Public Release, Distribution Unlimited
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _COMMON_PMAP_TLB_VMPAGEMD_H_
+#define _COMMON_PMAP_TLB_VMPAGEMD_H_
+
+#ifdef _LOCORE
+#error use assym.h instead
+#endif
+
+#ifdef _MODULE
+#error this file should not be included by loadable kernel modules
+#endif
+
+#include "opt_modular.h"
+#include "opt_multiprocessor.h"
+
+#include 
+
+#define	__HAVE_VM_PAGE_MD
+
+typedef struct pv_entry {
+	struct pv_entry *pv_next;
+	struct pmap *pv_pmap;
+	vaddr_t pv_va;
+} *pv_entry_t;
+
+#define	VM_PAGEMD_REFERENCED	0x0001	/* page has been recently referenced */
+#define	VM_PAGEMD_MODIFIED	0x0002	/* page has been modified */
+#define	VM_PAGEMD_POOLPAGE	0x0004	/* page is used as a poolpage */
+#define	VM_PAGEMD_EXECPAGE	0x0008	/* page is exec mapped */
+#ifdef __PMAP_VIRTUAL_CACHE_ALIASES
+#define	VM_PAGEMD_UNCACHED	0x0010	/* page is mapped uncached */
+#endif
+
+#ifdef __PMAP_VIRTUAL_CACHE_ALIASES
+#define	VM_PAGEMD_CACHED_P(mdpg)	(((mdpg)->mdpg_attrs & VM_PAGEMD_UNCACHED) == 0)
+#define	VM_PAGEMD_UNCACHED_P(mdpg)	(((mdpg)->mdpg_attrs & VM_PAGEMD_UNCACHED) != 0)
+#endif
+#define	VM_PAGEMD_MODIFIED_P(mdpg)	(((mdpg)->mdpg_attrs & VM_PAGEMD_MODIFIED) != 0)
+#define	VM_PAGEMD_REFERENCED_P(mdpg)	(((mdpg)->mdpg_attrs & VM_PAGEMD_REFERENCED) != 0)
+#define	VM_PAGEMD_POOLPAGE_P(mdpg)	(((mdpg)->mdpg_attrs & VM_PAGEMD_POOLPAGE) != 0)
+#define	VM_PAGEMD_EXECPAGE_P(mdpg)	(((mdpg)->mdpg_attrs & VM_PAGEMD_EXECPAGE) != 0)
+
+struct vm_page_md {
+	volatile u_int mdpg_attrs;	/* page attributes */
+	struct pv_entry mdpg_first;	/* pv_entry first */
+#if defined(MULTIPROCESSOR) || defined(MODULAR)
+	kmutex_t *mdpg_lock;		/* pv list lock */
+#define	VM_PAGEMD_PVLIST_LOCK_INIT(mdpg) 	\
+	(mdpg)->mdpg_lock = NULL
+#define	VM_PAGEMD_PVLIST_LOCK(pg, list_change)	\
+	pmap_pvlist_lock(mdpg, list_change)
+#define	VM_PAGEMD_PVLIST_UNLOCK(mdpg)		\
+	mutex_spin_exit((mdpg)->mdpg_lock)
+#define	VM_PAGEMD_PVLIST_LOCKED_P(mdpg)		\
+	mutex_owner((mdpg)->mdpg_lock)
+#define	VM_PAGEMD_PVLIST_GEN(mdpg)		\
+	((uint16_t)((mdpg)->mdpg_attrs >> 16))
+#else
+#define	VM_PAGEMD_PVLIST_LOCK_INIT(mdpg)	do { } while (/*CONSTCOND*/ 0)
+#define	VM_PAGEMD_PVLIST_LOCK(mdpg, lc)	(mutex_spin_enter(&pmap_pvlist_mutex), 0)
+#define	VM_PAGEMD_PVLIST_UNLOCK(mdpg)	mutex_spin_exit(&pmap_pvlist_mutex)
+#define	VM_PAGEMD_PVLIST_LOCKED_P(mdpg)	true
+#define	VM_PAGEMD_PVLIST_GEN(mdpg)		(0)
+#endif /* MULTIPROCESSOR || MODUL

CVS commit: src/sys/dev/isa

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 18:12:54 UTC 2011

Modified Files:
src/sys/dev/isa: finsio_isa.c itesio_isa.c nsclpcsio_isa.c smsc.c

Log Message:
Initialize sensors states before registering.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/isa/finsio_isa.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/isa/itesio_isa.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/isa/nsclpcsio_isa.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/isa/smsc.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/isa/finsio_isa.c
diff -u src/sys/dev/isa/finsio_isa.c:1.4 src/sys/dev/isa/finsio_isa.c:1.5
--- src/sys/dev/isa/finsio_isa.c:1.4	Tue Apr 22 13:33:38 2008
+++ src/sys/dev/isa/finsio_isa.c	Mon Jun 20 18:12:54 2011
@@ -1,5 +1,5 @@
 /*	$OpenBSD: fins.c,v 1.1 2008/03/19 19:33:09 deraadt Exp $	*/
-/*	$NetBSD: finsio_isa.c,v 1.4 2008/04/22 13:33:38 xtraeme Exp $	*/
+/*	$NetBSD: finsio_isa.c,v 1.5 2011/06/20 18:12:54 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2008 Juan Romero Pardines
@@ -19,7 +19,7 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: finsio_isa.c,v 1.4 2008/04/22 13:33:38 xtraeme Exp $");
+__KERNEL_RCSID(0, "$NetBSD: finsio_isa.c,v 1.5 2011/06/20 18:12:54 pgoyette Exp $");
 
 #include 
 #include 
@@ -542,6 +542,7 @@
 	 */
 	sc->sc_sme = sysmon_envsys_create();
 	for (i = 0; sc->sc_finsio_sensors[i].fs_desc; i++) {
+		sc->sc_sensor[i].state = ENVSYS_SINVALID;
 		sc->sc_sensor[i].units = sc->sc_finsio_sensors[i].fs_type;
 		if (sc->sc_sensor[i].units == ENVSYS_SVOLTS_DC)
 			sc->sc_sensor[i].flags = ENVSYS_FCHANGERFACT;

Index: src/sys/dev/isa/itesio_isa.c
diff -u src/sys/dev/isa/itesio_isa.c:1.21 src/sys/dev/isa/itesio_isa.c:1.22
--- src/sys/dev/isa/itesio_isa.c:1.21	Fri Aug 13 19:28:26 2010
+++ src/sys/dev/isa/itesio_isa.c	Mon Jun 20 18:12:54 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: itesio_isa.c,v 1.21 2010/08/13 19:28:26 jakllsch Exp $ */
+/*	$NetBSD: itesio_isa.c,v 1.22 2011/06/20 18:12:54 pgoyette Exp $ */
 /*	Derived from $OpenBSD: it.c,v 1.19 2006/04/10 00:57:54 deraadt Exp $	*/
 
 /*
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: itesio_isa.c,v 1.21 2010/08/13 19:28:26 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: itesio_isa.c,v 1.22 2011/06/20 18:12:54 pgoyette Exp $");
 
 #include 
 #include 
@@ -409,6 +409,10 @@
 	COPYDESCR(sc->sc_sensor[12].desc, "CPU Fan");
 	COPYDESCR(sc->sc_sensor[13].desc, "System Fan");
 	COPYDESCR(sc->sc_sensor[14].desc, "Aux Fan");
+
+	/* all */
+	for (i = 0; i < IT_NUM_SENSORS; i++)
+		sc->sc_sensor[i].state = ENVSYS_SINVALID;
 }
 #undef COPYDESCR
 

Index: src/sys/dev/isa/nsclpcsio_isa.c
diff -u src/sys/dev/isa/nsclpcsio_isa.c:1.28 src/sys/dev/isa/nsclpcsio_isa.c:1.29
--- src/sys/dev/isa/nsclpcsio_isa.c:1.28	Wed Nov 12 12:36:12 2008
+++ src/sys/dev/isa/nsclpcsio_isa.c	Mon Jun 20 18:12:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: nsclpcsio_isa.c,v 1.28 2008/11/12 12:36:12 ad Exp $ */
+/* $NetBSD: nsclpcsio_isa.c,v 1.29 2011/06/20 18:12:54 pgoyette Exp $ */
 
 /*
  * Copyright (c) 2002
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nsclpcsio_isa.c,v 1.28 2008/11/12 12:36:12 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nsclpcsio_isa.c,v 1.29 2011/06/20 18:12:54 pgoyette Exp $");
 
 #include 
 #include 
@@ -309,6 +309,7 @@
 
 	sme = sysmon_envsys_create();
 	for (i = 0; i < SIO_NUM_SENSORS; i++) {
+		sc->sc_sensor[i].state = ENVSYS_SINVALID;
 		if (sysmon_envsys_sensor_attach(sme, &sc->sc_sensor[i]) != 0) {
 			aprint_error_dev(sc->sc_dev,
 			"could not attach sensor %d", i);

Index: src/sys/dev/isa/smsc.c
diff -u src/sys/dev/isa/smsc.c:1.9 src/sys/dev/isa/smsc.c:1.10
--- src/sys/dev/isa/smsc.c:1.9	Tue May 12 09:10:16 2009
+++ src/sys/dev/isa/smsc.c	Mon Jun 20 18:12:54 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: smsc.c,v 1.9 2009/05/12 09:10:16 cegger Exp $ */
+/*	$NetBSD: smsc.c,v 1.10 2011/06/20 18:12:54 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: smsc.c,v 1.9 2009/05/12 09:10:16 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smsc.c,v 1.10 2011/06/20 18:12:54 pgoyette Exp $");
 
 #include 
 #include 
@@ -212,6 +212,7 @@
 	INITSENSOR(7, "Fan3", SMSC_FAN4_LSB, ENVSYS_SFANRPM);
 
 	for (i = 0; i < SMSC_MAX_SENSORS; i++) {
+		sc->sc_sensor[i].state = ENVSYS_SINVALID;
 		if (sysmon_envsys_sensor_attach(sc->sc_sme,
 		&sc->sc_sensor[i])) {
 			sysmon_envsys_destroy(sc->sc_sme);



CVS commit: src/sys/dev/ic

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 18:12:06 UTC 2011

Modified Files:
src/sys/dev/ic: ug.c

Log Message:
Initialize sensor states before registering


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ic/ug.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/ic/ug.c
diff -u src/sys/dev/ic/ug.c:1.11 src/sys/dev/ic/ug.c:1.12
--- src/sys/dev/ic/ug.c:1.11	Wed Mar 26 16:09:37 2008
+++ src/sys/dev/ic/ug.c	Mon Jun 20 18:12:06 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ug.c,v 1.11 2008/03/26 16:09:37 xtraeme Exp $ */
+/* $NetBSD: ug.c,v 1.12 2011/06/20 18:12:06 pgoyette Exp $ */
 
 /*
  * Copyright (c) 2007 Mihai Chelaru 
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ug.c,v 1.11 2008/03/26 16:09:37 xtraeme Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ug.c,v 1.12 2011/06/20 18:12:06 pgoyette Exp $");
 
 #include 
 #include 
@@ -429,6 +429,10 @@
 	COPYDESCR(sc->sc_sensor[16].desc, "SYS Fan");
 	COPYDESCR(sc->sc_sensor[17].desc, "AUX Fan 1");
 	COPYDESCR(sc->sc_sensor[18].desc, "AUX Fan 2");
+
+	/* All sensors */
+	for (i = 0; i < UG_NUM_SENSORS; i++)
+		sc->sc_sensor[i].units = ENVSYS_SINVALID;
 }
 
 void



CVS commit: src

2011-06-20 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jun 20 18:03:41 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/syscall: Makefile
Added Files:
src/tests/syscall: t_truncate.c

Log Message:
Few naive tests for truncate(2).


To generate a diff of this commit:
cvs rdiff -u -r1.353 -r1.354 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.32 -r1.33 src/tests/syscall/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/syscall/t_truncate.c

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.353 src/distrib/sets/lists/tests/mi:1.354
--- src/distrib/sets/lists/tests/mi:1.353	Fri Jun 17 17:00:58 2011
+++ src/distrib/sets/lists/tests/mi	Mon Jun 20 18:03:41 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.353 2011/06/17 17:00:58 christos Exp $
+# $NetBSD: mi,v 1.354 2011/06/20 18:03:41 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -637,6 +637,7 @@
 ./usr/libdata/debug/usr/tests/syscall/t_setuid.debug			tests-syscall-debug	debug,atf
 ./usr/libdata/debug/usr/tests/syscall/t_stat.debug			tests-syscall-debug	debug,atf
 ./usr/libdata/debug/usr/tests/syscall/t_timer.debug			tests-syscall-debug	debug,atf
+./usr/libdata/debug/usr/tests/syscall/t_truncate.debug			tests-syscall-debug	debug,atf
 ./usr/libdata/debug/usr/tests/syscall/t_umask.debug			tests-syscall-debug	debug,atf
 ./usr/libdata/debug/usr/tests/usr.bin	tests-sbin-tests
 ./usr/libdata/debug/usr/tests/usr.sbin	tests-sbin-tests
@@ -2355,6 +2356,7 @@
 ./usr/tests/syscall/t_setuid			tests-syscall-tests	atf
 ./usr/tests/syscall/t_stat			tests-syscall-tests	atf
 ./usr/tests/syscall/t_timer			tests-syscall-tests	atf
+./usr/tests/syscall/t_truncate			tests-syscall-tests	atf
 ./usr/tests/syscall/t_umask			tests-syscall-tests	atf
 ./usr/tests/toolchaintests-syscall-tests	atf
 ./usr/tests/toolchain/Atffile			tests-syscall-tests	atf

Index: src/tests/syscall/Makefile
diff -u src/tests/syscall/Makefile:1.32 src/tests/syscall/Makefile:1.33
--- src/tests/syscall/Makefile:1.32	Tue Jun 14 03:50:47 2011
+++ src/tests/syscall/Makefile	Mon Jun 20 18:03:41 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.32 2011/06/14 03:50:47 jruoho Exp $
+# $NetBSD: Makefile,v 1.33 2011/06/20 18:03:41 jruoho Exp $
 
 .include 
 
@@ -10,7 +10,7 @@
 TESTS_C+=	t_itimer t_kill
 TESTS_C+=	t_mincore t_mmap t_mprotect t_msync t_nanosleep
 TESTS_C+=	t_poll t_pollts t_pselect
-TESTS_C+=	t_setrlimit t_setuid t_stat t_timer t_umask
+TESTS_C+=	t_setrlimit t_setuid t_stat t_timer t_truncate t_umask
 
 LDADD.t_getpid+=	-lpthread
 LDADD.t_timer+=		-lpthread

Added files:

Index: src/tests/syscall/t_truncate.c
diff -u /dev/null src/tests/syscall/t_truncate.c:1.1
--- /dev/null	Mon Jun 20 18:03:41 2011
+++ src/tests/syscall/t_truncate.c	Mon Jun 20 18:03:41 2011
@@ -0,0 +1,173 @@
+/* $NetBSD: t_truncate.c,v 1.1 2011/06/20 18:03:41 jruoho Exp $ */
+
+/*-
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jukka Ruohonen.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include 
+__RCSID("$NetBSD: t_truncate.c,v 1.1 2011/06/20 18:03:41 jruoho Exp $");
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static const char path[] = "truncate";
+static const size_t sizes[] = { 8, 16, 512, 1024, 2048, 4094, 3000, 30 };
+
+ATF_TC_WITH_CLEANUP(ftruncate_basic);
+ATF_TC_HEAD(ftruncate_basic, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "A basic test of ftruncate(2)");
+}
+
+AT

CVS commit: src/sys/dev/ic

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 17:48:46 UTC 2011

Modified Files:
src/sys/dev/ic: cac.c ciss.c mfi.c nslm7x.c

Log Message:
Initializes sensors states before registering.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/ic/cac.c
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/ic/ciss.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/ic/mfi.c
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/ic/nslm7x.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/ic/cac.c
diff -u src/sys/dev/ic/cac.c:1.51 src/sys/dev/ic/cac.c:1.52
--- src/sys/dev/ic/cac.c:1.51	Sat Nov 13 13:52:00 2010
+++ src/sys/dev/ic/cac.c	Mon Jun 20 17:48:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cac.c,v 1.51 2010/11/13 13:52:00 uebayasi Exp $	*/
+/*	$NetBSD: cac.c,v 1.52 2011/06/20 17:48:45 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2006, 2007 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.51 2010/11/13 13:52:00 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.52 2011/06/20 17:48:45 pgoyette Exp $");
 
 #include "bio.h"
 
@@ -683,6 +683,7 @@
 
 	for (i = 0; i < nsensors; i++) {
 		sc->sc_sensor[i].units = ENVSYS_DRIVE;
+		sc->sc_sensor[i].state = ENVSYS_SINVALID;
 		/* Enable monitoring for drive state changes */
 		sc->sc_sensor[i].flags |= ENVSYS_FMONSTCHANGED;
 		/* logical drives */

Index: src/sys/dev/ic/ciss.c
diff -u src/sys/dev/ic/ciss.c:1.25 src/sys/dev/ic/ciss.c:1.26
--- src/sys/dev/ic/ciss.c:1.25	Mon May 16 17:21:37 2011
+++ src/sys/dev/ic/ciss.c	Mon Jun 20 17:48:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ciss.c,v 1.25 2011/05/16 17:21:37 mhitch Exp $	*/
+/*	$NetBSD: ciss.c,v 1.26 2011/06/20 17:48:45 pgoyette Exp $	*/
 /*	$OpenBSD: ciss.c,v 1.14 2006/03/13 16:02:23 mickey Exp $	*/
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.25 2011/05/16 17:21:37 mhitch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.26 2011/06/20 17:48:45 pgoyette Exp $");
 
 #include "bio.h"
 
@@ -1421,6 +1421,7 @@
 
 	for (i = 0; i < nsensors; i++) {
 		sc->sc_sensor[i].units = ENVSYS_DRIVE;
+		sc->sc_sensor[i].state = ENVSYS_SINVALID;
 		/* Enable monitoring for drive state changes */
 		sc->sc_sensor[i].flags |= ENVSYS_FMONSTCHANGED;
 		/* logical drives */
@@ -1436,7 +1437,8 @@
 	sc->sc_sme->sme_cookie = sc;
 	sc->sc_sme->sme_refresh = ciss_sensor_refresh;
 	if (sysmon_envsys_register(sc->sc_sme)) {
-		printf("%s: unable to register with sysmon\n", device_xname(&sc->sc_dev));
+		printf("%s: unable to register with sysmon\n",
+		device_xname(&sc->sc_dev));
 		return(1);
 	}
 	return (0);

Index: src/sys/dev/ic/mfi.c
diff -u src/sys/dev/ic/mfi.c:1.34 src/sys/dev/ic/mfi.c:1.35
--- src/sys/dev/ic/mfi.c:1.34	Sun Mar 14 18:06:28 2010
+++ src/sys/dev/ic/mfi.c	Mon Jun 20 17:48:46 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mfi.c,v 1.34 2010/03/14 18:06:28 pgoyette Exp $ */
+/* $NetBSD: mfi.c,v 1.35 2011/06/20 17:48:46 pgoyette Exp $ */
 /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */
 /*
  * Copyright (c) 2006 Marco Peereboom 
@@ -17,7 +17,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.34 2010/03/14 18:06:28 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.35 2011/06/20 17:48:46 pgoyette Exp $");
 
 #include "bio.h"
 
@@ -2021,6 +2021,7 @@
 
 	for (i = 0; i < nsensors; i++) {
 		sc->sc_sensor[i].units = ENVSYS_DRIVE;
+		sc->sc_sensor[i].state = ENVSYS_SINVALID;
 		/* Enable monitoring for drive state changes */
 		sc->sc_sensor[i].flags |= ENVSYS_FMONSTCHANGED;
 		/* logical drives */

Index: src/sys/dev/ic/nslm7x.c
diff -u src/sys/dev/ic/nslm7x.c:1.57 src/sys/dev/ic/nslm7x.c:1.58
--- src/sys/dev/ic/nslm7x.c:1.57	Sat Mar  5 22:27:21 2011
+++ src/sys/dev/ic/nslm7x.c	Mon Jun 20 17:48:46 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: nslm7x.c,v 1.57 2011/03/05 22:27:21 jakllsch Exp $ */
+/*	$NetBSD: nslm7x.c,v 1.58 2011/06/20 17:48:46 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.57 2011/03/05 22:27:21 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.58 2011/06/20 17:48:46 pgoyette Exp $");
 
 #include 
 #include 
@@ -1667,6 +1667,7 @@
 	lmsc->sc_sme = sysmon_envsys_create();
 	/* Initialize sensors */
 	for (i = 0; i < lmsc->numsensors; i++) {
+		lmsc->sensors[i].state = ENVSYS_SINVALID;
 		if (sysmon_envsys_sensor_attach(lmsc->sc_sme,
 		&lmsc->sensors[i])) {
 			sysmon_envsys_destroy(lmsc->sc_sme);



CVS commit: src/sys/arch

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jun 20 17:44:34 UTC 2011

Modified Files:
src/sys/arch/evbppc/conf: files.explora files.virtex files.walnut
std.explora std.obs405 std.virtex std.walnut
src/sys/arch/evbppc/explora: explora_start.S machdep.c
src/sys/arch/evbppc/obs405: obs200_machdep.c obs266_machdep.c
obs600_autoconf.c obs600_machdep.c
src/sys/arch/evbppc/virtex: machdep.c
src/sys/arch/evbppc/walnut: machdep.c
src/sys/arch/powerpc/conf: files.ibm4xx
src/sys/arch/powerpc/ibm4xx: clock.c ibm4xx_machdep.c
src/sys/arch/powerpc/include/ibm4xx: cpu.h
Added Files:
src/sys/arch/powerpc/ibm4xx: pic_uic.c
Removed Files:
src/sys/arch/powerpc/ibm4xx: intr.c
src/sys/arch/powerpc/include/ibm4xx: ibm4xx_intr.h

Log Message:
Change IBM4xx to use the common powerpc PIC framework.
Consolidate most ibm4xx initppc function into ibm4xx_init
and Make all IBM4xx use it.
Change explora to use initppc instead of bootstrap.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbppc/conf/files.explora
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbppc/conf/files.virtex \
src/sys/arch/evbppc/conf/std.explora src/sys/arch/evbppc/conf/std.obs405
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbppc/conf/files.walnut
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbppc/conf/std.virtex
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbppc/conf/std.walnut
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbppc/explora/explora_start.S
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/evbppc/explora/machdep.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbppc/obs405/obs200_machdep.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/evbppc/obs405/obs266_machdep.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbppc/obs405/obs600_autoconf.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbppc/obs405/obs600_machdep.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/evbppc/virtex/machdep.c
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/evbppc/walnut/machdep.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/conf/files.ibm4xx
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/ibm4xx/clock.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c
cvs rdiff -u -r1.25 -r0 src/sys/arch/powerpc/ibm4xx/intr.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/powerpc/ibm4xx/pic_uic.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/include/ibm4xx/cpu.h
cvs rdiff -u -r1.20 -r0 src/sys/arch/powerpc/include/ibm4xx/ibm4xx_intr.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/evbppc/conf/files.explora
diff -u src/sys/arch/evbppc/conf/files.explora:1.8 src/sys/arch/evbppc/conf/files.explora:1.9
--- src/sys/arch/evbppc/conf/files.explora:1.8	Wed Feb 20 21:43:34 2008
+++ src/sys/arch/evbppc/conf/files.explora	Mon Jun 20 17:44:33 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.explora,v 1.8 2008/02/20 21:43:34 drochner Exp $
+#	$NetBSD: files.explora,v 1.9 2011/06/20 17:44:33 matt Exp $
 
 # maxpartitions must be first item in files.${ARCH}
 
@@ -10,11 +10,13 @@
 defparam	opt_explora.h	COM_CONSOLE_SPEED
 
 include		"arch/powerpc/fpu/files.fpu"
+include		"arch/powerpc/pic/files.pic"
 
 file	arch/evbppc/explora/autoconf.c
 file	arch/evbppc/explora/consinit.c
 file	arch/evbppc/explora/machdep.c
-file	arch/powerpc/ibm4xx/intr.c
+file	arch/powerpc/ibm4xx/ibm4xx_machdep.c
+file	arch/powerpc/ibm4xx/pic_uic.c
 file	dev/md_root.cmemory_disk_hooks
 
 # Explora local bus

Index: src/sys/arch/evbppc/conf/files.virtex
diff -u src/sys/arch/evbppc/conf/files.virtex:1.4 src/sys/arch/evbppc/conf/files.virtex:1.5
--- src/sys/arch/evbppc/conf/files.virtex:1.4	Thu Mar 18 13:47:04 2010
+++ src/sys/arch/evbppc/conf/files.virtex	Mon Jun 20 17:44:33 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.virtex,v 1.4 2010/03/18 13:47:04 kiyohara Exp $
+#	$NetBSD: files.virtex,v 1.5 2011/06/20 17:44:33 matt Exp $
 #
 # Xilinx Virtex specific configuration
 
@@ -18,6 +18,8 @@
 file 	arch/evbppc/virtex/design_gsrd1.c 	design_gsrd1
 file 	arch/evbppc/virtex/design_gsrd2.c 	design_gsrd2 | design_dfc
 
+file	arch/powerpc/ibm4xx/ibm4xx_machdep.c
+
 # Memory Disk for install kernel
 file	dev/md_root.cmemory_disk_hooks
 
Index: src/sys/arch/evbppc/conf/std.explora
diff -u src/sys/arch/evbppc/conf/std.explora:1.4 src/sys/arch/evbppc/conf/std.explora:1.5
--- src/sys/arch/evbppc/conf/std.explora:1.4	Sun Dec 11 12:17:11 2005
+++ src/sys/arch/evbppc/conf/std.explora	Mon Jun 20 17:44:33 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: std.explora,v 1.4 2005/12/11 12:17:11 christos Exp $
+#	$NetBSD: std.explora,v 1.5 2011/06/20 17:44:33 matt Exp $
 #
 # Standard/required options for NetBSD/explora.
 
@@ -18,7 +18,7 @@
 makeoptions	BOARDTYPE="explora"
 makeoptions	PPCDIR="ibm4xx"
 
-options 	PPC_INTR_IMPL=""
+options 	PPC_INTR_IMPL=""
 
 options 	INTSTK=8192
 
Index: src/sys/arch/evbppc/conf/std.obs405
diff -u src/sys/arch/evbppc/conf/std.obs405:1.4 src/sys/arch/evbpp

CVS commit: src/sys/dev/spi

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 17:31:38 UTC 2011

Modified Files:
src/sys/dev/spi: tmp121.c

Log Message:
Initialize sensor state before registering


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/spi/tmp121.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/spi/tmp121.c
diff -u src/sys/dev/spi/tmp121.c:1.4 src/sys/dev/spi/tmp121.c:1.5
--- src/sys/dev/spi/tmp121.c:1.4	Fri Apr  4 10:13:59 2008
+++ src/sys/dev/spi/tmp121.c	Mon Jun 20 17:31:37 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: tmp121.c,v 1.4 2008/04/04 10:13:59 xtraeme Exp $ */
+/* $NetBSD: tmp121.c,v 1.5 2011/06/20 17:31:37 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tmp121.c,v 1.4 2008/04/04 10:13:59 xtraeme Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmp121.c,v 1.5 2011/06/20 17:31:37 pgoyette Exp $");
 
 #include 
 #include 
@@ -93,6 +93,7 @@
 
 	sc->sc_sme = sysmon_envsys_create();
 	sc->sc_sensor.units = ENVSYS_STEMP;
+	sc->sc_sensor.state = ENVSYS_SINVALID;
 	strlcpy(sc->sc_sensor.desc, device_xname(self),
 	sizeof(sc->sc_sensor.desc));
 	if (sysmon_envsys_sensor_attach(sc->sc_sme, &sc->sc_sensor)) {



CVS commit: src/sys/dev/pci

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 17:29:06 UTC 2011

Modified Files:
src/sys/dev/pci: arcmsr.c viaenv.c

Log Message:
Initialize sensors states before registering.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/pci/arcmsr.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pci/viaenv.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/arcmsr.c
diff -u src/sys/dev/pci/arcmsr.c:1.28 src/sys/dev/pci/arcmsr.c:1.29
--- src/sys/dev/pci/arcmsr.c:1.28	Mon Jun 20 13:26:58 2011
+++ src/sys/dev/pci/arcmsr.c	Mon Jun 20 17:29:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: arcmsr.c,v 1.28 2011/06/20 13:26:58 pgoyette Exp $ */
+/*	$NetBSD: arcmsr.c,v 1.29 2011/06/20 17:29:06 pgoyette Exp $ */
 /*	$OpenBSD: arc.c,v 1.68 2007/10/27 03:28:27 dlg Exp $ */
 
 /*
@@ -21,7 +21,7 @@
 #include "bio.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: arcmsr.c,v 1.28 2011/06/20 13:26:58 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arcmsr.c,v 1.29 2011/06/20 17:29:06 pgoyette Exp $");
 
 #include 
 #include 
@@ -1746,6 +1746,7 @@
 			goto bad;
 
 		sc->sc_arc_sensors[count].arc_sensor.units = ENVSYS_DRIVE;
+		sc->sc_arc_sensors[count].arc_sensor.state = ENVSYS_SINVALID;
 		sc->sc_arc_sensors[count].arc_sensor.flags =
 		ENVSYS_FMONSTCHANGED;
 
@@ -1773,6 +1774,8 @@
 
 		/* Attach disk sensors for this volume */
 		for (j = 0; j < bv.bv_nodisk; j++) {
+			sc->sc_arc_sensors[count].arc_sensor.state =
+			ENVSYS_SINVALID;
 			sc->sc_arc_sensors[count].arc_sensor.units =
 			ENVSYS_DRIVE;
 			sc->sc_arc_sensors[count].arc_sensor.flags =

Index: src/sys/dev/pci/viaenv.c
diff -u src/sys/dev/pci/viaenv.c:1.30 src/sys/dev/pci/viaenv.c:1.31
--- src/sys/dev/pci/viaenv.c:1.30	Fri Dec 10 21:20:09 2010
+++ src/sys/dev/pci/viaenv.c	Mon Jun 20 17:29:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: viaenv.c,v 1.30 2010/12/10 21:20:09 phx Exp $	*/
+/*	$NetBSD: viaenv.c,v 1.31 2011/06/20 17:29:06 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2000 Johan Danielsson
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: viaenv.c,v 1.30 2010/12/10 21:20:09 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: viaenv.c,v 1.31 2011/06/20 17:29:06 pgoyette Exp $");
 
 #include 
 #include 
@@ -343,6 +343,9 @@
 
 #undef COPYDESCR
 
+	for (i = 0; i < 10; i++)
+		sc->sc_sensor[i].state = ENVSYS_SINVALID;
+
 	sc->sc_sme = sysmon_envsys_create();
 
 	/* Initialize sensors */



CVS commit: src/sys/dev/onewire

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 17:24:16 UTC 2011

Modified Files:
src/sys/dev/onewire: owtemp.c

Log Message:
Initialize sensor state before registering.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/onewire/owtemp.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/onewire/owtemp.c
diff -u src/sys/dev/onewire/owtemp.c:1.15 src/sys/dev/onewire/owtemp.c:1.16
--- src/sys/dev/onewire/owtemp.c:1.15	Sun Dec  6 22:49:48 2009
+++ src/sys/dev/onewire/owtemp.c	Mon Jun 20 17:24:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: owtemp.c,v 1.15 2009/12/06 22:49:48 dyoung Exp $ */
+/*	$NetBSD: owtemp.c,v 1.16 2011/06/20 17:24:16 pgoyette Exp $ */
 /*	$OpenBSD: owtemp.c,v 1.1 2006/03/04 16:27:03 grange Exp $	*/
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: owtemp.c,v 1.15 2009/12/06 22:49:48 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: owtemp.c,v 1.16 2011/06/20 17:24:16 pgoyette Exp $");
 
 #include 
 #include 
@@ -106,6 +106,7 @@
 
 	/* Initialize sensor */
 	sc->sc_sensor.units = ENVSYS_STEMP;
+	sc->sc_sensor.state = ENVSYS_SINVALID;
 	(void)strlcpy(sc->sc_sensor.desc,
 	device_xname(self), sizeof(sc->sc_sensor.desc));
 	if (sysmon_envsys_sensor_attach(sc->sc_sme, &sc->sc_sensor)) {



CVS commit: src/sys/dev/acpi

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 17:21:50 UTC 2011

Modified Files:
src/sys/dev/acpi: acpi_fan.c acpi_pmtr.c acpi_tz.c aibs_acpi.c

Log Message:
Initialize sensors states before registering.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/acpi/acpi_fan.c \
src/sys/dev/acpi/acpi_pmtr.c
cvs rdiff -u -r1.81 -r1.82 src/sys/dev/acpi/acpi_tz.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/aibs_acpi.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/acpi/acpi_fan.c
diff -u src/sys/dev/acpi/acpi_fan.c:1.4 src/sys/dev/acpi/acpi_fan.c:1.5
--- src/sys/dev/acpi/acpi_fan.c:1.4	Wed Feb 16 09:05:12 2011
+++ src/sys/dev/acpi/acpi_fan.c	Mon Jun 20 17:21:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_fan.c,v 1.4 2011/02/16 09:05:12 jruoho Exp $ */
+/*	$NetBSD: acpi_fan.c,v 1.5 2011/06/20 17:21:50 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2011 Jukka Ruohonen 
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_fan.c,v 1.4 2011/02/16 09:05:12 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_fan.c,v 1.5 2011/06/20 17:21:50 pgoyette Exp $");
 
 #include 
 #include 
@@ -172,6 +172,7 @@
 
 	acpifan_sensor_state(self);
 	sc->sc_sensor.units = ENVSYS_INDICATOR;
+	sc->sc_sensor.state = ENVSYS_SINVALID;
 
 	(void)strlcpy(sc->sc_sensor.desc, "state", sizeof(sc->sc_sensor.desc));
 
Index: src/sys/dev/acpi/acpi_pmtr.c
diff -u src/sys/dev/acpi/acpi_pmtr.c:1.4 src/sys/dev/acpi/acpi_pmtr.c:1.5
--- src/sys/dev/acpi/acpi_pmtr.c:1.4	Fri Jun  3 18:50:36 2011
+++ src/sys/dev/acpi/acpi_pmtr.c	Mon Jun 20 17:21:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_pmtr.c,v 1.4 2011/06/03 18:50:36 jruoho Exp $ */
+/*	$NetBSD: acpi_pmtr.c,v 1.5 2011/06/20 17:21:50 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2011 Jukka Ruohonen 
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_pmtr.c,v 1.4 2011/06/03 18:50:36 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_pmtr.c,v 1.5 2011/06/20 17:21:50 pgoyette Exp $");
 
 #include 
 #include 
@@ -338,6 +338,8 @@
 	sc->sc_sensor_o.units = ENVSYS_SWATTS;
 	sc->sc_sensor_i.value_cur = val * 1000;
 	sc->sc_sensor_o.value_cur = val * 1000;
+	sc->sc_sensor_i.state = ENVSYS_SINVALID;
+	sc->sc_sensor_o.state = ENVSYS_SINVALID;
 
 	acpipmtr_sensor_type(self);
 

Index: src/sys/dev/acpi/acpi_tz.c
diff -u src/sys/dev/acpi/acpi_tz.c:1.81 src/sys/dev/acpi/acpi_tz.c:1.82
--- src/sys/dev/acpi/acpi_tz.c:1.81	Mon Jun 20 15:36:49 2011
+++ src/sys/dev/acpi/acpi_tz.c	Mon Jun 20 17:21:50 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_tz.c,v 1.81 2011/06/20 15:36:49 jruoho Exp $ */
+/* $NetBSD: acpi_tz.c,v 1.82 2011/06/20 17:21:50 pgoyette Exp $ */
 
 /*
  * Copyright (c) 2003 Jared D. McNeill 
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.81 2011/06/20 15:36:49 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.82 2011/06/20 17:21:50 pgoyette Exp $");
 
 #include 
 #include 
@@ -774,6 +774,7 @@
 
 	sc->sc_temp_sensor.flags = flags;
 	sc->sc_temp_sensor.units = ENVSYS_STEMP;
+	sc->sc_temp_sensor.state = ENVSYS_SINVALID;
 
 	(void)strlcpy(sc->sc_temp_sensor.desc, "temperature",
 	sizeof(sc->sc_temp_sensor.desc));
@@ -785,6 +786,7 @@
 
 		sc->sc_fan_sensor.flags = flags;
 		sc->sc_fan_sensor.units = ENVSYS_SFANRPM;
+		sc->sc_fan_sensor.state = ENVSYS_SINVALID;
 
 		(void)strlcpy(sc->sc_fan_sensor.desc,
 		"FAN", sizeof(sc->sc_fan_sensor.desc));

Index: src/sys/dev/acpi/aibs_acpi.c
diff -u src/sys/dev/acpi/aibs_acpi.c:1.1 src/sys/dev/acpi/aibs_acpi.c:1.2
--- src/sys/dev/acpi/aibs_acpi.c:1.1	Sun Jun 12 07:25:43 2011
+++ src/sys/dev/acpi/aibs_acpi.c	Mon Jun 20 17:21:50 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: aibs_acpi.c,v 1.1 2011/06/12 07:25:43 jruoho Exp $ */
+/* $NetBSD: aibs_acpi.c,v 1.2 2011/06/20 17:21:50 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: aibs_acpi.c,v 1.1 2011/06/12 07:25:43 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aibs_acpi.c,v 1.2 2011/06/20 17:21:50 pgoyette Exp $");
 
 #include 
 #include 
@@ -465,6 +465,7 @@
 	}
 
 	(void)strlcpy(as->as_sensor.desc, name, sizeof(as->as_sensor.desc));
+	as->as_sensor.state = ENVSYS_SINVALID;
 
 	if (sysmon_envsys_sensor_attach(sc->sc_sme, &as->as_sensor) != 0) {
 		rv = AE_AML_INTERNAL;



CVS commit: src/sys/arch/powerpc

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jun 20 17:15:38 UTC 2011

Modified Files:
src/sys/arch/powerpc/booke: genassym.cf
src/sys/arch/powerpc/ibm4xx: genassym.cf
src/sys/arch/powerpc/include: cpu.h
src/sys/arch/powerpc/oea: genassym.cf

Log Message:
Make struct cpu_info the same size if building MODULAR
kernels or compiling a module.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/booke/genassym.cf
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/ibm4xx/genassym.cf
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/powerpc/include/cpu.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/oea/genassym.cf

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

Modified files:

Index: src/sys/arch/powerpc/booke/genassym.cf
diff -u src/sys/arch/powerpc/booke/genassym.cf:1.6 src/sys/arch/powerpc/booke/genassym.cf:1.7
--- src/sys/arch/powerpc/booke/genassym.cf:1.6	Sat Jun 18 21:17:29 2011
+++ src/sys/arch/powerpc/booke/genassym.cf	Mon Jun 20 17:15:38 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.6 2011/06/18 21:17:29 matt Exp $
+#	$NetBSD: genassym.cf,v 1.7 2011/06/20 17:15:38 matt Exp $
 
 #-
 # Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
 define	FRAME_SPRG1	offsetof(struct ktrapframe, ktf_tf.tf_sprg1)
 define	FRAME_SPEFSCR	offsetof(struct ktrapframe, ktf_tf.tf_spefscr)
 
-define	CI_SAVELIFO	offsetof(struct cpu_info, ci_savelifo)
+define	CI_SAVELIFO	offsetof(struct cpu_info, ci_savearea[0])
 define	CI_PMAP_SEGTAB	offsetof(struct cpu_info, ci_pmap_segtabs[0])
 define	CI_EV_TLBMISS_SOFT offsetof(struct cpu_info, ci_ev_tlbmiss_soft.ev_count)
 

Index: src/sys/arch/powerpc/ibm4xx/genassym.cf
diff -u src/sys/arch/powerpc/ibm4xx/genassym.cf:1.21 src/sys/arch/powerpc/ibm4xx/genassym.cf:1.22
--- src/sys/arch/powerpc/ibm4xx/genassym.cf:1.21	Sat Jun 18 21:17:29 2011
+++ src/sys/arch/powerpc/ibm4xx/genassym.cf	Mon Jun 20 17:15:38 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.21 2011/06/18 21:17:29 matt Exp $
+#	$NetBSD: genassym.cf,v 1.22 2011/06/20 17:15:38 matt Exp $
 
 #
 # Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -43,10 +43,10 @@
 define	PM_CTX		offsetof(struct pmap, pm_ctx)
 
 define	CI_INTSTK	offsetof(struct cpu_info, ci_intstk)
-define	CI_TEMPSAVE	offsetof(struct cpu_info, ci_tempsave)
-define	CI_DDBSAVE	offsetof(struct cpu_info, ci_ddbsave)
-define	CI_IPKDBSAVE	offsetof(struct cpu_info, ci_ipkdbsave)
-define	CI_TLBMISSSAVE	offsetof(struct cpu_info, ci_tlbmisssave)
+define	CI_TEMPSAVE	offsetof(struct cpu_info, ci_savearea[CI_SAVETEMP])
+define	CI_DDBSAVE	offsetof(struct cpu_info, ci_savearea[CI_SAVEDDB])
+define	CI_IPKDBSAVE	offsetof(struct cpu_info, ci_savearea[CI_SAVEIPKDB])
+define	CI_TLBMISSSAVE	offsetof(struct cpu_info, ci_savearea[CI_SAVEMMU])
 
 define	CPUSAVE_R28	CPUSAVE_R28*sizeof(register_t)
 define	CPUSAVE_R29	CPUSAVE_R29*sizeof(register_t)

Index: src/sys/arch/powerpc/include/cpu.h
diff -u src/sys/arch/powerpc/include/cpu.h:1.83 src/sys/arch/powerpc/include/cpu.h:1.84
--- src/sys/arch/powerpc/include/cpu.h:1.83	Mon Jun 20 08:47:12 2011
+++ src/sys/arch/powerpc/include/cpu.h	Mon Jun 20 17:15:38 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.83 2011/06/20 08:47:12 matt Exp $	*/
+/*	$NetBSD: cpu.h,v 1.84 2011/06/20 17:15:38 matt Exp $	*/
 
 /*
  * Copyright (C) 1999 Wolfgang Solfrank.
@@ -77,55 +77,56 @@
 	volatile int ci_cpl;
 	volatile int ci_iactive;
 	volatile int ci_idepth;
-#ifndef PPC_BOOKE
-	volatile imask_t ci_ipending;
+	union {
+#if !defined(PPC_BOOKE) && !defined(_MODULE)
+		volatile imask_t un1_ipending;
+#define	ci_ipending	ci_un1.un1_ipending
 #endif
+		uint64_t un1_pad64;
+	} ci_un1;
 	volatile uint32_t ci_pending_ipis;
 	int ci_mtx_oldspl;
 	int ci_mtx_count;
-#ifdef PPC_IBM4XX
+#if defined(PPC_IBM4XX) || defined(MODULAR) || defined(_MODULE)
 	char *ci_intstk;
 #endif
-#ifndef PPC_BOOKE
+#define	CI_SAVETEMP	(0*CPUSAVE_LEN)
+#define	CI_SAVEDDB	(1*CPUSAVE_LEN)
+#define	CI_SAVEIPKDB	(2*CPUSAVE_LEN)
+#define	CI_SAVEMMU	(3*CPUSAVE_LEN)
+#define	CI_SAVEMAX	(4*CPUSAVE_LEN)
 #define	CPUSAVE_LEN	8
-	register_t ci_tempsave[CPUSAVE_LEN];
-	register_t ci_ddbsave[CPUSAVE_LEN];
-	register_t ci_ipkdbsave[CPUSAVE_LEN];
+#if !defined(PPC_BOOKE) && !defined(MODULAR) && !defined(_MODULE)
+#define	CPUSAVE_SIZE	(CI_SAVEMAX*CPUSAVE_LEN)
+#else
+#define	CPUSAVE_SIZE	128
+#endif
 #define	CPUSAVE_R28	0		/* where r28 gets saved */
 #define	CPUSAVE_R29	1		/* where r29 gets saved */
 #define	CPUSAVE_R30	2		/* where r30 gets saved */
 #define	CPUSAVE_R31	3		/* where r31 gets saved */
-#if defined(PPC_IBM4XX)
-#define	CPUSAVE_DEAR	4		/* where SPR_DEAR gets saved */
-#define	CPUSAVE_ESR	5		/* where SPR_ESR gets saved */
-	register_t ci_tlbmisssave[CPUSAVE_LEN];
-#else
-#define	CPUSAVE_DAR	4		/* where SPR_DAR gets saved */
-#define	CPUSAVE_DSISR	5		/* where SPR_DSISR gets saved */
-#define	DISISAVE_LEN	4
-	register_t ci_disisave[DISISAVE_LEN];
-#endif
+#defi

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

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 17:07:21 UTC 2011

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

Log Message:
Initialize sensor state before registering.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/x86/viac7temp.c

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

Modified files:

Index: src/sys/arch/x86/x86/viac7temp.c
diff -u src/sys/arch/x86/x86/viac7temp.c:1.5 src/sys/arch/x86/x86/viac7temp.c:1.6
--- src/sys/arch/x86/x86/viac7temp.c:1.5	Thu Feb 24 15:42:17 2011
+++ src/sys/arch/x86/x86/viac7temp.c	Mon Jun 20 17:07:21 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: viac7temp.c,v 1.5 2011/02/24 15:42:17 jruoho Exp $ */
+/* $NetBSD: viac7temp.c,v 1.6 2011/06/20 17:07:21 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2009 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: viac7temp.c,v 1.5 2011/02/24 15:42:17 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: viac7temp.c,v 1.6 2011/06/20 17:07:21 pgoyette Exp $");
 
 #include 
 #include 
@@ -97,6 +97,7 @@
 
 	sc->sc_sensor.units = ENVSYS_STEMP;
 	sc->sc_sensor.flags = ENVSYS_FMONLIMITS;
+	sc->sc_sensor.state = ENVSYS_SINVALID;
 
 	(void)strlcpy(sc->sc_sensor.desc, "temperature",
 	sizeof(sc->sc_sensor.desc));



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

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 17:01:45 UTC 2011

Modified Files:
src/sys/arch/sparc64/dev: lom.c pcf8591_envctrl.c

Log Message:
Initialize sensor states before registering.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc64/dev/lom.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sparc64/dev/pcf8591_envctrl.c

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

Modified files:

Index: src/sys/arch/sparc64/dev/lom.c
diff -u src/sys/arch/sparc64/dev/lom.c:1.8 src/sys/arch/sparc64/dev/lom.c:1.9
--- src/sys/arch/sparc64/dev/lom.c:1.8	Sun Jun 19 21:37:10 2011
+++ src/sys/arch/sparc64/dev/lom.c	Mon Jun 20 17:01:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: lom.c,v 1.8 2011/06/19 21:37:10 nakayama Exp $	*/
+/*	$NetBSD: lom.c,v 1.9 2011/06/20 17:01:45 pgoyette Exp $	*/
 /*	$OpenBSD: lom.c,v 1.21 2010/02/28 20:44:39 kettenis Exp $	*/
 /*
  * Copyright (c) 2009 Mark Kettenis
@@ -17,7 +17,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lom.c,v 1.8 2011/06/19 21:37:10 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lom.c,v 1.9 2011/06/20 17:01:45 pgoyette Exp $");
 
 #include 
 #include 
@@ -351,6 +351,7 @@
 	sc->sc_sme = sysmon_envsys_create();
 	for (i = 0; i < sc->sc_num_alarm; i++) {
 		sc->sc_alarm[i].units = ENVSYS_INDICATOR;
+		sc->sc_alarm[i].state = ENVSYS_SINVALID;
 		snprintf(sc->sc_alarm[i].desc, sizeof(sc->sc_alarm[i].desc),
 		i == 0 ? "Fault LED" : "Alarm%d", i);
 		if (sysmon_envsys_sensor_attach(sc->sc_sme, &sc->sc_alarm[i])) {
@@ -372,6 +373,7 @@
 	}
 	for (i = 0; i < sc->sc_num_fan; i++) {
 		sc->sc_fan[i].units = ENVSYS_SFANRPM;
+		sc->sc_fan[i].state = ENVSYS_SINVALID;
 		snprintf(sc->sc_fan[i].desc, sizeof(sc->sc_fan[i].desc),
 		"fan%d", i + 1);
 		if (sysmon_envsys_sensor_attach(sc->sc_sme, &sc->sc_fan[i])) {
@@ -382,6 +384,7 @@
 	}
 	for (i = 0; i < sc->sc_num_psu; i++) {
 		sc->sc_psu[i].units = ENVSYS_INDICATOR;
+		sc->sc_psu[i].state = ENVSYS_SINVALID;
 		snprintf(sc->sc_psu[i].desc, sizeof(sc->sc_psu[i].desc),
 		"PSU%d", i + 1);
 		if (sysmon_envsys_sensor_attach(sc->sc_sme, &sc->sc_psu[i])) {
@@ -392,6 +395,7 @@
 	}
 	for (i = 0; i < sc->sc_num_temp; i++) {
 		sc->sc_temp[i].units = ENVSYS_STEMP;
+		sc->sc_temp[i].state = ENVSYS_SINVALID;
 		snprintf(sc->sc_temp[i].desc, sizeof(sc->sc_temp[i].desc),
 		"temp%d", i + 1);
 		if (sysmon_envsys_sensor_attach(sc->sc_sme, &sc->sc_temp[i])) {

Index: src/sys/arch/sparc64/dev/pcf8591_envctrl.c
diff -u src/sys/arch/sparc64/dev/pcf8591_envctrl.c:1.4 src/sys/arch/sparc64/dev/pcf8591_envctrl.c:1.5
--- src/sys/arch/sparc64/dev/pcf8591_envctrl.c:1.4	Sun Apr  3 06:22:02 2011
+++ src/sys/arch/sparc64/dev/pcf8591_envctrl.c	Mon Jun 20 17:01:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcf8591_envctrl.c,v 1.4 2011/04/03 06:22:02 jdc Exp $	*/
+/*	$NetBSD: pcf8591_envctrl.c,v 1.5 2011/06/20 17:01:45 pgoyette Exp $	*/
 /*	$OpenBSD: pcf8591_envctrl.c,v 1.6 2007/10/25 21:17:20 kettenis Exp $ */
 
 /*
@@ -137,6 +137,7 @@
 		sensor = &sc->sc_channels[sc->sc_nchan].chan_sensor;
 		sensor->units = ENVSYS_STEMP;
 		sensor->flags |= ENVSYS_FMONLIMITS;
+		sensor->state = ENVSYS_SINVALID;
 		strlcpy(sensor->desc, desc, sizeof(sensor->desc));
 
 		if (strncmp(desc, "CPU", 3) == 0)



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

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 16:33:42 UTC 2011

Modified Files:
src/sys/arch/sparc/dev: tctrl.c

Log Message:
Initialize sensor states before registering


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/sparc/dev/tctrl.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/sparc/dev/tctrl.c
diff -u src/sys/arch/sparc/dev/tctrl.c:1.50 src/sys/arch/sparc/dev/tctrl.c:1.51
--- src/sys/arch/sparc/dev/tctrl.c:1.50	Sat Nov 21 04:16:51 2009
+++ src/sys/arch/sparc/dev/tctrl.c	Mon Jun 20 16:33:42 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tctrl.c,v 1.50 2009/11/21 04:16:51 rmind Exp $	*/
+/*	$NetBSD: tctrl.c,v 1.51 2011/06/20 16:33:42 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2005, 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tctrl.c,v 1.50 2009/11/21 04:16:51 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tctrl.c,v 1.51 2011/06/20 16:33:42 pgoyette Exp $");
 
 #include 
 #include 
@@ -1261,16 +1261,19 @@
 	(void)strlcpy(sc->sc_sensor[0].desc, "Case temperature",
 	sizeof(sc->sc_sensor[0].desc));
 	sc->sc_sensor[0].units = ENVSYS_STEMP;
+	sc->sc_sensor[0].state = ENVSYS_SINVALID;
 
 	/* battery voltage */
 	(void)strlcpy(sc->sc_sensor[1].desc, "Internal battery voltage",
 	sizeof(sc->sc_sensor[1].desc));
 	sc->sc_sensor[1].units = ENVSYS_SVOLTS_DC;
+	sc->sc_sensor[1].state = ENVSYS_SINVALID;
 
 	/* DC voltage */
 	(void)strlcpy(sc->sc_sensor[2].desc, "DC-In voltage",
 	sizeof(sc->sc_sensor[2].desc));
 	sc->sc_sensor[2].units = ENVSYS_SVOLTS_DC;
+	sc->sc_sensor[2].state = ENVSYS_SINVALID;
 
 	for (i = 0; i < ENVSYS_NUMSENSORS; i++) {
 		if (sysmon_envsys_sensor_attach(sc->sc_sme,



CVS commit: src/sys/arch/powerpc/oea

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 16:31:28 UTC 2011

Modified Files:
src/sys/arch/powerpc/oea: cpu_subr.c

Log Message:
Initialize sensor state before registering.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/powerpc/oea/cpu_subr.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/powerpc/oea/cpu_subr.c
diff -u src/sys/arch/powerpc/oea/cpu_subr.c:1.67 src/sys/arch/powerpc/oea/cpu_subr.c:1.68
--- src/sys/arch/powerpc/oea/cpu_subr.c:1.67	Mon Jun 20 06:21:45 2011
+++ src/sys/arch/powerpc/oea/cpu_subr.c	Mon Jun 20 16:31:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_subr.c,v 1.67 2011/06/20 06:21:45 matt Exp $	*/
+/*	$NetBSD: cpu_subr.c,v 1.68 2011/06/20 16:31:28 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.67 2011/06/20 06:21:45 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.68 2011/06/20 16:31:28 pgoyette Exp $");
 
 #include "opt_ppcparam.h"
 #include "opt_multiprocessor.h"
@@ -1128,6 +1128,7 @@
 	sme = sysmon_envsys_create();
 
 	sensor.units = ENVSYS_STEMP;
+	sensor.state = ENVSYS_SINVALID;
 	(void)strlcpy(sensor.desc, "CPU Temp", sizeof(sensor.desc));
 	if (sysmon_envsys_sensor_attach(sme, &sensor)) {
 		sysmon_envsys_destroy(sme);



CVS commit: src/sys/dev/acpi

2011-06-20 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jun 20 15:56:36 UTC 2011

Modified Files:
src/sys/dev/acpi: acpidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/acpi/acpidevs_data.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/acpi/acpidevs_data.h
diff -u src/sys/dev/acpi/acpidevs_data.h:1.24 src/sys/dev/acpi/acpidevs_data.h:1.25
--- src/sys/dev/acpi/acpidevs_data.h:1.24	Mon Jan 10 17:04:55 2011
+++ src/sys/dev/acpi/acpidevs_data.h	Mon Jun 20 15:56:36 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: acpidevs_data.h,v 1.24 2011/01/10 17:04:55 jruoho Exp $	*/
+/*	$NetBSD: acpidevs_data.h,v 1.25 2011/06/20 15:56:36 jruoho Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	# NetBSD: acpidevs,v 1.33 2011/01/10 17:04:22 jruoho Exp
+ *	# NetBSD: acpidevs,v 1.34 2011/06/20 15:56:07 jruoho Exp
  */
 
 const struct { const char *pnp, *str; } acpi_knowndevs[] = {
@@ -1433,6 +1433,10 @@
 	"Wake Alarm Device",
 	},
 	{
+	"ENE0100",
+	"KB3924-based CIR Port Reciever",
+	},
+	{
 	"HPQ0004",
 	"Hewlett-Packard 3D DriveGuard accelerometer",
 	},



CVS commit: src/sys/dev/acpi

2011-06-20 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jun 20 15:56:07 UTC 2011

Modified Files:
src/sys/dev/acpi: acpidevs

Log Message:
Add ENE0100, a KB3924-based cir(4) chip.

>From dmesg supplied by hasina rakotoarisoa on gnats.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/acpi/acpidevs

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/acpi/acpidevs
diff -u src/sys/dev/acpi/acpidevs:1.33 src/sys/dev/acpi/acpidevs:1.34
--- src/sys/dev/acpi/acpidevs:1.33	Mon Jan 10 17:04:22 2011
+++ src/sys/dev/acpi/acpidevs	Mon Jun 20 15:56:07 2011
@@ -1,4 +1,4 @@
-# $NetBSD: acpidevs,v 1.33 2011/01/10 17:04:22 jruoho Exp $
+# $NetBSD: acpidevs,v 1.34 2011/06/20 15:56:07 jruoho Exp $
 #
 # Originally extracted from:
 
@@ -389,6 +389,7 @@
 ACPI000D	Power Meter
 ACPI000E	Wake Alarm Device
 #  Others 
+ENE0100		KB3924-based CIR Port Reciever
 HPQ0004		Hewlett-Packard 3D DriveGuard accelerometer
 IBM0079		IBM Docking Station
 INT0800		Intel Firmware Hub Device



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

2011-06-20 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jun 20 15:39:54 UTC 2011

Modified Files:
src/sys/arch/x86/acpi: acpi_pdc.c

Log Message:
Use acpi_match_cpu_handle() from acpi_util.c and only evaluate
the _PDC control method for CPUs that are enabled in the MADT.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x86/acpi/acpi_pdc.c

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

Modified files:

Index: src/sys/arch/x86/acpi/acpi_pdc.c
diff -u src/sys/arch/x86/acpi/acpi_pdc.c:1.1 src/sys/arch/x86/acpi/acpi_pdc.c:1.2
--- src/sys/arch/x86/acpi/acpi_pdc.c:1.1	Sun Jun 12 10:11:52 2011
+++ src/sys/arch/x86/acpi/acpi_pdc.c	Mon Jun 20 15:39:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_pdc.c,v 1.1 2011/06/12 10:11:52 jruoho Exp $ */
+/* $NetBSD: acpi_pdc.c,v 1.2 2011/06/20 15:39:54 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010, 2011 Jukka Ruohonen 
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_pdc.c,v 1.1 2011/06/12 10:11:52 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_pdc.c,v 1.2 2011/06/20 15:39:54 jruoho Exp $");
 
 #include 
 
@@ -47,12 +47,11 @@
 static uint32_t		flags = 0;
 
 static ACPI_STATUS	acpi_md_pdc_walk(ACPI_HANDLE, uint32_t,void *,void **);
-static ACPI_STATUS	acpi_md_pdc_set(ACPI_HANDLE, uint32_t);
+static void		acpi_md_pdc_set(ACPI_HANDLE, uint32_t);
 
 uint32_t
 acpi_md_pdc(void)
 {
-	char *hid = __UNCONST("ACPI0007");
 	struct cpu_info *ci = curcpu();
 	uint32_t regs[4];
 
@@ -104,21 +103,26 @@
 	 * As the _PDC must be evaluated before the internal namespace
 	 * is built, we have no option but to walk with the interpreter.
 	 */
-	(void)AcpiGetDevices(hid, acpi_md_pdc_walk, NULL, NULL);
-
-	(void)AcpiWalkNamespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT,
+	(void)AcpiWalkNamespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
 	UINT32_MAX, acpi_md_pdc_walk, NULL, NULL, NULL);
 
 	return flags;
 }
 
 static ACPI_STATUS
-acpi_md_pdc_walk(ACPI_HANDLE hdl, uint32_t level, void *context, void **status)
+acpi_md_pdc_walk(ACPI_HANDLE hdl, uint32_t level, void *aux, void **sta)
 {
-	return acpi_md_pdc_set(hdl, flags);
+	struct cpu_info *ci;
+
+	ci = acpi_match_cpu_handle(hdl);
+
+	if (ci != NULL)
+		acpi_md_pdc_set(hdl, flags);
+
+	return AE_OK;
 }
 
-static ACPI_STATUS
+static void
 acpi_md_pdc_set(ACPI_HANDLE hdl, uint32_t val)
 {
 	ACPI_OBJECT_LIST arg;
@@ -137,6 +141,4 @@
 	obj.Buffer.Pointer = (void *)cap;
 
 	(void)AcpiEvaluateObject(hdl, "_PDC", &arg, NULL);
-
-	return AE_OK;
 }



CVS commit: src/sys/dev/acpi

2011-06-20 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jun 20 15:36:49 UTC 2011

Modified Files:
src/sys/dev/acpi: acpi_tz.c

Log Message:
Use the new acpi_match_cpu_handle() from acpi_util.c.


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/dev/acpi/acpi_tz.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/acpi/acpi_tz.c
diff -u src/sys/dev/acpi/acpi_tz.c:1.80 src/sys/dev/acpi/acpi_tz.c:1.81
--- src/sys/dev/acpi/acpi_tz.c:1.80	Mon Jun  6 17:49:41 2011
+++ src/sys/dev/acpi/acpi_tz.c	Mon Jun 20 15:36:49 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_tz.c,v 1.80 2011/06/06 17:49:41 pgoyette Exp $ */
+/* $NetBSD: acpi_tz.c,v 1.81 2011/06/20 15:36:49 jruoho Exp $ */
 
 /*
  * Copyright (c) 2003 Jared D. McNeill 
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.80 2011/06/06 17:49:41 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.81 2011/06/20 15:36:49 jruoho Exp $");
 
 #include 
 #include 
@@ -134,7 +134,6 @@
 static ACPI_STATUS	acpitz_set_fanspeed(device_t, uint32_t);
 #endif
 static void		acpitz_print_processor_list(device_t);
-static struct cpu_info *acpitz_find_processor(uint32_t);
 
 CFATTACH_DECL_NEW(acpitz, sizeof(struct acpitz_softc),
 acpitz_match, acpitz_attach, acpitz_detach, NULL);
@@ -708,60 +707,47 @@
 {
 	struct acpitz_softc *sc = device_private(dv);
 	ACPI_HANDLE handle = sc->sc_node->ad_handle;
+	ACPI_OBJECT *obj, *pref;
 	ACPI_HANDLE prhandle;
-	ACPI_BUFFER buf, prbuf;
-	ACPI_OBJECT *obj, *pref, *pr;
+	ACPI_BUFFER buf;
 	ACPI_STATUS rv;
 	struct cpu_info *ci;
 	unsigned int i, cnt;
 
 	rv = acpi_eval_struct(handle, "_PSL", &buf);
+
 	if (ACPI_FAILURE(rv) || buf.Pointer == NULL)
 		return;
+
 	obj = buf.Pointer;
+
 	if (obj->Type != ACPI_TYPE_PACKAGE || obj->Package.Count == 0)
 		goto done;
 
-	for (i = 0, cnt = 0; i < obj->Package.Count; i++) {
+	for (cnt = i = 0; i < obj->Package.Count; i++) {
+
 		pref = &obj->Package.Elements[i];
 		rv = acpi_eval_reference_handle(pref, &prhandle);
+
 		if (ACPI_FAILURE(rv))
 			continue;
-		rv = acpi_eval_struct(prhandle, NULL, &prbuf);
-		if (ACPI_FAILURE(rv) || prbuf.Pointer == NULL)
+
+		ci = acpi_match_cpu_handle(prhandle);
+
+		if (ci == NULL)
 			continue;
-		pr = prbuf.Pointer;
-		if (pr->Type != ACPI_TYPE_PROCESSOR)
-			goto next;
-
-		ci = acpitz_find_processor(pr->Processor.ProcId);
-		if (ci) {
-			if (cnt == 0)
-aprint_normal(":");
-			aprint_normal(" %s", device_xname(ci->ci_dev));
-			++cnt;
-		}
-next:
-		ACPI_FREE(prbuf.Pointer);
+
+		if (cnt == 0)
+			aprint_normal(":");
+
+		aprint_normal(" %s", device_xname(ci->ci_dev));
+		++cnt;
 	}
 
 done:
 	ACPI_FREE(buf.Pointer);
 }
 
-static struct cpu_info *
-acpitz_find_processor(uint32_t id)
-{
-	CPU_INFO_ITERATOR cii;
-	struct cpu_info *ci;
-
-	for (CPU_INFO_FOREACH(cii, ci))
-		if (ci->ci_acpiid == id)
-			return ci;
-
-	return NULL;
-}
-
 static void
 acpitz_tick(void *opaque)
 {



CVS commit: src/sys/dev/acpi

2011-06-20 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jun 20 15:33:49 UTC 2011

Modified Files:
src/sys/dev/acpi: acpi_cpu.c

Log Message:
Use the new acpi_match_cpu_info() from acpi_util.c.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/acpi/acpi_cpu.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/acpi/acpi_cpu.c
diff -u src/sys/dev/acpi/acpi_cpu.c:1.41 src/sys/dev/acpi/acpi_cpu.c:1.42
--- src/sys/dev/acpi/acpi_cpu.c:1.41	Sun Jun 12 10:11:52 2011
+++ src/sys/dev/acpi/acpi_cpu.c	Mon Jun 20 15:33:49 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu.c,v 1.41 2011/06/12 10:11:52 jruoho Exp $ */
+/* $NetBSD: acpi_cpu.c,v 1.42 2011/06/20 15:33:49 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010, 2011 Jukka Ruohonen 
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu.c,v 1.41 2011/06/12 10:11:52 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu.c,v 1.42 2011/06/20 15:33:49 jruoho Exp $");
 
 #include 
 #include 
@@ -57,8 +57,6 @@
 static void		  acpicpu_sysctl(device_t);
 
 static ACPI_STATUS	  acpicpu_object(ACPI_HANDLE, struct acpicpu_object *);
-static int		  acpicpu_find(struct cpu_info *,
-   struct acpi_devnode **);
 static uint32_t		  acpicpu_cap(struct acpicpu_softc *);
 static ACPI_STATUS	  acpicpu_cap_osc(struct acpicpu_softc *,
 	  uint32_t, uint32_t *);
@@ -85,11 +83,6 @@
 	{ "Supermicro", "PDSMi-LN4", "0123456789" },
 };
 
-static const char * const acpicpu_hid[] = {
-	"ACPI0007",
-	NULL
-};
-
 CFATTACH_DECL_NEW(acpicpu, sizeof(struct acpicpu_softc),
 acpicpu_match, acpicpu_attach, acpicpu_detach, NULL);
 
@@ -123,7 +116,10 @@
 	if (ci == NULL)
 		return 0;
 
-	return acpicpu_find(ci, NULL);
+	if (acpi_match_cpu_info(ci) == NULL)
+		return 0;
+
+	return 10;
 }
 
 static void
@@ -131,6 +127,7 @@
 {
 	struct acpicpu_softc *sc = device_private(self);
 	struct cpu_info *ci;
+	ACPI_HANDLE hdl;
 	cpuid_t id;
 	int rv;
 
@@ -142,15 +139,16 @@
 	sc->sc_ci = ci;
 	sc->sc_dev = self;
 	sc->sc_cold = true;
-	sc->sc_node = NULL;
 
-	rv = acpicpu_find(ci, &sc->sc_node);
+	hdl = acpi_match_cpu_info(ci);
 
-	if (rv == 0) {
+	if (hdl == NULL) {
 		aprint_normal(": failed to match processor\n");
 		return;
 	}
 
+	sc->sc_node = acpi_get_node(hdl);
+
 	if (acpicpu_once_attach() != 0) {
 		aprint_normal(": failed to initialize\n");
 		return;
@@ -404,52 +402,6 @@
 	return rv;
 }
 
-static int
-acpicpu_find(struct cpu_info *ci, struct acpi_devnode **ptr)
-{
-	struct acpi_softc *sc = acpi_softc;
-	struct acpicpu_object ao;
-	struct acpi_devnode *ad;
-	ACPI_INTEGER val;
-	ACPI_STATUS rv;
-
-	if (sc == NULL || acpi_active == 0)
-		return 0;
-
-	/*
-	 * CPUs are declared in the ACPI namespace
-	 * either as a Processor() or as a Device().
-	 * In both cases the MADT entries are used
-	 * for the match (see ACPI 4.0, section 8.4).
-	 */
-	SIMPLEQ_FOREACH(ad, &sc->ad_head, ad_list) {
-
-		if (ad->ad_type == ACPI_TYPE_PROCESSOR) {
-
-			rv = acpicpu_object(ad->ad_handle, &ao);
-
-			if (ACPI_SUCCESS(rv) && ci->ci_acpiid == ao.ao_procid)
-goto out;
-		}
-
-		if (acpi_match_hid(ad->ad_devinfo, acpicpu_hid) != 0) {
-
-			rv = acpi_eval_integer(ad->ad_handle, "_UID", &val);
-
-			if (ACPI_SUCCESS(rv) && ci->ci_acpiid == val)
-goto out;
-		}
-	}
-
-	return 0;
-
-out:
-	if (ptr != NULL)
-		*ptr = ad;
-
-	return 10;
-}
-
 static uint32_t
 acpicpu_cap(struct acpicpu_softc *sc)
 {



CVS commit: src/sys/dev/acpi

2011-06-20 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jun 20 15:31:52 UTC 2011

Modified Files:
src/sys/dev/acpi: acpi_util.c acpi_util.h

Log Message:
Add two new functions, acpi_match_cpu_info() and acpi_match_cpu_handle(),
which will match a given struct cpu_info with the corresponding ACPI handle,
and vice versa.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/acpi/acpi_util.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/acpi_util.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/acpi/acpi_util.c
diff -u src/sys/dev/acpi/acpi_util.c:1.6 src/sys/dev/acpi/acpi_util.c:1.7
--- src/sys/dev/acpi/acpi_util.c:1.6	Tue Nov  2 16:45:48 2010
+++ src/sys/dev/acpi/acpi_util.c	Mon Jun 20 15:31:52 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_util.c,v 1.6 2010/11/02 16:45:48 gsutre Exp $ */
+/*	$NetBSD: acpi_util.c,v 1.7 2011/06/20 15:31:52 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -65,17 +65,22 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_util.c,v 1.6 2010/11/02 16:45:48 gsutre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_util.c,v 1.7 2011/06/20 15:31:52 jruoho Exp $");
 
 #include 
 
 #include 
 #include 
 
-#define _COMPONENT		ACPI_BUS_COMPONENT
-ACPI_MODULE_NAME		("acpi_util")
+#define _COMPONENT	ACPI_BUS_COMPONENT
+ACPI_MODULE_NAME	("acpi_util")
 
-static void	acpi_clean_node(ACPI_HANDLE, void *);
+static void		acpi_clean_node(ACPI_HANDLE, void *);
+
+static const char * const acpicpu_ids[] = {
+	"ACPI0007",
+	NULL
+};
 
 /*
  * Evaluate an integer object.
@@ -367,3 +372,138 @@
 	return 0;
 }
 
+/*
+ * Match a handle from a cpu_info. Returns NULL on failure.
+ *
+ * Note that if also acpi_devnode is needed, a subsequent
+ * call to acpi_get_node() will work.
+ */
+ACPI_HANDLE
+acpi_match_cpu_info(struct cpu_info *ci)
+{
+	struct acpi_softc *sc = acpi_softc;
+	struct acpi_devnode *ad;
+	ACPI_INTEGER val;
+	ACPI_OBJECT *obj;
+	ACPI_BUFFER buf;
+	ACPI_HANDLE hdl;
+	ACPI_STATUS rv;
+
+	if (sc == NULL || acpi_active == 0)
+		return NULL;
+
+	/*
+	 * CPUs are declared in the ACPI namespace
+	 * either as a Processor() or as a Device().
+	 * In both cases the MADT entries are used
+	 * for the match (see ACPI 4.0, section 8.4).
+	 */
+	SIMPLEQ_FOREACH(ad, &sc->ad_head, ad_list) {
+
+		hdl = ad->ad_handle;
+
+		switch (ad->ad_type) {
+
+		case ACPI_TYPE_DEVICE:
+
+			if (acpi_match_hid(ad->ad_devinfo, acpicpu_ids) == 0)
+break;
+
+			rv = acpi_eval_integer(hdl, "_UID", &val);
+
+			if (ACPI_SUCCESS(rv) && val == ci->ci_acpiid)
+return hdl;
+
+			break;
+
+		case ACPI_TYPE_PROCESSOR:
+
+			rv = acpi_eval_struct(hdl, NULL, &buf);
+
+			if (ACPI_FAILURE(rv))
+break;
+
+			obj = buf.Pointer;
+
+			if (obj->Processor.ProcId == ci->ci_acpiid) {
+ACPI_FREE(buf.Pointer);
+return hdl;
+			}
+
+			ACPI_FREE(buf.Pointer);
+			break;
+		}
+	}
+
+	return NULL;
+}
+
+/*
+ * Match a CPU from a handle. Returns NULL on failure.
+ */
+struct cpu_info *
+acpi_match_cpu_handle(ACPI_HANDLE hdl)
+{
+	struct cpu_info *ci;
+	ACPI_DEVICE_INFO *di;
+	CPU_INFO_ITERATOR cii;
+	ACPI_INTEGER val;
+	ACPI_OBJECT *obj;
+	ACPI_BUFFER buf;
+	ACPI_STATUS rv;
+
+	ci = NULL;
+	di = NULL;
+	buf.Pointer = NULL;
+
+	rv = AcpiGetObjectInfo(hdl, &di);
+
+	if (ACPI_FAILURE(rv))
+		return NULL;
+
+	switch (di->Type) {
+
+	case ACPI_TYPE_DEVICE:
+
+		if (acpi_match_hid(di, acpicpu_ids) == 0)
+			goto out;
+
+		rv = acpi_eval_integer(hdl, "_UID", &val);
+
+		if (ACPI_FAILURE(rv))
+			goto out;
+
+		break;
+
+	case ACPI_TYPE_PROCESSOR:
+
+		rv = acpi_eval_struct(hdl, NULL, &buf);
+
+		if (ACPI_FAILURE(rv))
+			goto out;
+
+		obj = buf.Pointer;
+		val = obj->Processor.ProcId;
+		break;
+
+	default:
+		goto out;
+	}
+
+	for (CPU_INFO_FOREACH(cii, ci)) {
+
+		if (ci->ci_acpiid == val)
+			goto out;
+	}
+
+	ci = NULL;
+
+out:
+	if (di != NULL)
+		ACPI_FREE(di);
+
+	if (buf.Pointer != NULL)
+		ACPI_FREE(buf.Pointer);
+
+	return ci;
+}

Index: src/sys/dev/acpi/acpi_util.h
diff -u src/sys/dev/acpi/acpi_util.h:1.3 src/sys/dev/acpi/acpi_util.h:1.4
--- src/sys/dev/acpi/acpi_util.h:1.3	Mon Jun  7 17:13:52 2010
+++ src/sys/dev/acpi/acpi_util.h	Mon Jun 20 15:31:52 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_util.h,v 1.3 2010/06/07 17:13:52 jruoho Exp $ */
+/*	$NetBSD: acpi_util.h,v 1.4 2011/06/20 15:31:52 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -82,8 +82,9 @@
 struct acpi_devnode *acpi_get_node(ACPI_HANDLE handle);
 void		 acpi_set_node(struct acpi_devnode *ad);
 
-const char*	acpi_name(ACPI_HANDLE);
-
-int		acpi_match_hid(ACPI_DEVICE_INFO *, const char * const *);
+const char	*acpi_name(ACPI_HANDLE);
+int		 acpi_match_hid(ACPI_DEVICE_INFO *, const char * const *);
+ACPI_HANDLE	 acpi_match_cpu_info(struct cpu_info *);
+struct cpu_info *acpi_match_cpu_handle(ACPI_HANDLE);
 
 #endif	/* !_SYS_DEV_ACPI_ACPI_UTIL_H */



CVS commit: othersrc/external/bsd/mat/dist

2011-06-20 Thread Thomas Klausner
Module Name:othersrc
Committed By:   wiz
Date:   Mon Jun 20 15:15:25 UTC 2011

Modified Files:
othersrc/external/bsd/mat/dist: matpax.1

Log Message:
Same fixes as for mattar, since the contents are nearly the same.
XXX: should describe differences in options (I guess)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/mat/dist/matpax.1

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

Modified files:

Index: othersrc/external/bsd/mat/dist/matpax.1
diff -u othersrc/external/bsd/mat/dist/matpax.1:1.1 othersrc/external/bsd/mat/dist/matpax.1:1.2
--- othersrc/external/bsd/mat/dist/matpax.1:1.1	Mon Jun 20 14:58:53 2011
+++ othersrc/external/bsd/mat/dist/matpax.1	Mon Jun 20 15:15:25 2011
@@ -1,4 +1,4 @@
-.\" $NetBSD: matpax.1,v 1.1 2011/06/20 14:58:53 agc Exp $
+.\" $NetBSD: matpax.1,v 1.2 2011/06/20 15:15:25 wiz Exp $
 .\"
 .\" Copyright (c) 2011 Alistair Crooks 
 .\" All rights reserved.
@@ -31,10 +31,10 @@
 .Nd minimalist archive tool program with pax frontend
 .Sh SYNOPSIS
 .Nm
-.Op Fl Vcptvx
+.Op Fl cptVvx
 .Op Fl C Ar directory
-.Op Fl T Ar template
 .Op Fl f Ar archive
+.Op Fl T Ar template
 .Op Ar file ...
 .Sh DESCRIPTION
 The
@@ -56,15 +56,8 @@
 perform an initial
 .Xr chdir 2
 into the specified directory before attempting to resolve any filenames.
-.It Fl T Ar template
-takes the names of the entries to be included in the archive
-from the template file provided.
-This template file is expected to be in the
-.Dv METALOG
-format, as generated during the
-.Nx
-.Dv build.sh
-phase.
+.It Fl c
+create the archive
 .It Fl f Ar archive
 Use the
 .Xr libmat 3
@@ -76,12 +69,6 @@
 or will be read from
 .Dv stdin
 depending on the action specified.
-.It Fl V
-verify the archive does not contain dangerous
-entries which could compromise a machine if the archive
-is extracted or listed.
-.It Fl c
-create the archive
 .It Fl p
 when extracting the components of the archive,
 preserve the file owner and group information,
@@ -89,17 +76,32 @@
 Setuid and setgid bits are only preserved
 if the program is run with an effective
 uid of 0.
+.It Fl T Ar template
+takes the names of the entries to be included in the archive
+from the template file provided.
+This template file is expected to be in the
+.Dv METALOG
+format, as generated during the
+.Nx
+.Dv build.sh
+phase.
 .It Fl t
 list the contents of the archive on stdout.
+.It Fl V
+verify the archive does not contain dangerous
+entries which could compromise a machine if the archive
+is extracted or listed.
 .It Fl v
 perform operations in a verbose manner.
-This option can be repeated to provide higher 
+This option can be repeated to provide higher
 levels of verbosity.
 For instance, when listing entries,
 a verbosity level of 2 will also show
 the
 .Xr SHA256 3
 digests associated with the archive component.
+.It Fl x
+extract the contents of the archive.
 .El
 .Pp
 .Nm
@@ -111,7 +113,7 @@
 but without some of the constraints and limits
 inherent in those archivers.
 In addition,
-digests are used to make sure that the 
+digests are used to make sure that the
 contents of the archive remain the same as when the archive was made.
 To protect against malicious archives, a sanity
 check,



CVS commit: othersrc/external/bsd/mat/dist

2011-06-20 Thread Thomas Klausner
Module Name:othersrc
Committed By:   wiz
Date:   Mon Jun 20 15:09:18 UTC 2011

Modified Files:
othersrc/external/bsd/mat/dist: mat.1

Log Message:
Reinstate my changes which got lost in mattar conversion.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/mat/dist/mat.1

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

Modified files:

Index: othersrc/external/bsd/mat/dist/mat.1
diff -u othersrc/external/bsd/mat/dist/mat.1:1.3 othersrc/external/bsd/mat/dist/mat.1:1.4
--- othersrc/external/bsd/mat/dist/mat.1:1.3	Mon Jun 20 14:58:53 2011
+++ othersrc/external/bsd/mat/dist/mat.1	Mon Jun 20 15:09:18 2011
@@ -1,4 +1,4 @@
-.\" $NetBSD: mat.1,v 1.3 2011/06/20 14:58:53 agc Exp $
+.\" $NetBSD: mat.1,v 1.4 2011/06/20 15:09:18 wiz Exp $
 .\"
 .\" Copyright (c) 2011 Alistair Crooks 
 .\" All rights reserved.
@@ -31,10 +31,10 @@
 .Nd minimalist archive tool program
 .Sh SYNOPSIS
 .Nm
-.Op Fl Vcptvx
+.Op Fl cptVvx
 .Op Fl C Ar directory
-.Op Fl T Ar template
 .Op Fl f Ar archive
+.Op Fl T Ar template
 .Op Ar file ...
 .Sh DESCRIPTION
 The
@@ -56,15 +56,8 @@
 perform an initial
 .Xr chdir 2
 into the specified directory before attempting to resolve any filenames.
-.It Fl T Ar template
-takes the names of the entries to be included in the archive
-from the template file provided.
-This template file is expected to be in the
-.Dv METALOG
-format, as generated during the
-.Nx
-.Dv build.sh
-phase.
+.It Fl c
+create the archive
 .It Fl f Ar archive
 Use the
 .Xr libmat 3
@@ -76,12 +69,6 @@
 or will be read from
 .Dv stdin
 depending on the action specified.
-.It Fl V
-verify the archive does not contain dangerous
-entries which could compromise a machine if the archive
-is extracted or listed.
-.It Fl c
-create the archive
 .It Fl p
 when extracting the components of the archive,
 preserve the file owner and group information,
@@ -89,17 +76,32 @@
 Setuid and setgid bits are only preserved
 if the program is run with an effective
 uid of 0.
+.It Fl T Ar template
+takes the names of the entries to be included in the archive
+from the template file provided.
+This template file is expected to be in the
+.Dv METALOG
+format, as generated during the
+.Nx
+.Dv build.sh
+phase.
 .It Fl t
 list the contents of the archive on stdout.
+.It Fl V
+verify the archive does not contain dangerous
+entries which could compromise a machine if the archive
+is extracted or listed.
 .It Fl v
 perform operations in a verbose manner.
-This option can be repeated to provide higher 
+This option can be repeated to provide higher
 levels of verbosity.
 For instance, when listing entries,
 a verbosity level of 2 will also show
 the
 .Xr SHA256 3
 digests associated with the archive component.
+.It Fl x
+extract the contents of the archive.
 .El
 .Pp
 .Nm
@@ -111,7 +113,7 @@
 but without some of the constraints and limits
 inherent in those archivers.
 In addition,
-digests are used to make sure that the 
+digests are used to make sure that the
 contents of the archive remain the same as when the archive was made.
 To protect against malicious archives, a sanity
 check,



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

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 15:01:30 UTC 2011

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

Log Message:
Inialize sensor state before registering.


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

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

Modified files:

Index: src/sys/arch/x86/x86/coretemp.c
diff -u src/sys/arch/x86/x86/coretemp.c:1.25 src/sys/arch/x86/x86/coretemp.c:1.26
--- src/sys/arch/x86/x86/coretemp.c:1.25	Sat Mar 19 06:15:12 2011
+++ src/sys/arch/x86/x86/coretemp.c	Mon Jun 20 15:01:30 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: coretemp.c,v 1.25 2011/03/19 06:15:12 ahoka Exp $ */
+/* $NetBSD: coretemp.c,v 1.26 2011/06/20 15:01:30 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: coretemp.c,v 1.25 2011/03/19 06:15:12 ahoka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coretemp.c,v 1.26 2011/06/20 15:01:30 pgoyette Exp $");
 
 #include 
 #include 
@@ -172,6 +172,7 @@
 
 	sc->sc_sensor.units = ENVSYS_STEMP;
 	sc->sc_sensor.flags = ENVSYS_FMONCRITICAL;
+	sc->sc_sensor.state = ENVSYS_SINVALID;
 
 	(void)pmf_device_register(self, NULL, NULL);
 	(void)snprintf(sc->sc_sensor.desc, sizeof(sc->sc_sensor.desc),



CVS commit: src/sys/dev/acpi

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 15:00:04 UTC 2011

Modified Files:
src/sys/dev/acpi: thinkpad_acpi.c

Log Message:
Initialize sensor state before trying to register.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/acpi/thinkpad_acpi.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/acpi/thinkpad_acpi.c
diff -u src/sys/dev/acpi/thinkpad_acpi.c:1.38 src/sys/dev/acpi/thinkpad_acpi.c:1.39
--- src/sys/dev/acpi/thinkpad_acpi.c:1.38	Mon Jun  6 17:53:01 2011
+++ src/sys/dev/acpi/thinkpad_acpi.c	Mon Jun 20 15:00:04 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: thinkpad_acpi.c,v 1.38 2011/06/06 17:53:01 pgoyette Exp $ */
+/* $NetBSD: thinkpad_acpi.c,v 1.39 2011/06/20 15:00:04 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.38 2011/06/06 17:53:01 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.39 2011/06/20 15:00:04 pgoyette Exp $");
 
 #include 
 #include 
@@ -472,6 +472,7 @@
 	for (i = j = 0; i < THINKPAD_NTEMPSENSORS; i++) {
 
 		sc->sc_sensor[i].units = ENVSYS_STEMP;
+		sc->sc_sensor[i].state = ENVSYS_SINVALID;
 
 		(void)snprintf(sc->sc_sensor[i].desc,
 		sizeof(sc->sc_sensor[i].desc), "temperature %d", i);
@@ -484,6 +485,7 @@
 	for (i = THINKPAD_NTEMPSENSORS; i < THINKPAD_NSENSORS; i++, j++) {
 
 		sc->sc_sensor[i].units = ENVSYS_SFANRPM;
+		sc->sc_sensor[i].state = ENVSYS_SINVALID;
 
 		(void)snprintf(sc->sc_sensor[i].desc,
 		sizeof(sc->sc_sensor[i].desc), "fan speed %d", j);



CVS commit: othersrc/external/bsd/mat

2011-06-20 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Mon Jun 20 14:58:54 UTC 2011

Modified Files:
othersrc/external/bsd/mat/dist: main.c mat.1 mat.h
othersrc/external/bsd/mat/libmat: Makefile
othersrc/external/bsd/mat/mat: Makefile
Added Files:
othersrc/external/bsd/mat/dist: frontends.c matpax.1

Log Message:
Abstract the mat/mattar frontend into its own function in frontends.c

Add a matpax frontend which uses a more pax-like interface

Add manual pages for matpax, fixup mat(1)


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/mat/dist/frontends.c \
othersrc/external/bsd/mat/dist/matpax.1
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/mat/dist/main.c \
othersrc/external/bsd/mat/dist/mat.h
cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/mat/dist/mat.1
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/mat/libmat/Makefile
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/mat/mat/Makefile

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

Modified files:

Index: othersrc/external/bsd/mat/dist/main.c
diff -u othersrc/external/bsd/mat/dist/main.c:1.1.1.1 othersrc/external/bsd/mat/dist/main.c:1.2
--- othersrc/external/bsd/mat/dist/main.c:1.1.1.1	Sat Jun 18 04:53:13 2011
+++ othersrc/external/bsd/mat/dist/main.c	Mon Jun 20 14:58:53 2011
@@ -22,9 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#include 
-
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -32,192 +30,39 @@
 
 #include "mat.h"
 
-#ifndef TMPDIR
-#define TMPDIR	"/tmp"
-#endif
-
-/* read input from stdin into a temp file */
-static int
-dostdin(const char *tmpdir, char *temp, size_t size)
-{
-	ssize_t	cc;
-	char	buf[BUFSIZ * 10];
-	int	fd;
-
-	(void) snprintf(temp, size, "%s/mat.XX", tmpdir);
-	if ((fd = mkstemp(temp)) < 0) {
-		(void) fprintf(stderr, "can't make temporary file '%s'\n", temp);
-		return -1;
-	}
-	while ((cc = read(STDIN_FILENO, buf, sizeof(buf))) > 0) {
-		if (write(fd, buf, cc) != cc) {
-			(void) fprintf(stderr, "short write to '%s'\n", temp);
-			(void) unlink(temp);
-			close(fd);
-			return -1;
-		}
-	}
-	return fd;
-}
-
-/* return non-zero if we're reading the archive */
-static int
-reading(const char *action)
-{
-	return (strcmp(action, "verify") == 0 ||
-		strcmp(action, "list")  == 0 ||
-		strcmp(action, "extract") == 0);
-}
-
-/* take a list of files from a metalog */
-static int
-read_metalog(mat_t *mat, char *metalog)
-{
-	regmatch_t	 matches[10];
-	regex_t		 r;
-	FILE		*fp;
-	char		 buf[MAT_PATH_MAX * 2];
-	char		 f[MAT_PATH_MAX];
-	int		 ok;
-
-	mat->recursing = 0;
-	if ((fp = fopen(metalog, "r")) == NULL) {
-		(void) fprintf(stderr, "can't open metalog '%s'\n", metalog);
-		return 0;
-	}
-	(void) regcomp(&r, "^([^ \t]+)[ \t]+type=[a-z]*[ \t]+uname=([^ \t]+)[ \t]+gname=([^ \t\n]+)", REG_EXTENDED);
-	for (ok = 1 ; fgets(buf, sizeof(buf), fp) != NULL ; ) {
-		if (regexec(&r, buf, 10, matches, 0) == 0) {
-			(void) snprintf(mat->user, sizeof(mat->user), "%.*s",
-(int)(matches[2].rm_eo - matches[2].rm_so),
-&buf[matches[2].rm_so]);
-			(void) snprintf(mat->group, sizeof(mat->group), "%.*s",
-(int)(matches[3].rm_eo - matches[3].rm_so),
-&buf[matches[3].rm_so]);
-			(void) snprintf(f, sizeof(f), "%.*s",
-(int)(matches[1].rm_eo - matches[1].rm_so),
-&buf[matches[1].rm_so]);
-			if (!mat_add(mat, f)) {
-ok = 0;
-			}
-		}
-	}
-	(void) fclose(fp);
-	regfree(&r);
-	return ok;
-}
+/* struct to map string to mat frontend function */
+typedef struct map_t {
+	const char	*s;
+	int		(*func)(int, char **);
+} map_t;
+
+static map_t	mappings[] = {
+	{ "tar",	mat_tar	},
+	{ "mtar",	mat_tar	},
+	{ "mattar",	mat_tar	},
+	{ "mat",	mat_tar	},
+	{ "pax",	mat_pax	},
+	{ "mpax",	mat_pax	},
+	{ "matpax",	mat_pax	},
+	{ NULL,		NULL	}
+};
 
 int
 main(int argc, char **argv)
 {
-	const char	*action;
-	mat_t	 	 mat;
-	char		 newarg[256];
-	char		 temp[MAT_PATH_MAX];
-	char		*metalog;
-	char		*dir;
-	char		*f;
-	int		 deltemp;
-	int		 fd;
-	int		 ok;
-	int		 i;
+	map_t	*mp;
+	char	*s;
 
-	(void) memset(&mat, 0x0, sizeof(mat));
-	action = NULL;
-	f = NULL;
-	metalog = NULL;
-	dir = NULL;
-	deltemp = 0;
-	if (*argv[1] != '-') {
-		(void) snprintf(newarg, sizeof(newarg), "-%s", argv[1]);
-		argv[1] = newarg;
-	}
-	while ((i = getopt(argc, argv, "C:T:Vcf:ptvx")) != -1) {
-		switch(i) {
-		case 'C':
-			dir = optarg;
-			break;
-		case 'T':
-			metalog = optarg;
-			break;
-		case 'V':
-			action = "verify";
-			break;
-		case 'c':
-			action = "create";
-			break;
-		case 'f':
-			f = optarg;
-			break;
-		case 'p':
-			mat.preserve = 1;
-			break;
-		case 't':
-			action = "list";
-			break;
-		case 'v':
-			mat.verbose += 1;
-			break;
-		case 'x':
-			action = "extract";
-			break;
-		default:
-			break;
-		}
-	}
-	if (action == NULL) {
-		(void) fprintf

CVS commit: src/sys/dev/pci

2011-06-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jun 20 13:26:58 UTC 2011

Modified Files:
src/sys/dev/pci: arcmsr.c arcmsrvar.h

Log Message:
Maintain our own storage for volume and disk ID info rather than
(ab)using envstat's storage.

XXX Compile-tested only.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pci/arcmsr.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/arcmsrvar.h

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

Modified files:

Index: src/sys/dev/pci/arcmsr.c
diff -u src/sys/dev/pci/arcmsr.c:1.27 src/sys/dev/pci/arcmsr.c:1.28
--- src/sys/dev/pci/arcmsr.c:1.27	Sat Jun  4 13:25:56 2011
+++ src/sys/dev/pci/arcmsr.c	Mon Jun 20 13:26:58 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: arcmsr.c,v 1.27 2011/06/04 13:25:56 pgoyette Exp $ */
+/*	$NetBSD: arcmsr.c,v 1.28 2011/06/20 13:26:58 pgoyette Exp $ */
 /*	$OpenBSD: arc.c,v 1.68 2007/10/27 03:28:27 dlg Exp $ */
 
 /*
@@ -21,7 +21,7 @@
 #include "bio.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: arcmsr.c,v 1.27 2011/06/04 13:25:56 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arcmsr.c,v 1.28 2011/06/20 13:26:58 pgoyette Exp $");
 
 #include 
 #include 
@@ -1735,8 +1735,8 @@
 		kthread_exit(0);
 
 	sc->sc_sme = sysmon_envsys_create();
-	slen = sizeof(envsys_data_t) * sc->sc_nsensors;
-	sc->sc_sensors = kmem_zalloc(slen, KM_SLEEP);
+	slen = sizeof(arc_edata_t) * sc->sc_nsensors;
+	sc->sc_arc_sensors = kmem_zalloc(slen, KM_SLEEP);
 
 	/* Attach sensors for volumes and disks */
 	for (i = 0; i < bi.bi_novol; i++) {
@@ -1745,44 +1745,47 @@
 		if (arc_bio_vol(sc, &bv) != 0)
 			goto bad;
 
-		sc->sc_sensors[count].units = ENVSYS_DRIVE;
-		sc->sc_sensors[count].flags = ENVSYS_FMONSTCHANGED;
+		sc->sc_arc_sensors[count].arc_sensor.units = ENVSYS_DRIVE;
+		sc->sc_arc_sensors[count].arc_sensor.flags =
+		ENVSYS_FMONSTCHANGED;
 
 		/* Skip passthrough volumes */		
 		if (bv.bv_level == BIOC_SVOL_PASSTHRU)
 			continue;
 
 		if (bv.bv_level == BIOC_SVOL_RAID10)
-			snprintf(sc->sc_sensors[count].desc,
-			sizeof(sc->sc_sensors[count].desc),
+			snprintf(sc->sc_arc_sensors[count].arc_sensor.desc,
+			sizeof(sc->sc_arc_sensors[count].arc_sensor.desc),
 			"RAID 1+0 volume%d (%s)", i, bv.bv_dev);
 		else
-			snprintf(sc->sc_sensors[count].desc,
-			sizeof(sc->sc_sensors[count].desc),
+			snprintf(sc->sc_arc_sensors[count].arc_sensor.desc,
+			sizeof(sc->sc_arc_sensors[count].arc_sensor.desc),
 			"RAID %d volume%d (%s)", bv.bv_level, i,
 			bv.bv_dev);
 
-		sc->sc_sensors[count].value_max = i;
+		sc->sc_arc_sensors[count].arc_volid = i;
 
 		if (sysmon_envsys_sensor_attach(sc->sc_sme,
-		&sc->sc_sensors[count]))
+		&sc->sc_arc_sensors[count].arc_sensor))
 			goto bad;
 
 		count++;
 
 		/* Attach disk sensors for this volume */
 		for (j = 0; j < bv.bv_nodisk; j++) {
-			sc->sc_sensors[count].units = ENVSYS_DRIVE;
-			sc->sc_sensors[count].flags = ENVSYS_FMONSTCHANGED;
+			sc->sc_arc_sensors[count].arc_sensor.units =
+			ENVSYS_DRIVE;
+			sc->sc_arc_sensors[count].arc_sensor.flags =
+			ENVSYS_FMONSTCHANGED;
 
-			snprintf(sc->sc_sensors[count].desc,
-			sizeof(sc->sc_sensors[count].desc),
+			snprintf(sc->sc_arc_sensors[count].arc_sensor.desc,
+			sizeof(sc->sc_arc_sensors[count].arc_sensor.desc),
 			"disk%d volume%d (%s)", j, i, bv.bv_dev);
-			sc->sc_sensors[count].value_max = i;
-			sc->sc_sensors[count].private = j + 10;
+			sc->sc_arc_sensors[count].arc_volid = i;
+			sc->sc_arc_sensors[count].arc_diskid = j + 10;
 
 			if (sysmon_envsys_sensor_attach(sc->sc_sme,
-			&sc->sc_sensors[count]))
+			&sc->sc_arc_sensors[count].arc_sensor))
 goto bad;
 
 			count++;
@@ -1806,10 +1809,10 @@
 
 bad:
 	sysmon_envsys_destroy(sc->sc_sme);
-	kmem_free(sc->sc_sensors, slen);
+	kmem_free(sc->sc_arc_sensors, slen);
 
 	sc->sc_sme = NULL;
-	sc->sc_sensors = NULL;
+	sc->sc_arc_sensors = NULL;
 
 	kthread_exit(0);
 }
@@ -1820,13 +1823,14 @@
 	struct arc_softc	*sc = sme->sme_cookie;
 	struct bioc_vol		bv;
 	struct bioc_disk	bd;
+	arc_edata_t		*arcdata = (arc_edata_t *)edata;
 
 	/* sanity check */
 	if (edata->units != ENVSYS_DRIVE)
 		return;
 
 	memset(&bv, 0, sizeof(bv));
-	bv.bv_volid = edata->value_max;
+	bv.bv_volid = arcdata->arc_volid;
 
 	if (arc_bio_vol(sc, &bv)) {
 		edata->value_cur = ENVSYS_DRIVE_EMPTY;
@@ -1835,10 +1839,10 @@
 	}
 
 	/* Current sensor is handling a disk volume member */
-	if (edata->private) {
+	if (arcdata->arc_diskid) {
 		memset(&bd, 0, sizeof(bd));
-		bd.bd_volid = edata->value_max;
-		bd.bd_diskid = edata->private - 10;
+		bd.bd_volid = arcdata->arc_volid;
+		bd.bd_diskid = arcdata->arc_diskid - 10;
 
 		if (arc_bio_disk_volume(sc, &bd)) {
 			edata->value_cur = ENVSYS_DRIVE_OFFLINE;

Index: src/sys/dev/pci/arcmsrvar.h
diff -u src/sys/dev/pci/arcmsrvar.h:1.13 src/sys/dev/pci/arcmsrvar.h:1.14
--- src/sys/dev/pci/arcmsrvar.h:1.13	Tue Sep 23 22:22:41 2008
+++ src/sys/dev/p

CVS commit: src/distrib/alpha/instkernel/ramdisk

2011-06-20 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Jun 20 13:09:38 UTC 2011

Modified Files:
src/distrib/alpha/instkernel/ramdisk: list

Log Message:
Fix pasto botch.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/distrib/alpha/instkernel/ramdisk/list

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

Modified files:

Index: src/distrib/alpha/instkernel/ramdisk/list
diff -u src/distrib/alpha/instkernel/ramdisk/list:1.40 src/distrib/alpha/instkernel/ramdisk/list:1.41
--- src/distrib/alpha/instkernel/ramdisk/list:1.40	Sun Jun 19 06:48:07 2011
+++ src/distrib/alpha/instkernel/ramdisk/list	Mon Jun 20 13:09:38 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.40 2011/06/19 06:48:07 tsutsui Exp $
+#	$NetBSD: list,v 1.41 2011/06/20 13:09:38 tsutsui Exp $
 
 SRCDIRS	bin sbin usr.bin/less usr.bin usr.sbin
 
@@ -57,7 +57,7 @@
 # init invokes the shell as -sh
 ARGVLN	sh -sh
 
-SPECIAL	ping		srcdir	distrib/utils/x_gzip
+SPECIAL	gzip		srcdir	distrib/utils/x_gzip
 SPECIAL	ping		srcdir	distrib/utils/x_ping
 
 LIBS	-ledit -lutil -lcurses -lterminfo -lrmt -lcrypt -ll -lm -lz -lprop



CVS commit: src/sys/arch/zaurus/stand/zboot

2011-06-20 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Mon Jun 20 12:39:21 UTC 2011

Modified Files:
src/sys/arch/zaurus/stand/zboot: boot.c compat_linux.h diskprobe.c
pathnames.h unixdev.h unixsys.S version

Log Message:
support SL-C1000.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/zaurus/stand/zboot/boot.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/zaurus/stand/zboot/compat_linux.h \
src/sys/arch/zaurus/stand/zboot/diskprobe.c \
src/sys/arch/zaurus/stand/zboot/pathnames.h \
src/sys/arch/zaurus/stand/zboot/unixdev.h \
src/sys/arch/zaurus/stand/zboot/unixsys.S \
src/sys/arch/zaurus/stand/zboot/version

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/zaurus/stand/zboot/boot.c
diff -u src/sys/arch/zaurus/stand/zboot/boot.c:1.2 src/sys/arch/zaurus/stand/zboot/boot.c:1.3
--- src/sys/arch/zaurus/stand/zboot/boot.c:1.2	Sat Jan 22 19:19:25 2011
+++ src/sys/arch/zaurus/stand/zboot/boot.c	Mon Jun 20 12:39:21 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.2 2011/01/22 19:19:25 joerg Exp $	*/
+/*	$NetBSD: boot.c,v 1.3 2011/06/20 12:39:21 nonaka Exp $	*/
 
 /*
  * Copyright (c) 2009 NONAKA Kimihiro 
@@ -128,7 +128,7 @@
 			} while (isnum(fname[i]));
 		}
 
-#define isvalidpart(c) ((c) >= 'a' && (c) <= 'a' + MAXPARTITIONS)
+#define isvalidpart(c) ((c) >= 'a' && (c) < 'a' + MAXPARTITIONS)
 		if (i < devlen) {
 			if (!isvalidpart(fname[i]))
 return (EPART);

Index: src/sys/arch/zaurus/stand/zboot/compat_linux.h
diff -u src/sys/arch/zaurus/stand/zboot/compat_linux.h:1.1 src/sys/arch/zaurus/stand/zboot/compat_linux.h:1.2
--- src/sys/arch/zaurus/stand/zboot/compat_linux.h:1.1	Mon Mar  2 09:33:02 2009
+++ src/sys/arch/zaurus/stand/zboot/compat_linux.h	Mon Jun 20 12:39:21 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_linux.h,v 1.1 2009/03/02 09:33:02 nonaka Exp $	*/
+/*	$NetBSD: compat_linux.h,v 1.2 2011/06/20 12:39:21 nonaka Exp $	*/
 /*	$OpenBSD: compat_linux.h,v 1.8 2007/06/16 00:26:33 deraadt Exp $	*/
 
 /*
@@ -60,6 +60,7 @@
 #define __NR_ioctl		(__NR_SYSCALL_BASE + LINUX_SYS_ioctl)
 #define __NR_select		(__NR_SYSCALL_BASE + LINUX_SYS_select)
 #define __NR_stat		(__NR_SYSCALL_BASE + LINUX_SYS_stat)
+#define __NR_fstat		(__NR_SYSCALL_BASE + LINUX_SYS_fstat)
 #define __NR_syscall		(__NR_SYSCALL_BASE + 113)
 
 #undef	SYS_select
Index: src/sys/arch/zaurus/stand/zboot/diskprobe.c
diff -u src/sys/arch/zaurus/stand/zboot/diskprobe.c:1.1 src/sys/arch/zaurus/stand/zboot/diskprobe.c:1.2
--- src/sys/arch/zaurus/stand/zboot/diskprobe.c:1.1	Mon Mar  2 09:33:02 2009
+++ src/sys/arch/zaurus/stand/zboot/diskprobe.c	Mon Jun 20 12:39:21 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: diskprobe.c,v 1.1 2009/03/02 09:33:02 nonaka Exp $	*/
+/*	$NetBSD: diskprobe.c,v 1.2 2011/06/20 12:39:21 nonaka Exp $	*/
 /*	$OpenBSD: diskprobe.c,v 1.3 2006/10/13 00:00:55 krw Exp $	*/
 
 /*
@@ -40,14 +40,20 @@
 #include "boot.h"
 #include "disk.h"
 #include "unixdev.h"
+#include "pathnames.h"
 #include "compat_linux.h"
 
+/* All the info on /proc/partitions */
+struct partinfo {
+	char devname[MAXDEVNAME];
+	TAILQ_ENTRY(partinfo) list;
+};
+TAILQ_HEAD(partlist_lh, partinfo);
+struct partlist_lh partlist;
+
 /* Disk spin-up wait timeout. */
 static u_int timeout = 10;
 
-/* Local Prototypes */
-static void hardprobe(char *buf, size_t bufsiz);
-
 /* List of disk devices we found/probed */
 struct disklist_lh disklist;
 
@@ -129,11 +135,130 @@
 		strlcat(buf, "none...", bufsiz);
 }
 
+static void
+getpartitions(void)
+{
+	struct linux_stat sb;
+	struct partinfo *pip;
+	char *bc, *top, *next, *p, *q;
+	int fd, off, len;
+
+	fd = uopen(_PATH_PARTITIONS, LINUX_O_RDONLY);
+	if (fd == -1)
+		return;
+
+	if (ufstat(fd, &sb) < 0) {
+		uclose(fd);
+		return;
+	}
+
+	bc = alloc(sb.lst_size + 1);
+	if (bc == NULL) {
+		printf("Could not allocate memory for %s\n", _PATH_PARTITIONS);
+		uclose(fd);
+		return;
+	}
+
+	off = 0;
+	do {
+		len = uread(fd, bc + off, 1024);
+		if (len <= 0)
+			break;
+		off += len;
+	} while (len > 0);
+	bc[off] = '\0';
+
+	uclose(fd);
+
+	/* bc now contains the whole /proc/partitions */
+	for (p = bc; *p != '\0'; p = next) {
+		top = p;
+
+		/* readline */
+		for (; *p != '\0' && *p != '\r' && *p != '\n'; p++)
+			continue;
+		if (*p == '\r') {
+			*p++ = '\0';
+			if (*p == '\n')
+*p++ = '\0';
+		} else if (*p == '\n')
+			*p++ = '\0';
+		next = p;
+
+		/*
+		 * /proc/partitions format:
+		 * major minor  #blocks  name
+		 *
+		 *   %d%d %d %s
+		 *
+		 * e.g.:
+		 * major minor  #blocks  name
+		 *
+		 *   22 07962192 hdc
+		 *   22 1  10079 hdc1
+		 *   60 0 965120 mmcda
+		 *   60 1  43312 mmcda1
+		 */
+
+		/* trailing space */
+		for (p = top; *p == ' ' || *p == '\t'; p++)
+			continue;
+
+		/* major */
+		for (; isdigit(*p); p++)
+			continue;
+		if (*p != ' ' && *p != '\t')
+			continue;	/* next line */
+		for (; *p == ' ' || *p == '\t'

CVS commit: src/sys/net

2011-06-20 Thread Mihai Chelaru
Module Name:src
Committed By:   kefren
Date:   Mon Jun 20 09:43:27 UTC 2011

Modified Files:
src/sys/net: if_loop.c

Log Message:
Avoid computing INET[6] cksums for MPLS packets


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/net/if_loop.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/net/if_loop.c
diff -u src/sys/net/if_loop.c:1.74 src/sys/net/if_loop.c:1.75
--- src/sys/net/if_loop.c:1.74	Fri Jun 17 09:15:24 2011
+++ src/sys/net/if_loop.c	Mon Jun 20 09:43:27 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_loop.c,v 1.74 2011/06/17 09:15:24 kefren Exp $	*/
+/*	$NetBSD: if_loop.c,v 1.75 2011/06/20 09:43:27 kefren Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.74 2011/06/17 09:15:24 kefren Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.75 2011/06/20 09:43:27 kefren Exp $");
 
 #include "opt_inet.h"
 #include "opt_atalk.h"
@@ -217,7 +217,7 @@
 looutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
 struct rtentry *rt)
 {
-	int s, isr;
+	int s, isr = -1;
 	struct ifqueue *ifq = NULL;
 	int csum_flags;
 
@@ -268,6 +268,19 @@
 
 	m_tag_delete_nonpersistent(m);
 
+#ifdef MPLS
+	if (rt != NULL && rt_gettag(rt) != NULL &&
+	rt_gettag(rt)->sa_family == AF_MPLS &&
+	(m->m_flags & (M_MCAST | M_BCAST)) == 0) {
+		union mpls_shim msh;
+		msh.s_addr = MPLS_GETSADDR(rt);
+		if (msh.shim.label != MPLS_LABEL_IMPLNULL) {
+			ifq = &mplsintrq;
+			isr = NETISR_MPLS;
+		}
+	}
+	if (isr != NETISR_MPLS)
+#endif
 	switch (dst->sa_family) {
 
 #ifdef INET
@@ -320,18 +333,6 @@
 		m_freem(m);
 		return (EAFNOSUPPORT);
 	}
-#ifdef MPLS
-	if (rt != NULL && rt_gettag(rt) != NULL &&
-	rt_gettag(rt)->sa_family == AF_MPLS &&
-	(m->m_flags & (M_MCAST | M_BCAST)) == 0) {
-		union mpls_shim msh;
-		msh.s_addr = MPLS_GETSADDR(rt);
-		if (msh.shim.label != MPLS_LABEL_IMPLNULL) {
-			ifq = &mplsintrq;
-			isr = NETISR_MPLS;
-		}
-	}
-#endif
 	s = splnet();
 	if (IF_QFULL(ifq)) {
 		IF_DROP(ifq);



CVS commit: src/gnu/usr.bin/gdb6/bfd

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Jun 20 09:27:43 UTC 2011

Modified Files:
src/gnu/usr.bin/gdb6/bfd: Makefile

Log Message:
remove sh5 code.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/gnu/usr.bin/gdb6/bfd/Makefile

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

Modified files:

Index: src/gnu/usr.bin/gdb6/bfd/Makefile
diff -u src/gnu/usr.bin/gdb6/bfd/Makefile:1.5 src/gnu/usr.bin/gdb6/bfd/Makefile:1.6
--- src/gnu/usr.bin/gdb6/bfd/Makefile:1.5	Sun Mar 14 00:26:09 2010
+++ src/gnu/usr.bin/gdb6/bfd/Makefile	Mon Jun 20 09:27:43 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2010/03/14 00:26:09 mrg Exp $
+#	$NetBSD: Makefile,v 1.6 2011/06/20 09:27:43 mrg Exp $
 
 .include 
 
@@ -27,12 +27,6 @@
 
 .include 
 
-# XXX
-.if ${MACHINE_CPU} == "sh5"
-COPTS.elf32.c=-O1
-COPTS.elf64.c=-O1
-.endif
-
 ${OBJS} ${SOBJS}: elf32-target.h elf64-target.h
 targets.o targets.pico: targmatch.h Makefile
 



CVS commit: src/sys/arch/sparc64

2011-06-20 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Mon Jun 20 09:25:48 UTC 2011

Modified Files:
src/sys/arch/sparc64/include: db_machdep.h
src/sys/arch/sparc64/sparc64: db_trace.c

Log Message:
Remove frame32 hack with using the same trick in netbsd32_machdep.c.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sparc64/include/db_machdep.h
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/sparc64/sparc64/db_trace.c

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

Modified files:

Index: src/sys/arch/sparc64/include/db_machdep.h
diff -u src/sys/arch/sparc64/include/db_machdep.h:1.31 src/sys/arch/sparc64/include/db_machdep.h:1.32
--- src/sys/arch/sparc64/include/db_machdep.h:1.31	Fri May 27 12:41:18 2011
+++ src/sys/arch/sparc64/include/db_machdep.h	Mon Jun 20 09:25:48 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_machdep.h,v 1.31 2011/05/27 12:41:18 nakayama Exp $ */
+/*	$NetBSD: db_machdep.h,v 1.32 2011/06/20 09:25:48 nakayama Exp $ */
 
 /*
  * Mach Operating System
@@ -37,6 +37,9 @@
 
 #include 
 
+#ifndef SUN4U
+#define SUN4U	/* see .../sparc/include/frame.h for the reason */
+#endif
 #include 
 #include 
 #include 

Index: src/sys/arch/sparc64/sparc64/db_trace.c
diff -u src/sys/arch/sparc64/sparc64/db_trace.c:1.47 src/sys/arch/sparc64/sparc64/db_trace.c:1.48
--- src/sys/arch/sparc64/sparc64/db_trace.c:1.47	Fri Apr 15 08:43:12 2011
+++ src/sys/arch/sparc64/sparc64/db_trace.c	Mon Jun 20 09:25:48 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_trace.c,v 1.47 2011/04/15 08:43:12 mrg Exp $ */
+/*	$NetBSD: db_trace.c,v 1.48 2011/06/20 09:25:48 nakayama Exp $ */
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath.  All rights reserved.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.47 2011/04/15 08:43:12 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.48 2011/06/20 09:25:48 nakayama Exp $");
 
 #include 
 #include 
@@ -67,7 +67,6 @@
 	return val;
 }
 #define	KLOAD(x)	kload((db_addr_t)(u_long)&(x))
-#define frame32 frame	/* XXX */
 #endif
 
 void
@@ -278,7 +277,7 @@
   f->fr_local[4], f->fr_local[5], f->fr_local[6], f->fr_local[7]);
 			db_printf("%8x %8x %8x %8x %8x %8x %8x=sp %8x=pc:",
   f->fr_arg[0], f->fr_arg[1], f->fr_arg[2], f->fr_arg[3],
-  f->fr_arg[4], f->fr_arg[5], (unsigned)(uintptr_t)f->fr_fp, f->fr_pc);
+  f->fr_arg[4], f->fr_arg[5], f->fr_fp, f->fr_pc);
 			db_printsym(f->fr_pc, DB_STGY_PROC, db_printf);
 			db_printf("\n");
 		} else {
@@ -295,7 +294,7 @@
   f->fr_arg[0], f->fr_arg[1], 
   f->fr_arg[2], f->fr_arg[3],
   f->fr_arg[4], f->fr_arg[5], 
-  (unsigned)(uintptr_t)f->fr_fp, f->fr_pc);
+  f->fr_fp, f->fr_pc);
 		}
 	}
 }



CVS commit: src

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Jun 20 09:11:17 UTC 2011

Modified Files:
src/common/lib/libc/gen: rb.c
src/crypto/dist/heimdal/lib/krb5: convert_creds.c init_creds_pw.c
rd_req.c
src/crypto/external/bsd/openssh/dist: progressmeter.c
src/external/bsd/bind/dist/lib/isc/unix: time.c
src/external/bsd/openldap/dist/libraries/liblutil: detach.c
src/lib/libc/compat/sys: compat_getdents.c
src/lib/libc/db/btree: bt_split.c
src/lib/libc/db/recno: rec_put.c
src/lib/libc/gdtoa: strtof.c
src/lib/libc/rpc: clnt_dg.c
src/lib/libedit: eln.c
src/lib/libpuffs: puffs_priv.h
src/sys/arch/amd64/include: stdarg.h

Log Message:
various build fixes for gcc 4.5.  from chuq.  XXX i'm not sure all of
these work properly wtf pointer aliasing, but there are no casts at
least...

the lib/libpuffs/puffs_priv.h is definately a real bug fix.

from chuq.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/common/lib/libc/gen/rb.c
cvs rdiff -u -r1.2 -r1.3 src/crypto/dist/heimdal/lib/krb5/convert_creds.c \
src/crypto/dist/heimdal/lib/krb5/init_creds_pw.c \
src/crypto/dist/heimdal/lib/krb5/rd_req.c
cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/openssh/dist/progressmeter.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/bind/dist/lib/isc/unix/time.c
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/external/bsd/openldap/dist/libraries/liblutil/detach.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/compat/sys/compat_getdents.c
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/db/btree/bt_split.c
cvs rdiff -u -r1.17 -r1.18 src/lib/libc/db/recno/rec_put.c
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/gdtoa/strtof.c
cvs rdiff -u -r1.24 -r1.25 src/lib/libc/rpc/clnt_dg.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libedit/eln.c
cvs rdiff -u -r1.43 -r1.44 src/lib/libpuffs/puffs_priv.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amd64/include/stdarg.h

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

Modified files:

Index: src/common/lib/libc/gen/rb.c
diff -u src/common/lib/libc/gen/rb.c:1.10 src/common/lib/libc/gen/rb.c:1.11
--- src/common/lib/libc/gen/rb.c:1.10	Tue Apr 12 16:19:44 2011
+++ src/common/lib/libc/gen/rb.c	Mon Jun 20 09:11:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rb.c,v 1.10 2011/04/12 16:19:44 matt Exp $	*/
+/*	$NetBSD: rb.c,v 1.11 2011/06/20 09:11:16 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -39,10 +39,10 @@
 #else
 #define KASSERT(s)	do { } while (/*CONSTCOND*/ 0)
 #endif
-__RCSID("$NetBSD: rb.c,v 1.10 2011/04/12 16:19:44 matt Exp $");
+__RCSID("$NetBSD: rb.c,v 1.11 2011/06/20 09:11:16 mrg Exp $");
 #else
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rb.c,v 1.10 2011/04/12 16:19:44 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rb.c,v 1.11 2011/06/20 09:11:16 mrg Exp $");
 #endif
 
 #ifdef _LIBC
@@ -91,7 +91,7 @@
 {
 
 	rbt->rbt_ops = ops;
-	*((const struct rb_node **)&rbt->rbt_root) = RB_SENTINEL_NODE;
+	rbt->rbt_root = RB_SENTINEL_NODE;
 	RB_TAILQ_INIT(&rbt->rbt_nodes);
 #ifndef RBSMALL
 	rbt->rbt_minmax[RB_DIR_LEFT] = rbt->rbt_root;	/* minimum node */

Index: src/crypto/dist/heimdal/lib/krb5/convert_creds.c
diff -u src/crypto/dist/heimdal/lib/krb5/convert_creds.c:1.2 src/crypto/dist/heimdal/lib/krb5/convert_creds.c:1.3
--- src/crypto/dist/heimdal/lib/krb5/convert_creds.c:1.2	Sat Mar 22 08:37:13 2008
+++ src/crypto/dist/heimdal/lib/krb5/convert_creds.c	Mon Jun 20 09:11:16 2011
@@ -33,7 +33,7 @@
 
 #include "krb5_locl.h"
 __RCSID("$Heimdal: convert_creds.c 22050 2007-11-11 11:20:46Z lha $"
-"$NetBSD: convert_creds.c,v 1.2 2008/03/22 08:37:13 mlelstv Exp $");
+"$NetBSD: convert_creds.c,v 1.3 2011/06/20 09:11:16 mrg Exp $");
 
 #include "krb5-v4compat.h"
 
@@ -172,7 +172,7 @@
 
 keytype = v5_creds->session.keytype;
 
-if (keytype != ENCTYPE_DES_CBC_CRC) {
+if (keytype != (krb5_keytype)ENCTYPE_DES_CBC_CRC) {
 	/* MIT krb524d doesn't like nothing but des-cbc-crc tickets,
so go get one */
 	krb5_creds template;
Index: src/crypto/dist/heimdal/lib/krb5/init_creds_pw.c
diff -u src/crypto/dist/heimdal/lib/krb5/init_creds_pw.c:1.2 src/crypto/dist/heimdal/lib/krb5/init_creds_pw.c:1.3
--- src/crypto/dist/heimdal/lib/krb5/init_creds_pw.c:1.2	Sat Mar 22 08:37:13 2008
+++ src/crypto/dist/heimdal/lib/krb5/init_creds_pw.c	Mon Jun 20 09:11:16 2011
@@ -34,7 +34,7 @@
 #include "krb5_locl.h"
 
 __RCSID("$Heimdal: init_creds_pw.c 21931 2007-08-27 14:11:55Z lha $"
-"$NetBSD: init_creds_pw.c,v 1.2 2008/03/22 08:37:13 mlelstv Exp $");
+"$NetBSD: init_creds_pw.c,v 1.3 2011/06/20 09:11:16 mrg Exp $");
 
 typedef struct krb5_get_init_creds_ctx {
 KDCOptions flags;
@@ -806,7 +806,7 @@
 		   heim_octet_string *data)
 {
 krb5_error_code ret;
-if (paid->etype == ENCTYPE_NULL)
+if (paid->etype == (krb5_enctype)ENCTYPE_NULL)
 	return NULL;
 ret = set_paid(paid, context, 
 		   paid->etype,
Index: src/c

CVS commit: src/sys/arch/powerpc

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jun 20 08:47:13 UTC 2011

Modified Files:
src/sys/arch/powerpc/include: cpu.h
src/sys/arch/powerpc/powerpc: powerpc_machdep.c

Log Message:
Make more module friendly (part 1).
Don't export frame.h and psl.h to all of the kernel.
add lwp_pc and clkf accessor functions.
whitespace cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/powerpc/include/cpu.h
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/powerpc/powerpc/powerpc_machdep.c

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

Modified files:

Index: src/sys/arch/powerpc/include/cpu.h
diff -u src/sys/arch/powerpc/include/cpu.h:1.82 src/sys/arch/powerpc/include/cpu.h:1.83
--- src/sys/arch/powerpc/include/cpu.h:1.82	Fri Jun 17 19:04:00 2011
+++ src/sys/arch/powerpc/include/cpu.h	Mon Jun 20 08:47:12 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.82 2011/06/17 19:04:00 matt Exp $	*/
+/*	$NetBSD: cpu.h,v 1.83 2011/06/20 08:47:12 matt Exp $	*/
 
 /*
  * Copyright (C) 1999 Wolfgang Solfrank.
@@ -45,13 +45,12 @@
 #if defined(_KERNEL) || defined(_KMEMUSER)
 #if defined(_KERNEL_OPT)
 #include "opt_lockdebug.h"
+#include "opt_modular.h"
 #include "opt_multiprocessor.h"
 #include "opt_ppcarch.h"
 #endif
 
 #ifdef _KERNEL
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -154,8 +153,7 @@
 
 #ifdef _KERNEL
 
-#ifdef MULTIPROCESSOR
-
+#if defined(MULTIPROCESSOR) && !defined(_MODULE)
 struct cpu_hatch_data {
 	device_t self;
 	struct cpu_info *ci;
@@ -168,33 +166,25 @@
 	int batu[4], batl[4];
 	int tbu, tbl;
 };
+#endif /* MULTIPROCESSOR && !_MODULE */
 
-static __inline int
-cpu_number(void)
-{
-	int pir;
-
-	__asm ("mfspr %0,1023" : "=r"(pir));
-	return pir;
-}
-
-void	cpu_boot_secondary_processors(void);
-
+#if defined(MULTIPROCESSOR) || defined(_MODULE)
+#define	cpu_number()		(curcpu()->ci_index + 0)
 
 #define CPU_IS_PRIMARY(ci)	((ci)->ci_cpuid == 0)
-#define CPU_INFO_ITERATOR		int
-#define CPU_INFO_FOREACH(cii, ci)	\
+#define CPU_INFO_ITERATOR	int
+#define CPU_INFO_FOREACH(cii, ci)\
 	cii = 0, ci = &cpu_info[0]; cii < ncpu; cii++, ci++
 
 #else
-
 #define cpu_number()		0
 
-#define CPU_INFO_ITERATOR		int
-#define CPU_INFO_FOREACH(cii, ci)	\
+#define CPU_IS_PRIMARY(ci)	true
+#define CPU_INFO_ITERATOR	int
+#define CPU_INFO_FOREACH(cii, ci)\
 	cii = 0, ci = curcpu(); ci != NULL; ci = NULL
 
-#endif /* MULTIPROCESSOR */
+#endif /* MULTIPROCESSOR || _MODULE */
 
 extern struct cpu_info cpu_info[];
 
@@ -314,88 +304,69 @@
 	return (pvr);
 }
 
-static __inline int
-cntlzw(uint32_t val)
-{
-	int 			cnt;
-
-	__asm volatile ("cntlzw %0,%1" : "=r"(cnt) : "r"(val));
-	return (cnt);
-}
-
-/*
- * functions to access the G3's cache throttling register
- * bits 1 - 9 specify additional waits on cache acess
- * bit 0 enables cache throttling
- */
-
-static __inline int
-mfictc(void)
-{
-	int reg;
-
-	__asm ("mfspr %0,1019" : "=r"(reg));
-	return reg;
-}
-
-static __inline void
-mtictc(uint32_t reg)
-{
-
-	__asm ("mtspr 1019,%0" :: "r"(reg));
-}
-
-#define	CLKF_USERMODE(frame)	(((frame)->cf_srr1 & PSL_PR) != 0)
-#define	CLKF_PC(frame)		((frame)->cf_srr0)
-#define	CLKF_INTR(frame)	((frame)->cf_idepth > 0)
-
-#define	LWP_PC(l)		(trapframe(l)->tf_srr0)
-
-#define	cpu_proc_fork(p1, p2)
-
+#if !defined(_MODULE)
 extern int powersave;
 extern int cpu_timebase;
 extern int cpu_printfataltraps;
 extern char cpu_model[];
 
-struct cpu_info *cpu_attach_common(device_t, int);
-void cpu_setup(device_t, struct cpu_info *);
-void cpu_identify(char *, size_t);
-int cpu_get_dfs(void);
-void cpu_set_dfs(int);
-void delay (unsigned int);
-void cpu_probe_cache(void);
+struct cpu_info *
+	cpu_attach_common(device_t, int);
+void	cpu_setup(device_t, struct cpu_info *);
+void	cpu_identify(char *, size_t);
+int	cpu_get_dfs(void);
+void	cpu_set_dfs(int);
+void	cpu_probe_cache(void);
 #ifndef PPC_BOOKE
-void dcache_flush_page(vaddr_t);
-void icache_flush_page(vaddr_t);
-void dcache_flush(vaddr_t, vsize_t);
-void icache_flush(vaddr_t, vsize_t);
+void	dcache_flush_page(vaddr_t);
+void	icache_flush_page(vaddr_t);
+void	dcache_flush(vaddr_t, vsize_t);
+void	icache_flush(vaddr_t, vsize_t);
 #else
-void dcache_wb_page(vaddr_t);
-void dcache_wbinv_page(vaddr_t);
-void dcache_inv_page(vaddr_t);
-void dcache_zero_page(vaddr_t);
-void icache_inv_page(vaddr_t);
-void dcache_wb(vaddr_t, vsize_t);
-void dcache_wbinv(vaddr_t, vsize_t);
-void dcache_inv(vaddr_t, vsize_t);
-void icache_inv(vaddr_t, vsize_t);
+void	dcache_wb_page(vaddr_t);
+void	dcache_wbinv_page(vaddr_t);
+void	dcache_inv_page(vaddr_t);
+void	dcache_zero_page(vaddr_t);
+void	icache_inv_page(vaddr_t);
+void	dcache_wb(vaddr_t, vsize_t);
+void	dcache_wbinv(vaddr_t, vsize_t);
+void	dcache_inv(vaddr_t, vsize_t);
+void	icache_inv(vaddr_t, vsize_t);
 #endif
-void *mapiodev(paddr_t, psize_t);
-void unmapiodev(vaddr_t, vsize_t);
+void *	mapiodev(paddr_t, psize_t);
+void	unmapiode

CVS commit: src/sys/arch

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Jun 20 08:46:28 UTC 2011

Modified Files:
src/sys/arch/hp700/stand/xxboot: Makefile
src/sys/arch/i386/stand/netboot/ne2000_isa: Makefile

Log Message:
remove some more ancient HAVE_GCC checks.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hp700/stand/xxboot/Makefile
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/i386/stand/netboot/ne2000_isa/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/hp700/stand/xxboot/Makefile
diff -u src/sys/arch/hp700/stand/xxboot/Makefile:1.14 src/sys/arch/hp700/stand/xxboot/Makefile:1.15
--- src/sys/arch/hp700/stand/xxboot/Makefile:1.14	Sun May  3 17:33:29 2009
+++ src/sys/arch/hp700/stand/xxboot/Makefile	Mon Jun 20 08:46:28 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2009/05/03 17:33:29 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.15 2011/06/20 08:46:28 mrg Exp $
 
 PROG=	xxboot
 NOMAN=	# defined
@@ -18,10 +18,6 @@
 
 .include 
 
-.if defined(HAVE_GCC) && ${HAVE_GCC} != 4
-COPTS+=	-fwritable-strings
-.endif
-
 LINKS=	${BINDIR}/${PROG} ${BINDIR}/sdboot
 
 BINDIR=		/usr/mdec

Index: src/sys/arch/i386/stand/netboot/ne2000_isa/Makefile
diff -u src/sys/arch/i386/stand/netboot/ne2000_isa/Makefile:1.2 src/sys/arch/i386/stand/netboot/ne2000_isa/Makefile:1.3
--- src/sys/arch/i386/stand/netboot/ne2000_isa/Makefile:1.2	Fri Aug 29 00:02:24 2008
+++ src/sys/arch/i386/stand/netboot/ne2000_isa/Makefile	Mon Jun 20 08:46:28 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2008/08/29 00:02:24 gmcgarry Exp $
+#	$NetBSD: Makefile,v 1.3 2011/06/20 08:46:28 mrg Exp $
 
 USE_NETIF=	ne2000_isa
 
@@ -6,7 +6,7 @@
 
 .include "../Makefile.netboot"
 
-.if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC)
+.if defined(HAVE_GCC) || defined(HAVE_PCC)
 COPTS.dp8390.c +=	-Wno-pointer-sign
 .endif
 



CVS commit: src/usr.sbin/syslogd

2011-06-20 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Mon Jun 20 08:27:15 UTC 2011

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

Log Message:
Now need to use own buffer for klog read due to previous change.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/usr.sbin/syslogd/syslogd.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/syslogd/syslogd.c
diff -u src/usr.sbin/syslogd/syslogd.c:1.103 src/usr.sbin/syslogd/syslogd.c:1.104
--- src/usr.sbin/syslogd/syslogd.c:1.103	Mon Jun 20 00:42:11 2011
+++ src/usr.sbin/syslogd/syslogd.c	Mon Jun 20 08:27:15 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: syslogd.c,v 1.103 2011/06/20 00:42:11 enami Exp $	*/
+/*	$NetBSD: syslogd.c,v 1.104 2011/06/20 08:27:15 enami Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993, 1994
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)syslogd.c	8.3 (Berkeley) 4/4/94";
 #else
-__RCSID("$NetBSD: syslogd.c,v 1.103 2011/06/20 00:42:11 enami Exp $");
+__RCSID("$NetBSD: syslogd.c,v 1.104 2011/06/20 08:27:15 enami Exp $");
 #endif
 #endif /* not lint */
 
@@ -273,10 +273,11 @@
 
 /*
  * Global line buffer.	Since we only process one event at a time,
- * a global one will do.
+ * a global one will do.  But for klog, we use own buffer so that
+ * partial line at the end of buffer can be deferred.
  */
-char *linebuf;
-size_t linebufsize, linebufoff;
+char *linebuf, *klog_linebuf;
+size_t linebufsize, klog_linebufoff;
 
 static const char *bindhostname = NULL;
 
@@ -457,6 +458,11 @@
 		logerror("Couldn't allocate buffer");
 		die(0, 0, NULL);
 	}
+	if (!(klog_linebuf = malloc(linebufsize))) {
+		logerror("Couldn't allocate buffer for klog");
+		die(0, 0, NULL);
+	}
+
 
 #ifndef SUN_LEN
 #define SUN_LEN(unp) (strlen((unp)->sun_path) + 2)
@@ -662,16 +668,16 @@
 dispatch_read_klog(int fd, short event, void *ev)
 {
 	ssize_t rv;
-	size_t resid = linebufsize - linebufoff;
+	size_t resid = linebufsize - klog_linebufoff;
 
 	DPRINTF((D_CALL|D_EVENT), "Kernel log active (%d, %d, %p)"
 		" with linebuf@%p, length %zu)\n", fd, event, ev,
-		linebuf, linebufsize);
+		klog_linebuf, linebufsize);
 
-	rv = read(fd, &linebuf[linebufoff], resid - 1);
+	rv = read(fd, &klog_linebuf[klog_linebufoff], resid - 1);
 	if (rv > 0) {
-		linebuf[linebufoff + rv] = '\0';
-		printsys(linebuf);
+		klog_linebuf[klog_linebufoff + rv] = '\0';
+		printsys(klog_linebuf);
 	} else if (rv < 0 && errno != EINTR) {
 		/*
 		 * /dev/klog has croaked.  Disable the event
@@ -1504,7 +1510,7 @@
 	char *p, *q;
 	struct buf_msg *buffer;
 
-	linebufoff = 0;
+	klog_linebufoff = 0;
 	for (p = msg; *p != '\0'; ) {
 		bool bsdsyslog = true;
 
@@ -1537,7 +1543,7 @@
 		if (*q != '\0')
 			*q++ = '\0';
 		else {
-			memcpy(linebuf, p, linebufoff = q - p);
+			memcpy(linebuf, p, klog_linebufoff = q - p);
 			break;
 		}
 



CVS commit: src/sys/lib/libsa

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Jun 20 08:22:44 UTC 2011

Modified Files:
src/sys/lib/libsa: Makefile

Log Message:
remove HAVE_GCC == 4 conditional


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/lib/libsa/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/lib/libsa/Makefile
diff -u src/sys/lib/libsa/Makefile:1.73 src/sys/lib/libsa/Makefile:1.74
--- src/sys/lib/libsa/Makefile:1.73	Thu Jun 16 16:47:53 2011
+++ src/sys/lib/libsa/Makefile	Mon Jun 20 08:22:43 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.73 2011/06/16 16:47:53 joerg Exp $
+#	$NetBSD: Makefile,v 1.74 2011/06/20 08:22:43 mrg Exp $
 
 LIB=	sa
 NOPIC=	# defined
@@ -85,6 +85,6 @@
 	@rm -f lib${LIB}.o
 	@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
 
-.if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC)
+.if defined(HAVE_GCC) || defined(HAVE_PCC)
 CPPFLAGS+=	-Wno-pointer-sign
 .endif



CVS commit: src/sys/arch/powerpc/powerpc

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jun 20 08:18:28 UTC 2011

Modified Files:
src/sys/arch/powerpc/powerpc: genassym.cf locore_subr.S

Log Message:
If this is a MODULAR kernel, export USRSTACK and CPU_MAXNUM as linker symbols
so modules can access them.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/powerpc/genassym.cf
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/powerpc/powerpc/locore_subr.S

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/powerpc/powerpc/genassym.cf
diff -u src/sys/arch/powerpc/powerpc/genassym.cf:1.7 src/sys/arch/powerpc/powerpc/genassym.cf:1.8
--- src/sys/arch/powerpc/powerpc/genassym.cf:1.7	Sat Jun 18 21:17:29 2011
+++ src/sys/arch/powerpc/powerpc/genassym.cf	Mon Jun 20 08:18:28 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.7 2011/06/18 21:17:29 matt Exp $
+#	$NetBSD: genassym.cf,v 1.8 2011/06/20 08:18:28 matt Exp $
 
 #-
 # Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -48,23 +48,26 @@
 quote #define __INTR_PRIVATE
 
 include 
-include 
+include 
 include 
-include 
-include 
+include 
 include 
+include 
 include 
-include 
+include 
 
 include 
 
-include 
-include 
+include 
+include 
+include 
 
 define	IPL_HIGH		IPL_HIGH
 define	IPL_SCHED		IPL_SCHED
 define	IPL_VM			IPL_VM
 
+define	CPU_MAXNUM		CPU_MAXNUM
+
 define	FRAMELEN	FRAMELEN
 define	FRAME_TF	offsetof(struct ktrapframe, ktf_tf)
 define	FRAME_R0	offsetof(struct ktrapframe, ktf_tf.tf_fixreg[0])
@@ -198,6 +201,7 @@
 define	PAGE_SIZE	PAGE_SIZE
 define	PAGE_MASK	PAGE_MASK
 define	PAGE_SHIFT	PAGE_SHIFT
+define	USRSTACK	USRSTACK
 
 ifdef	__HAVE_FAST_SOFTINTS
 define	__HAVE_FAST_SOFTINTS	__HAVE_FAST_SOFTINTS

Index: src/sys/arch/powerpc/powerpc/locore_subr.S
diff -u src/sys/arch/powerpc/powerpc/locore_subr.S:1.44 src/sys/arch/powerpc/powerpc/locore_subr.S:1.45
--- src/sys/arch/powerpc/powerpc/locore_subr.S:1.44	Fri Jun 17 23:14:40 2011
+++ src/sys/arch/powerpc/powerpc/locore_subr.S	Mon Jun 20 08:18:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore_subr.S,v 1.44 2011/06/17 23:14:40 matt Exp $	*/
+/*	$NetBSD: locore_subr.S,v 1.45 2011/06/20 08:18:28 matt Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -77,6 +77,7 @@
 #include "opt_lockdebug.h"
 #include "opt_multiprocessor.h"
 #include "opt_ddb.h"
+#include "opt_modular.h"
 
 #ifdef DDB
 #define	CFRAME_LRSAVE(t0)	\
@@ -142,6 +143,13 @@
 GLOBAL(powersave)
 	.long	-1
 
+#ifdef MODULAR
+	.global	__USRSTACK
+	.equ	__USRSTACK, USRSTACK
+	.global	__CPU_MAXNUM
+	.equ	__CPU_MAXNUM, CPU_MAXNUM
+#endif
+
 	.text
 	.align 2
 /*



CVS commit: src/sys/arch/powerpc/ibm4xx

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jun 20 08:13:17 UTC 2011

Modified Files:
src/sys/arch/powerpc/ibm4xx: pmap.c

Log Message:
Get rid of extern inline.
Cleanup includes.
Rearrange pv_entry so that are pointers are first.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/powerpc/ibm4xx/pmap.c

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

Modified files:

Index: src/sys/arch/powerpc/ibm4xx/pmap.c
diff -u src/sys/arch/powerpc/ibm4xx/pmap.c:1.67 src/sys/arch/powerpc/ibm4xx/pmap.c:1.68
--- src/sys/arch/powerpc/ibm4xx/pmap.c:1.67	Sat Jun 18 06:41:41 2011
+++ src/sys/arch/powerpc/ibm4xx/pmap.c	Mon Jun 20 08:13:17 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.67 2011/06/18 06:41:41 matt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.68 2011/06/20 08:13:17 matt Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -67,23 +67,24 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.67 2011/06/18 06:41:41 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.68 2011/06/20 08:13:17 matt Exp $");
 
 #include 
+#include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 
 #include 
 
-#include 
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 
@@ -158,8 +159,8 @@
 
 struct pv_entry {
 	struct pv_entry *pv_next;	/* Linked list of mappings */
-	vaddr_t pv_va;			/* virtual address of mapping */
 	struct pmap *pv_pm;
+	vaddr_t pv_va;			/* virtual address of mapping */
 };
 
 /* Each index corresponds to TLB_SIZE_* value. */
@@ -181,7 +182,7 @@
 
 static int ctx_flush(int);
 
-inline struct pv_entry *pa_to_pv(paddr_t);
+struct pv_entry *pa_to_pv(paddr_t);
 static inline char *pa_to_attr(paddr_t);
 
 static inline volatile u_int *pte_find(struct pmap *, vaddr_t);
@@ -193,7 +194,7 @@
 static int ppc4xx_tlb_size_mask(size_t, int *, int *);
 
 
-inline struct pv_entry *
+struct pv_entry *
 pa_to_pv(paddr_t pa)
 {
 	int bank, pg;



CVS commit: src/sys/arch/powerpc

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jun 20 08:07:03 UTC 2011

Modified Files:
src/sys/arch/powerpc/include: pmap.h
src/sys/arch/powerpc/include/oea: pmap.h
src/sys/arch/powerpc/oea: pmap_kernel.c

Log Message:
Add #error for unknown PPC variant
Now that oea calls cpu_fixup_stubs, we don't need pmap_fixup_stubs.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/powerpc/include/pmap.h
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/include/oea/pmap.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/oea/pmap_kernel.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/powerpc/include/pmap.h
diff -u src/sys/arch/powerpc/include/pmap.h:1.35 src/sys/arch/powerpc/include/pmap.h:1.36
--- src/sys/arch/powerpc/include/pmap.h:1.35	Tue Mar  9 22:40:06 2010
+++ src/sys/arch/powerpc/include/pmap.h	Mon Jun 20 08:07:03 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.35 2010/03/09 22:40:06 matt Exp $	*/
+/*	$NetBSD: pmap.h,v 1.36 2011/06/20 08:07:03 matt Exp $	*/
 
 #ifdef _KERNEL_OPT
 #include "opt_ppcarch.h"
@@ -11,4 +11,5 @@
 #elif defined(PPC_OEA) || defined (PPC_OEA64) || defined (PPC_OEA64_BRIDGE)
 #include 
 #else
+#error unknown PPC variant
 #endif

Index: src/sys/arch/powerpc/include/oea/pmap.h
diff -u src/sys/arch/powerpc/include/oea/pmap.h:1.22 src/sys/arch/powerpc/include/oea/pmap.h:1.23
--- src/sys/arch/powerpc/include/oea/pmap.h:1.22	Tue Feb 15 19:39:12 2011
+++ src/sys/arch/powerpc/include/oea/pmap.h	Mon Jun 20 08:07:03 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.22 2011/02/15 19:39:12 macallan Exp $	*/
+/*	$NetBSD: pmap.h,v 1.23 2011/06/20 08:07:03 matt Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -181,24 +181,22 @@
 extern const struct pmap_ops pmap64_ops;
 extern const struct pmap_ops pmap64bridge_ops;
 
-void	pmap_fixup_stubs(const struct pmap_ops *);
-
 static inline void
 pmap_setup32(void)
 {
-	pmap_fixup_stubs(&pmap32_ops);
+	pmapops = &pmap32_ops;
 }
 
 static inline void
 pmap_setup64(void)
 {
-	pmap_fixup_stubs(&pmap64_ops);
+	pmapops = &pmap64_ops;
 }
 
 static inline void
 pmap_setup64bridge(void)
 {
-	pmap_fixup_stubs(&pmap64bridge_ops);
+	pmapops = &pmap64bridge_ops;
 }
 #endif
 

Index: src/sys/arch/powerpc/oea/pmap_kernel.c
diff -u src/sys/arch/powerpc/oea/pmap_kernel.c:1.7 src/sys/arch/powerpc/oea/pmap_kernel.c:1.8
--- src/sys/arch/powerpc/oea/pmap_kernel.c:1.7	Sun Feb 27 09:01:56 2011
+++ src/sys/arch/powerpc/oea/pmap_kernel.c	Mon Jun 20 08:07:03 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_kernel.c,v 1.7 2011/02/27 09:01:56 rjs Exp $	*/
+/*	$NetBSD: pmap_kernel.c,v 1.8 2011/06/20 08:07:03 matt Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -30,7 +30,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: pmap_kernel.c,v 1.7 2011/02/27 09:01:56 rjs Exp $");
+__KERNEL_RCSID(1, "$NetBSD: pmap_kernel.c,v 1.8 2011/06/20 08:07:03 matt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_pmap.h"
@@ -58,18 +58,7 @@
 
 const struct pmap_ops *pmapops;
 
-void
-pmap_fixup_stubs(const struct pmap_ops *ops)
-{
-	extern uint32_t _ftext[], _etext[];
-	extern uint32_t __stub_pmap_start[], __stub_pmap_end[];
-
-	pmapops = ops;
-
-	powerpc_fixup_stubs(_ftext, _etext, __stub_pmap_start, __stub_pmap_end);
-}
-
-#define	__stub	__section(".stub.pmap") __noprofile
+#define	__stub	__section(".stub") __noprofile
 
 int	pmap_pte_spill(struct pmap *, vaddr_t, bool)		__stub;
 void	pmap_real_memory(paddr_t *, psize_t *)			__stub;



CVS commit: src/sys/arch

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jun 20 08:01:14 UTC 2011

Modified Files:
src/sys/arch/amigappc/include: vmparam.h
src/sys/arch/bebox/include: vmparam.h
src/sys/arch/evbppc/include: vmparam.h
src/sys/arch/ibmnws/include: vmparam.h
src/sys/arch/macppc/include: vmparam.h
src/sys/arch/mvmeppc/include: vmparam.h
src/sys/arch/ofppc/include: vmparam.h
src/sys/arch/prep/include: vmparam.h
src/sys/arch/rs6000/include: vmparam.h
src/sys/arch/sandpoint/include: vmparam.h
Added Files:
src/sys/arch/powerpc/include: vmparam.h

Log Message:
Don't export USER_SR if _MODULE is defined.
Add a common  like we have for 


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amigappc/include/vmparam.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/bebox/include/vmparam.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbppc/include/vmparam.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ibmnws/include/vmparam.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/macppc/include/vmparam.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mvmeppc/include/vmparam.h
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/ofppc/include/vmparam.h
cvs rdiff -u -r0 -r1.14 src/sys/arch/powerpc/include/vmparam.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/prep/include/vmparam.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/rs6000/include/vmparam.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sandpoint/include/vmparam.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/amigappc/include/vmparam.h
diff -u src/sys/arch/amigappc/include/vmparam.h:1.6 src/sys/arch/amigappc/include/vmparam.h:1.7
--- src/sys/arch/amigappc/include/vmparam.h:1.6	Mon Feb  3 17:09:54 2003
+++ src/sys/arch/amigappc/include/vmparam.h	Mon Jun 20 08:01:13 2011
@@ -1,3 +1,3 @@
-/*	$NetBSD: vmparam.h,v 1.6 2003/02/03 17:09:54 matt Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.7 2011/06/20 08:01:13 matt Exp $	*/
 
-#include 
+#include 

Index: src/sys/arch/bebox/include/vmparam.h
diff -u src/sys/arch/bebox/include/vmparam.h:1.15 src/sys/arch/bebox/include/vmparam.h:1.16
--- src/sys/arch/bebox/include/vmparam.h:1.15	Sun Feb 17 03:57:15 2008
+++ src/sys/arch/bebox/include/vmparam.h	Mon Jun 20 08:01:13 2011
@@ -1,4 +1,7 @@
-/*	$NetBSD: vmparam.h,v 1.15 2008/02/17 03:57:15 kiyohara Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.16 2011/06/20 08:01:13 matt Exp $	*/
 
+#if !defined(_MODULE)
 #define USER_SR		10
-#include 
+#endif
+
+#include 

Index: src/sys/arch/evbppc/include/vmparam.h
diff -u src/sys/arch/evbppc/include/vmparam.h:1.4 src/sys/arch/evbppc/include/vmparam.h:1.5
--- src/sys/arch/evbppc/include/vmparam.h:1.4	Tue Jan 18 01:10:25 2011
+++ src/sys/arch/evbppc/include/vmparam.h	Mon Jun 20 08:01:13 2011
@@ -1,13 +1,3 @@
-/*	$NetBSD: vmparam.h,v 1.4 2011/01/18 01:10:25 matt Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.5 2011/06/20 08:01:13 matt Exp $	*/
 
-#ifdef _KERNEL_OPT
-#include "opt_ppcarch.h"
-#endif
-
-#ifdef PPC_IBM4XX
-#include 
-#elif defined(PPC_OEA)
-#include 
-#elif defined(PPC_BOOKE)
-#include 
-#endif
+#include 

Index: src/sys/arch/ibmnws/include/vmparam.h
diff -u src/sys/arch/ibmnws/include/vmparam.h:1.2 src/sys/arch/ibmnws/include/vmparam.h:1.3
--- src/sys/arch/ibmnws/include/vmparam.h:1.2	Sun Dec 11 12:17:51 2005
+++ src/sys/arch/ibmnws/include/vmparam.h	Mon Jun 20 08:01:14 2011
@@ -1,4 +1,7 @@
-/*	$NetBSD: vmparam.h,v 1.2 2005/12/11 12:17:51 christos Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.3 2011/06/20 08:01:14 matt Exp $	*/
 
+#if !defined(_MODULE)
 #define	USER_SR		11
-#include 
+#endif
+
+#include 

Index: src/sys/arch/macppc/include/vmparam.h
diff -u src/sys/arch/macppc/include/vmparam.h:1.23 src/sys/arch/macppc/include/vmparam.h:1.24
--- src/sys/arch/macppc/include/vmparam.h:1.23	Mon Feb  3 17:09:56 2003
+++ src/sys/arch/macppc/include/vmparam.h	Mon Jun 20 08:01:14 2011
@@ -1,3 +1,3 @@
-/*	$NetBSD: vmparam.h,v 1.23 2003/02/03 17:09:56 matt Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.24 2011/06/20 08:01:14 matt Exp $	*/
 
-#include 
+#include 

Index: src/sys/arch/mvmeppc/include/vmparam.h
diff -u src/sys/arch/mvmeppc/include/vmparam.h:1.3 src/sys/arch/mvmeppc/include/vmparam.h:1.4
--- src/sys/arch/mvmeppc/include/vmparam.h:1.3	Mon Feb  3 17:09:58 2003
+++ src/sys/arch/mvmeppc/include/vmparam.h	Mon Jun 20 08:01:14 2011
@@ -1,4 +1,6 @@
-/*	$NetBSD: vmparam.h,v 1.3 2003/02/03 17:09:58 matt Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.4 2011/06/20 08:01:14 matt Exp $	*/
 
+#if !defined(_MODULE)
 #define	USER_SR	15
-#include 
+#endif
+#include 

Index: src/sys/arch/ofppc/include/vmparam.h
diff -u src/sys/arch/ofppc/include/vmparam.h:1.22 src/sys/arch/ofppc/include/vmparam.h:1.23
--- src/sys/arch/ofppc/include/vmparam.h:1.22	Wed Nov 14 18:34:12 2007
+++ src/sys/arch/ofppc/include/vmparam.h	Mon Jun 20 08:01:14 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.22 2007/11/14 18:34:12 garbled Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.23 2011/06/20 08:01:14 

CVS commit: src

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Jun 20 07:44:04 UTC 2011

Modified Files:
src/crypto/external/bsd/openssh/bin/sftp: Makefile
src/crypto/external/bsd/openssh/bin/ssh: Makefile
src/crypto/external/bsd/openssh/bin/ssh-keygen: Makefile
src/crypto/external/bsd/openssh/bin/sshd: Makefile
src/crypto/external/bsd/openssh/lib: Makefile
src/distrib/utils/sysinst: Makefile.inc
src/distrib/utils/x_dhclient: Makefile
src/external/bsd/am-utils/bin/amd: Makefile
src/external/bsd/am-utils/bin/amq: Makefile
src/external/bsd/am-utils/bin/pawd: Makefile
src/external/bsd/am-utils/lib/libamu: Makefile
src/external/bsd/bind: Makefile.inc
src/external/bsd/bind/bin/named: Makefile
src/external/bsd/bind/lib/libdns: Makefile
src/external/historical/nawk/bin: Makefile
src/lib/libcrypt: Makefile
src/lib/libgssapi: Makefile
src/lib/libhdb: Makefile
src/lib/libheimntlm: Makefile
src/lib/libhx509: Makefile
src/lib/libkadm5clnt: Makefile
src/lib/libkadm5srv: Makefile
src/lib/libm: Makefile
src/lib/libtelnet: Makefile
src/libexec/ipropd-master: Makefile
src/libexec/ipropd-slave: Makefile
src/libexec/kadmind: Makefile
src/libexec/kpasswdd: Makefile
src/regress/sys/kern/ras/ras1: Makefile
src/regress/sys/kern/ras/ras2: Makefile
src/regress/sys/kern/ras/ras3: Makefile
src/sbin/dkctl: Makefile
src/sbin/dump: Makefile
src/sbin/fsck_ext2fs: Makefile
src/sbin/fsck_ffs: Makefile
src/sbin/fsdb: Makefile
src/sbin/mount_smbfs: Makefile.inc
src/sbin/newfs: Makefile
src/sbin/newfs_sysvbfs: Makefile
src/sbin/restore: Makefile
src/share/mk: bsd.kmodule.mk
src/usr.bin/awk: Makefile
src/usr.bin/crontab: Makefile
src/usr.bin/ctags: Makefile
src/usr.bin/gzip: Makefile
src/usr.bin/nvi/build: Makefile
src/usr.bin/telnet: Makefile
src/usr.bin/tr: Makefile
src/usr.sbin/bootp/bootptest: Makefile
src/usr.sbin/cron: Makefile
src/usr.sbin/dhcp: Makefile.inc
src/usr.sbin/dumplfs: Makefile
src/usr.sbin/hprop: Makefile
src/usr.sbin/installboot: Makefile
src/usr.sbin/iprop-log: Makefile
src/usr.sbin/isdn/isdnd: Makefile
src/usr.sbin/isdn/isdnmonitor: Makefile
src/usr.sbin/isdn/isdntel: Makefile
src/usr.sbin/isdn/isdntrace: Makefile
src/usr.sbin/makefs/cd9660: Makefile.inc
src/usr.sbin/mopd/common: Makefile
src/usr.sbin/mopd/mopd: Makefile
src/usr.sbin/mopd/mopprobe: Makefile
src/usr.sbin/mscdlabel: Makefile
src/usr.sbin/pppd: Makefile.inc
src/usr.sbin/pppd/pppd: Makefile
src/usr.sbin/rarpd: Makefile
src/usr.sbin/rbootd: Makefile
src/usr.sbin/rpc.pcnfsd: Makefile
src/usr.sbin/rtadvd: Makefile
src/usr.sbin/tcpdump: Makefile
src/usr.sbin/wiconfig: Makefile

Log Message:
remove most of the remaining HAVE_GCC tests that are always true in
the modern world.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/crypto/external/bsd/openssh/bin/sftp/Makefile
cvs rdiff -u -r1.4 -r1.5 src/crypto/external/bsd/openssh/bin/ssh/Makefile
cvs rdiff -u -r1.2 -r1.3 \
src/crypto/external/bsd/openssh/bin/ssh-keygen/Makefile
cvs rdiff -u -r1.4 -r1.5 src/crypto/external/bsd/openssh/bin/sshd/Makefile
cvs rdiff -u -r1.8 -r1.9 src/crypto/external/bsd/openssh/lib/Makefile
cvs rdiff -u -r1.52 -r1.53 src/distrib/utils/sysinst/Makefile.inc
cvs rdiff -u -r1.16 -r1.17 src/distrib/utils/x_dhclient/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/am-utils/bin/amd/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/am-utils/bin/amq/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/am-utils/bin/pawd/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/am-utils/lib/libamu/Makefile
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/bind/Makefile.inc
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/bind/bin/named/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/bind/lib/libdns/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/historical/nawk/bin/Makefile
cvs rdiff -u -r1.21 -r1.22 src/lib/libcrypt/Makefile
cvs rdiff -u -r1.22 -r1.23 src/lib/libgssapi/Makefile
cvs rdiff -u -r1.24 -r1.25 src/lib/libhdb/Makefile
cvs rdiff -u -r1.3 -r1.4 src/lib/libheimntlm/Makefile
cvs rdiff -u -r1.6 -r1.7 src/lib/libhx509/Makefile
cvs rdiff -u -r1.25 -r1.26 src/lib/libkadm5clnt/Makefile
cvs rdiff -u -r1.28 -r1.29 src/lib/libkadm5srv/Makefile
cvs rdiff -u -r1.110 -r1.111 src/lib/libm/Makefile
cvs rdiff -u -r1.32 -r1.33 src/lib/libtelnet/Makefile
cvs rdiff -u -r1.3 -r1.4 src/libexec/ipropd-master/Makefile
cvs rdiff -u -r1.3 -r1.4 src/libexec/ipropd-slave/Makefile
cvs rdiff -u -r1.21 -r1.22 src/libexec/kadmind/Makefile
cvs rdiff -u -r1

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

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jun 20 07:31:19 UTC 2011

Modified Files:
src/sys/arch/powerpc/include: frame.h

Log Message:
Pad out trapframe for OEA so that trapframe has identical sizes for all
PPC variants.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/include/frame.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/powerpc/include/frame.h
diff -u src/sys/arch/powerpc/include/frame.h:1.22 src/sys/arch/powerpc/include/frame.h:1.23
--- src/sys/arch/powerpc/include/frame.h:1.22	Tue Jan 18 01:02:54 2011
+++ src/sys/arch/powerpc/include/frame.h	Mon Jun 20 07:31:18 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: frame.h,v 1.22 2011/01/18 01:02:54 matt Exp $	*/
+/*	$NetBSD: frame.h,v 1.23 2011/06/20 07:31:18 matt Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -84,9 +84,11 @@
 	uint32_t tf_exc;
 #if defined(PPC_OEA) || defined(PPC_OEA64) || defined(PPC_OEA64_BRIDGE)
 	register_t tf_dar;
+	register_t tf_pad0[2];
 	uint32_t tf_dsisr;
 	uint32_t tf_vrsave;
 	uint32_t tf_mq;
+	uint32_t tf_pad1[1];
 #endif
 #if defined(PPC_BOOKE) || defined(PPC_IBM4XX)
 	register_t tf_dear;



CVS commit: src/sys/arch

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jun 20 07:23:36 UTC 2011

Modified Files:
src/sys/arch/evbppc/include: psl.h
src/sys/arch/powerpc/booke: booke_machdep.c
src/sys/arch/powerpc/include: psl.h

Log Message:
Fixup PSL handling to be tolerant of modules.  Move evbppc psl changes
into powerpc psl.h


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbppc/include/psl.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/booke/booke_machdep.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/powerpc/include/psl.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/evbppc/include/psl.h
diff -u src/sys/arch/evbppc/include/psl.h:1.3 src/sys/arch/evbppc/include/psl.h:1.4
--- src/sys/arch/evbppc/include/psl.h:1.3	Sun Dec 11 12:17:12 2005
+++ src/sys/arch/evbppc/include/psl.h	Mon Jun 20 07:23:36 2011
@@ -1,28 +1,3 @@
-/*	$NetBSD: psl.h,v 1.3 2005/12/11 12:17:12 christos Exp $	*/
-
-#ifdef _KERNEL_OPT
-#include "opt_ppcarch.h"
-#endif
+/*	$NetBSD: psl.h,v 1.4 2011/06/20 07:23:36 matt Exp $	*/
 
 #include 
-
-#ifdef PPC_IBM4XX
-/* 4xx don't have PSL_RI */
-#undef PSL_USERSET
-#ifdef PPC_IBM403
-#define	PSL_USERSET	(PSL_EE | PSL_PR | PSL_ME | PSL_IR | PSL_DR)
-#else
-/* Apparently we get unexplained machine checks, so disable them. */
-#define	PSL_USERSET	(PSL_EE | PSL_PR | PSL_IR | PSL_DR)
-#endif
-
-/* 
- * We also need to override the PSL_SE bit.  4xx have completely
- * different debug register support.
- *
- * The SE bit is actually the DWE bit.  We want to set the DE bit
- * to enable the debug regs instead of the DWE bit.
- */
-#undef	PSL_SE
-#define	PSL_SE	0x0200
-#endif

Index: src/sys/arch/powerpc/booke/booke_machdep.c
diff -u src/sys/arch/powerpc/booke/booke_machdep.c:1.8 src/sys/arch/powerpc/booke/booke_machdep.c:1.9
--- src/sys/arch/powerpc/booke/booke_machdep.c:1.8	Wed Jun 15 15:22:56 2011
+++ src/sys/arch/powerpc/booke/booke_machdep.c	Mon Jun 20 07:23:36 2011
@@ -38,6 +38,8 @@
 
 #include 
 
+#include "opt_modular.h"
+
 #include 
 #include 
 #include 
@@ -61,6 +63,12 @@
 psize_t pmemsize;
 struct vm_map *phys_map;
 
+#ifdef MODULAR
+register_t cpu_psluserset = PSL_USERSET;
+register_t cpu_pslusermod = PSL_USERMOD;
+register_t cpu_pslusermask = PSL_USERMASK;
+#endif
+
 static bus_addr_t booke_dma_phys_to_bus_mem(bus_dma_tag_t, bus_addr_t);
 static bus_addr_t booke_dma_bus_mem_to_phys(bus_dma_tag_t, bus_addr_t);
 

Index: src/sys/arch/powerpc/include/psl.h
diff -u src/sys/arch/powerpc/include/psl.h:1.17 src/sys/arch/powerpc/include/psl.h:1.18
--- src/sys/arch/powerpc/include/psl.h:1.17	Mon May  2 02:01:33 2011
+++ src/sys/arch/powerpc/include/psl.h	Mon Jun 20 07:23:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: psl.h,v 1.17 2011/05/02 02:01:33 matt Exp $	*/
+/*	$NetBSD: psl.h,v 1.18 2011/06/20 07:23:36 matt Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -102,23 +102,34 @@
 #include "opt_ppcarch.h"
 #endif /* _KERNEL_OPT */
 
-#if defined(PPC_OEA) || defined (PPC_OEA64_BRIDGE)
-extern int cpu_psluserset, cpu_pslusermod;
+#if defined(PPC_OEA) || defined (PPC_OEA64_BRIDGE) || defined(_MODULE)
+extern register_t cpu_psluserset, cpu_pslusermod, cpu_pslusermask;
 
 #define	PSL_USERSET		cpu_psluserset
 #define	PSL_USERMOD		cpu_pslusermod
+#define	PSL_USERMASK		cpu_pslusermask
 #elif defined(PPC_BOOKE)
-#define	PSL_USERSET		(PSL_EE | PSL_PR | PSL_ME | PSL_CE | PSL_DE | PSL_IS | PSL_DS)
-#define	PSL_USERSRR1		((PSL_USERSET|PSL_USERMOD) & (PSL_SPV|PSL_CE|0x))
+#define	PSL_USERSET		(PSL_EE | PSL_PR | PSL_IS | PSL_DS | PSL_ME | PSL_CE | PSL_DE)
+#define	PSL_USERMASK		(PSL_SPV | PSL_CE | 0x)
 #define	PSL_USERMOD		(PSL_SPV)
 #else /* PPC_IBM4XX */
-#define	PSL_USERSET		(PSL_EE | PSL_PR | PSL_ME | PSL_IR | PSL_DR)
+#ifdef PPC_IBM403
+#define	PSL_USERSET		(PSL_EE | PSL_PR | PSL_IR | PSL_DR | PSL_ME)
+#else /* Apparently we get unexplained machine checks, so disable them. */
+#define	PSL_USERSET		(PSL_EE | PSL_PR | PSL_IR | PSL_DR)
+#endif
+#define	PSL_USERMASK		0x
 #define	PSL_USERMOD		(0)
+/* 
+ * We also need to override the PSL_SE bit.  4xx have completely different
+ * debug register support.  The SE bit is actually the DWE bit.  We want to
+ * set the DE bit to enable the debug regs instead of the DWE bit.
+ */
+#undef	PSL_SE
+#define	PSL_SE			PSL_DE
 #endif /* PPC_OEA */
 
-#ifndef PSL_USERSRR1
-#define	PSL_USERSRR1		((PSL_USERSET|PSL_USERMOD) & 0x)
-#endif
+#define	PSL_USERSRR1		((PSL_USERSET|PSL_USERMOD) & PSL_USERMASK)
 #define	PSL_USEROK_P(psl)	(((psl) & ~PSL_USERMOD) == PSL_USERSET)
 #endif /* !_LOCORE */
 



CVS commit: src/sys/arch

2011-06-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jun 20 07:18:07 UTC 2011

Modified Files:
src/sys/arch/bebox/bebox: machdep.c
src/sys/arch/evbppc/ev64260: machdep.c
src/sys/arch/evbppc/pmppc: machdep.c
src/sys/arch/evbppc/virtex: machdep.c
src/sys/arch/evbppc/walnut: machdep.c
src/sys/arch/ibmnws/ibmnws: machdep.c
src/sys/arch/macppc/macppc: machdep.c
src/sys/arch/mvmeppc/mvmeppc: machdep.c
src/sys/arch/powerpc/oea: oea_machdep.c
src/sys/arch/prep/prep: machdep.c platform.c
src/sys/arch/rs6000/rs6000: machdep.c
src/sys/arch/sandpoint/sandpoint: machdep.c

Log Message:
Cleanup includes.  ( is handled by softints, not MD anymore,
so this can be nuked).


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/bebox/bebox/machdep.c
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/evbppc/ev64260/machdep.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbppc/pmppc/machdep.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/evbppc/virtex/machdep.c
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/evbppc/walnut/machdep.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/ibmnws/ibmnws/machdep.c
cvs rdiff -u -r1.157 -r1.158 src/sys/arch/macppc/macppc/machdep.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/mvmeppc/mvmeppc/machdep.c
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/powerpc/oea/oea_machdep.c
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/prep/prep/machdep.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/prep/prep/platform.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/rs6000/rs6000/machdep.c
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/sandpoint/sandpoint/machdep.c

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

Modified files:

Index: src/sys/arch/bebox/bebox/machdep.c
diff -u src/sys/arch/bebox/bebox/machdep.c:1.99 src/sys/arch/bebox/bebox/machdep.c:1.100
--- src/sys/arch/bebox/bebox/machdep.c:1.99	Sat Oct 30 06:11:18 2010
+++ src/sys/arch/bebox/bebox/machdep.c	Mon Jun 20 07:18:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.99 2010/10/30 06:11:18 kiyohara Exp $	*/
+/*	$NetBSD: machdep.c,v 1.100 2011/06/20 07:18:05 matt Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,19 +32,24 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.99 2010/10/30 06:11:18 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.100 2011/06/20 07:18:05 matt Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
 #include "opt_ipkdb.h"
 
+#define _POWERPC_BUS_DMA_PRIVATE
+
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -54,20 +59,16 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 
-#include 
-
 #include 
 #include 
-#define _POWERPC_BUS_DMA_PRIVATE
-#include 
-#include 
-#include 
 #include 
-#include 
+
+#include 
+#include 
+#include 
 
 #include 
 #include  

Index: src/sys/arch/evbppc/ev64260/machdep.c
diff -u src/sys/arch/evbppc/ev64260/machdep.c:1.28 src/sys/arch/evbppc/ev64260/machdep.c:1.29
--- src/sys/arch/evbppc/ev64260/machdep.c:1.28	Mon Dec 20 00:25:32 2010
+++ src/sys/arch/evbppc/ev64260/machdep.c	Mon Jun 20 07:18:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.28 2010/12/20 00:25:32 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.29 2011/06/20 07:18:06 matt Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.28 2010/12/20 00:25:32 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.29 2011/06/20 07:18:06 matt Exp $");
 
 #include "opt_marvell.h"
 #include "opt_modular.h"
@@ -62,12 +62,11 @@
 
 #include 
 
-#include 
-
-#include 
-#include 
 #include 
 
+#include 
+#include 
+
 #include 
 #include 
 #include 

Index: src/sys/arch/evbppc/pmppc/machdep.c
diff -u src/sys/arch/evbppc/pmppc/machdep.c:1.10 src/sys/arch/evbppc/pmppc/machdep.c:1.11
--- src/sys/arch/evbppc/pmppc/machdep.c:1.10	Mon Dec 20 00:25:32 2010
+++ src/sys/arch/evbppc/pmppc/machdep.c	Mon Jun 20 07:18:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.10 2010/12/20 00:25:32 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.11 2011/06/20 07:18:06 matt Exp $	*/
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.10 2010/12/20 00:25:32 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.11 2011/06/20 07:18:06 matt Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
@@ -74,12 +74,15 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -87,26 +90,22 @@
 #include 
 #include 
 #include 
-#include 
 #include 
+#include 
 #include 
-#include 
 
 #include 
 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
 #include 
-#include 
 #include 
 
+#include 
+#include 
+#include 
+#include