Re: CVS commit: src/sys/arch/hppa

2010-11-14 Thread Nick Hudson
On Sunday 14 November 2010 03:16:05 Masao Uebayashi wrote:
 Module Name:  src
 Committed By: uebayasi
 Date: Sun Nov 14 03:16:05 UTC 2010
 
 Modified Files:
   src/sys/arch/hppa/hppa: pmap.c
   src/sys/arch/hppa/include: mutex.h vmparam.h
 
 Log Message:
 Don't rely on global APIs from internal.

Why is this change necessary?

Thanks,
Nick
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.78 -r1.79 src/sys/arch/hppa/hppa/pmap.c
 cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/include/mutex.h
 cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hppa/include/vmparam.h
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Re: CVS commit: src/sys/arch/hppa

2010-11-14 Thread Masao Uebayashi
On Sun, Nov 14, 2010 at 10:36:26AM +, Nick Hudson wrote:
 On Sunday 14 November 2010 03:16:05 Masao Uebayashi wrote:
  Module Name:src
  Committed By:   uebayasi
  Date:   Sun Nov 14 03:16:05 UTC 2010
  
  Modified Files:
  src/sys/arch/hppa/hppa: pmap.c
  src/sys/arch/hppa/include: mutex.h vmparam.h
  
  Log Message:
  Don't rely on global APIs from internal.
 
 Why is this change necessary?
 
 Thanks,
 Nick

To reduce unnecessary dependencies.  kmutex_t is for users.
machine/mutex.h is internal, it knows what it's typedef'ed from.
All other machine/mutex.h uses struct kmutex.  Do you have a specific
reason to use kmutex_t?

vm_page_md should be moved to machine/pmap.h too.  It's not really
a parameter.

  
  
  To generate a diff of this commit:
  cvs rdiff -u -r1.78 -r1.79 src/sys/arch/hppa/hppa/pmap.c
  cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/include/mutex.h
  cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hppa/include/vmparam.h
  
  Please note that diffs are not public domain; they are subject to the
  copyright notices on the relevant files.
  


Re: CVS commit: src/sys/arch/hppa

2010-11-14 Thread Nick Hudson
Did you check that a kernel still builds?

I'll respond more fully later...

Nick

Sent from my iPhone

On 14 Nov 2010, at 12:30, Masao Uebayashi uebay...@tombi.co.jp wrote:

 On Sun, Nov 14, 2010 at 10:36:26AM +, Nick Hudson wrote:
 On Sunday 14 November 2010 03:16:05 Masao Uebayashi wrote:
 Module Name:src
 Committed By:uebayasi
 Date:Sun Nov 14 03:16:05 UTC 2010
 
 Modified Files:
src/sys/arch/hppa/hppa: pmap.c
src/sys/arch/hppa/include: mutex.h vmparam.h
 
 Log Message:
 Don't rely on global APIs from internal.
 
 Why is this change necessary?
 
 Thanks,
 Nick
 
 To reduce unnecessary dependencies.  kmutex_t is for users.
 machine/mutex.h is internal, it knows what it's typedef'ed from.
 All other machine/mutex.h uses struct kmutex.  Do you have a specific
 reason to use kmutex_t?
 
 vm_page_md should be moved to machine/pmap.h too.  It's not really
 a parameter.
 
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.78 -r1.79 src/sys/arch/hppa/hppa/pmap.c
 cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/include/mutex.h
 cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hppa/include/vmparam.h
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


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

2010-11-14 Thread Masao Uebayashi
On Sun, Nov 14, 2010 at 05:52:51AM +, David Holland wrote:
 On Sun, Nov 14, 2010 at 03:32:44AM +, Masao Uebayashi wrote:
   XXX What is the conclusion about direct vs. indirect #include from headers?
 
 Every header file should include the things it requires to compile.
 Therefore, there should in principle be no cases where a header file
 (or source file) needs to #include something it doesn't itself use.

This clarifies my long-unanswered question, thanks!

I've (re)built about 300 kernels in the last days.  I've found:

- sys/sysctl.h's struct kinfo_proc should be moved into sys/proc.h
  (I've done this locally).  Otherwise all sysctl node providers
  includes sys/proc.h and uvm/uvm_extern.h.
  (This is where I started...)

- sys/syscallargs.h should be split into pieces, otherwise all its
  users have to know unrelated types (sys/mount.h, sys/cpu.h).

- sys/proc.h's tsleep(), wakeup(), and friends should be moved into
  some common header, because it's widely used API.  sys/proc.h will
  be used only for struct proc related things.


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

2010-11-14 Thread Masao Uebayashi
On Mon, Nov 15, 2010 at 11:24:21AM +0900, Masao Uebayashi wrote:
 On Sun, Nov 14, 2010 at 05:52:51AM +, David Holland wrote:
  On Sun, Nov 14, 2010 at 03:32:44AM +, Masao Uebayashi wrote:
XXX What is the conclusion about direct vs. indirect #include from 
  headers?
  
  Every header file should include the things it requires to compile.
  Therefore, there should in principle be no cases where a header file
  (or source file) needs to #include something it doesn't itself use.
 
 This clarifies my long-unanswered question, thanks!
 
 I've (re)built about 300 kernels in the last days.  I've found:
 
 - sys/sysctl.h's struct kinfo_proc should be moved into sys/proc.h
   (I've done this locally).  Otherwise all sysctl node providers
   includes sys/proc.h and uvm/uvm_extern.h.
   (This is where I started...)
 
 - sys/syscallargs.h should be split into pieces, otherwise all its
   users have to know unrelated types (sys/mount.h, sys/cpu.h).
 
 - sys/proc.h's tsleep(), wakeup(), and friends should be moved into
   some common header, because it's widely used API.  sys/proc.h will
   be used only for struct proc related things.

Note that none of ltsleep(), tsleep(), and wakeup() use struct proc as
part of interface.


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

2010-11-14 Thread SODA Noriyuki
 On Sun, 14 Nov 2010 05:52:51 +,
David Holland dholland-sourcechan...@netbsd.org said:

 On Sun, Nov 14, 2010 at 03:32:44AM +, Masao Uebayashi wrote:
 XXX What is the conclusion about direct vs. indirect #include from headers?
 
 Every header file should include the things it requires to compile.
 Therefore, there should in principle be no cases where a header file
 (or source file) needs to #include something it doesn't itself use.

Well, there is another thing which has to be considered.  That is
name space pollution.
Header files which are exported to userland (for userland visible APIs)
should not export random symbols.  Only symbols which are defined as
the interface of the header file are allowed to be exported.

It seems the sys/param.h change is safe about this point though,
because all definitions of the uvm_param.h seem to be protected
by defined(_KERNEL).
-- 
soda


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

2010-11-14 Thread Bernd Ernesti
On Mon, Nov 15, 2010 at 11:24:21AM +0900, Masao Uebayashi wrote:
 On Sun, Nov 14, 2010 at 05:52:51AM +, David Holland wrote:
  On Sun, Nov 14, 2010 at 03:32:44AM +, Masao Uebayashi wrote:
XXX What is the conclusion about direct vs. indirect #include from 
  headers?
  
  Every header file should include the things it requires to compile.
  Therefore, there should in principle be no cases where a header file
  (or source file) needs to #include something it doesn't itself use.
 
 This clarifies my long-unanswered question, thanks!
 
 I've (re)built about 300 kernels in the last days.  I've found:
 
 - sys/sysctl.h's struct kinfo_proc should be moved into sys/proc.h
   (I've done this locally).  Otherwise all sysctl node providers
   includes sys/proc.h and uvm/uvm_extern.h.
   (This is where I started...)
 
 - sys/syscallargs.h should be split into pieces, otherwise all its
   users have to know unrelated types (sys/mount.h, sys/cpu.h).
 
 - sys/proc.h's tsleep(), wakeup(), and friends should be moved into
   some common header, because it's widely used API.  sys/proc.h will
   be used only for struct proc related things.

What are the issues here that we need to fix this right now?

Can you please post changes and/or start a thread about all this
before you do them on tech-kern?

Bernd



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

2010-11-14 Thread Adam Hamsik

On Nov,Monday 15 2010, at 7:16 AM, Bernd Ernesti wrote:

 On Mon, Nov 15, 2010 at 11:24:21AM +0900, Masao Uebayashi wrote:
 On Sun, Nov 14, 2010 at 05:52:51AM +, David Holland wrote:
 On Sun, Nov 14, 2010 at 03:32:44AM +, Masao Uebayashi wrote:
 XXX What is the conclusion about direct vs. indirect #include from headers?
 
 Every header file should include the things it requires to compile.
 Therefore, there should in principle be no cases where a header file
 (or source file) needs to #include something it doesn't itself use.
 
 This clarifies my long-unanswered question, thanks!
 
 I've (re)built about 300 kernels in the last days.  I've found:
 
 - sys/sysctl.h's struct kinfo_proc should be moved into sys/proc.h
  (I've done this locally).  Otherwise all sysctl node providers
  includes sys/proc.h and uvm/uvm_extern.h.
  (This is where I started...)
 
 - sys/syscallargs.h should be split into pieces, otherwise all its
  users have to know unrelated types (sys/mount.h, sys/cpu.h).
 
 - sys/proc.h's tsleep(), wakeup(), and friends should be moved into
  some common header, because it's widely used API.  sys/proc.h will
  be used only for struct proc related things.
 
 What are the issues here that we need to fix this right now?

I think that it's quite good time to fix, it would be much harder to do this 
after 6.0 branch.

Regards

Adam.



CVS commit: src/distrib/notes/common

2010-11-14 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sun Nov 14 11:19:50 UTC 2010

Modified Files:
src/distrib/notes/common: main

Log Message:
Add myself.


To generate a diff of this commit:
cvs rdiff -u -r1.467 -r1.468 src/distrib/notes/common/main

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.467 src/distrib/notes/common/main:1.468
--- src/distrib/notes/common/main:1.467	Wed Oct 27 18:17:42 2010
+++ src/distrib/notes/common/main	Sun Nov 14 11:19:49 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.467 2010/10/27 18:17:42 martin Exp $
+.\	$NetBSD: main,v 1.468 2010/11/14 11:19:49 kiyohara Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -1215,6 +1215,7 @@
 .It Ta Frank Kardel Ta Mt kar...@netbsd.org
 .It Ta KAWAMOTO Yosihisa Ta Mt kawam...@netbsd.org
 .It Ta Min Sik Kim Ta Mt mins...@netbsd.org
+.It Ta KIYOHARA Takashi Ta Mt kiyoh...@netbsd.org
 .It Ta Thomas Klausner Ta Mt w...@netbsd.org
 .It Ta Klaus Klein Ta Mt kle...@netbsd.org
 .It Ta John Klos Ta Mt jk...@netbsd.org



CVS commit: src/sys/arch

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 14 13:33:23 UTC 2010

Modified Files:
src/sys/arch/alpha/include: pmap.h vmparam.h
src/sys/arch/amd64/include: pmap.h vmparam.h
src/sys/arch/arm/include/arm32: pmap.h vmparam.h
src/sys/arch/hppa/include: pmap.h vmparam.h
src/sys/arch/i386/include: pmap.h vmparam.h
src/sys/arch/ia64/include: pmap.h vmparam.h
src/sys/arch/mips/include: pmap.h vmparam.h
src/sys/arch/powerpc/include/oea: pmap.h vmparam.h
src/sys/arch/sh3/include: pmap.h vmparam.h
src/sys/arch/sparc/include: pmap.h vmparam.h
src/sys/arch/sparc64/include: pmap.h vmparam.h
src/sys/arch/vax/include: pmap.h vmparam.h

Log Message:
Move struct vm_page_md definition from vmparam.h to pmap.h, because
it's used only by pmap.  vmparam.h has definitions for wider
audience.

All GENERIC kernels build tested, except ia64.

powerpc/include/booke/vmparam.h has one too, but it has no pmap.h,
so it's left as is.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/alpha/include/pmap.h
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/alpha/include/vmparam.h
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/amd64/include/pmap.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amd64/include/vmparam.h
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/arm/include/arm32/pmap.h
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/include/arm32/vmparam.h
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/hppa/include/pmap.h
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hppa/include/vmparam.h
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/i386/include/pmap.h
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/i386/include/vmparam.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/include/pmap.h \
src/sys/arch/ia64/include/vmparam.h
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/mips/include/pmap.h
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/mips/include/vmparam.h
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/powerpc/include/oea/pmap.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/include/oea/vmparam.h
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/sh3/include/pmap.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sh3/include/vmparam.h
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/sparc/include/pmap.h
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/sparc/include/vmparam.h
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/sparc64/include/pmap.h
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sparc64/include/vmparam.h
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/vax/include/pmap.h
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/vax/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/alpha/include/pmap.h
diff -u src/sys/arch/alpha/include/pmap.h:1.75 src/sys/arch/alpha/include/pmap.h:1.76
--- src/sys/arch/alpha/include/pmap.h:1.75	Mon Oct 26 03:51:43 2009
+++ src/sys/arch/alpha/include/pmap.h	Sun Nov 14 13:33:20 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.75 2009/10/26 03:51:43 thorpej Exp $ */
+/* $NetBSD: pmap.h,v 1.76 2010/11/14 13:33:20 uebayasi Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2007 The NetBSD Foundation, Inc.
@@ -349,6 +349,22 @@
 	}\
 } while (0)
 
+/*
+ * pmap-specific data store in the vm_page structure.
+ */
+#define	__HAVE_VM_PAGE_MD
+struct vm_page_md {
+	struct pv_entry *pvh_list;		/* pv_entry list */
+	int pvh_attrs;/* page attributes */
+	unsigned pvh_refcnt;
+};
+
+#define	VM_MDPAGE_INIT(pg)		\
+do {	\
+	(pg)-mdpage.pvh_list = NULL;	\
+	(pg)-mdpage.pvh_refcnt = 0;	\
+} while (/*CONSTCOND*/0)
+
 #endif /* _KERNEL */
 
 #endif /* _PMAP_MACHINE_ */

Index: src/sys/arch/alpha/include/vmparam.h
diff -u src/sys/arch/alpha/include/vmparam.h:1.34 src/sys/arch/alpha/include/vmparam.h:1.35
--- src/sys/arch/alpha/include/vmparam.h:1.34	Sat Nov  6 15:42:43 2010
+++ src/sys/arch/alpha/include/vmparam.h	Sun Nov 14 13:33:20 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.34 2010/11/06 15:42:43 uebayasi Exp $ */
+/* $NetBSD: vmparam.h,v 1.35 2010/11/14 13:33:20 uebayasi Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -151,20 +151,4 @@
 #define	VM_NFREELIST		1
 #define	VM_FREELIST_DEFAULT	0
 
-/*
- * pmap-specific data store in the vm_page structure.
- */
-#define	__HAVE_VM_PAGE_MD
-struct vm_page_md {
-	struct pv_entry *pvh_list;		/* pv_entry list */
-	int pvh_attrs;/* page attributes */
-	unsigned pvh_refcnt;
-};
-
-#define	VM_MDPAGE_INIT(pg)		\
-do {	\
-	(pg)-mdpage.pvh_list = NULL;	\
-	(pg)-mdpage.pvh_refcnt = 0;	\
-} while (/*CONSTCOND*/0)
-
 #endif	/* ! _ALPHA_VMPARAM_H_ */

Index: src/sys/arch/amd64/include/pmap.h
diff -u src/sys/arch/amd64/include/pmap.h:1.22 src/sys/arch/amd64/include/pmap.h:1.23
--- src/sys/arch/amd64/include/pmap.h:1.22	Sun Oct 26 00:08:15 2008
+++ src/sys/arch/amd64/include/pmap.h	Sun Nov 14 13:33:20 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.22 2008/10/26 00:08:15 mrg Exp $	*/
+/*	$NetBSD: pmap.h,v 1.23 2010/11/14 

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

2010-11-14 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Nov 14 13:40:32 UTC 2010

Modified Files:
src/sys/arch/xen/include: i82489var.h

Log Message:
Explain why we hardwire lapic_cpu_number() to 0 on Xen.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/xen/include/i82489var.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/xen/include/i82489var.h
diff -u src/sys/arch/xen/include/i82489var.h:1.1 src/sys/arch/xen/include/i82489var.h:1.2
--- src/sys/arch/xen/include/i82489var.h:1.1	Thu Sep 28 18:53:15 2006
+++ src/sys/arch/xen/include/i82489var.h	Sun Nov 14 13:40:31 2010
@@ -1,5 +1,11 @@
-/*	$NetBSD: i82489var.h,v 1.1 2006/09/28 18:53:15 bouyer Exp $	*/
+/*	$NetBSD: i82489var.h,v 1.2 2010/11/14 13:40:31 bouyer Exp $	*/
 
 #include x86/i82489var.h
+
+/*
+ * Xen doesn't give acces to the lapic. In addition, the lapic number provided
+ * by the dom0 to Xen when setting up iopics is ignored, the hypervisor will
+ * decide itself to which physical CPU the interrupt should be routed to.
+ */
 #undef lapic_cpu_number
 #define lapic_cpu_number() (0)



CVS commit: src/sys/dev/mii

2010-11-14 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Nov 14 13:40:36 UTC 2010

Modified Files:
src/sys/dev/mii: rlphy.c

Log Message:
rlphy fails to work without autonegotiation.

Reason is that ifm_data does not store BMCR data but a media index
that gets poked into the BMCR register.

Setting the BMCR and ANAR registers is correctly handled by the
generic function mii_phy_setmedia.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/mii/rlphy.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/mii/rlphy.c
diff -u src/sys/dev/mii/rlphy.c:1.25 src/sys/dev/mii/rlphy.c:1.26
--- src/sys/dev/mii/rlphy.c:1.25	Mon Feb 16 08:00:42 2009
+++ src/sys/dev/mii/rlphy.c	Sun Nov 14 13:40:36 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rlphy.c,v 1.25 2009/02/16 08:00:42 cegger Exp $	*/
+/*	$NetBSD: rlphy.c,v 1.26 2010/11/14 13:40:36 mlelstv Exp $	*/
 /*	$OpenBSD: rlphy.c,v 1.20 2005/07/31 05:27:30 pvalchev Exp $	*/
 
 /*
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rlphy.c,v 1.25 2009/02/16 08:00:42 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: rlphy.c,v 1.26 2010/11/14 13:40:36 mlelstv Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -165,27 +165,7 @@
 		if ((mii-mii_ifp-if_flags  IFF_UP) == 0)
 			break;
 
-		switch (IFM_SUBTYPE(ife-ifm_media)) {
-		case IFM_AUTO:
-			/*
-			 * If we're already in auto mode, just return.
-			 */
-			if (PHY_READ(sc, MII_BMCR)  BMCR_AUTOEN)
-return (0);
-			(void) mii_phy_auto(sc, 0);
-			break;
-		case IFM_100_T4:
-			/*
-			 * XXX Not supported as a manual setting right now.
-			 */
-			return (EINVAL);
-		default:
-			/*
-			 * BMCR data is stored in the ifmedia entry.
-			 */
-			PHY_WRITE(sc, MII_ANAR, mii_anar(ife-ifm_media));
-			PHY_WRITE(sc, MII_BMCR, ife-ifm_data);
-		}
+		mii_phy_setmedia(sc);
 		break;
 
 	case MII_TICK:



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

2010-11-14 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Nov 14 13:43:05 UTC 2010

Modified Files:
src/sys/arch/xen/x86: cpu.c

Log Message:
Boot vs AP processors don't make sense for physical CPUs, these are
handled by the hypervisor and all CPUs are running when the dom0 is started.
In addition, we don't have a reliable way to determine the boot CPU as
- we may not be running on the boot CPU
- we don't have access to the lapic id
So simplify by ignoring the information and assign phycpu_info_primary to the
first attached CPU.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/xen/x86/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/arch/xen/x86/cpu.c
diff -u src/sys/arch/xen/x86/cpu.c:1.51 src/sys/arch/xen/x86/cpu.c:1.52
--- src/sys/arch/xen/x86/cpu.c:1.51	Sat Nov  6 11:46:04 2010
+++ src/sys/arch/xen/x86/cpu.c	Sun Nov 14 13:43:04 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.51 2010/11/06 11:46:04 uebayasi Exp $	*/
+/*	$NetBSD: cpu.c,v 1.52 2010/11/14 13:43:04 bouyer Exp $	*/
 /* NetBSD: cpu.c,v 1.18 2004/02/20 17:35:01 yamt Exp  */
 
 /*-
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.51 2010/11/06 11:46:04 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.52 2010/11/14 13:43:04 bouyer Exp $);
 
 #include opt_ddb.h
 #include opt_multiprocessor.h
@@ -220,7 +220,7 @@
 	struct cpu_attach_args *caa = aux;
 	struct cpu_info *ci;
 	uintptr_t ptr;
-	static bool again = false;
+	static int nphycpu = 0;
 
 	sc-sc_dev = self;
 
@@ -231,24 +231,24 @@
 
 	/*
 	 * If we're an Application Processor, allocate a cpu_info
-	 * structure, otherwise use the primary's.
+	 * If we're the first attached CPU use the primary cpu_info,
+	 * otherwise allocate a new one
 	 */
-	if (caa-cpu_role == CPU_ROLE_AP) {
-		if ((boothowto  RB_MD1) != 0) {
-			aprint_error(: multiprocessor boot disabled\n);
-			if (!pmf_device_register(self, NULL, NULL))
-aprint_error_dev(self,
-   couldn't establish power handler\n);
-			return;
-		}
-		aprint_naive(: Application Processor\n);
+	aprint_naive(\n);
+	aprint_normal(\n);
+	if (nphycpu  0) {
+		struct cpu_info *tmp;
 		ptr = (uintptr_t)kmem_zalloc(sizeof(*ci) + CACHE_LINE_SIZE - 1,
 		KM_SLEEP);
 		ci = (struct cpu_info *)roundup2(ptr, CACHE_LINE_SIZE);
 		ci-ci_curldt = -1;
+
+		tmp = phycpu_info_list;
+		while (tmp-ci_next)
+			tmp = tmp-ci_next;
+
+		tmp-ci_next = ci;
 	} else {
-		aprint_naive(: %s Processor\n,
-		caa-cpu_role == CPU_ROLE_SP ? Single : Boot);
 		ci = phycpu_info_primary;
 	}
 
@@ -259,51 +259,14 @@
 	ci-ci_acpiid = caa-cpu_id;
 	ci-ci_cpuid = caa-cpu_number;
 	ci-ci_vcpu = NULL;
-
-	/*
-	 * Boot processor may not be attached first, but the below
-	 * must be done to allow booting other processors.
-	 */
-	if (!again) {
-		atomic_or_32(ci-ci_flags, CPUF_PRESENT | CPUF_PRIMARY);
-		/* Basic init */
-		again = true;
-	}
-
-	printf(: );
-	switch (caa-cpu_role) {
-	case CPU_ROLE_SP:
-		printf((uniprocessor)\n);
-		atomic_or_32(ci-ci_flags, CPUF_SP);
-		break;
-
-	case CPU_ROLE_BP:
-		printf((boot processor)\n);
-		atomic_or_32(ci-ci_flags, CPUF_BSP);
-		break;
-
-	case CPU_ROLE_AP:
-		/*
-		 * report on an AP
-		 */
-		printf((application processor)\n);
-		if (ci-ci_flags  CPUF_PRESENT) {
-			struct cpu_info *tmp;
-
-			tmp = phycpu_info_list;
-			while (tmp-ci_next)
-tmp = tmp-ci_next;
-
-			tmp-ci_next = ci;
-		}
-		break;
-
-	default:
-		panic(unknown processor type??\n);
-	}
+	ci-ci_index = nphycpu++;
+	ci-ci_cpumask = (1  cpu_index(ci));
 
 	atomic_or_32(phycpus_attached, ci-ci_cpumask);
 
+	if (!pmf_device_register(self, NULL, NULL))
+		aprint_error_dev(self, couldn't establish power handler\n);
+
 	return;
 }
 



CVS commit: src/sys/uvm

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 14 15:06:34 UTC 2010

Modified Files:
src/sys/uvm: uvm_page.c uvm_page.h uvm_pglist.c

Log Message:
Be a little more friendly to dynamic physical segment registration.

Maintain an array of pointer to struct vm_physseg, instead of struct
array.  So that VM subsystem can take its pointer safely.  Pointer
to this struct will replace raw paddr_t usage in the future.

Dynamic removal is not supported yet.

Only MD data structure changes, no kernel bump needed.

Tested on i386, amd64, powerpc/ibm40x, arm11.


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/sys/uvm/uvm_page.c
cvs rdiff -u -r1.66 -r1.67 src/sys/uvm/uvm_page.h
cvs rdiff -u -r1.46 -r1.47 src/sys/uvm/uvm_pglist.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_page.c
diff -u src/sys/uvm/uvm_page.c:1.163 src/sys/uvm/uvm_page.c:1.164
--- src/sys/uvm/uvm_page.c:1.163	Fri Nov 12 05:23:41 2010
+++ src/sys/uvm/uvm_page.c	Sun Nov 14 15:06:34 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.c,v 1.163 2010/11/12 05:23:41 uebayasi Exp $	*/
+/*	$NetBSD: uvm_page.c,v 1.164 2010/11/14 15:06:34 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.163 2010/11/12 05:23:41 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.164 2010/11/14 15:06:34 uebayasi Exp $);
 
 #include opt_ddb.h
 #include opt_uvmhist.h
@@ -125,9 +125,13 @@
  * physical memory config is stored in vm_physmem.
  */
 
-struct vm_physseg vm_physmem[VM_PHYSSEG_MAX];	/* XXXCDC: uvm.physmem */
-int vm_nphysseg = 0;/* XXXCDC: uvm.nphysseg */
-#define	vm_nphysmem	vm_nphysseg
+SIMPLEQ_HEAD(vm_physseg_freelist, vm_physseg);
+
+struct vm_physseg *vm_physmem_ptrs[VM_PHYSSEG_MAX];
+int vm_nphysmem = 0;
+static struct vm_physseg vm_physmem_store[VM_PHYSSEG_MAX];
+static struct vm_physseg_freelist vm_physmem_freelist =
+SIMPLEQ_HEAD_INITIALIZER(vm_physmem_freelist);
 
 /*
  * Some supported CPUs in a given architecture don't support all
@@ -181,6 +185,15 @@
 
 static void uvm_pageinsert(struct uvm_object *, struct vm_page *);
 static void uvm_pageremove(struct uvm_object *, struct vm_page *);
+static struct vm_physseg *uvm_physseg_alloc(
+struct vm_physseg_freelist * const, struct vm_physseg **, int,
+const paddr_t, const paddr_t);
+static void uvm_physseg_free(struct vm_physseg_freelist *,
+struct vm_physseg **, struct vm_physseg *);
+static void uvm_physseg_init(void);
+static void uvm_physseg_insert(struct vm_physseg *,
+struct vm_physseg **, int);
+static void uvm_physseg_remove(struct vm_physseg **, struct vm_physseg *);
 
 /*
  * per-object tree of pages
@@ -684,7 +697,6 @@
 panic(uvm_page_physget: out of memory!);
 vm_nphysmem--;
 for (x = lcv ; x  vm_nphysmem ; x++)
-	/* structure copy */
 	VM_PHYSMEM_PTR_SWAP(x, x + 1);
 			}
 			return (true);
@@ -702,7 +714,6 @@
 panic(uvm_page_physget: out of memory!);
 vm_nphysmem--;
 for (x = lcv ; x  vm_nphysmem ; x++)
-	/* structure copy */
 	VM_PHYSMEM_PTR_SWAP(x, x + 1);
 			}
 			return (true);
@@ -733,7 +744,6 @@
 panic(uvm_page_physget: out of memory!);
 			vm_nphysmem--;
 			for (x = lcv ; x  vm_nphysmem ; x++)
-/* structure copy */
 VM_PHYSMEM_PTR_SWAP(x, x + 1);
 		}
 		return (true);
@@ -768,31 +778,18 @@
 uvm_page_physload(paddr_t start, paddr_t end, paddr_t avail_start,
 paddr_t avail_end, int free_list)
 {
-	int preload, lcv;
-	psize_t npages;
-	struct vm_page *pgs;
-	struct vm_physseg *ps;
+	struct vm_physseg *seg;
+	int lcv;
 
-	if (uvmexp.pagesize == 0)
-		panic(uvm_page_physload: page size not set!);
 	if (free_list = VM_NFREELIST || free_list  VM_FREELIST_DEFAULT)
 		panic(uvm_page_physload: bad free list %d, free_list);
-	if (start = end)
-		panic(uvm_page_physload: start = end);
-
-	/*
-	 * do we have room?
-	 */
 
-	if (vm_nphysmem == VM_PHYSSEG_MAX) {
-		printf(uvm_page_physload: unable to load physical memory 
-		segment\n);
-		printf(\t%d segments allocated, ignoring 0x%llx - 0x%llx\n,
-		VM_PHYSSEG_MAX, (long long)start, (long long)end);
-		printf(\tincrease VM_PHYSSEG_MAX\n);
-		return;
-	}
+	seg = uvm_physseg_alloc(vm_physmem_freelist, vm_physmem_ptrs,
+	vm_nphysmem, start, end);
+	KASSERT(seg != NULL);
 
+	seg-avail_start = avail_start;
+	seg-avail_end = avail_end;
 	/*
 	 * check to see if this is a preload (i.e. uvm_page_init hasn't been
 	 * called yet, so malloc is not available).
@@ -802,112 +799,184 @@
 		if (VM_PHYSMEM_PTR(lcv)-pgs)
 			break;
 	}
-	preload = (lcv == vm_nphysmem);
+	if (lcv == vm_nphysmem) {
+		seg-pgs = NULL;
+		seg-lastpg = NULL;
+		seg-free_list = free_list;
+	} else {
+		panic(uvm_page_physload: 
+		tried to add RAM after uvm_page_init);
+	}
+	vm_nphysmem++;
+}
 
-	/*
-	 * if VM is already 

CVS commit: src/sys/uvm

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 14 15:16:53 UTC 2010

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

Log Message:
Fix build caused by a last minute change.


To generate a diff of this commit:
cvs rdiff -u -r1.164 -r1.165 src/sys/uvm/uvm_page.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_page.c
diff -u src/sys/uvm/uvm_page.c:1.164 src/sys/uvm/uvm_page.c:1.165
--- src/sys/uvm/uvm_page.c:1.164	Sun Nov 14 15:06:34 2010
+++ src/sys/uvm/uvm_page.c	Sun Nov 14 15:16:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.c,v 1.164 2010/11/14 15:06:34 uebayasi Exp $	*/
+/*	$NetBSD: uvm_page.c,v 1.165 2010/11/14 15:16:53 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.164 2010/11/14 15:06:34 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.165 2010/11/14 15:16:53 uebayasi Exp $);
 
 #include opt_ddb.h
 #include opt_uvmhist.h
@@ -188,8 +188,10 @@
 static struct vm_physseg *uvm_physseg_alloc(
 struct vm_physseg_freelist * const, struct vm_physseg **, int,
 const paddr_t, const paddr_t);
+#if 0
 static void uvm_physseg_free(struct vm_physseg_freelist *,
 struct vm_physseg **, struct vm_physseg *);
+#endif
 static void uvm_physseg_init(void);
 static void uvm_physseg_insert(struct vm_physseg *,
 struct vm_physseg **, int);
@@ -858,6 +860,7 @@
 	return ps;
 }
 
+#if 0
 void
 uvm_physseg_free(struct vm_physseg_freelist *freelist,
 struct vm_physseg **segs, struct vm_physseg *seg)
@@ -866,6 +869,7 @@
 	uvm_physseg_remove(segs, seg);
 	SIMPLEQ_INSERT_TAIL(freelist, seg, list);
 }
+#endif
 
 static void
 uvm_physseg_init(void)



CVS commit: src/sys/uvm

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 14 15:18:07 UTC 2010

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

Log Message:
... and another.


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/sys/uvm/uvm_page.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_page.c
diff -u src/sys/uvm/uvm_page.c:1.165 src/sys/uvm/uvm_page.c:1.166
--- src/sys/uvm/uvm_page.c:1.165	Sun Nov 14 15:16:53 2010
+++ src/sys/uvm/uvm_page.c	Sun Nov 14 15:18:07 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.c,v 1.165 2010/11/14 15:16:53 uebayasi Exp $	*/
+/*	$NetBSD: uvm_page.c,v 1.166 2010/11/14 15:18:07 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.165 2010/11/14 15:16:53 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.166 2010/11/14 15:18:07 uebayasi Exp $);
 
 #include opt_ddb.h
 #include opt_uvmhist.h
@@ -195,7 +195,9 @@
 static void uvm_physseg_init(void);
 static void uvm_physseg_insert(struct vm_physseg *,
 struct vm_physseg **, int);
+#if 0
 static void uvm_physseg_remove(struct vm_physseg **, struct vm_physseg *);
+#endif
 
 /*
  * per-object tree of pages
@@ -922,6 +924,7 @@
 #endif
 }
 
+#if 0
 static void
 uvm_physseg_remove(struct vm_physseg **segs, struct vm_physseg *seg)
 {
@@ -938,6 +941,7 @@
 	}
 	*segp = NULL;
 }
+#endif
 
 /*
  * vm_physseg_find: find vm_physseg structure that belongs to a PA



CVS commit: src/tools/host-mkdep

2010-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov 14 15:18:24 UTC 2010

Modified Files:
src/tools/host-mkdep: host-mkdep.in

Log Message:
recognize isysroot


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/tools/host-mkdep/host-mkdep.in

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

Modified files:

Index: src/tools/host-mkdep/host-mkdep.in
diff -u src/tools/host-mkdep/host-mkdep.in:1.18 src/tools/host-mkdep/host-mkdep.in:1.19
--- src/tools/host-mkdep/host-mkdep.in:1.18	Sat Feb 20 10:04:03 2010
+++ src/tools/host-mkdep/host-mkdep.in	Sun Nov 14 10:18:24 2010
@@ -1,6 +1,6 @@
 #...@bshell@ -
 #
-#	$NetBSD: host-mkdep.in,v 1.18 2010/02/20 15:04:03 joerg Exp $
+#	$NetBSD: host-mkdep.in,v 1.19 2010/11/14 15:18:24 christos Exp $
 #
 # Copyright (c) 1991, 1993
 #	The Regents of the University of California.  All rights reserved.
@@ -148,7 +148,7 @@
 cppargs=${cppargs%x}
 ;;
 
-		-[IDU]|-include|-isystem)
+		-[IDU]|-include|-isystem|-isysroot)
 set -- $@ $1 $2
 shift 2
 cppargs=${cppargs%xx}



CVS commit: src/sys/compat/sys

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 14 15:36:47 UTC 2010

Modified Files:
src/sys/compat/sys: sockio.h

Log Message:
Include sys/ioccom.h directly because it's used.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/compat/sys/sockio.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/compat/sys/sockio.h
diff -u src/sys/compat/sys/sockio.h:1.9 src/sys/compat/sys/sockio.h:1.10
--- src/sys/compat/sys/sockio.h:1.9	Sun Nov  7 19:45:06 2010
+++ src/sys/compat/sys/sockio.h	Sun Nov 14 15:36:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sockio.h,v 1.9 2010/11/07 19:45:06 pooka Exp $	*/
+/*	$NetBSD: sockio.h,v 1.10 2010/11/14 15:36:47 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1990, 1993, 1994
@@ -37,6 +37,8 @@
 #include opt_compat_netbsd.h
 #include opt_modular.h
 
+#include sys/ioccom.h
+
 #if defined(COMPAT_09) || defined(COMPAT_10) || defined(COMPAT_11) || \
 defined(COMPAT_12) || defined(COMPAT_13) || defined(COMPAT_14) || \
 defined(COMPAT_15) || defined(COMPAT_16) || defined(COMPAT_20) || \



CVS commit: src/sys/dev/ieee1394

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 14 15:47:20 UTC 2010

Modified Files:
src/sys/dev/ieee1394: firewire.h firewirereg.h

Log Message:
Include dependencies directly.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ieee1394/firewire.h
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ieee1394/firewirereg.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/ieee1394/firewire.h
diff -u src/sys/dev/ieee1394/firewire.h:1.5 src/sys/dev/ieee1394/firewire.h:1.6
--- src/sys/dev/ieee1394/firewire.h:1.5	Mon Mar 29 03:05:27 2010
+++ src/sys/dev/ieee1394/firewire.h	Sun Nov 14 15:47:20 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: firewire.h,v 1.5 2010/03/29 03:05:27 kiyohara Exp $	*/
+/*	$NetBSD: firewire.h,v 1.6 2010/11/14 15:47:20 uebayasi Exp $	*/
 /*-
  * Copyright (c) 2003 Hidetoshi Shimokawa
  * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
@@ -39,6 +39,8 @@
 #ifndef _FIREWIRE_H_
 #define _FIREWIRE_H_
 
+#include sys/ioccom.h
+
 #define	DEV_DEF  0
 #define	DEV_DV   2
 

Index: src/sys/dev/ieee1394/firewirereg.h
diff -u src/sys/dev/ieee1394/firewirereg.h:1.14 src/sys/dev/ieee1394/firewirereg.h:1.15
--- src/sys/dev/ieee1394/firewirereg.h:1.14	Tue Sep  7 07:26:54 2010
+++ src/sys/dev/ieee1394/firewirereg.h	Sun Nov 14 15:47:20 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: firewirereg.h,v 1.14 2010/09/07 07:26:54 cegger Exp $	*/
+/*	$NetBSD: firewirereg.h,v 1.15 2010/11/14 15:47:20 uebayasi Exp $	*/
 /*-
  * Copyright (c) 2003 Hidetoshi Shimokawa
  * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
@@ -38,6 +38,7 @@
 #ifndef _FIREWIREREG_H_
 #define _FIREWIREREG_H_
 
+#include sys/selinfo.h
 #include sys/uio.h
 
 #define PROJECT_STR		The NetBSD Project



CVS commit: src/lib/libc

2010-11-14 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sun Nov 14 18:11:43 UTC 2010

Modified Files:
src/lib/libc/compat/stdlib: compat_unsetenv.c
src/lib/libc/gen: popen.c
src/lib/libc/misc: initfini.c
src/lib/libc/stdlib: Makefile.inc getenv.c local.h putenv.c setenv.c
system.c unsetenv.c
Added Files:
src/lib/libc/include: env.h
src/lib/libc/stdlib: _env.c

Log Message:
Improve and simplify implementation of *env(3) functions:
- Use RB tree to keep track of memory allocated via setenv(3) as
  suggested by Enami Tsugutomo in private e-mail.
  This simplifies the code a lot as we no longer need to keep the size
  of environ in sync with an array of allocated environment variables.
  It also makes it possible to free environment variables in unsetenv(3)
  if something has changed the order of the environ array.
- Fix a bug in getenv(3) and getenv_r(3) which would return bogus
  results e.g. for  getenv(A=B)  if an environment variable A
  with value B=C exists.
- Clean up the internal functions:
  - Don't expose the read/write lock for the environment to other parts
of libc. Provide locking functions instead.
  - Use bool to report success or failure.
  - Use ssize_t or size_t instead of int for indexes.
  - Provide internal functions with simpler interfaces e.g. don't
combine return values and reference arguments.
  - Don't copy environ into an allocated block unless we really need
to grow it.

Code reviewed by Joerg Sonnenberger and Christos Zoulas, tested by
Joerg Sonnenberger and me. These changes also fix problems in
zsh 4.3.* and pam_ssh according to Joerg.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/compat/stdlib/compat_unsetenv.c
cvs rdiff -u -r1.29 -r1.30 src/lib/libc/gen/popen.c
cvs rdiff -u -r0 -r1.1 src/lib/libc/include/env.h
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/misc/initfini.c
cvs rdiff -u -r1.74 -r1.75 src/lib/libc/stdlib/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/stdlib/_env.c
cvs rdiff -u -r1.32 -r1.33 src/lib/libc/stdlib/getenv.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/stdlib/local.h
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/stdlib/putenv.c
cvs rdiff -u -r1.42 -r1.43 src/lib/libc/stdlib/setenv.c
cvs rdiff -u -r1.22 -r1.23 src/lib/libc/stdlib/system.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/stdlib/unsetenv.c

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

Modified files:

Index: src/lib/libc/compat/stdlib/compat_unsetenv.c
diff -u src/lib/libc/compat/stdlib/compat_unsetenv.c:1.2 src/lib/libc/compat/stdlib/compat_unsetenv.c:1.3
--- src/lib/libc/compat/stdlib/compat_unsetenv.c:1.2	Thu Sep 23 17:30:49 2010
+++ src/lib/libc/compat/stdlib/compat_unsetenv.c	Sun Nov 14 18:11:42 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_unsetenv.c,v 1.2 2010/09/23 17:30:49 christos Exp $	*/
+/*	$NetBSD: compat_unsetenv.c,v 1.3 2010/11/14 18:11:42 tron Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = from: @(#)setenv.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: compat_unsetenv.c,v 1.2 2010/09/23 17:30:49 christos Exp $);
+__RCSID($NetBSD: compat_unsetenv.c,v 1.3 2010/11/14 18:11:42 tron Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -54,16 +54,12 @@
 __weak_alias(unsetenv,_unsetenv)
 #endif
 
-#ifdef _REENTRANT
-extern rwlock_t __environ_lock;
-#endif
+#include env.h
 
 __warn_references(unsetenv,
 warning: reference to compatibility unsetenv();
  include stdlib.h for correct reference)
 
-extern char **environ;
-
 /*
  * unsetenv(name) --
  *	Delete environmental variable name.
@@ -71,15 +67,21 @@
 void
 unsetenv(const char *name)
 {
-	char **p;
-	int offset;
+	size_t l_name;
 
 	_DIAGASSERT(name != NULL);
 
-	rwlock_wrlock(__environ_lock);
-	while (__findenv(name, offset))	/* if set multiple times */
-		for (p = environ[offset];; ++p)
-			if (!(*p = *(p + 1)))
-break;
-	rwlock_unlock(__environ_lock);
+	l_name = strlen(name);
+	if (__writelockenv()) {
+		ssize_t offset;
+
+		while ((offset = __getenvslot(name, l_name, false)) != -1) {
+			char **p;		
+			for (p = environ[offset]; ; ++p) {
+if ((*p = *(p + 1)) == NULL)
+	break;
+			}
+		}
+		(void)__unlockenv();
+	}
 }

Index: src/lib/libc/gen/popen.c
diff -u src/lib/libc/gen/popen.c:1.29 src/lib/libc/gen/popen.c:1.30
--- src/lib/libc/gen/popen.c:1.29	Sun Oct 15 16:12:02 2006
+++ src/lib/libc/gen/popen.c	Sun Nov 14 18:11:42 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: popen.c,v 1.29 2006/10/15 16:12:02 christos Exp $	*/
+/*	$NetBSD: popen.c,v 1.30 2010/11/14 18:11:42 tron Exp $	*/
 
 /*
  * Copyright (c) 1988, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)popen.c	8.3 (Berkeley) 5/3/95;
 #else
-__RCSID($NetBSD: popen.c,v 1.29 2006/10/15 16:12:02 christos Exp $);
+__RCSID($NetBSD: popen.c,v 1.30 2010/11/14 18:11:42 tron Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -54,6 +54,8 @@
 #include stdlib.h
 #include 

CVS commit: src/tests/lib/libc/stdlib

2010-11-14 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sun Nov 14 18:15:08 UTC 2010

Modified Files:
src/tests/lib/libc/stdlib: t_environment.c

Log Message:
Update tests for *env(3):
- Introduce randomness into t_setenv to avoid freeing environment
  variables exactly in the order they have been allocated.
  Also call unsetenv(3) twice to make sure it behaves well if the
  environment variable doesn't exist.
- t_getenv is no longer a known failure after getenv(3) and getenv_r(3)
  have been fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libc/stdlib/t_environment.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/lib/libc/stdlib/t_environment.c
diff -u src/tests/lib/libc/stdlib/t_environment.c:1.9 src/tests/lib/libc/stdlib/t_environment.c:1.10
--- src/tests/lib/libc/stdlib/t_environment.c:1.9	Sat Nov 13 21:08:36 2010
+++ src/tests/lib/libc/stdlib/t_environment.c	Sun Nov 14 18:15:08 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_environment.c,v 1.9 2010/11/13 21:08:36 tron Exp $	*/
+/*	$NetBSD: t_environment.c,v 1.10 2010/11/14 18:15:08 tron Exp $	*/
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: t_environment.c,v 1.9 2010/11/13 21:08:36 tron Exp $);
+__RCSID($NetBSD: t_environment.c,v 1.10 2010/11/14 18:15:08 tron Exp $);
 
 #include atf-c.h
 #include errno.h
@@ -79,21 +79,28 @@
 
 ATF_TC_BODY(t_setenv, tc)
 {
-	size_t i;
+	const size_t numvars = 8192;
+	size_t i, offset;
 	char name[1024];
 	char value[1024];
-	for (i = 0; i  10240; i++) {
-		snprintf(name, sizeof(name), var%zu, i);
-		snprintf(value, sizeof(value), value%ld, lrand48());
+
+	offset = lrand48();
+	for (i = 0; i  numvars; i++) {
+		(void)snprintf(name, sizeof(name), var%zu,
+		(i * 7 + offset) % numvars);
+		(void)snprintf(value, sizeof(value), value%ld, lrand48());
 		ATF_CHECK(setenv(name, value, 1) != -1);
 		ATF_CHECK(setenv(name, foo, 0) != -1);
 		ATF_CHECK_STREQ(getenv(name), value);
 	}
 
-	for (i = 0; i  10240; i++) {
-		snprintf(name, sizeof(name), var%zu, i);
+	offset = lrand48();
+	for (i = 0; i  numvars; i++) {
+		(void)snprintf(name, sizeof(name), var%zu,
+		(i * 11 + offset) % numvars);
 		ATF_CHECK(unsetenv(name) != -1);
 		ATF_CHECK(getenv(name) == NULL);
+		ATF_CHECK(unsetenv(name) != -1);
 	}
 
 	ATF_CHECK_ERRNO(EINVAL, setenv(NULL, val, 1) == -1);
@@ -174,11 +181,7 @@
 {
 	ATF_CHECK(setenv(EVIL, very=bad, 1) != -1);
 	ATF_CHECK_STREQ(getenv(EVIL), very=bad);
-
-	atf_tc_expect_fail(getenv(3) doesn't check variable names properly);
 	ATF_CHECK(getenv(EVIL=very) == NULL);
-
-	atf_tc_expect_pass();
 	ATF_CHECK(unsetenv(EVIL) != -1);
 }
 



CVS commit: src/bin/sh

2010-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov 14 19:36:07 UTC 2010

Modified Files:
src/bin/sh: show.c

Log Message:
don't core-dump if we cannot open the trace file.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/bin/sh/show.c

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

Modified files:

Index: src/bin/sh/show.c
diff -u src/bin/sh/show.c:1.26 src/bin/sh/show.c:1.27
--- src/bin/sh/show.c:1.26	Fri Nov 14 05:46:13 2003
+++ src/bin/sh/show.c	Sun Nov 14 14:36:07 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: show.c,v 1.26 2003/11/14 10:46:13 dsl Exp $	*/
+/*	$NetBSD: show.c,v 1.27 2010/11/14 19:36:07 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)show.c	8.3 (Berkeley) 5/4/95;
 #else
-__RCSID($NetBSD: show.c,v 1.26 2003/11/14 10:46:13 dsl Exp $);
+__RCSID($NetBSD: show.c,v 1.27 2010/11/14 19:36:07 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -273,7 +273,7 @@
 void
 trputc(int c)
 {
-	if (debug != 1)
+	if (debug != 1 || !tracefile)
 		return;
 	putc(c, tracefile);
 }
@@ -285,7 +285,7 @@
 #ifdef DEBUG
 	va_list va;
 
-	if (debug != 1)
+	if (debug != 1 || !tracefile)
 		return;
 	va_start(va, fmt);
 	(void) vfprintf(tracefile, fmt, va);
@@ -297,7 +297,7 @@
 tracev(const char *fmt, va_list va)
 {
 #ifdef DEBUG
-	if (debug != 1)
+	if (debug != 1 || !tracefile)
 		return;
 	(void) vfprintf(tracefile, fmt, va);
 #endif
@@ -308,7 +308,7 @@
 void
 trputs(const char *s)
 {
-	if (debug != 1)
+	if (debug != 1 || !tracefile)
 		return;
 	fputs(s, tracefile);
 }
@@ -320,7 +320,7 @@
 	char *p;
 	char c;
 
-	if (debug != 1)
+	if (debug != 1 || !tracefile)
 		return;
 	putc('', tracefile);
 	for (p = s ; *p ; p++) {
@@ -359,7 +359,7 @@
 trargs(char **ap)
 {
 #ifdef DEBUG
-	if (debug != 1)
+	if (debug != 1 || !tracefile)
 		return;
 	while (*ap) {
 		trstring(*ap++);
@@ -405,6 +405,7 @@
 	if (tracefile) {
 		if (!freopen(s, a, tracefile)) {
 			fprintf(stderr, Can't re-open %s\n, s);
+			tracefile = NULL;
 			debug = 0;
 			return;
 		}



CVS commit: src/bin/sh

2010-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov 14 19:43:38 UTC 2010

Modified Files:
src/bin/sh: parser.c

Log Message:
- Fix a couple of bugs to make the following two echo statements print the
  same output as they should:

line='#define bindir /usr/bin /* comment */'
echo ${line%%/\**}
echo ${line%%/\**}

1. ISDBLQUOTE() was not working properly for non VSNORMAL expansions because
   varnest was incremented before the variable was completely parsed. Add
   an insub adjustment to keep track of that.
2. When we have a quoted backslash, we need to escape twice, because one
   level of escaping will be stripped later. (XXX: Do that when insub == 1
   only?)

- Make macros statements


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/bin/sh/parser.c

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

Modified files:

Index: src/bin/sh/parser.c
diff -u src/bin/sh/parser.c:1.74 src/bin/sh/parser.c:1.75
--- src/bin/sh/parser.c:1.74	Sat Jan 17 19:30:54 2009
+++ src/bin/sh/parser.c	Sun Nov 14 14:43:38 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: parser.c,v 1.74 2009/01/18 00:30:54 lukem Exp $	*/
+/*	$NetBSD: parser.c,v 1.75 2010/11/14 19:43:38 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)parser.c	8.7 (Berkeley) 5/16/95;
 #else
-__RCSID($NetBSD: parser.c,v 1.74 2009/01/18 00:30:54 lukem Exp $);
+__RCSID($NetBSD: parser.c,v 1.75 2010/11/14 19:43:38 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -896,20 +896,27 @@
  * This code assumes that an int is 32 bits. We don't use uint32_t,
  * because the rest of the code does not.
  */
-#define ISDBLQUOTE() ((varnest  32) ? (dblquote  (1  varnest)) : \
-(dblquotep[(varnest / 32) - 1]  (1  (varnest % 32
+#define VN (varnest - insub)
+#define ISDBLQUOTE() ((VN  32) ? (dblquote  (1  VN)) : \
+(dblquotep[(VN / 32) - 1]  (1  (VN % 32
 
 #define SETDBLQUOTE() \
-if (varnest  32) \
-	dblquote |= (1  varnest); \
-else \
-	dblquotep[(varnest / 32) - 1] |= (1  (varnest % 32))
+do { \
+	TRACE((setdblquote %d\n, varnest)); \
+	if (varnest  32) \
+		dblquote |= (1  varnest); \
+	else \
+		dblquotep[(varnest / 32) - 1] |= (1  (varnest % 32));\
+} while (/*CONSTCOND*/0)
 
 #define CLRDBLQUOTE() \
-if (varnest  32) \
-	dblquote = ~(1  varnest); \
-else \
-	dblquotep[(varnest / 32) - 1] = ~(1  (varnest % 32))
+do { \
+	TRACE((clrdblquote %d\n, varnest)); \
+	if (varnest  32) \
+		dblquote = ~(1  varnest); \
+	else \
+		dblquotep[(varnest / 32) - 1] = ~(1  (varnest % 32)); \
+} while (/*CONSTCOND*/0)
 
 STATIC int
 readtoken1(int firstc, char const *syn, char *eofmark, int striptabs)
@@ -928,6 +935,7 @@
 	volatile int arinest;	/* levels of arithmetic expansion */
 	volatile int parenlevel;	/* levels of parens in arithmetic */
 	volatile int oldstyle;
+	volatile int insub;
 	char const * volatile prevsyntax;	/* syntax before arithmetic */
 #ifdef __GNUC__
 	prevsyntax = NULL;	/* XXX gcc4 */
@@ -936,9 +944,9 @@
 	startlinno = plinno;
 	dblquote = 0;
 	varnest = 0;
-	if (syntax == DQSYNTAX) {
+	insub = 0;
+	if (syntax == DQSYNTAX)
 		SETDBLQUOTE();
-	}
 	quotef = 0;
 	bqlist = NULL;
 	arinest = 0;
@@ -994,10 +1002,14 @@
 	break;
 }
 quotef = 1;
+TRACE((varnest=%d doubleq=%d c=%c\n,
+varnest, ISDBLQUOTE(), c));
 if (ISDBLQUOTE()  c != '\\' 
 c != '`'  c != '$' 
-(c != '' || eofmark != NULL))
-	USTPUTC('\\', out);
+(c != '' || eofmark != NULL)) {
+	USTPUTC(CTLESC, out);
+	USTPUTC(CTLESC, out);
+}
 if (SQSYNTAX[c] == CCTL)
 	USTPUTC(CTLESC, out);
 else if (eofmark == NULL) {
@@ -1068,6 +1080,7 @@
 PARSESUB();		/* parse substitution */
 break;
 			case CENDVAR:	/* CLOSEBRACE */
+insub = 0;
 if (varnest  0  !ISDBLQUOTE()) {
 	varnest--;
 	USTPUTC(CTLENDVAR, out);
@@ -1340,7 +1353,9 @@
 			flags |= VSQUOTE;
 		*(stackblock() + typeloc) = subtype | flags;
 		if (subtype != VSNORMAL) {
+			TRACE((varnest=%d subtype=%d\n, varnest, subtype));
 			varnest++;
+			insub = 1;
 			if (varnest = maxnest) {
 dblquotep = ckrealloc(dblquotep, maxnest / 8);
 dblquotep[(maxnest / 32) - 1] = 0;



CVS commit: src/bin/sh

2010-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov 14 19:49:17 UTC 2010

Modified Files:
src/bin/sh: parser.c

Log Message:
revert previous. breaks other stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/bin/sh/parser.c

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

Modified files:

Index: src/bin/sh/parser.c
diff -u src/bin/sh/parser.c:1.75 src/bin/sh/parser.c:1.76
--- src/bin/sh/parser.c:1.75	Sun Nov 14 14:43:38 2010
+++ src/bin/sh/parser.c	Sun Nov 14 14:49:16 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: parser.c,v 1.75 2010/11/14 19:43:38 christos Exp $	*/
+/*	$NetBSD: parser.c,v 1.76 2010/11/14 19:49:16 christos Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)parser.c	8.7 (Berkeley) 5/16/95;
 #else
-__RCSID($NetBSD: parser.c,v 1.75 2010/11/14 19:43:38 christos Exp $);
+__RCSID($NetBSD: parser.c,v 1.76 2010/11/14 19:49:16 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -896,27 +896,20 @@
  * This code assumes that an int is 32 bits. We don't use uint32_t,
  * because the rest of the code does not.
  */
-#define VN (varnest - insub)
-#define ISDBLQUOTE() ((VN  32) ? (dblquote  (1  VN)) : \
-(dblquotep[(VN / 32) - 1]  (1  (VN % 32
+#define ISDBLQUOTE() ((varnest  32) ? (dblquote  (1  varnest)) : \
+(dblquotep[(varnest / 32) - 1]  (1  (varnest % 32
 
 #define SETDBLQUOTE() \
-do { \
-	TRACE((setdblquote %d\n, varnest)); \
-	if (varnest  32) \
-		dblquote |= (1  varnest); \
-	else \
-		dblquotep[(varnest / 32) - 1] |= (1  (varnest % 32));\
-} while (/*CONSTCOND*/0)
+if (varnest  32) \
+	dblquote |= (1  varnest); \
+else \
+	dblquotep[(varnest / 32) - 1] |= (1  (varnest % 32))
 
 #define CLRDBLQUOTE() \
-do { \
-	TRACE((clrdblquote %d\n, varnest)); \
-	if (varnest  32) \
-		dblquote = ~(1  varnest); \
-	else \
-		dblquotep[(varnest / 32) - 1] = ~(1  (varnest % 32)); \
-} while (/*CONSTCOND*/0)
+if (varnest  32) \
+	dblquote = ~(1  varnest); \
+else \
+	dblquotep[(varnest / 32) - 1] = ~(1  (varnest % 32))
 
 STATIC int
 readtoken1(int firstc, char const *syn, char *eofmark, int striptabs)
@@ -935,7 +928,6 @@
 	volatile int arinest;	/* levels of arithmetic expansion */
 	volatile int parenlevel;	/* levels of parens in arithmetic */
 	volatile int oldstyle;
-	volatile int insub;
 	char const * volatile prevsyntax;	/* syntax before arithmetic */
 #ifdef __GNUC__
 	prevsyntax = NULL;	/* XXX gcc4 */
@@ -944,9 +936,9 @@
 	startlinno = plinno;
 	dblquote = 0;
 	varnest = 0;
-	insub = 0;
-	if (syntax == DQSYNTAX)
+	if (syntax == DQSYNTAX) {
 		SETDBLQUOTE();
+	}
 	quotef = 0;
 	bqlist = NULL;
 	arinest = 0;
@@ -1002,14 +994,10 @@
 	break;
 }
 quotef = 1;
-TRACE((varnest=%d doubleq=%d c=%c\n,
-varnest, ISDBLQUOTE(), c));
 if (ISDBLQUOTE()  c != '\\' 
 c != '`'  c != '$' 
-(c != '' || eofmark != NULL)) {
-	USTPUTC(CTLESC, out);
-	USTPUTC(CTLESC, out);
-}
+(c != '' || eofmark != NULL))
+	USTPUTC('\\', out);
 if (SQSYNTAX[c] == CCTL)
 	USTPUTC(CTLESC, out);
 else if (eofmark == NULL) {
@@ -1080,7 +1068,6 @@
 PARSESUB();		/* parse substitution */
 break;
 			case CENDVAR:	/* CLOSEBRACE */
-insub = 0;
 if (varnest  0  !ISDBLQUOTE()) {
 	varnest--;
 	USTPUTC(CTLENDVAR, out);
@@ -1353,9 +1340,7 @@
 			flags |= VSQUOTE;
 		*(stackblock() + typeloc) = subtype | flags;
 		if (subtype != VSNORMAL) {
-			TRACE((varnest=%d subtype=%d\n, varnest, subtype));
 			varnest++;
-			insub = 1;
 			if (varnest = maxnest) {
 dblquotep = ckrealloc(dblquotep, maxnest / 8);
 dblquotep[(maxnest / 32) - 1] = 0;



CVS commit: src/lib/libc

2010-11-14 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sun Nov 14 22:04:37 UTC 2010

Modified Files:
src/lib/libc/include: env.h
src/lib/libc/stdlib: _env.c getenv.c

Log Message:
1.) Rename internal function __findvar() to __findenvvar().
2.) Add a wrapper function __findenv() which implements the previous
*internal* interface. It turns out that ld.elf_so(1) and pthread(3)
both use it.

Stripping e.g. LD_LIBRARY_PATH from the environment while running
setuid binaries works again now.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/include/env.h
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/stdlib/_env.c
cvs rdiff -u -r1.34 -r1.35 src/lib/libc/stdlib/getenv.c

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

Modified files:

Index: src/lib/libc/include/env.h
diff -u src/lib/libc/include/env.h:1.1 src/lib/libc/include/env.h:1.2
--- src/lib/libc/include/env.h:1.1	Sun Nov 14 18:11:42 2010
+++ src/lib/libc/include/env.h	Sun Nov 14 22:04:36 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: env.h,v 1.1 2010/11/14 18:11:42 tron Exp $	*/
+/*	$NetBSD: env.h,v 1.2 2010/11/14 22:04:36 tron Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 #include reentrant.h
 
 extern ssize_t __getenvslot(const char *name, size_t l_name, bool allocate);
-extern char *__findenv(const char *name, size_t l_name);
+extern char *__findenvvar(const char *name, size_t l_name);
 
 #ifdef _REENTRANT
 extern bool __readlockenv(void);

Index: src/lib/libc/stdlib/_env.c
diff -u src/lib/libc/stdlib/_env.c:1.1 src/lib/libc/stdlib/_env.c:1.2
--- src/lib/libc/stdlib/_env.c:1.1	Sun Nov 14 18:11:43 2010
+++ src/lib/libc/stdlib/_env.c	Sun Nov 14 22:04:36 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: _env.c,v 1.1 2010/11/14 18:11:43 tron Exp $ */
+/*	$NetBSD: _env.c,v 1.2 2010/11/14 22:04:36 tron Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -33,6 +33,7 @@
 
 #include assert.h
 #include errno.h
+#include limits.h
 #include stdlib.h
 #include stddef.h
 #include string.h
@@ -77,6 +78,12 @@
 static rwlock_t env_lock = RWLOCK_INITIALIZER;
 #endif
 
+/* Compatibility function. */
+char *__findenv(const char *name, int *offsetp);
+
+__warn_references(__findenv,
+warning: __findenv is an internal obsolete function.)
+
 /* Our initialization function. */
 void __libc_env_init(void);
 
@@ -268,7 +275,7 @@
 
 /* Find a string in the environment. */
 char *
-__findenv(const char *name, size_t l_name)
+__findenvvar(const char *name, size_t l_name)
 {
 	ssize_t offset;
 
@@ -276,6 +283,25 @@
 	return (offset != -1) ? environ[offset] + l_name + 1 : NULL;
 }
 
+/* Compatibility interface, do *not* call this function. */
+char *
+__findenv(const char *name, int *offsetp)
+{
+	size_t l_name;
+	ssize_t offset;
+
+	l_name = __envvarnamelen(name, false);
+	if (l_name == 0)
+		return NULL;
+
+	offset = __getenvslot(name, l_name, false);
+	if (offset  0 || offset  INT_MAX)
+		return NULL;
+
+	*offsetp = (int)offset;
+	return environ[offset] + l_name + 1;
+}
+
 #ifdef _REENTRANT
 
 /* Lock the environment for read. */

Index: src/lib/libc/stdlib/getenv.c
diff -u src/lib/libc/stdlib/getenv.c:1.34 src/lib/libc/stdlib/getenv.c:1.35
--- src/lib/libc/stdlib/getenv.c:1.34	Sun Nov 14 20:37:02 2010
+++ src/lib/libc/stdlib/getenv.c	Sun Nov 14 22:04:36 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: getenv.c,v 1.34 2010/11/14 20:37:02 tron Exp $	*/
+/*	$NetBSD: getenv.c,v 1.35 2010/11/14 22:04:36 tron Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)getenv.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: getenv.c,v 1.34 2010/11/14 20:37:02 tron Exp $);
+__RCSID($NetBSD: getenv.c,v 1.35 2010/11/14 22:04:36 tron Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -71,7 +71,7 @@
 
 	result = NULL;
 	if (__readlockenv()) {
-		result = __findenv(name, l_name);
+		result = __findenvvar(name, l_name);
 		(void)__unlockenv();
 	}
 	
@@ -96,7 +96,7 @@
 	if (__readlockenv()) {
 		const char *value;
 
-		value = __findenv(name, l_name);
+		value = __findenvvar(name, l_name);
 		if (value != NULL) {
 			if (strlcpy(buf, value, len)  len) {
 rv = 0;



CVS commit: src/libexec/ld.elf_so

2010-11-14 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sun Nov 14 22:09:16 UTC 2010

Modified Files:
src/libexec/ld.elf_so: xenv.c

Log Message:
Don't use internal libc function __findenv().


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/libexec/ld.elf_so/xenv.c

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

Modified files:

Index: src/libexec/ld.elf_so/xenv.c
diff -u src/libexec/ld.elf_so/xenv.c:1.1 src/libexec/ld.elf_so/xenv.c:1.2
--- src/libexec/ld.elf_so/xenv.c:1.1	Fri Oct 29 15:08:17 2010
+++ src/libexec/ld.elf_so/xenv.c	Sun Nov 14 22:09:16 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: xenv.c,v 1.1 2010/10/29 15:08:17 christos Exp $	*/
+/*	$NetBSD: xenv.c,v 1.2 2010/11/14 22:09:16 tron Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = from: @(#)setenv.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: xenv.c,v 1.1 2010/10/29 15:08:17 christos Exp $);
+__RCSID($NetBSD: xenv.c,v 1.2 2010/11/14 22:09:16 tron Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -42,9 +42,10 @@
 #include string.h
 #include rtldenv.h
 
-extern char * __findenv(const char *, int *);
 extern char **environ;
 
+#include unistd.h
+
 /*
  * xunsetenv(name) --
  *	Delete environmental variable name.
@@ -52,19 +53,29 @@
 int
 xunsetenv(const char *name)
 {
-	int offset;
+	size_t l_name, r_offset, w_offset;
+
+	if (name == NULL) {
+		errno = EINVAL;
+		return -1;
+	}
 
-	if (name == NULL || *name == '\0' || strchr(name, '=') != NULL) {
+	l_name = strcspn(name, =);
+	if (l_name == 0 || name[l_name] == '=') {
 		errno = EINVAL;
 		return -1;
 	}
 
-	while (__findenv(name, offset) != NULL) {
-		while (environ[offset] != NULL) {
-			environ[offset] = environ[offset + 1];
-			offset++;
+	for (r_offset = 0, w_offset = 0; environ[r_offset] != NULL;
+	r_offset++) {
+		if (strncmp(name, environ[r_offset], l_name) != 0 ||
+		environ[r_offset][l_name] != '=') {
+			environ[w_offset++] = environ[r_offset];
 		}
 	}
 
+	while (w_offset  r_offset)
+		environ[w_offset++] = NULL;
+
 	return 0;
 }



CVS commit: src/lib/libpthread

2010-11-14 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sun Nov 14 22:25:24 UTC 2010

Modified Files:
src/lib/libpthread: pthread.c

Log Message:
Don't use internal libc function __findenv().


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/lib/libpthread/pthread.c

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

Modified files:

Index: src/lib/libpthread/pthread.c
diff -u src/lib/libpthread/pthread.c:1.116 src/lib/libpthread/pthread.c:1.117
--- src/lib/libpthread/pthread.c:1.116	Thu Jul  8 15:13:35 2010
+++ src/lib/libpthread/pthread.c	Sun Nov 14 22:25:23 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread.c,v 1.116 2010/07/08 15:13:35 rmind Exp $	*/
+/*	$NetBSD: pthread.c,v 1.117 2010/11/14 22:25:23 tron Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: pthread.c,v 1.116 2010/07/08 15:13:35 rmind Exp $);
+__RCSID($NetBSD: pthread.c,v 1.117 2010/11/14 22:25:23 tron Exp $);
 
 #define	__EXPOSE_STACK	1
 
@@ -1287,10 +1287,18 @@
 char *
 pthread__getenv(const char *name)
 {
-	extern char *__findenv(const char *, int *);
-	int off;
+	extern char **environ;
+	size_t l_name, offset;
 
-	return __findenv(name, off);
+	l_name = strlen(name);
+	for (offset = 0; environ[offset] != NULL; offset++) {
+		if (strncmp(name, environ[offset], l_name) == 0 
+		environ[offset][l_name] == '=') {
+			return environ[offset] + l_name + 1;
+		}
+	}
+
+	return NULL;
 }
 
 pthread_mutex_t *



CVS commit: src/sys/dev

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 05:52:41 UTC 2010

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

Log Message:
curlwp needs sys/lwp.h.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/firmload.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/firmload.c
diff -u src/sys/dev/firmload.c:1.13 src/sys/dev/firmload.c:1.14
--- src/sys/dev/firmload.c:1.13	Thu Oct 21 01:02:34 2010
+++ src/sys/dev/firmload.c	Mon Nov 15 05:52:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: firmload.c,v 1.13 2010/10/21 01:02:34 jmcneill Exp $	*/
+/*	$NetBSD: firmload.c,v 1.14 2010/11/15 05:52:41 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: firmload.c,v 1.13 2010/10/21 01:02:34 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: firmload.c,v 1.14 2010/11/15 05:52:41 uebayasi Exp $);
 
 /*
  * The firmload API provides an interface for device drivers to access
@@ -46,6 +46,7 @@
 #include sys/sysctl.h
 #include sys/vnode.h
 #include sys/kauth.h
+#include sys/lwp.h
 
 #include dev/firmload.h
 



CVS commit: src/sys/dev/dm

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 05:53:29 UTC 2010

Modified Files:
src/sys/dev/dm: dm_target_linear.c

Log Message:
curlwp needs sys/lwp.h.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/dm/dm_target_linear.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/dm/dm_target_linear.c
diff -u src/sys/dev/dm/dm_target_linear.c:1.10 src/sys/dev/dm/dm_target_linear.c:1.11
--- src/sys/dev/dm/dm_target_linear.c:1.10	Tue May 18 15:10:41 2010
+++ src/sys/dev/dm/dm_target_linear.c	Mon Nov 15 05:53:29 2010
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target_linear.c,v 1.10 2010/05/18 15:10:41 haad Exp $  */
+/*$NetBSD: dm_target_linear.c,v 1.11 2010/11/15 05:53:29 uebayasi Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -40,6 +40,7 @@
 #include sys/buf.h
 #include sys/kmem.h
 #include sys/vnode.h
+#include sys/lwp.h
 
 #include machine/int_fmtio.h
 



CVS commit: src/sys/dev/dm

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 05:54:38 UTC 2010

Modified Files:
src/sys/dev/dm: dm_target_stripe.c

Log Message:
curlwp needs sys/lwp.h.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/dm/dm_target_stripe.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/dm/dm_target_stripe.c
diff -u src/sys/dev/dm/dm_target_stripe.c:1.11 src/sys/dev/dm/dm_target_stripe.c:1.12
--- src/sys/dev/dm/dm_target_stripe.c:1.11	Sat Oct 23 21:18:54 2010
+++ src/sys/dev/dm/dm_target_stripe.c	Mon Nov 15 05:54:38 2010
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target_stripe.c,v 1.11 2010/10/23 21:18:54 haad Exp $*/
+/*$NetBSD: dm_target_stripe.c,v 1.12 2010/11/15 05:54:38 uebayasi Exp $*/
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -38,6 +38,7 @@
 #include sys/buf.h
 #include sys/kmem.h
 #include sys/vnode.h
+#include sys/lwp.h
 
 #include dm.h
 



CVS commit: src/sys/dev/ic

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 05:56:31 UTC 2010

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

Log Message:
Socket ioctl definitions need sys/sockio.h.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/dev/ic/rtw.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/rtw.c
diff -u src/sys/dev/ic/rtw.c:1.117 src/sys/dev/ic/rtw.c:1.118
--- src/sys/dev/ic/rtw.c:1.117	Sat Nov 13 13:52:02 2010
+++ src/sys/dev/ic/rtw.c	Mon Nov 15 05:56:29 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: rtw.c,v 1.117 2010/11/13 13:52:02 uebayasi Exp $ */
+/* $NetBSD: rtw.c,v 1.118 2010/11/15 05:56:29 uebayasi Exp $ */
 /*-
  * Copyright (c) 2004, 2005, 2006, 2007 David Young.  All rights
  * reserved.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rtw.c,v 1.117 2010/11/13 13:52:02 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: rtw.c,v 1.118 2010/11/15 05:56:29 uebayasi Exp $);
 
 
 #include sys/param.h
@@ -45,6 +45,7 @@
 #include sys/time.h
 #include sys/types.h
 #include sys/device.h
+#include sys/sockio.h
 
 #include machine/endian.h
 #include sys/bus.h



CVS commit: src/sys/dev/pci

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 05:57:25 UTC 2010

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

Log Message:
tsleep needs sys/proc.h.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/dev/pci/if_iwi.c

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

Modified files:

Index: src/sys/dev/pci/if_iwi.c
diff -u src/sys/dev/pci/if_iwi.c:1.84 src/sys/dev/pci/if_iwi.c:1.85
--- src/sys/dev/pci/if_iwi.c:1.84	Mon Apr  5 07:20:25 2010
+++ src/sys/dev/pci/if_iwi.c	Mon Nov 15 05:57:24 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_iwi.c,v 1.84 2010/04/05 07:20:25 joerg Exp $  */
+/*	$NetBSD: if_iwi.c,v 1.85 2010/11/15 05:57:24 uebayasi Exp $  */
 
 /*-
  * Copyright (c) 2004, 2005
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_iwi.c,v 1.84 2010/04/05 07:20:25 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_iwi.c,v 1.85 2010/11/15 05:57:24 uebayasi Exp $);
 
 /*-
  * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
@@ -46,6 +46,7 @@
 #include sys/malloc.h
 #include sys/conf.h
 #include sys/kauth.h
+#include sys/proc.h
 
 #include sys/bus.h
 #include machine/endian.h



CVS commit: src/sys/dev/pci

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 05:57:39 UTC 2010

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

Log Message:
tsleep needs sys/proc.h.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/if_wpi.c

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

Modified files:

Index: src/sys/dev/pci/if_wpi.c
diff -u src/sys/dev/pci/if_wpi.c:1.47 src/sys/dev/pci/if_wpi.c:1.48
--- src/sys/dev/pci/if_wpi.c:1.47	Mon Apr  5 07:20:28 2010
+++ src/sys/dev/pci/if_wpi.c	Mon Nov 15 05:57:39 2010
@@ -1,4 +1,4 @@
-/*  $NetBSD: if_wpi.c,v 1.47 2010/04/05 07:20:28 joerg Exp $*/
+/*  $NetBSD: if_wpi.c,v 1.48 2010/11/15 05:57:39 uebayasi Exp $*/
 
 /*-
  * Copyright (c) 2006, 2007
@@ -18,7 +18,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wpi.c,v 1.47 2010/04/05 07:20:28 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wpi.c,v 1.48 2010/11/15 05:57:39 uebayasi Exp $);
 
 /*
  * Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters.
@@ -38,6 +38,7 @@
 #include sys/conf.h
 #include sys/kauth.h
 #include sys/callout.h
+#include sys/proc.h
 
 #include sys/bus.h
 #include machine/endian.h



CVS commit: src/sys/dev/pckbport

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 05:58:18 UTC 2010

Modified Files:
src/sys/dev/pckbport: synaptics.c

Log Message:
wakeup needs sys/proc.h.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pckbport/synaptics.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/pckbport/synaptics.c
diff -u src/sys/dev/pckbport/synaptics.c:1.24 src/sys/dev/pckbport/synaptics.c:1.25
--- src/sys/dev/pckbport/synaptics.c:1.24	Sun Mar 21 20:04:43 2010
+++ src/sys/dev/pckbport/synaptics.c	Mon Nov 15 05:58:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: synaptics.c,v 1.24 2010/03/21 20:04:43 plunky Exp $	*/
+/*	$NetBSD: synaptics.c,v 1.25 2010/11/15 05:58:18 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 2005, Steve C. Woodford
@@ -48,7 +48,7 @@
 #include opt_pms.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: synaptics.c,v 1.24 2010/03/21 20:04:43 plunky Exp $);
+__KERNEL_RCSID(0, $NetBSD: synaptics.c,v 1.25 2010/11/15 05:58:18 uebayasi Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -56,6 +56,7 @@
 #include sys/ioctl.h
 #include sys/sysctl.h
 #include sys/kernel.h
+#include sys/proc.h
 
 #include sys/bus.h
 



CVS commit: src/sys/dev/sbus

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 05:59:57 UTC 2010

Modified Files:
src/sys/dev/sbus: agten.c

Log Message:
This doesn't use uvm(9) API.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/sbus/agten.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/sbus/agten.c
diff -u src/sys/dev/sbus/agten.c:1.26 src/sys/dev/sbus/agten.c:1.27
--- src/sys/dev/sbus/agten.c:1.26	Sun Nov 14 03:49:53 2010
+++ src/sys/dev/sbus/agten.c	Mon Nov 15 05:59:57 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: agten.c,v 1.26 2010/11/14 03:49:53 uebayasi Exp $ */
+/*	$NetBSD: agten.c,v 1.27 2010/11/15 05:59:57 uebayasi Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: agten.c,v 1.26 2010/11/14 03:49:53 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: agten.c,v 1.27 2010/11/15 05:59:57 uebayasi Exp $);
 
 /*
  * a driver for the Fujitsu AG-10e SBus framebuffer
@@ -52,8 +52,6 @@
 #include sys/systm.h
 #include sys/conf.h
 
-#include uvm/uvm_extern.h
-
 #include dev/sun/fbio.h
 #include dev/sun/fbvar.h
 #include dev/sun/btreg.h



CVS commit: src/sys/dev/usb

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:01:07 UTC 2010

Modified Files:
src/sys/dev/usb: ucycom.c

Log Message:
Dereferencing struct lwp * needs sys/lwp.h.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/usb/ucycom.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/usb/ucycom.c
diff -u src/sys/dev/usb/ucycom.c:1.31 src/sys/dev/usb/ucycom.c:1.32
--- src/sys/dev/usb/ucycom.c:1.31	Wed Nov  3 22:34:23 2010
+++ src/sys/dev/usb/ucycom.c	Mon Nov 15 06:01:07 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ucycom.c,v 1.31 2010/11/03 22:34:23 dyoung Exp $	*/
+/*	$NetBSD: ucycom.c,v 1.32 2010/11/15 06:01:07 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ucycom.c,v 1.31 2010/11/03 22:34:23 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: ucycom.c,v 1.32 2010/11/15 06:01:07 uebayasi Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -51,6 +51,7 @@
 #include sys/file.h
 #include sys/vnode.h
 #include sys/kauth.h
+#include sys/lwp.h
 
 #include dev/usb/usb.h
 #include dev/usb/usbhid.h



CVS commit: src/sys/dev/usb

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:01:30 UTC 2010

Modified Files:
src/sys/dev/usb: uhso.c

Log Message:
Dereferencing struct lwp * needs sys/lwp.h.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/usb/uhso.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/usb/uhso.c
diff -u src/sys/dev/usb/uhso.c:1.2 src/sys/dev/usb/uhso.c:1.3
--- src/sys/dev/usb/uhso.c:1.2	Mon Apr  5 07:21:49 2010
+++ src/sys/dev/usb/uhso.c	Mon Nov 15 06:01:29 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhso.c,v 1.2 2010/04/05 07:21:49 joerg Exp $	*/
+/*	$NetBSD: uhso.c,v 1.3 2010/11/15 06:01:29 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 2009 Iain Hibbert
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uhso.c,v 1.2 2010/04/05 07:21:49 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: uhso.c,v 1.3 2010/11/15 06:01:29 uebayasi Exp $);
 
 #include opt_inet.h
 
@@ -55,6 +55,7 @@
 #include sys/systm.h
 #include sys/tty.h
 #include sys/vnode.h
+#include sys/lwp.h
 
 #include net/bpf.h
 #include net/if.h



CVS commit: src/sys/arch/acorn26/acorn26

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:05:27 UTC 2010

Modified Files:
src/sys/arch/acorn26/acorn26: except.c

Log Message:
Dereferencing struct proc * and struct lwp *, include them


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/acorn26/acorn26/except.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/acorn26/acorn26/except.c
diff -u src/sys/arch/acorn26/acorn26/except.c:1.25 src/sys/arch/acorn26/acorn26/except.c:1.26
--- src/sys/arch/acorn26/acorn26/except.c:1.25	Wed Jul  7 01:17:26 2010
+++ src/sys/arch/acorn26/acorn26/except.c	Mon Nov 15 06:05:27 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: except.c,v 1.25 2010/07/07 01:17:26 chs Exp $ */
+/* $NetBSD: except.c,v 1.26 2010/11/15 06:05:27 uebayasi Exp $ */
 /*-
  * Copyright (c) 1998, 1999, 2000 Ben Harris
  * All rights reserved.
@@ -31,7 +31,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: except.c,v 1.25 2010/07/07 01:17:26 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: except.c,v 1.26 2010/11/15 06:05:27 uebayasi Exp $);
 
 #include opt_ddb.h
 
@@ -41,6 +41,8 @@
 #include sys/syslog.h
 #include sys/systm.h
 #include sys/cpu.h
+#include sys/lwp.h
+#include sys/proc.h
 
 #include uvm/uvm_extern.h
 



CVS commit: src/sys/arch/acorn26/acorn26

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:06:51 UTC 2010

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

Log Message:
struct proc * and struct lwp * derefs.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/acorn26/acorn26/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/acorn26/acorn26/pmap.c
diff -u src/sys/arch/acorn26/acorn26/pmap.c:1.32 src/sys/arch/acorn26/acorn26/pmap.c:1.33
--- src/sys/arch/acorn26/acorn26/pmap.c:1.32	Fri Nov 12 12:48:49 2010
+++ src/sys/arch/acorn26/acorn26/pmap.c	Mon Nov 15 06:06:51 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.32 2010/11/12 12:48:49 uebayasi Exp $ */
+/* $NetBSD: pmap.c,v 1.33 2010/11/15 06:06:51 uebayasi Exp $ */
 /*-
  * Copyright (c) 1997, 1998, 2000 Ben Harris
  * All rights reserved.
@@ -102,12 +102,14 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.32 2010/11/12 12:48:49 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.33 2010/11/15 06:06:51 uebayasi Exp $);
 
 #include sys/kernel.h /* for cold */
 #include sys/malloc.h
 #include sys/pool.h
 #include sys/systm.h
+#include sys/lwp.h
+#include sys/proc.h
 
 #include uvm/uvm.h
 #include uvm/uvm_stat.h



CVS commit: src/sys/arch/acorn26/acorn26

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:07:41 UTC 2010

Modified Files:
src/sys/arch/acorn26/acorn26: start.c

Log Message:
lwp0 needs sys/lwp.h.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/acorn26/acorn26/start.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/acorn26/acorn26/start.c
diff -u src/sys/arch/acorn26/acorn26/start.c:1.17 src/sys/arch/acorn26/acorn26/start.c:1.18
--- src/sys/arch/acorn26/acorn26/start.c:1.17	Fri Nov 27 03:23:03 2009
+++ src/sys/arch/acorn26/acorn26/start.c	Mon Nov 15 06:07:41 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: start.c,v 1.17 2009/11/27 03:23:03 rmind Exp $ */
+/* $NetBSD: start.c,v 1.18 2010/11/15 06:07:41 uebayasi Exp $ */
 /*-
  * Copyright (c) 1998, 2000 Ben Harris
  * All rights reserved.
@@ -31,13 +31,14 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: start.c,v 1.17 2009/11/27 03:23:03 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: start.c,v 1.18 2010/11/15 06:07:41 uebayasi Exp $);
 
 #include opt_modular.h
 
 #include sys/msgbuf.h
 #include sys/syslog.h
 #include sys/systm.h
+#include sys/lwp.h
 
 #include dev/i2c/i2cvar.h
 #include acorn26/ioc/iociicvar.h



CVS commit: src/sys/arch/algor/algor

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:08:32 UTC 2010

Modified Files:
src/sys/arch/algor/algor: machdep.c

Log Message:
curlwp needs sys/lwp.h.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/algor/algor/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/algor/algor/machdep.c
diff -u src/sys/arch/algor/algor/machdep.c:1.45 src/sys/arch/algor/algor/machdep.c:1.46
--- src/sys/arch/algor/algor/machdep.c:1.45	Mon Feb  8 19:02:25 2010
+++ src/sys/arch/algor/algor/machdep.c	Mon Nov 15 06:08:32 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.45 2010/02/08 19:02:25 joerg Exp $	*/
+/*	$NetBSD: machdep.c,v 1.46 2010/11/15 06:08:32 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -106,7 +106,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.45 2010/02/08 19:02:25 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.46 2010/11/15 06:08:32 uebayasi Exp $);
 
 #include opt_algor_p4032.h
 #include opt_algor_p5064.h 
@@ -129,6 +129,7 @@
 #include sys/termios.h
 #include sys/ksyms.h
 #include sys/device.h
+#include sys/lwp.h
 
 #include net/if.h
 #include net/if_ether.h



CVS commit: src/sys/arch/amd64/amd64

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:12:28 UTC 2010

Modified Files:
src/sys/arch/amd64/amd64: machdep.c

Log Message:
struct lwp * and struct proc * derefs.


To generate a diff of this commit:
cvs rdiff -u -r1.156 -r1.157 src/sys/arch/amd64/amd64/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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.156 src/sys/arch/amd64/amd64/machdep.c:1.157
--- src/sys/arch/amd64/amd64/machdep.c:1.156	Fri Nov 12 13:18:56 2010
+++ src/sys/arch/amd64/amd64/machdep.c	Mon Nov 15 06:12:28 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.156 2010/11/12 13:18:56 uebayasi Exp $	*/
+/*	$NetBSD: machdep.c,v 1.157 2010/11/15 06:12:28 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
@@ -107,7 +107,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.156 2010/11/12 13:18:56 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.157 2010/11/15 06:12:28 uebayasi Exp $);
 
 /* #define XENDEBUG_LOW  */
 
@@ -148,6 +148,8 @@
 #include sys/syscallargs.h
 #include sys/ksyms.h
 #include sys/device.h
+#include sys/lwp.h
+#include sys/proc.h
 
 #ifdef KGDB
 #include sys/kgdb.h



CVS commit: src/sys/arch/arc/jazz

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:13:16 UTC 2010

Modified Files:
src/sys/arch/arc/jazz: bus_dma_jazz.c

Log Message:
struct proc * deref.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arc/jazz/bus_dma_jazz.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/arc/jazz/bus_dma_jazz.c
diff -u src/sys/arch/arc/jazz/bus_dma_jazz.c:1.15 src/sys/arch/arc/jazz/bus_dma_jazz.c:1.16
--- src/sys/arch/arc/jazz/bus_dma_jazz.c:1.15	Wed May 14 13:29:27 2008
+++ src/sys/arch/arc/jazz/bus_dma_jazz.c	Mon Nov 15 06:13:16 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_dma_jazz.c,v 1.15 2008/05/14 13:29:27 tsutsui Exp $	*/
+/*	$NetBSD: bus_dma_jazz.c,v 1.16 2010/11/15 06:13:16 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 2003 Izumi Tsutsui.  All rights reserved.
@@ -51,12 +51,13 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_dma_jazz.c,v 1.15 2008/05/14 13:29:27 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_dma_jazz.c,v 1.16 2010/11/15 06:13:16 uebayasi Exp $);
 
 #include sys/param.h
 #include sys/systm.h
 #include sys/mbuf.h
 #include sys/device.h
+#include sys/proc.h
 
 #include uvm/uvm_extern.h
 



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

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:14:02 UTC 2010

Modified Files:
src/sys/arch/arm/ixp12x0: ixp12x0_com.c

Log Message:
struct lwp * deref (for kauth).


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/arm/ixp12x0/ixp12x0_com.c

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

Modified files:

Index: src/sys/arch/arm/ixp12x0/ixp12x0_com.c
diff -u src/sys/arch/arm/ixp12x0/ixp12x0_com.c:1.36 src/sys/arch/arm/ixp12x0/ixp12x0_com.c:1.37
--- src/sys/arch/arm/ixp12x0/ixp12x0_com.c:1.36	Sat Mar 14 15:36:02 2009
+++ src/sys/arch/arm/ixp12x0/ixp12x0_com.c	Mon Nov 15 06:14:02 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ixp12x0_com.c,v 1.36 2009/03/14 15:36:02 dsl Exp $ */
+/*	$NetBSD: ixp12x0_com.c,v 1.37 2010/11/15 06:14:02 uebayasi Exp $ */
 /*
  * Copyright (c) 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ixp12x0_com.c,v 1.36 2009/03/14 15:36:02 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: ixp12x0_com.c,v 1.37 2010/11/15 06:14:02 uebayasi Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -88,6 +88,7 @@
 #include sys/uio.h
 #include sys/vnode.h
 #include sys/kauth.h
+#include sys/lwp.h
 
 #include machine/intr.h
 #include machine/bus.h



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

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:23:05 UTC 2010

Modified Files:
src/sys/arch/ews4800mips/ews4800mips: tr2.c tr2a.c

Log Message:
struct cpu_info * deref needs sys/cpu.h.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ews4800mips/ews4800mips/tr2.c \
src/sys/arch/ews4800mips/ews4800mips/tr2a.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/ews4800mips/ews4800mips/tr2.c
diff -u src/sys/arch/ews4800mips/ews4800mips/tr2.c:1.3 src/sys/arch/ews4800mips/ews4800mips/tr2.c:1.4
--- src/sys/arch/ews4800mips/ews4800mips/tr2.c:1.3	Mon Apr 28 20:23:18 2008
+++ src/sys/arch/ews4800mips/ews4800mips/tr2.c	Mon Nov 15 06:23:05 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: tr2.c,v 1.3 2008/04/28 20:23:18 martin Exp $	*/
+/*	$NetBSD: tr2.c,v 1.4 2010/11/15 06:23:05 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tr2.c,v 1.3 2008/04/28 20:23:18 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: tr2.c,v 1.4 2010/11/15 06:23:05 uebayasi Exp $);
 
 #include fb_sbdio.h
 #include kbms_sbdio.h
@@ -41,6 +41,7 @@
 #include sys/systm.h
 #include sys/conf.h
 #include sys/device.h
+#include sys/cpu.h
 
 #include uvm/uvm_extern.h
 
Index: src/sys/arch/ews4800mips/ews4800mips/tr2a.c
diff -u src/sys/arch/ews4800mips/ews4800mips/tr2a.c:1.3 src/sys/arch/ews4800mips/ews4800mips/tr2a.c:1.4
--- src/sys/arch/ews4800mips/ews4800mips/tr2a.c:1.3	Mon Apr 28 20:23:18 2008
+++ src/sys/arch/ews4800mips/ews4800mips/tr2a.c	Mon Nov 15 06:23:05 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: tr2a.c,v 1.3 2008/04/28 20:23:18 martin Exp $	*/
+/*	$NetBSD: tr2a.c,v 1.4 2010/11/15 06:23:05 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tr2a.c,v 1.3 2008/04/28 20:23:18 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: tr2a.c,v 1.4 2010/11/15 06:23:05 uebayasi Exp $);
 
 #include fb_sbdio.h
 #include kbms_sbdio.h
@@ -41,6 +41,7 @@
 #include sys/systm.h
 #include sys/conf.h
 #include sys/device.h
+#include sys/cpu.h
 
 #include uvm/uvm_extern.h
 



CVS commit: src/sys/arch/hp700/hp700

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:24:54 UTC 2010

Modified Files:
src/sys/arch/hp700/hp700: mainbus.c

Log Message:
struct proc * deref needs sys/proc.h.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/hp700/hp700/mainbus.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/hp700/hp700/mainbus.c
diff -u src/sys/arch/hp700/hp700/mainbus.c:1.72 src/sys/arch/hp700/hp700/mainbus.c:1.73
--- src/sys/arch/hp700/hp700/mainbus.c:1.72	Fri Nov 12 06:54:56 2010
+++ src/sys/arch/hp700/hp700/mainbus.c	Mon Nov 15 06:24:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.72 2010/11/12 06:54:56 skrll Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.73 2010/11/15 06:24:53 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.72 2010/11/12 06:54:56 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: mainbus.c,v 1.73 2010/11/15 06:24:53 uebayasi Exp $);
 
 #include locators.h
 #include power.h
@@ -70,6 +70,7 @@
 #include sys/reboot.h
 #include sys/extent.h
 #include sys/mbuf.h
+#include sys/proc.h
 
 #include uvm/uvm_page.h
 #include uvm/uvm.h



CVS commit: src/sys/arch/hpcmips/hpcmips

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:25:43 UTC 2010

Modified Files:
src/sys/arch/hpcmips/hpcmips: machdep.c

Log Message:
curlwp needs sys/lwp.h.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/arch/hpcmips/hpcmips/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/hpcmips/hpcmips/machdep.c
diff -u src/sys/arch/hpcmips/hpcmips/machdep.c:1.111 src/sys/arch/hpcmips/hpcmips/machdep.c:1.112
--- src/sys/arch/hpcmips/hpcmips/machdep.c:1.111	Tue Mar  2 21:17:31 2010
+++ src/sys/arch/hpcmips/hpcmips/machdep.c	Mon Nov 15 06:25:42 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.111 2010/03/02 21:17:31 pooka Exp $	*/
+/*	$NetBSD: machdep.c,v 1.112 2010/11/15 06:25:42 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 1999 Shin Takemura, All rights reserved.
@@ -108,7 +108,7 @@
  */
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.111 2010/03/02 21:17:31 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.112 2010/11/15 06:25:42 uebayasi Exp $);
 
 #include opt_vr41xx.h
 #include opt_tx39xx.h
@@ -135,6 +135,7 @@
 #include sys/boot_flag.h
 #include sys/ksyms.h
 #include sys/device.h
+#include sys/lwp.h
 
 #include uvm/uvm_extern.h
 



CVS commit: src/sys/arch/hpcmips/tx

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:26:58 UTC 2010

Modified Files:
src/sys/arch/hpcmips/tx: tx39icu.c

Log Message:
struct cpu_info * deref needs sys/cpu.h.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/hpcmips/tx/tx39icu.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/hpcmips/tx/tx39icu.c
diff -u src/sys/arch/hpcmips/tx/tx39icu.c:1.25 src/sys/arch/hpcmips/tx/tx39icu.c:1.26
--- src/sys/arch/hpcmips/tx/tx39icu.c:1.25	Mon Apr 28 20:23:21 2008
+++ src/sys/arch/hpcmips/tx/tx39icu.c	Mon Nov 15 06:26:58 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: tx39icu.c,v 1.25 2008/04/28 20:23:21 martin Exp $ */
+/*	$NetBSD: tx39icu.c,v 1.26 2010/11/15 06:26:58 uebayasi Exp $ */
 
 /*-
  * Copyright (c) 1999-2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tx39icu.c,v 1.25 2008/04/28 20:23:21 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: tx39icu.c,v 1.26 2010/11/15 06:26:58 uebayasi Exp $);
 
 #include opt_vr41xx.h
 #include opt_tx39xx.h
@@ -44,6 +44,7 @@
 #include sys/device.h
 #include sys/malloc.h
 #include sys/queue.h
+#include sys/cpu.h
 
 #include uvm/uvm_extern.h
 



CVS commit: src/sys/arch/hpcmips/vr

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:27:41 UTC 2010

Modified Files:
src/sys/arch/hpcmips/vr: vr.c

Log Message:
struct cpu_info * deref needs sys/cpu.h.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/hpcmips/vr/vr.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/hpcmips/vr/vr.c
diff -u src/sys/arch/hpcmips/vr/vr.c:1.56 src/sys/arch/hpcmips/vr/vr.c:1.57
--- src/sys/arch/hpcmips/vr/vr.c:1.56	Sat Apr 10 22:53:59 2010
+++ src/sys/arch/hpcmips/vr/vr.c	Mon Nov 15 06:27:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vr.c,v 1.56 2010/04/10 22:53:59 jun Exp $	*/
+/*	$NetBSD: vr.c,v 1.57 2010/11/15 06:27:41 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 1999-2002
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vr.c,v 1.56 2010/04/10 22:53:59 jun Exp $);
+__KERNEL_RCSID(0, $NetBSD: vr.c,v 1.57 2010/11/15 06:27:41 uebayasi Exp $);
 
 #include opt_vr41xx.h
 #include opt_tx39xx.h
@@ -46,6 +46,7 @@
 #include sys/reboot.h
 #include sys/device.h
 #include sys/bus.h
+#include sys/cpu.h
 
 #include uvm/uvm_extern.h
 



CVS commit: src/sys/arch/hpcsh/hpcsh

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:30:04 UTC 2010

Modified Files:
src/sys/arch/hpcsh/hpcsh: machdep.c

Log Message:
sys/lwp.h for lwp0, sh3/proc.h for sh_proc0_init.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/hpcsh/hpcsh/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/hpcsh/hpcsh/machdep.c
diff -u src/sys/arch/hpcsh/hpcsh/machdep.c:1.73 src/sys/arch/hpcsh/hpcsh/machdep.c:1.74
--- src/sys/arch/hpcsh/hpcsh/machdep.c:1.73	Mon May  3 12:16:04 2010
+++ src/sys/arch/hpcsh/hpcsh/machdep.c	Mon Nov 15 06:30:04 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.73 2010/05/03 12:16:04 tsutsui Exp $	*/
+/*	$NetBSD: machdep.c,v 1.74 2010/11/15 06:30:04 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002, 2004 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.73 2010/05/03 12:16:04 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.74 2010/11/15 06:30:04 uebayasi Exp $);
 
 #include opt_md.h
 #include opt_ddb.h
@@ -44,6 +44,7 @@
 #include sys/systm.h
 #include sys/kernel.h
 #include sys/device.h
+#include sys/lwp.h
 
 #include sys/reboot.h
 #include sys/mount.h
@@ -62,6 +63,7 @@
 #include sh3/cache.h
 #include sh3/clock.h
 #include sh3/intcreg.h
+#include sh3/proc.h
 
 #ifdef KGDB
 #include sys/kgdb.h



CVS commit: src/distrib/notes/common

2010-11-14 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sun Nov 14 11:19:50 UTC 2010

Modified Files:
src/distrib/notes/common: main

Log Message:
Add myself.


To generate a diff of this commit:
cvs rdiff -u -r1.467 -r1.468 src/distrib/notes/common/main

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



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

2010-11-14 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Nov 14 13:40:32 UTC 2010

Modified Files:
src/sys/arch/xen/include: i82489var.h

Log Message:
Explain why we hardwire lapic_cpu_number() to 0 on Xen.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/xen/include/i82489var.h

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



CVS commit: src/sys/dev/mii

2010-11-14 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Nov 14 13:40:36 UTC 2010

Modified Files:
src/sys/dev/mii: rlphy.c

Log Message:
rlphy fails to work without autonegotiation.

Reason is that ifm_data does not store BMCR data but a media index
that gets poked into the BMCR register.

Setting the BMCR and ANAR registers is correctly handled by the
generic function mii_phy_setmedia.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/mii/rlphy.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/xen/x86

2010-11-14 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Nov 14 13:43:05 UTC 2010

Modified Files:
src/sys/arch/xen/x86: cpu.c

Log Message:
Boot vs AP processors don't make sense for physical CPUs, these are
handled by the hypervisor and all CPUs are running when the dom0 is started.
In addition, we don't have a reliable way to determine the boot CPU as
- we may not be running on the boot CPU
- we don't have access to the lapic id
So simplify by ignoring the information and assign phycpu_info_primary to the
first attached CPU.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/xen/x86/cpu.c

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



CVS commit: src/sys/uvm

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 14 15:06:34 UTC 2010

Modified Files:
src/sys/uvm: uvm_page.c uvm_page.h uvm_pglist.c

Log Message:
Be a little more friendly to dynamic physical segment registration.

Maintain an array of pointer to struct vm_physseg, instead of struct
array.  So that VM subsystem can take its pointer safely.  Pointer
to this struct will replace raw paddr_t usage in the future.

Dynamic removal is not supported yet.

Only MD data structure changes, no kernel bump needed.

Tested on i386, amd64, powerpc/ibm40x, arm11.


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/sys/uvm/uvm_page.c
cvs rdiff -u -r1.66 -r1.67 src/sys/uvm/uvm_page.h
cvs rdiff -u -r1.46 -r1.47 src/sys/uvm/uvm_pglist.c

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



CVS commit: src/sys/uvm

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 14 15:16:53 UTC 2010

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

Log Message:
Fix build caused by a last minute change.


To generate a diff of this commit:
cvs rdiff -u -r1.164 -r1.165 src/sys/uvm/uvm_page.c

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



CVS commit: src/sys/uvm

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 14 15:18:07 UTC 2010

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

Log Message:
... and another.


To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/sys/uvm/uvm_page.c

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



CVS commit: src/tools/host-mkdep

2010-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov 14 15:18:24 UTC 2010

Modified Files:
src/tools/host-mkdep: host-mkdep.in

Log Message:
recognize isysroot


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/tools/host-mkdep/host-mkdep.in

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



CVS commit: src/sys/compat/sys

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 14 15:36:47 UTC 2010

Modified Files:
src/sys/compat/sys: sockio.h

Log Message:
Include sys/ioccom.h directly because it's used.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/compat/sys/sockio.h

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



CVS commit: src/sys/dev/ieee1394

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sun Nov 14 15:47:20 UTC 2010

Modified Files:
src/sys/dev/ieee1394: firewire.h firewirereg.h

Log Message:
Include dependencies directly.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ieee1394/firewire.h
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ieee1394/firewirereg.h

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



CVS commit: src/lib/libc

2010-11-14 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sun Nov 14 18:11:43 UTC 2010

Modified Files:
src/lib/libc/compat/stdlib: compat_unsetenv.c
src/lib/libc/gen: popen.c
src/lib/libc/misc: initfini.c
src/lib/libc/stdlib: Makefile.inc getenv.c local.h putenv.c setenv.c
system.c unsetenv.c
Added Files:
src/lib/libc/include: env.h
src/lib/libc/stdlib: _env.c

Log Message:
Improve and simplify implementation of *env(3) functions:
- Use RB tree to keep track of memory allocated via setenv(3) as
  suggested by Enami Tsugutomo in private e-mail.
  This simplifies the code a lot as we no longer need to keep the size
  of environ in sync with an array of allocated environment variables.
  It also makes it possible to free environment variables in unsetenv(3)
  if something has changed the order of the environ array.
- Fix a bug in getenv(3) and getenv_r(3) which would return bogus
  results e.g. for  getenv(A=B)  if an environment variable A
  with value B=C exists.
- Clean up the internal functions:
  - Don't expose the read/write lock for the environment to other parts
of libc. Provide locking functions instead.
  - Use bool to report success or failure.
  - Use ssize_t or size_t instead of int for indexes.
  - Provide internal functions with simpler interfaces e.g. don't
combine return values and reference arguments.
  - Don't copy environ into an allocated block unless we really need
to grow it.

Code reviewed by Joerg Sonnenberger and Christos Zoulas, tested by
Joerg Sonnenberger and me. These changes also fix problems in
zsh 4.3.* and pam_ssh according to Joerg.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/compat/stdlib/compat_unsetenv.c
cvs rdiff -u -r1.29 -r1.30 src/lib/libc/gen/popen.c
cvs rdiff -u -r0 -r1.1 src/lib/libc/include/env.h
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/misc/initfini.c
cvs rdiff -u -r1.74 -r1.75 src/lib/libc/stdlib/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/stdlib/_env.c
cvs rdiff -u -r1.32 -r1.33 src/lib/libc/stdlib/getenv.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/stdlib/local.h
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/stdlib/putenv.c
cvs rdiff -u -r1.42 -r1.43 src/lib/libc/stdlib/setenv.c
cvs rdiff -u -r1.22 -r1.23 src/lib/libc/stdlib/system.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/stdlib/unsetenv.c

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



CVS commit: src/tests/lib/libc/stdlib

2010-11-14 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sun Nov 14 18:15:08 UTC 2010

Modified Files:
src/tests/lib/libc/stdlib: t_environment.c

Log Message:
Update tests for *env(3):
- Introduce randomness into t_setenv to avoid freeing environment
  variables exactly in the order they have been allocated.
  Also call unsetenv(3) twice to make sure it behaves well if the
  environment variable doesn't exist.
- t_getenv is no longer a known failure after getenv(3) and getenv_r(3)
  have been fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libc/stdlib/t_environment.c

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



CVS commit: src/tests/lib/libc/stdlib

2010-11-14 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sun Nov 14 19:19:25 UTC 2010

Modified Files:
src/tests/lib/libc/stdlib: Makefile t_environment.c

Log Message:
Add a new regression test t_threaded which tests using getenv_r(3),
putenv(3), setenv(3) and unsetenv(3) concurrently.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/stdlib/Makefile
cvs rdiff -u -r1.10 -r1.11 src/tests/lib/libc/stdlib/t_environment.c

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



CVS commit: src/bin/sh

2010-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov 14 19:36:07 UTC 2010

Modified Files:
src/bin/sh: show.c

Log Message:
don't core-dump if we cannot open the trace file.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/bin/sh/show.c

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



CVS commit: src/bin/sh

2010-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov 14 19:43:38 UTC 2010

Modified Files:
src/bin/sh: parser.c

Log Message:
- Fix a couple of bugs to make the following two echo statements print the
  same output as they should:

line='#define bindir /usr/bin /* comment */'
echo ${line%%/\**}
echo ${line%%/\**}

1. ISDBLQUOTE() was not working properly for non VSNORMAL expansions because
   varnest was incremented before the variable was completely parsed. Add
   an insub adjustment to keep track of that.
2. When we have a quoted backslash, we need to escape twice, because one
   level of escaping will be stripped later. (XXX: Do that when insub == 1
   only?)

- Make macros statements


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/bin/sh/parser.c

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



CVS commit: src/bin/sh

2010-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov 14 19:49:17 UTC 2010

Modified Files:
src/bin/sh: parser.c

Log Message:
revert previous. breaks other stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/bin/sh/parser.c

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



CVS commit: src/lib/libc/stdlib

2010-11-14 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sun Nov 14 20:37:02 UTC 2010

Modified Files:
src/lib/libc/stdlib: getenv.c

Log Message:
Set errno to ENOENT if we reject the environment variable name in
getenv_r() instead of leaving it unchanged.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/lib/libc/stdlib/getenv.c

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



CVS commit: src/dist/nvi/common

2010-11-14 Thread Eric Schnoebelen
Module Name:src
Committed By:   schnoebe
Date:   Sun Nov 14 20:53:54 UTC 2010

Modified Files:
src/dist/nvi/common: options.c

Log Message:
bin/44088

Change the initialization state of gtagsmode to 0, (unset).

This brings about least astonishment for users, permittings tags
functionality to work as expected.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/dist/nvi/common/options.c

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



CVS commit: src/lib/libc

2010-11-14 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sun Nov 14 22:04:37 UTC 2010

Modified Files:
src/lib/libc/include: env.h
src/lib/libc/stdlib: _env.c getenv.c

Log Message:
1.) Rename internal function __findvar() to __findenvvar().
2.) Add a wrapper function __findenv() which implements the previous
*internal* interface. It turns out that ld.elf_so(1) and pthread(3)
both use it.

Stripping e.g. LD_LIBRARY_PATH from the environment while running
setuid binaries works again now.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/include/env.h
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/stdlib/_env.c
cvs rdiff -u -r1.34 -r1.35 src/lib/libc/stdlib/getenv.c

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



CVS commit: src/libexec/ld.elf_so

2010-11-14 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sun Nov 14 22:09:16 UTC 2010

Modified Files:
src/libexec/ld.elf_so: xenv.c

Log Message:
Don't use internal libc function __findenv().


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/libexec/ld.elf_so/xenv.c

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



CVS commit: src/lib/libpthread

2010-11-14 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sun Nov 14 22:25:24 UTC 2010

Modified Files:
src/lib/libpthread: pthread.c

Log Message:
Don't use internal libc function __findenv().


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/lib/libpthread/pthread.c

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



CVS commit: src/sys/dev

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 05:52:41 UTC 2010

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

Log Message:
curlwp needs sys/lwp.h.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/firmload.c

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



CVS commit: src/sys/dev/dm

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 05:53:29 UTC 2010

Modified Files:
src/sys/dev/dm: dm_target_linear.c

Log Message:
curlwp needs sys/lwp.h.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/dm/dm_target_linear.c

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



CVS commit: src/sys/dev/dm

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 05:54:38 UTC 2010

Modified Files:
src/sys/dev/dm: dm_target_stripe.c

Log Message:
curlwp needs sys/lwp.h.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/dm/dm_target_stripe.c

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



CVS commit: src/sys/dev/ic

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 05:56:31 UTC 2010

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

Log Message:
Socket ioctl definitions need sys/sockio.h.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/dev/ic/rtw.c

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



CVS commit: src/sys/dev/pci

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 05:57:07 UTC 2010

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

Log Message:
tsleep needs sys/proc.h.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/if_ipw.c

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



CVS commit: src/sys/dev/pci

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 05:57:25 UTC 2010

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

Log Message:
tsleep needs sys/proc.h.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/dev/pci/if_iwi.c

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



CVS commit: src/sys/dev/pci

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 05:57:39 UTC 2010

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

Log Message:
tsleep needs sys/proc.h.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/if_wpi.c

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



CVS commit: src/sys/dev/pckbport

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 05:58:18 UTC 2010

Modified Files:
src/sys/dev/pckbport: synaptics.c

Log Message:
wakeup needs sys/proc.h.


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

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



CVS commit: src/sys/dev/sbus

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 05:59:57 UTC 2010

Modified Files:
src/sys/dev/sbus: agten.c

Log Message:
This doesn't use uvm(9) API.


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

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



CVS commit: src/sys/dev/usb

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:01:07 UTC 2010

Modified Files:
src/sys/dev/usb: ucycom.c

Log Message:
Dereferencing struct lwp * needs sys/lwp.h.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/usb/ucycom.c

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



CVS commit: src/sys/dev/usb

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:01:30 UTC 2010

Modified Files:
src/sys/dev/usb: uhso.c

Log Message:
Dereferencing struct lwp * needs sys/lwp.h.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/usb/uhso.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/acorn26/acorn26

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:05:27 UTC 2010

Modified Files:
src/sys/arch/acorn26/acorn26: except.c

Log Message:
Dereferencing struct proc * and struct lwp *, include them


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/acorn26/acorn26/except.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/acorn26/acorn26

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:06:51 UTC 2010

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

Log Message:
struct proc * and struct lwp * derefs.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/acorn26/acorn26/pmap.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/acorn26/acorn26

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:07:41 UTC 2010

Modified Files:
src/sys/arch/acorn26/acorn26: start.c

Log Message:
lwp0 needs sys/lwp.h.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/acorn26/acorn26/start.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/algor/algor

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:08:32 UTC 2010

Modified Files:
src/sys/arch/algor/algor: machdep.c

Log Message:
curlwp needs sys/lwp.h.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/algor/algor/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/amd64/amd64

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:12:28 UTC 2010

Modified Files:
src/sys/arch/amd64/amd64: machdep.c

Log Message:
struct lwp * and struct proc * derefs.


To generate a diff of this commit:
cvs rdiff -u -r1.156 -r1.157 src/sys/arch/amd64/amd64/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/arc/jazz

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:13:16 UTC 2010

Modified Files:
src/sys/arch/arc/jazz: bus_dma_jazz.c

Log Message:
struct proc * deref.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arc/jazz/bus_dma_jazz.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/arm/ixp12x0

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:14:02 UTC 2010

Modified Files:
src/sys/arch/arm/ixp12x0: ixp12x0_com.c

Log Message:
struct lwp * deref (for kauth).


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/arm/ixp12x0/ixp12x0_com.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/ews4800mips/ews4800mips

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:22:13 UTC 2010

Modified Files:
src/sys/arch/ews4800mips/ews4800mips: interrupt.c

Log Message:
struct cpu_info * deref needs sys/cpu.h.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ews4800mips/ews4800mips/interrupt.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/ews4800mips/ews4800mips

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:23:05 UTC 2010

Modified Files:
src/sys/arch/ews4800mips/ews4800mips: tr2.c tr2a.c

Log Message:
struct cpu_info * deref needs sys/cpu.h.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ews4800mips/ews4800mips/tr2.c \
src/sys/arch/ews4800mips/ews4800mips/tr2a.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/hpcmips/hpcmips

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:25:43 UTC 2010

Modified Files:
src/sys/arch/hpcmips/hpcmips: machdep.c

Log Message:
curlwp needs sys/lwp.h.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/arch/hpcmips/hpcmips/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/hpcmips/tx

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:26:58 UTC 2010

Modified Files:
src/sys/arch/hpcmips/tx: tx39icu.c

Log Message:
struct cpu_info * deref needs sys/cpu.h.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/hpcmips/tx/tx39icu.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/hpcsh/hpcsh

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:30:04 UTC 2010

Modified Files:
src/sys/arch/hpcsh/hpcsh: machdep.c

Log Message:
sys/lwp.h for lwp0, sh3/proc.h for sh_proc0_init.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/hpcsh/hpcsh/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/hppa/hppa

2010-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Mon Nov 15 06:32:38 UTC 2010

Modified Files:
src/sys/arch/hppa/hppa: db_machdep.c

Log Message:
struct lwp * deref needs sys/lwp.h.


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

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