Re: CVS commit: src/lib/libm/arch/i387

2011-06-20 Thread Joerg Sonnenberger
On Mon, Jun 20, 2011 at 11:25:34AM +0900, tsugutomo.en...@jp.sony.com wrote:
 Joerg Sonnenberger jo...@netbsd.org writes:
 
  Log Message:
  Switch to SSE code, since our gas supports it now.
 
 
  To generate a diff of this commit:
  cvs rdiff -u -r1.6 -r1.7 src/lib/libm/arch/i387/s_copysign.S
  cvs rdiff -u -r1.5 -r1.6 src/lib/libm/arch/i387/s_copysignf.S
 
 Is the change done in s_copysignf.S correct?

It works, but why do you think it is incorrect?

Joerg


Re: CVS commit: src/lib/libm/arch/i387

2011-06-20 Thread Matthias Drochner

jo...@britannica.bec.de said:
 why do you think it is incorrect?

You just did an unifdef.

best regards
Matthias





Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt



Besuchen Sie uns auf unserem neuen Webauftritt unter www.fz-juelich.de


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

2011-06-20 Thread Christos Zoulas
In article 20110620230053.9893c17...@cvs.netbsd.org,
Havard Eidnes source-changes-d@NetBSD.org wrote:
-=-=-=-=-=-

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.

But that should not be needed for x_gzip. What needs those?

christos



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

2011-06-20 Thread Izumi Tsutsui
 Modified Files:
  src/distrib/alpha/instkernel/ramdisk: list
 
 Log Message:
 Add -lbz2 and -llzma so that this links again.
 
 But that should not be needed for x_gzip. What needs those?

Bad pasto in x_gzip line caused errors,
but it has been fixed already anyway.
---
Izumi Tsutsui


Re: CVS commit: src/lib/libm/arch/i387

2011-06-20 Thread tsugutomo . enami
Joerg Sonnenberger jo...@britannica.bec.de writes:

 On Mon, Jun 20, 2011 at 11:25:34AM +0900, tsugutomo.en...@jp.sony.com wrote:
 Joerg Sonnenberger jo...@netbsd.org writes:
 
  Log Message:
  Switch to SSE code, since our gas supports it now.
 
 
  To generate a diff of this commit:
  cvs rdiff -u -r1.6 -r1.7 src/lib/libm/arch/i387/s_copysign.S
  cvs rdiff -u -r1.5 -r1.6 src/lib/libm/arch/i387/s_copysignf.S
 
 Is the change done in s_copysignf.S correct?

 It works, but why do you think it is incorrect?

I should ask if it is `what you intended' instead of `correct'.

Since what you did for thses two files are quite opposite, I guess one
of the changes is not waht you want.

For s_copysignf.S (not s_copysign.S), you simply removed already #if 0
outed code which uses pand/por instruction and it disagrees with commit
message.

enami.


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

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

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

Log Message:
Explicitly include powerpc/psl.h


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/include/userret.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/include/booke/cpuvar.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/userret.h
diff -u src/sys/arch/powerpc/include/userret.h:1.20 src/sys/arch/powerpc/include/userret.h:1.21
--- src/sys/arch/powerpc/include/userret.h:1.20	Mon May  2 02:01:33 2011
+++ src/sys/arch/powerpc/include/userret.h	Mon Jun 20 06:00:46 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: userret.h,v 1.20 2011/05/02 02:01:33 matt Exp $	*/
+/*	$NetBSD: userret.h,v 1.21 2011/06/20 06:00:46 matt Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -37,6 +37,7 @@
 #include sys/userret.h
 
 #include powerpc/fpu.h
+#include powerpc/psl.h
 
 #ifdef PPC_BOOKE
 #include powerpc/spr.h

Index: src/sys/arch/powerpc/include/booke/cpuvar.h
diff -u src/sys/arch/powerpc/include/booke/cpuvar.h:1.8 src/sys/arch/powerpc/include/booke/cpuvar.h:1.9
--- src/sys/arch/powerpc/include/booke/cpuvar.h:1.8	Wed Jun 15 15:18:20 2011
+++ src/sys/arch/powerpc/include/booke/cpuvar.h	Mon Jun 20 06:00:46 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuvar.h,v 1.8 2011/06/15 15:18:20 matt Exp $	*/
+/*	$NetBSD: cpuvar.h,v 1.9 2011/06/20 06:00:46 matt Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -37,8 +37,9 @@
 #ifndef _POWERPC_BOOKE_CPUVAR_H_
 #define _POWERPC_BOOKE_CPUVAR_H_
 
-#include machine/bus.h
+#include sys/bus.h
 #include prop/proplib.h
+#include powerpc/psl.h
 
 struct cpunode_softc {
 	device_t sc_dev;



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

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

Modified Files:
src/sys/arch/powerpc/include/oea: bat.h

Log Message:
Include powerpc/psl.h


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/powerpc/include/oea/bat.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/oea/bat.h
diff -u src/sys/arch/powerpc/include/oea/bat.h:1.13 src/sys/arch/powerpc/include/oea/bat.h:1.14
--- src/sys/arch/powerpc/include/oea/bat.h:1.13	Tue Jul 21 07:08:57 2009
+++ src/sys/arch/powerpc/include/oea/bat.h	Mon Jun 20 06:04:33 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bat.h,v 1.13 2009/07/21 07:08:57 nisimura Exp $	*/
+/*	$NetBSD: bat.h,v 1.14 2011/06/20 06:04:33 matt Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -64,6 +64,8 @@
 #define	_POWERPC_OEA_BAT_H_
 
 #if defined(_KERNEL)  !defined(_LOCORE)
+#include powerpc/psl.h
+
 struct bat {
 	register_t batu;
 	register_t batl;



CVS commit: src/sys/arch/powerpc

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

Modified Files:
src/sys/arch/powerpc/include: netbsd32_machdep.h
src/sys/arch/powerpc/oea: cpu_subr.c ofwoea_machdep.c
src/sys/arch/powerpc/pic: i8259_common.c ipi_openpic.c openpic_common.c
pic_distopenpic.c pic_i8259.c pic_mpcsoc.c pic_openpic.c
pic_prepivr.c

Log Message:
arch/powerpc/... - powerpc/...


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/include/netbsd32_machdep.h
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/powerpc/oea/cpu_subr.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/oea/ofwoea_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/pic/i8259_common.c \
src/sys/arch/powerpc/pic/ipi_openpic.c \
src/sys/arch/powerpc/pic/pic_distopenpic.c \
src/sys/arch/powerpc/pic/pic_openpic.c \
src/sys/arch/powerpc/pic/pic_prepivr.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/pic/openpic_common.c \
src/sys/arch/powerpc/pic/pic_i8259.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/powerpc/pic/pic_mpcsoc.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/netbsd32_machdep.h
diff -u src/sys/arch/powerpc/include/netbsd32_machdep.h:1.6 src/sys/arch/powerpc/include/netbsd32_machdep.h:1.7
--- src/sys/arch/powerpc/include/netbsd32_machdep.h:1.6	Thu Dec 10 14:13:51 2009
+++ src/sys/arch/powerpc/include/netbsd32_machdep.h	Mon Jun 20 06:21:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.h,v 1.6 2009/12/10 14:13:51 matt Exp $	*/
+/*	$NetBSD: netbsd32_machdep.h,v 1.7 2011/06/20 06:21:45 matt Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -45,7 +45,7 @@
 #include compat/netbsd32/netbsd32.h
 #include powerpc/frame.h
 
-/* from arch/sparc/include/signal.h */
+/* from sparc/include/signal.h */
 typedef u_int32_t netbsd32_sigcontextp_t;
 
 struct netbsd32_sigcontext {

Index: src/sys/arch/powerpc/oea/cpu_subr.c
diff -u src/sys/arch/powerpc/oea/cpu_subr.c:1.66 src/sys/arch/powerpc/oea/cpu_subr.c:1.67
--- src/sys/arch/powerpc/oea/cpu_subr.c:1.66	Fri Jun 17 19:03:04 2011
+++ src/sys/arch/powerpc/oea/cpu_subr.c	Mon Jun 20 06:21:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_subr.c,v 1.66 2011/06/17 19:03:04 matt Exp $	*/
+/*	$NetBSD: cpu_subr.c,v 1.67 2011/06/20 06:21:45 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu_subr.c,v 1.66 2011/06/17 19:03:04 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu_subr.c,v 1.67 2011/06/20 06:21:45 matt Exp $);
 
 #include opt_ppcparam.h
 #include opt_multiprocessor.h
@@ -52,6 +52,7 @@
 #include uvm/uvm.h
 
 #include powerpc/pcb.h
+#include powerpc/psl.h
 #include powerpc/spr.h
 #include powerpc/oea/hid.h
 #include powerpc/oea/hid_601.h
@@ -238,8 +239,8 @@
 volatile int cpu_hatch_stack;
 extern int ticks_per_intr;
 #include powerpc/oea/bat.h
-#include arch/powerpc/pic/picvar.h
-#include arch/powerpc/pic/ipivar.h
+#include powerpc/pic/picvar.h
+#include powerpc/pic/ipivar.h
 extern struct bat battable[];
 #else
 struct cpu_info cpu_info[1] = {
@@ -250,7 +251,9 @@
 #endif /*MULTIPROCESSOR*/
 
 int cpu_altivec;
-int cpu_psluserset, cpu_pslusermod;
+register_t cpu_psluserset;
+register_t cpu_pslusermod;
+register_t cpu_pslusermask = 0x;
 char cpu_model[80];
 
 /* This is to be called from locore.S, and nowhere else. */

Index: src/sys/arch/powerpc/oea/ofwoea_machdep.c
diff -u src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.21 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.22
--- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.21	Sun Jun 12 16:35:10 2011
+++ src/sys/arch/powerpc/oea/ofwoea_machdep.c	Mon Jun 20 06:21:45 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ofwoea_machdep.c,v 1.21 2011/06/12 16:35:10 matt Exp $ */
+/* $NetBSD: ofwoea_machdep.c,v 1.22 2011/06/20 06:21:45 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ofwoea_machdep.c,v 1.21 2011/06/12 16:35:10 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ofwoea_machdep.c,v 1.22 2011/06/20 06:21:45 matt Exp $);
 
 #include opt_ppcarch.h
 #include opt_compat_netbsd.h
@@ -59,7 +59,7 @@
 #include powerpc/ofw_bus.h
 #include powerpc/ofw_cons.h
 #include powerpc/spr.h
-#include arch/powerpc/pic/picvar.h
+#include powerpc/pic/picvar.h
 
 #include opt_oea.h
 

Index: src/sys/arch/powerpc/pic/i8259_common.c
diff -u src/sys/arch/powerpc/pic/i8259_common.c:1.5 src/sys/arch/powerpc/pic/i8259_common.c:1.6
--- src/sys/arch/powerpc/pic/i8259_common.c:1.5	Sat Jun 18 06:41:43 2011
+++ src/sys/arch/powerpc/pic/i8259_common.c	Mon Jun 20 06:21:45 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: i8259_common.c,v 1.5 2011/06/18 06:41:43 matt Exp $ */
+/* $NetBSD: i8259_common.c,v 1.6 2011/06/20 06:21:45 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 

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

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

Modified Files:
src/sys/arch/powerpc/marvell: pic_discovery.c

Log Message:
Add __CTASSERT(sizeof(imask_t) == sizeof(uint64_t));


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/marvell/pic_discovery.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/marvell/pic_discovery.c
diff -u src/sys/arch/powerpc/marvell/pic_discovery.c:1.4 src/sys/arch/powerpc/marvell/pic_discovery.c:1.5
--- src/sys/arch/powerpc/marvell/pic_discovery.c:1.4	Sat Jun 18 06:41:43 2011
+++ src/sys/arch/powerpc/marvell/pic_discovery.c	Mon Jun 20 06:22:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic_discovery.c,v 1.4 2011/06/18 06:41:43 matt Exp $	*/
+/*	$NetBSD: pic_discovery.c,v 1.5 2011/06/20 06:22:23 matt Exp $	*/
 
 /*
  * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pic_discovery.c,v 1.4 2011/06/18 06:41:43 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pic_discovery.c,v 1.5 2011/06/20 06:22:23 matt Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -52,6 +52,8 @@
 #include dev/marvell/gtintrvar.h
 
 
+__CTASSERT(sizeof(imask_t) == sizeof(uint64_t));
+
 struct discovery_gpp_pic_ops;
 
 struct discovery_pic_ops {



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

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

Modified Files:
src/sys/arch/powerpc/pic: intr.c ipi.c

Log Message:
Cleanup includes.  Explicitly include powerpc/psl.h


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/pic/intr.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/pic/ipi.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/pic/intr.c
diff -u src/sys/arch/powerpc/pic/intr.c:1.15 src/sys/arch/powerpc/pic/intr.c:1.16
--- src/sys/arch/powerpc/pic/intr.c:1.15	Fri Jun 17 23:36:18 2011
+++ src/sys/arch/powerpc/pic/intr.c	Mon Jun 20 06:23:52 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.15 2011/06/17 23:36:18 matt Exp $ */
+/*	$NetBSD: intr.c,v 1.16 2011/06/20 06:23:52 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,26 +27,28 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.15 2011/06/17 23:36:18 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.16 2011/06/20 06:23:52 matt Exp $);
 
+#include opt_interrupt.h
 #include opt_multiprocessor.h
+#include opt_pic.h
 
 #define __INTR_PRIVATE
 
 #include sys/param.h
-#include sys/malloc.h
-#include sys/kernel.h
 #include sys/cpu.h
+#include sys/kernel.h
+#include sys/malloc.h
+
+#include powerpc/psl.h
+#include powerpc/pic/picvar.h
 
-#include arch/powerpc/pic/picvar.h
-#include opt_pic.h
-#include opt_interrupt.h
 #if defined(PIC_I8259) || defined (PIC_PREPIVR)
 #include machine/isa_machdep.h
 #endif
 
 #ifdef MULTIPROCESSOR
-#include arch/powerpc/pic/ipivar.h
+#include powerpc/pic/ipivar.h
 #endif
 
 #ifdef __HAVE_FAST_SOFTINTS

Index: src/sys/arch/powerpc/pic/ipi.c
diff -u src/sys/arch/powerpc/pic/ipi.c:1.9 src/sys/arch/powerpc/pic/ipi.c:1.10
--- src/sys/arch/powerpc/pic/ipi.c:1.9	Sun Jun  5 16:52:26 2011
+++ src/sys/arch/powerpc/pic/ipi.c	Mon Jun 20 06:23:52 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ipi.c,v 1.9 2011/06/05 16:52:26 matt Exp $ */
+/* $NetBSD: ipi.c,v 1.10 2011/06/20 06:23:52 matt Exp $ */
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ipi.c,v 1.9 2011/06/05 16:52:26 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ipi.c,v 1.10 2011/06/20 06:23:52 matt Exp $);
 
 #include opt_multiprocessor.h
 #include opt_pic.h
@@ -42,8 +42,10 @@
 #include sys/atomic.h
 #include sys/cpu.h
 
-#include arch/powerpc/pic/picvar.h
-#include arch/powerpc/pic/ipivar.h
+#include powerpc/psl.h
+
+#include powerpc/pic/picvar.h
+#include powerpc/pic/ipivar.h
 #include opt_ipi.h
 
 #ifdef MULTIPROCESSOR



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

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

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

Log Message:
Explicitly include powerpc/psl.h


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/powerpc/include/ibm4xx/cpu.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/ibm4xx/cpu.h
diff -u src/sys/arch/powerpc/include/ibm4xx/cpu.h:1.18 src/sys/arch/powerpc/include/ibm4xx/cpu.h:1.19
--- src/sys/arch/powerpc/include/ibm4xx/cpu.h:1.18	Sat Jun 18 17:06:52 2011
+++ src/sys/arch/powerpc/include/ibm4xx/cpu.h	Mon Jun 20 06:24:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.18 2011/06/18 17:06:52 matt Exp $	*/
+/*	$NetBSD: cpu.h,v 1.19 2011/06/20 06:24:30 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -38,6 +38,7 @@
 #ifndef	_IBM4XX_CPU_H_
 #define	_IBM4XX_CPU_H_
 
+#include powerpc/psl.h
 #include powerpc/spr.h
 #include powerpc/ibm4xx/spr.h
 #include powerpc/ibm4xx/dcr4xx.h



CVS commit: src/sys/arch

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

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

Log Message:
Cleanup powerpc param.h.  If compiling a MODULE, ignore port-specific stuff.
Only include machine/cpu.h in powerpc/param.h at the end.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/amigappc/include/param.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/bebox/include/param.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbppc/include/param.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ibmnws/include/param.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/macppc/include/param.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mvmeppc/include/param.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/ofppc/include/param.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/include/param.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/prep/include/param.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/rs6000/include/param.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sandpoint/include/param.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/param.h
diff -u src/sys/arch/amigappc/include/param.h:1.12 src/sys/arch/amigappc/include/param.h:1.13
--- src/sys/arch/amigappc/include/param.h:1.12	Tue Jul 21 09:49:16 2009
+++ src/sys/arch/amigappc/include/param.h	Mon Jun 20 06:29:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.12 2009/07/21 09:49:16 phx Exp $	*/
+/*	$NetBSD: param.h,v 1.13 2011/06/20 06:29:53 matt Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -31,19 +31,15 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifdef	_KERNEL
-#ifndef	_LOCORE
-#include machine/cpu.h
-#endif	/* _LOCORE */
-#endif
-
 /*
  * Machine dependent constants for PowerPC (32-bit only currently)
  */
-#define	MACHINE		amigappc
+#if defined(_KERNEL)  !defined(_MODULE)
 
+#define	MACHINE			amigappc
+#define	KERNBASE		0x800 /* XXX valid for CyberstormPPC */
 #define	__NO_FIXED_MSGBUF
 
-#define	KERNBASE	0x800	/* XXX valid for CyberstormPPC */
+#endif /* _KERNEL  !_MODULE */
 
 #include powerpc/param.h

Index: src/sys/arch/bebox/include/param.h
diff -u src/sys/arch/bebox/include/param.h:1.13 src/sys/arch/bebox/include/param.h:1.14
--- src/sys/arch/bebox/include/param.h:1.13	Sun Jun 12 07:04:55 2011
+++ src/sys/arch/bebox/include/param.h	Mon Jun 20 06:29:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.13 2011/06/12 07:04:55 kiyohara Exp $	*/
+/*	$NetBSD: param.h,v 1.14 2011/06/20 06:29:53 matt Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -31,25 +31,18 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifdef	_KERNEL
-#ifndef	_LOCORE
-#include machine/cpu.h
-#endif	/* _LOCORE */
-#endif
-
-
 /*
  * Machine dependent constants for PowerPC (32-bit only currently)
  */
-#ifdef _KERNEL
-#define	MACHINE		bebox
-#endif
+#if defined(_KERNEL)  !defined(_MODULE)
 
+#define	MACHINE			bebox
+#define	KERNBASE		0x3100	/* EXC_AST + 0x100 */
 #define	__NO_FIXED_MSGBUF
 
-#define	KERNBASE	0x3100
-
-#include powerpc/param.h
-
 /* at this offset we mmap() the PCI IO range in display drivers */
 #define PCI_MAGIC_IO_RANGE	0xf200
+
+#endif /* _KERNEL  !_MODULE */
+
+#include powerpc/param.h

Index: src/sys/arch/evbppc/include/param.h
diff -u src/sys/arch/evbppc/include/param.h:1.2 src/sys/arch/evbppc/include/param.h:1.3
--- src/sys/arch/evbppc/include/param.h:1.2	Tue Mar  4 07:50:59 2003
+++ src/sys/arch/evbppc/include/param.h	Mon Jun 20 06:29:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.2 2003/03/04 07:50:59 matt Exp $	*/
+/*	$NetBSD: param.h,v 1.3 2011/06/20 06:29:53 matt Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -34,7 +34,10 @@
 /*
  * Machine dependent constants for PowerPC (32-bit only currently)
  */
-#define	MACHINE		evbppc
-#define	MID_MACHINE	MID_POWERPC
+#if defined(_KERNEL)  !defined(_MODULE)
+
+#define	MACHINE			evbppc
+
+#endif /* _KERNEL  !_MODULE */
 
 #include powerpc/param.h

Index: src/sys/arch/ibmnws/include/param.h
diff -u src/sys/arch/ibmnws/include/param.h:1.2 src/sys/arch/ibmnws/include/param.h:1.3
--- src/sys/arch/ibmnws/include/param.h:1.2	Sun Dec 11 12:17:50 2005
+++ src/sys/arch/ibmnws/include/param.h	Mon Jun 20 06:29:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.2 2005/12/11 12:17:50 christos Exp $	*/
+/*	$NetBSD: param.h,v 1.3 2011/06/20 06:29:53 matt Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -31,19 +31,15 @@
  * ADVISED OF THE 

CVS commit: src/sys/arch

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

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

Log Message:
Don't expose port-specific if _MODULE is defined.
Don't _MACHINE_CPU_H_, _PORT_CPU_H_


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/amigappc/include/cpu.h
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/bebox/include/cpu.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbppc/include/cpu.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ibmnws/include/cpu.h
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/macppc/include/cpu.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mvmeppc/include/cpu.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/ofppc/include/cpu.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/prep/include/cpu.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/rs6000/include/cpu.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sandpoint/include/cpu.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/cpu.h
diff -u src/sys/arch/amigappc/include/cpu.h:1.19 src/sys/arch/amigappc/include/cpu.h:1.20
--- src/sys/arch/amigappc/include/cpu.h:1.19	Thu Jan 20 15:44:56 2011
+++ src/sys/arch/amigappc/include/cpu.h	Mon Jun 20 06:35:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.19 2011/01/20 15:44:56 phx Exp $	*/
+/*	$NetBSD: cpu.h,v 1.20 2011/06/20 06:35:39 matt Exp $	*/
 
 /*
  * Copyright (C) 1995-1997 Wolfgang Solfrank.
@@ -30,12 +30,12 @@
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef	_MACHINE_CPU_H_
-#define	_MACHINE_CPU_H_
+#ifndef	_AMIGAPPC_CPU_H_
+#define	_AMIGAPPC_CPU_H_
+#define	_MACHINE_CPU_H_		/* for m68k/cpu.h */
 
-#if defined(_KERNEL)
+#if defined(_KERNEL)  !defined(_MODULE)
 #define	CPU_MAXNUM	1
-
 /*
  * Amiga models
  */
@@ -67,8 +67,6 @@
  */
 int badaddr_read(void *, size_t, int *);
 
-#endif /* _KERNEL */
-
 /*
  * Reorder protection when accessing device registers.
  */
@@ -79,6 +77,8 @@
  */
 #define amiga_cpu_sync() __asm volatile (sync; isync)
 
+#endif /* _KERNEL  !_MODULE */
+
 #include powerpc/cpu.h
 
-#endif	/* _MACHINE_CPU_H_ */
+#endif	/* _AMIGAPPC_CPU_H_ */

Index: src/sys/arch/bebox/include/cpu.h
diff -u src/sys/arch/bebox/include/cpu.h:1.12 src/sys/arch/bebox/include/cpu.h:1.13
--- src/sys/arch/bebox/include/cpu.h:1.12	Wed Oct 17 19:53:59 2007
+++ src/sys/arch/bebox/include/cpu.h	Mon Jun 20 06:35:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.12 2007/10/17 19:53:59 garbled Exp $	*/
+/*	$NetBSD: cpu.h,v 1.13 2011/06/20 06:35:39 matt Exp $	*/
 
 /*
  * Copyright (C) 1995-1997 Wolfgang Solfrank.
@@ -30,14 +30,14 @@
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef	_MACHINE_CPU_H_
-#define	_MACHINE_CPU_H_
+#ifndef	_BEBOX_CPU_H_
+#define	_BEBOX_CPU_H_
 
-#if defined(_KERNEL)
+#if defined(_KERNEL)  !defined(_MODULE)
 #define	CPU_MAXNUM	2
 extern char bootpath[];
 #endif
 
 #include powerpc/cpu.h
 
-#endif	/* _MACHINE_CPU_H_ */
+#endif	/* _BEBOX_CPU_H_ */

Index: src/sys/arch/evbppc/include/cpu.h
diff -u src/sys/arch/evbppc/include/cpu.h:1.6 src/sys/arch/evbppc/include/cpu.h:1.7
--- src/sys/arch/evbppc/include/cpu.h:1.6	Sat Jun 18 06:44:26 2011
+++ src/sys/arch/evbppc/include/cpu.h	Mon Jun 20 06:35:40 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.6 2011/06/18 06:44:26 matt Exp $	*/
+/*	$NetBSD: cpu.h,v 1.7 2011/06/20 06:35:40 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -35,15 +35,15 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef	_MACHINE_CPU_H_
-#define	_MACHINE_CPU_H_
+#ifndef	_EVBPPC_CPU_H_
+#define	_EVBPPC_CPU_H_
 
+#if defined(_KERNEL)  !defined(_MODULE)
 #ifdef _KERNEL_OPT
 #include opt_ppcarch.h
 #include opt_multiprocessor.h
 #endif
 
-#ifdef _KERNEL
 #ifdef PPC_IBM4XX
 extern int fake_mapiodev;
 #endif
@@ -54,11 +54,13 @@
 #define CPU_MAXNUM 1
 #endif
 
+#endif	/* _KERNEL  !_MODULE */
+
 #include powerpc/cpu.h
 
+#if defined(_KERNEL)
 extern char module_machine_booke[];
 extern char module_machine_ibm4xx[];
-
 #endif	/* _KERNEL */
 
-#endif	/* _MACHINE_CPU_H_ */
+#endif	/* _EVBPPC_CPU_H_ */

Index: src/sys/arch/ibmnws/include/cpu.h
diff -u src/sys/arch/ibmnws/include/cpu.h:1.2 src/sys/arch/ibmnws/include/cpu.h:1.3
--- src/sys/arch/ibmnws/include/cpu.h:1.2	Sun Dec 11 12:17:50 2005
+++ src/sys/arch/ibmnws/include/cpu.h	Mon Jun 20 06:35:40 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.2 2005/12/11 12:17:50 christos Exp $	*/
+/*	$NetBSD: cpu.h,v 1.3 2011/06/20 06:35:40 matt Exp $	

CVS commit: src

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Jun 20 06:52:38 UTC 2011

Modified Files:
src: Makefile
src/lib/csu/common_elf: Makefile.inc
src/lib/i18n_module/UTF7: Makefile
src/lib/libbz2: Makefile
src/share/mk: bsd.own.mk bsd.sys.mk
src/sys/arch/hp700/stand: Makefile.inc
src/sys/arch/i386/stand: Makefile.booters
src/sys/arch/i386/stand/boot: Makefile.boot
src/sys/arch/i386/stand/bootxx: Makefile.bootxx
src/sys/conf: Makefile.kern.inc

Log Message:
remove all the code that supported HAVE_GCC=3.  mostly from chuq.


To generate a diff of this commit:
cvs rdiff -u -r1.283 -r1.284 src/Makefile
cvs rdiff -u -r1.32 -r1.33 src/lib/csu/common_elf/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 src/lib/i18n_module/UTF7/Makefile
cvs rdiff -u -r1.14 -r1.15 src/lib/libbz2/Makefile
cvs rdiff -u -r1.670 -r1.671 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.203 -r1.204 src/share/mk/bsd.sys.mk
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hp700/stand/Makefile.inc
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/i386/stand/Makefile.booters
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/i386/stand/boot/Makefile.boot
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/i386/stand/bootxx/Makefile.bootxx
cvs rdiff -u -r1.139 -r1.140 src/sys/conf/Makefile.kern.inc

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

Modified files:

Index: src/Makefile
diff -u src/Makefile:1.283 src/Makefile:1.284
--- src/Makefile:1.283	Wed Jun 15 09:45:58 2011
+++ src/Makefile	Mon Jun 20 06:52:36 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.283 2011/06/15 09:45:58 mrg Exp $
+#	$NetBSD: Makefile,v 1.284 2011/06/20 06:52:36 mrg Exp $
 
 #
 # This is the top-level makefile for building NetBSD. For an outline of
@@ -199,10 +199,10 @@
 # Targets (in order!) called by make build.
 #
 .if defined(HAVE_GCC)
-.if ${HAVE_GCC} == 3
-LIBGCC_EXT=3
-.else
+.if ${HAVE_GCC} == 4
 LIBGCC_EXT=4
+.else
+LIBGCC_EXT=45
 .endif
 .endif
 
@@ -444,10 +444,8 @@
 .if defined(HAVE_GCC)
 .if ${MKGCC} != no
 .if ${USE_COMPILERCRTSTUFF} == yes
-.if (${HAVE_GCC} == 3 || ${HAVE_GCC} == 4)
 	${MAKEDIRTARGET} . do-gnu-lib-crtstuff${LIBGCC_EXT}
 .endif
-.endif
 	${MAKEDIRTARGET} . do-gnu-lib-libgcc${LIBGCC_EXT}
 .endif
 .endif

Index: src/lib/csu/common_elf/Makefile.inc
diff -u src/lib/csu/common_elf/Makefile.inc:1.32 src/lib/csu/common_elf/Makefile.inc:1.33
--- src/lib/csu/common_elf/Makefile.inc:1.32	Sun Dec 13 08:52:38 2009
+++ src/lib/csu/common_elf/Makefile.inc	Mon Jun 20 06:52:36 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.32 2009/12/13 08:52:38 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.33 2011/06/20 06:52:36 mrg Exp $
 
 .if !defined(ELFSIZE)
 ELFSIZE=32
@@ -14,7 +14,7 @@
 CPPFLAGS+=	-DJCR
 CPPFLAGS+=	-DDSO_HANDLE
 
-.if defined(HAVE_GCC)  ${HAVE_GCC}  3
+.if defined(HAVE_GCC)
 CFLAGS+=	-fno-unit-at-a-time
 .endif
 

Index: src/lib/i18n_module/UTF7/Makefile
diff -u src/lib/i18n_module/UTF7/Makefile:1.3 src/lib/i18n_module/UTF7/Makefile:1.4
--- src/lib/i18n_module/UTF7/Makefile:1.3	Fri Aug 29 00:02:22 2008
+++ src/lib/i18n_module/UTF7/Makefile	Mon Jun 20 06:52:36 2011
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile,v 1.3 2008/08/29 00:02:22 gmcgarry Exp $
+#	$NetBSD: Makefile,v 1.4 2011/06/20 06:52:36 mrg Exp $
 
 SRCPRE=citrus_
 .include bsd.lib.mk
 
-.if ${MACHINE_ARCH} == vax  defined(HAVE_GCC)  ${HAVE_GCC}  3
+.if ${MACHINE_ARCH} == vax  defined(HAVE_GCC)
 COPTS.citrus_utf7.c+=	-O0
 .endif

Index: src/lib/libbz2/Makefile
diff -u src/lib/libbz2/Makefile:1.14 src/lib/libbz2/Makefile:1.15
--- src/lib/libbz2/Makefile:1.14	Fri Aug 29 00:02:22 2008
+++ src/lib/libbz2/Makefile	Mon Jun 20 06:52:37 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2008/08/29 00:02:22 gmcgarry Exp $
+#	$NetBSD: Makefile,v 1.15 2011/06/20 06:52:37 mrg Exp $
 
 USE_FORT?= yes	# data driven bugs?
 
@@ -22,7 +22,7 @@
 
 # XXX blocksort.c gets mis-compiled with 4.1
 .if (${MACHINE_ARCH} == sh3el || ${MACHINE_ARCH} == sh3eb)  \
-(defined(HAVE_GCC)  ${HAVE_GCC} == 4)
+defined(HAVE_GCC)
 COPTS.blocksort.c+=	-fno-loop-optimize
 .endif
 

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.670 src/share/mk/bsd.own.mk:1.671
--- src/share/mk/bsd.own.mk:1.670	Wed Jun 15 09:45:59 2011
+++ src/share/mk/bsd.own.mk	Mon Jun 20 06:52:37 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.670 2011/06/15 09:45:59 mrg Exp $
+#	$NetBSD: bsd.own.mk,v 1.671 2011/06/20 06:52:37 mrg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -46,7 +46,7 @@
 #
 TOOLCHAIN_MISSING?=	no
 
-# default to GCC4
+# default to GCC4.1
 .if !defined(HAVE_GCC)  !defined(HAVE_PCC)
 HAVE_GCC=	4
 .endif
@@ -574,7 +574,7 @@
 MKISCSI=	no
 # XXX GCC 4 outputs mcount() calling sequences that try to load values
 # from over 64KB away and this fails to assemble.
-.if defined(HAVE_GCC)  (${HAVE_GCC} == 4)
+.if defined(HAVE_GCC)
 NOPROFILE=	# defined
 .endif
 .endif

Index: src/share/mk/bsd.sys.mk
diff -u 

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.  (net/netisr.h 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 sys/cdefs.h
-__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 sys/param.h
 #include sys/buf.h
+#include sys/bus.h
 #include sys/conf.h
 #include sys/device.h
 #include sys/exec.h
 #include sys/extent.h
+#include sys/intr.h
 #include sys/kernel.h
+#include sys/ksyms.h
 #include sys/malloc.h
 #include sys/mbuf.h
 #include sys/mount.h
@@ -54,20 +59,16 @@
 #include sys/syscallargs.h
 #include sys/syslog.h
 #include sys/systm.h
-#include sys/ksyms.h
 
 #include uvm/uvm_extern.h
 
-#include net/netisr.h
-
 #include machine/bootinfo.h
 #include machine/autoconf.h
-#define _POWERPC_BUS_DMA_PRIVATE
-#include machine/bus.h
-#include machine/intr.h
-#include machine/pmap.h
 #include machine/powerpc.h
-#include machine/trap.h
+
+#include powerpc/pmap.h
+#include powerpc/psl.h
+#include powerpc/trap.h
 
 #include powerpc/oea/bat.h
 #include powerpc/pic/picvar.h 

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 sys/cdefs.h
-__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 uvm/uvm_extern.h
 
-#include net/netisr.h
-
-#include machine/db_machdep.h
-#include machine/pmap.h
 #include machine/powerpc.h
 
+#include powerpc/db_machdep.h
+#include powerpc/pmap.h
+
 #include powerpc/oea/bat.h
 #include powerpc/pic/picvar.h
 #include powerpc/pio.h

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 sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.10 2010/12/20 00:25:32 

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 powerpc/psl.h
-
-#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 sys/cdefs.h
 
+#include opt_modular.h
+
 #include sys/param.h
 #include sys/cpu.h
 #include sys/device.h
@@ -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/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

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 

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 powerpc/vmparam.h like we have for powerpc/pmap.h


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 powerpc/oea/vmparam.h
+#include powerpc/vmparam.h

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 powerpc/oea/vmparam.h
+#endif
+
+#include powerpc/vmparam.h

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 powerpc/ibm4xx/vmparam.h
-#elif defined(PPC_OEA)
-#include powerpc/oea/vmparam.h
-#elif defined(PPC_BOOKE)
-#include powerpc/booke/vmparam.h
-#endif
+#include powerpc/vmparam.h

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 powerpc/oea/vmparam.h
+#endif
+
+#include powerpc/vmparam.h

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 powerpc/oea/vmparam.h
+#include powerpc/vmparam.h

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 powerpc/oea/vmparam.h
+#endif
+#include powerpc/vmparam.h

Index: src/sys/arch/ofppc/include/vmparam.h
diff -u src/sys/arch/ofppc/include/vmparam.h:1.22 

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 powerpc/oea/pmap.h
 #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 sys/cdefs.h
 
-__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/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 sys/cdefs.h
-__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 sys/param.h
+#include sys/cpu.h
+#include sys/device.h
 #include sys/malloc.h
+#include sys/pool.h
 #include sys/proc.h
 #include sys/queue.h
 #include sys/systm.h
-#include sys/pool.h
-#include sys/device.h
-#include sys/cpu.h
 
 #include uvm/uvm.h
 
-#include machine/pcb.h
 #include machine/powerpc.h
 #include machine/tlb.h
 
+#include powerpc/pcb.h
+
 #include powerpc/spr.h
 #include powerpc/ibm4xx/spr.h
 
@@ -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/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 sys/param.h
-include sys/intr.h
+include sys/bitops.h
 include sys/cpu.h
-include sys/mutex.h
-include sys/rwlock.h
+include sys/intr.h
 include sys/lwp.h
+include sys/mutex.h
 include sys/proc.h
-include sys/bitops.h
+include sys/rwlock.h
 
 include uvm/uvm_extern.h
 
-include machine/pcb.h
-include machine/frame.h
+include powerpc/frame.h
+include powerpc/pcb.h
+include powerpc/psl.h
 
 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/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/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/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 machine/frame.h
-#include machine/psl.h
 #include machine/intr.h
 #include sys/device_if.h
 #include sys/evcnt.h
@@ -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 *	

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 lib/libkern/libkern.h
-__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: 

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 bsd.own.mk
 
@@ -27,12 +27,6 @@
 
 .include bsd.lib.mk
 
-# 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/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 sys/cdefs.h
-__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/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 non...@netbsd.org
@@ -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'; 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/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 sys/cdefs.h
-__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 sys/param.h
 #include sys/buf.h
@@ -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/pci/arcmsrvar.h	Mon Jun 20 13:26:58 2011
@@ 

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 sys/types.h
-
-#include regex.h
+#include stdarg.h
 #include stdio.h
 #include stdlib.h
 #include string.h
@@ -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(stderr, No action 

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 jmcne...@invisible.ca
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__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 sys/param.h
 #include sys/device.h
@@ -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: 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 sys/cdefs.h
-__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 sys/param.h
 #include sys/device.h
@@ -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: 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 a...@netbsd.org
 .\ 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: 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 a...@netbsd.org
 .\ 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: 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 sys/cdefs.h
-__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 sys/param.h
 
 #include dev/acpi/acpireg.h
 #include dev/acpi/acpivar.h
 
-#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: 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 jruoho...@iki.fi
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__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 sys/param.h
 #include sys/cpu.h
@@ -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: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/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 sys/cdefs.h
-__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/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 sys/cdefs.h
-__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 sys/param.h
 #include sys/systm.h
@@ -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/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 sys/cdefs.h
-__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 sys/param.h
 #include sys/device.h
@@ -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/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 jmcne...@invisible.ca
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__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 sys/param.h
 #include sys/device.h
@@ -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/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 jruoho...@iki.fi
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__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 sys/param.h
 #include sys/module.h
@@ -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 jruoho...@iki.fi
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__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 sys/param.h
 #include sys/module.h
@@ -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 jmcne...@invisible.ca
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__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 sys/param.h
 #include sys/device.h
@@ -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 sys/cdefs.h
-__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 sys/param.h
 #include sys/kmem.h
@@ -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/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 sys/cdefs.h
-__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 sys/param.h
 #include sys/systm.h
@@ -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/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 sys/cdefs.h
-__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 sys/param.h
 #include sys/buf.h
@@ -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 sys/cdefs.h
-__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 sys/param.h
 #include sys/systm.h
@@ -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/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 sys/cdefs.h
-__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 sys/param.h
 #include sys/systm.h
@@ -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/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=powerpc/ibm4xx/ibm4xx_intr.h
+options 	PPC_INTR_IMPL=powerpc/intr.h
 
 options 	INTSTK=8192
 
Index: src/sys/arch/evbppc/conf/std.obs405
diff -u 

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 sys/cdefs.h
-__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 sys/cdefs.h
-__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 ma...@peereboom.us
@@ -17,7 +17,7 @@
  */
 
 #include sys/cdefs.h
-__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 sys/cdefs.h
-__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 sys/param.h
 #include sys/systm.h
@@ -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

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 bsd.own.mk
 
@@ -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 sys/cdefs.h
+__RCSID($NetBSD: t_truncate.c,v 1.1 2011/06/20 18:03:41 jruoho Exp $);
+
+#include sys/stat.h
+
+#include atf-c.h
+#include errno.h
+#include fcntl.h
+#include stdio.h
+#include string.h
+#include unistd.h
+
+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)
+{
+	

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 kef...@netbsd.ro
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__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 sys/param.h
 #include sys/systm.h
@@ -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/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 sys/cdefs.h
-__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 sys/param.h
 #include sys/systm.h
@@ -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 sys/cdefs.h
-__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 sys/param.h
 #include sys/kernel.h
@@ -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 sys/cdefs.h
-__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 sys/param.h
 #include sys/systm.h
@@ -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 sys/cdefs.h
-__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 sys/param.h
 #include sys/systm.h
@@ -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/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 sys/mutex.h
+
+#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 || MODULAR */
+};
+

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 sys/disklabel.h
 #include sys/bootblock.h
+#include sys/param.h
+#include dev/raidframe/raidframevar.h
 
 #include machine/bootinfo.h
 #include machine/stdarg.h
@@ -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/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

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 sys/syscall.h
 
 #include machine/param.h
-#include machine/pmap.h
 #include machine/psl.h
 #include machine/trap.h
 #include machine/asm.h

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 sys/syscall.h
 
 #include machine/param.h
-#include machine/pmap.h
 #include machine/psl.h
 #include machine/trap.h
 #include machine/asm.h

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 sys/syscall.h
 
 #include machine/param.h
-#include machine/pmap.h
 #include machine/psl.h
 #include machine/trap.h
 #include machine/asm.h

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 $	*/
 
 /*-
  

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 sys/cdefs.h
-__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 sys/param.h
 #include sys/systm.h
@@ -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 sys/cdefs.h
-__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 sys/param.h
 #include sys/systm.h
@@ -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 sys/cdefs.h
 
-__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 sys/param.h
 #include sys/systm.h
@@ -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 sys/cdefs.h
-__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 sys/param.h
 #include sys/systm.h
@@ 

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/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 sys/cdefs.h
-__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 sys/param.h
 #include sys/condvar.h
@@ -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/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 string.h 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 string.h
 
 void
 munchit(s)



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 bsd.own.mk
 .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/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 sys/cdefs.h
-__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 sys/cdefs.h
-__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 ma...@peereboom.us
@@ -17,7 +17,7 @@
  */
 
 #include sys/cdefs.h
-__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/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 sys/cdefs.h
-__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 sys/param.h
 #include sys/buf.h
@@ -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/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/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 sys/cdefs.h
-__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 sys/hash.h
 
 #include uvm/uvm.h
+#include uvm/uvm_pdaemon.h	/* for uvmpd_trylockowner */
 #include uvm/uvm_pdpolicy.h
 #include uvm/uvm_pdpolicy_impl.h
 
@@ -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/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 sys/cdefs.h
-__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 sys/stat.h
 
@@ -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/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=mpcpage=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/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 bsd.own.mk
 
 .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/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 21 | grep version`\ buildinf.h
+	@echo #define CFLAGS \`${CC} -v 21 | 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

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 bsd.lib.mk
+
+.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 bsd.lib.mk
 .include bsd.subdir.mk
+
+# 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 bsd.own.mk
 
@@ -14,3 +14,7 @@
 WARNS=	4
 
 .include bsd.lib.mk
+
+.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/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/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/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 sys/cdefs.h
-__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 jruoho...@iki.fi
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__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 sys/param.h
 #include sys/cpu.h
@@ -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 jruoho...@iki.fi
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__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 sys/param.h
 #include sys/module.h
@@ -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 sys/cdefs.h
-__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 sys/param.h
 #include sys/kmem.h
@@ -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 

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/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 bsd.own.mk
 
 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/lib/crtstuff4
+   do nbmake-MACHINE dependall install
 
-7. In each of src/lib/csu, src/gnu/lib/libgcc4, src/lib/libdes, and src/lib,
-   do nbmake-MACHINE all install.
+7. In each of src/lib

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/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/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 sys/cdefs.h
-__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 sys/param.h
 #include sys/systm.h
@@ -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 = {
+			.dcache_size = 16384,
+			

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/matpax.1
diff -u othersrc/external/bsd/mat/dist/matpax.1:1.2 

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 sys/cdefs.h
-__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 sys/param.h
 #include sys/cpu.h
@@ -702,7 +702,7 @@
 {
 
 	memcpy((void *)dst, (void *)src, PAGE_SIZE);
-	dcache_flush_page(dst);
+	dcache_wbinv_page(dst);
 }
 
 /*



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

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 bsd.own.mk
 
@@ -6,4 +6,10 @@
 SUBDIR+=	binutils
 .endif
 
+.if ${HAVE_GCC} == 45
+.if ${MKGCCCMDS} != no
+#SUBDIR+=	gcc
+.endif
+.endif
+
 .include bsd.subdir.mk

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 bsd.own.mk
 
@@ -23,8 +23,10 @@
 .endif
 .endif
 
+.if ${HAVE_GCC} == 4
 .if ${MKGCCCMDS} != no
 SUBDIR+=	gcc4
 .endif
+.endif
 
 .include bsd.subdir.mk



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/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/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/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/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/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/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/include/oea

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

Modified Files:
src/sys/arch/powerpc/include/oea: bat.h

Log Message:
Include powerpc/psl.h


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/powerpc/include/oea/bat.h

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/include

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

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

Log Message:
Explicitly include powerpc/psl.h


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/include/userret.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/include/booke/cpuvar.h

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

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

Modified Files:
src/sys/arch/powerpc/include: netbsd32_machdep.h
src/sys/arch/powerpc/oea: cpu_subr.c ofwoea_machdep.c
src/sys/arch/powerpc/pic: i8259_common.c ipi_openpic.c openpic_common.c
pic_distopenpic.c pic_i8259.c pic_mpcsoc.c pic_openpic.c
pic_prepivr.c

Log Message:
arch/powerpc/... - powerpc/...


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/include/netbsd32_machdep.h
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/powerpc/oea/cpu_subr.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/oea/ofwoea_machdep.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/pic/i8259_common.c \
src/sys/arch/powerpc/pic/ipi_openpic.c \
src/sys/arch/powerpc/pic/pic_distopenpic.c \
src/sys/arch/powerpc/pic/pic_openpic.c \
src/sys/arch/powerpc/pic/pic_prepivr.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/pic/openpic_common.c \
src/sys/arch/powerpc/pic/pic_i8259.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/powerpc/pic/pic_mpcsoc.c

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/pic

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

Modified Files:
src/sys/arch/powerpc/pic: intr.c ipi.c

Log Message:
Cleanup includes.  Explicitly include powerpc/psl.h


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/pic/intr.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/pic/ipi.c

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/include/ibm4xx

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

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

Log Message:
Explicitly include powerpc/psl.h


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/powerpc/include/ibm4xx/cpu.h

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/marvell

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

Modified Files:
src/sys/arch/powerpc/marvell: pic_discovery.c

Log Message:
Add __CTASSERT(sizeof(imask_t) == sizeof(uint64_t));


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/marvell/pic_discovery.c

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



CVS commit: src/sys/arch

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

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

Log Message:
Cleanup powerpc param.h.  If compiling a MODULE, ignore port-specific stuff.
Only include machine/cpu.h in powerpc/param.h at the end.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/amigappc/include/param.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/bebox/include/param.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbppc/include/param.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ibmnws/include/param.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/macppc/include/param.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mvmeppc/include/param.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/ofppc/include/param.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/include/param.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/prep/include/param.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/rs6000/include/param.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sandpoint/include/param.h

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



CVS commit: src/sys/arch

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

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

Log Message:
Don't expose port-specific if _MODULE is defined.
Don't _MACHINE_CPU_H_, _PORT_CPU_H_


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/amigappc/include/cpu.h
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/bebox/include/cpu.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbppc/include/cpu.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ibmnws/include/cpu.h
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/macppc/include/cpu.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mvmeppc/include/cpu.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/ofppc/include/cpu.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/prep/include/cpu.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/rs6000/include/cpu.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sandpoint/include/cpu.h

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



CVS commit: src

2011-06-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Jun 20 06:52:38 UTC 2011

Modified Files:
src: Makefile
src/lib/csu/common_elf: Makefile.inc
src/lib/i18n_module/UTF7: Makefile
src/lib/libbz2: Makefile
src/share/mk: bsd.own.mk bsd.sys.mk
src/sys/arch/hp700/stand: Makefile.inc
src/sys/arch/i386/stand: Makefile.booters
src/sys/arch/i386/stand/boot: Makefile.boot
src/sys/arch/i386/stand/bootxx: Makefile.bootxx
src/sys/conf: Makefile.kern.inc

Log Message:
remove all the code that supported HAVE_GCC=3.  mostly from chuq.


To generate a diff of this commit:
cvs rdiff -u -r1.283 -r1.284 src/Makefile
cvs rdiff -u -r1.32 -r1.33 src/lib/csu/common_elf/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 src/lib/i18n_module/UTF7/Makefile
cvs rdiff -u -r1.14 -r1.15 src/lib/libbz2/Makefile
cvs rdiff -u -r1.670 -r1.671 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.203 -r1.204 src/share/mk/bsd.sys.mk
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hp700/stand/Makefile.inc
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/i386/stand/Makefile.booters
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/i386/stand/boot/Makefile.boot
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/i386/stand/bootxx/Makefile.bootxx
cvs rdiff -u -r1.139 -r1.140 src/sys/conf/Makefile.kern.inc

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



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.  (net/netisr.h 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.



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.



  1   2   >