CVS commit: src/sys

2012-02-06 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Mon Feb  6 23:30:15 UTC 2012

Modified Files:
src/sys/modules/npf: Makefile
src/sys/net/npf: files.npf npf.h npf_handler.c npf_impl.h npf_ruleset.c
Added Files:
src/sys/net/npf: npf_rproc.c

Log Message:
- Split NPF rule procedure code into a separate module (no functional changes).
- Simplify some code, add more comments, some asserts.
- G/C unused rule hook code.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/modules/npf/Makefile
cvs rdiff -u -r1.5 -r1.6 src/sys/net/npf/files.npf
cvs rdiff -u -r1.13 -r1.14 src/sys/net/npf/npf.h
cvs rdiff -u -r1.12 -r1.13 src/sys/net/npf/npf_handler.c
cvs rdiff -u -r1.9 -r1.10 src/sys/net/npf/npf_impl.h \
src/sys/net/npf/npf_ruleset.c
cvs rdiff -u -r0 -r1.1 src/sys/net/npf/npf_rproc.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/modules/npf/Makefile
diff -u src/sys/modules/npf/Makefile:1.8 src/sys/modules/npf/Makefile:1.9
--- src/sys/modules/npf/Makefile:1.8	Tue Nov 29 20:05:30 2011
+++ src/sys/modules/npf/Makefile	Mon Feb  6 23:30:14 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2011/11/29 20:05:30 rmind Exp $
+# $NetBSD: Makefile,v 1.9 2012/02/06 23:30:14 rmind Exp $
 
 .include "../Makefile.inc"
 
@@ -8,8 +8,8 @@ KMOD=		npf
 
 SRCS=		npf.c npf_alg.c npf_ctl.c npf_handler.c
 SRCS+=		npf_inet.c npf_instr.c npf_log.c npf_mbuf.c npf_nat.c
-SRCS+=		npf_processor.c npf_ruleset.c npf_sendpkt.c npf_session.c
-SRCS+=		npf_state.c npf_state_tcp.c npf_tableset.c
+SRCS+=		npf_processor.c npf_ruleset.c npf_rproc.c npf_sendpkt.c
+SRCS+=		npf_session.c npf_state.c npf_state_tcp.c npf_tableset.c
 
 CPPFLAGS+=	-DINET6
 

Index: src/sys/net/npf/files.npf
diff -u src/sys/net/npf/files.npf:1.5 src/sys/net/npf/files.npf:1.6
--- src/sys/net/npf/files.npf:1.5	Tue Nov 29 20:05:30 2011
+++ src/sys/net/npf/files.npf	Mon Feb  6 23:30:14 2012
@@ -1,4 +1,4 @@
-# $NetBSD: files.npf,v 1.5 2011/11/29 20:05:30 rmind Exp $
+# $NetBSD: files.npf,v 1.6 2012/02/06 23:30:14 rmind Exp $
 #
 # Public Domain.
 #
@@ -17,6 +17,7 @@ file	net/npf/npf_instr.c			npf
 file	net/npf/npf_mbuf.c			npf
 file	net/npf/npf_processor.c			npf
 file	net/npf/npf_ruleset.c			npf
+file	net/npf/npf_rproc.c			npf
 file	net/npf/npf_tableset.c			npf
 file	net/npf/npf_inet.c			npf
 file	net/npf/npf_session.c			npf

Index: src/sys/net/npf/npf.h
diff -u src/sys/net/npf/npf.h:1.13 src/sys/net/npf/npf.h:1.14
--- src/sys/net/npf/npf.h:1.13	Sun Feb  5 00:37:13 2012
+++ src/sys/net/npf/npf.h	Mon Feb  6 23:30:14 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf.h,v 1.13 2012/02/05 00:37:13 rmind Exp $	*/
+/*	$NetBSD: npf.h,v 1.14 2012/02/06 23:30:14 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2009-2011 The NetBSD Foundation, Inc.
@@ -68,10 +68,7 @@ typedef uint8_t			npf_netmask_t;
 typedef void			nbuf_t;
 
 struct npf_rproc;
-struct npf_hook;
-
 typedef struct npf_rproc	npf_rproc_t;
-typedef struct npf_hook		npf_hook_t;
 
 /*
  * Packet information cache.
@@ -215,12 +212,6 @@ int		nbuf_store_datum(nbuf_t *, void *, 
 int		nbuf_add_tag(nbuf_t *, uint32_t, uint32_t);
 int		nbuf_find_tag(nbuf_t *, uint32_t, void **);
 
-#if 0
-npf_hook_t *	npf_hook_register(npf_rule_t *,
-		void (*)(npf_cache_t *, nbuf_t *, void *), void *);
-void		npf_hook_unregister(npf_rule_t *, npf_hook_t *);
-#endif
-
 #endif	/* _KERNEL */
 
 /* Rule attributes. */

Index: src/sys/net/npf/npf_handler.c
diff -u src/sys/net/npf/npf_handler.c:1.12 src/sys/net/npf/npf_handler.c:1.13
--- src/sys/net/npf/npf_handler.c:1.12	Sun Jan 15 00:49:48 2012
+++ src/sys/net/npf/npf_handler.c	Mon Feb  6 23:30:14 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_handler.c,v 1.12 2012/01/15 00:49:48 rmind Exp $	*/
+/*	$NetBSD: npf_handler.c,v 1.13 2012/02/06 23:30:14 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2009-2010 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: npf_handler.c,v 1.12 2012/01/15 00:49:48 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_handler.c,v 1.13 2012/02/06 23:30:14 rmind Exp $");
 
 #include 
 #include 
@@ -166,9 +166,12 @@ npf_packet_handler(void *arg, struct mbu
 		goto block;
 	}
 
-	/* Get rule procedure for assocation and/or execution. */
+	/*
+	 * Get the rule procedure (acquires a reference) for assocation
+	 * with a session (if any) and execution.
+	 */
 	KASSERT(rp == NULL);
-	rp = npf_rproc_return(rl);
+	rp = npf_rule_getrproc(rl);
 
 	/* Apply the rule, release the lock. */
 	error = npf_rule_apply(&npc, nbuf, rl, &retfl);
@@ -185,6 +188,10 @@ npf_packet_handler(void *arg, struct mbu
 			error = ENOMEM;
 			goto out;
 		}
+		/*
+		 * Note: the reference to the rule procedure is transfered to
+		 * the session.  It will be released on session destruction.
+		 */
 		npf_session_setpass(se, rp);
 	}
 pass:
@@ -195,44 +202,47 @@ pass:
 	error = npf_do_nat(&npc, se, nbuf, ifp, di);
 block:
 	/*
-	 * Perform rule procedure, if any.
+	 * E

CVS commit: src/sys/arch/cats/cats

2012-02-06 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Feb  6 17:51:48 UTC 2012

Modified Files:
src/sys/arch/cats/cats: cats_machdep.c

Log Message:
Make this compile with VERBOSE_ARM_INIT.
If the AOUT magic is not ZMAGIC, assume kernel is ELF.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/cats/cats/cats_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/cats/cats/cats_machdep.c
diff -u src/sys/arch/cats/cats/cats_machdep.c:1.71 src/sys/arch/cats/cats/cats_machdep.c:1.72
--- src/sys/arch/cats/cats/cats_machdep.c:1.71	Fri Jul  1 20:35:31 2011
+++ src/sys/arch/cats/cats/cats_machdep.c	Mon Feb  6 17:51:47 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cats_machdep.c,v 1.71 2011/07/01 20:35:31 dyoung Exp $	*/
+/*	$NetBSD: cats_machdep.c,v 1.72 2012/02/06 17:51:47 matt Exp $	*/
 
 /*
  * Copyright (c) 1997,1998 Mark Brinicombe.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cats_machdep.c,v 1.71 2011/07/01 20:35:31 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cats_machdep.c,v 1.72 2012/02/06 17:51:47 matt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_modular.h"
@@ -385,7 +385,8 @@ initarm(void *arm_bootargs)
 
 	if (ebsabootinfo.bt_magic != BT_MAGIC_NUMBER_EBSA
 	&& ebsabootinfo.bt_magic != BT_MAGIC_NUMBER_CATS)
-		panic("Incompatible magic number passed in boot args");
+		panic("Incompatible magic number %#x passed in boot args",
+		ebsabootinfo.bt_magic);
 
 #ifdef VERBOSE_INIT_ARM
 	/* output the incoming bootinfo */
@@ -581,8 +582,11 @@ initarm(void *arm_bootargs)
 #endif
 
 	/* Now we fill in the L2 pagetable for the kernel static code/data */
-#ifdef ABLEELF
-	{
+	struct exec *kernexec = (struct exec *)KERNEL_TEXT_BASE;
+	if (N_GETMAGIC(kernexec[0]) != ZMAGIC) {
+		/*
+		 * If it's not a.out, assume ELF.
+		 */
 		extern char etext[], _end[];
 		size_t textsize = (uintptr_t) etext - KERNEL_BASE;
 		size_t totalsize = (uintptr_t) _end - KERNEL_BASE;
@@ -598,35 +602,27 @@ initarm(void *arm_bootargs)
 		(void) pmap_map_chunk(l1pagetable, KERNEL_BASE + logical,
 		physical_start + logical, totalsize - textsize,
 		VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
-	}
-#else
-	{
-		struct exec *kernexec = (struct exec *)KERNEL_TEXT_BASE;
-		if (N_GETMAGIC(kernexec[0]) != ZMAGIC)
-			panic("Illegal kernel format");
-		else {
-			extern int end;
-			u_int logical;
+	} else {
+		extern int end;
+		u_int logical;
 			
-			logical = pmap_map_chunk(l1pagetable, KERNEL_TEXT_BASE,
-	physical_start, kernexec->a_text,
-	VM_PROT_READ, PTE_CACHE);
-			logical += pmap_map_chunk(l1pagetable,
-	KERNEL_TEXT_BASE + logical,
-	physical_start + logical, kernexec->a_data,
-	VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
-			logical += pmap_map_chunk(l1pagetable,
-	KERNEL_TEXT_BASE + logical,
-	physical_start + logical, kernexec->a_bss,
-	VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
-			logical += pmap_map_chunk(l1pagetable,
-	KERNEL_TEXT_BASE + logical,
-	physical_start + logical, kernexec->a_syms + sizeof(int)
-	+ *(u_int *)((int)&end + kernexec->a_syms + sizeof(int)),
-	VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
-		}
+		logical = pmap_map_chunk(l1pagetable, KERNEL_TEXT_BASE,
+			physical_start, kernexec->a_text,
+			VM_PROT_READ, PTE_CACHE);
+		logical += pmap_map_chunk(l1pagetable,
+			KERNEL_TEXT_BASE + logical,
+			physical_start + logical, kernexec->a_data,
+			VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
+		logical += pmap_map_chunk(l1pagetable,
+			KERNEL_TEXT_BASE + logical,
+			physical_start + logical, kernexec->a_bss,
+			VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
+		logical += pmap_map_chunk(l1pagetable,
+			KERNEL_TEXT_BASE + logical,
+			physical_start + logical, kernexec->a_syms + sizeof(int)
+			+ *(u_int *)((int)&end + kernexec->a_syms + sizeof(int)),
+			VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
 	}
-#endif
 
 	/*
 	 * PATCH PATCH ...
@@ -695,7 +691,7 @@ initarm(void *arm_bootargs)
 	 */
 #ifdef VERBOSE_INIT_ARM
 	/* checking sttb address */
-	printf("cpu_setttb address = %p\n", cpu_setttb);
+	printf("cpu_setttb address = %p\n", cpufuncs.cf_setttb);
 
 	printf("kernel_l1pt=0x%08x old = 0x%08x, phys = 0x%08x\n",
 			((uint*)kernel_l1pt.pv_va)[0xf00],



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

2012-02-06 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Feb  6 17:51:05 UTC 2012

Modified Files:
src/sys/arch/cats/conf: GENERIC

Log Message:
Increase SYMTAB_SPACE (commented out).
Add commented out VERBOSE_INIT_ARM and FCOM_INIT_ARM


To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/arch/cats/conf/GENERIC

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

Modified files:

Index: src/sys/arch/cats/conf/GENERIC
diff -u src/sys/arch/cats/conf/GENERIC:1.137 src/sys/arch/cats/conf/GENERIC:1.138
--- src/sys/arch/cats/conf/GENERIC:1.137	Sun Dec 18 05:49:25 2011
+++ src/sys/arch/cats/conf/GENERIC	Mon Feb  6 17:51:05 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.137 2011/12/18 05:49:25 dholland Exp $
+# $NetBSD: GENERIC,v 1.138 2012/02/06 17:51:05 matt Exp $
 #
 # GENERIC machine description file
 # 
@@ -47,6 +47,8 @@ options 	NTP		# NTP phase/frequency lock
 # For StrongARM systems
 options 	CPU_SA110	# Support the SA110 core
 makeoptions	CPUFLAGS="-march=armv4 -mtune=strongarm"
+#options 	VERBOSE_INIT_ARM
+#options 	FCOM_INIT_ARM	# early console attach
 
 # FPA options
 
@@ -193,7 +195,7 @@ options 	WSDISPLAY_COMPAT_RAWKBD		# can 
 options 	DDB		# in-kernel debugger
 options 	DDB_HISTORY_SIZE=100	# Enable history editing in DDB
 #makeoptions	DEBUG="-g"	# compile full symbol table
-#options		SYMTAB_SPACE=50
+#options 	SYMTAB_SPACE=90
 
 config		netbsd	root on ? type ?
 



CVS commit: src/external/bsd/dhcpcd/dist

2012-02-06 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Feb  6 17:47:26 UTC 2012

Removed Files:
src/external/bsd/dhcpcd/dist: README
src/external/bsd/dhcpcd/dist/compat: getline.c getline.h

Log Message:
Remove stale files from older imports.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.6 -r0 src/external/bsd/dhcpcd/dist/README
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/dhcpcd/dist/compat/getline.c \
src/external/bsd/dhcpcd/dist/compat/getline.h

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



CVS commit: src/external/public-domain/sqlite/dist

2012-02-06 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Feb  6 17:24:49 UTC 2012

Modified Files:
src/external/public-domain/sqlite/dist: sqlite3.c

Log Message:
Back out part of previous commit (no reason to define SQLITE_BIG_DBL
especially for VAX since it uses DBL_MAX from the VAX ).


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/public-domain/sqlite/dist/sqlite3.c

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

Modified files:

Index: src/external/public-domain/sqlite/dist/sqlite3.c
diff -u src/external/public-domain/sqlite/dist/sqlite3.c:1.5 src/external/public-domain/sqlite/dist/sqlite3.c:1.6
--- src/external/public-domain/sqlite/dist/sqlite3.c:1.5	Sun Feb  5 17:55:12 2012
+++ src/external/public-domain/sqlite/dist/sqlite3.c	Mon Feb  6 17:24:49 2012
@@ -7792,11 +7792,7 @@ SQLITE_PRIVATE void sqlite3HashClear(Has
 # endif
 #endif
 #ifndef SQLITE_BIG_DBL
-# ifdef __vax__
-#  define SQLITE_BIG_DBL (1e38)
-# else
-#  define SQLITE_BIG_DBL (1e99)
-# endif
+# define SQLITE_BIG_DBL (1e99)
 #endif
 #ifndef SQLITE_HUGE_DBL
 # define SQLITE_HUGE_DBL (1.0e+308)
@@ -132876,7 +132872,7 @@ SQLITE_API int sqlite3_extension_init(
 **May you share freely, never taking more than you give.
 **
 *
-** $Id: sqlite3.c,v 1.5 2012/02/05 17:55:12 matt Exp $
+** $Id: sqlite3.c,v 1.6 2012/02/06 17:24:49 matt Exp $
 **
 ** This file implements an integration between the ICU library 
 ** ("International Components for Unicode", an open-source library 



CVS commit: src/doc

2012-02-06 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Feb  6 15:58:56 UTC 2012

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of dhcpcd-5.5.4


To generate a diff of this commit:
cvs rdiff -u -r1.907 -r1.908 src/doc/3RDPARTY
cvs rdiff -u -r1.1666 -r1.1667 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.907 src/doc/3RDPARTY:1.908
--- src/doc/3RDPARTY:1.907	Fri Feb  3 00:05:57 2012
+++ src/doc/3RDPARTY	Mon Feb  6 15:58:56 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.907 2012/02/03 00:05:57 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.908 2012/02/06 15:58:56 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -270,8 +270,8 @@ No changes for NetBSD integration - just
 top of the current tree.
 
 Package:	dhcpcd
-Version:	5.5.3
-Current Vers:	5.5.3
+Version:	5.5.4
+Current Vers:	5.5.4
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/dhcpcd/
 Home Page:	http://roy.marples.name/projects/dhcpcd/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1666 src/doc/CHANGES:1.1667
--- src/doc/CHANGES:1.1666	Fri Feb  3 00:05:58 2012
+++ src/doc/CHANGES	Mon Feb  6 15:58:56 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1666 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1667 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1236,4 +1236,5 @@ Changes from NetBSD 5.0 to NetBSD 6.0:
 	ntp: import ntp 4.2.6p5.
 		[kardel 20120201]
 	dhcpcd(8): Import dhcpcd-5.5.3 [roy 20120202]
+	dhcpcd(8): Import dhcpcd-5.5.4 [roy 20120206]
 



CVS commit: src/external/bsd/dhcpcd/dist

2012-02-06 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Feb  6 15:57:00 UTC 2012

Update of /cvsroot/src/external/bsd/dhcpcd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv17157

Log Message:
Import dhcpcd-5.5.4 with the following changes:
* Disregard IFF_RUNNING on link state changes
* Warn about the kernel not configured for IPv6 RAs instead of
  complaining it can't send messages

OK: releng@

Status:

Vendor Tag: roy
Release Tags:   dhcpcd-5-5-4

U src/external/bsd/dhcpcd/dist/arp.c
U src/external/bsd/dhcpcd/dist/bind.c
U src/external/bsd/dhcpcd/dist/common.c
U src/external/bsd/dhcpcd/dist/control.c
U src/external/bsd/dhcpcd/dist/dhcp.c
U src/external/bsd/dhcpcd/dist/dhcpcd.c
U src/external/bsd/dhcpcd/dist/duid.c
U src/external/bsd/dhcpcd/dist/eloop.c
U src/external/bsd/dhcpcd/dist/if-options.c
U src/external/bsd/dhcpcd/dist/if-pref.c
U src/external/bsd/dhcpcd/dist/ipv4ll.c
U src/external/bsd/dhcpcd/dist/ipv6rs.c
U src/external/bsd/dhcpcd/dist/net.c
U src/external/bsd/dhcpcd/dist/signals.c
U src/external/bsd/dhcpcd/dist/configure.c
U src/external/bsd/dhcpcd/dist/bpf.c
U src/external/bsd/dhcpcd/dist/if-bsd.c
U src/external/bsd/dhcpcd/dist/platform-bsd.c
U src/external/bsd/dhcpcd/dist/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in
U src/external/bsd/dhcpcd/dist/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/arp.h
U src/external/bsd/dhcpcd/dist/bind.h
U src/external/bsd/dhcpcd/dist/bpf-filter.h
U src/external/bsd/dhcpcd/dist/common.h
U src/external/bsd/dhcpcd/dist/config.h
U src/external/bsd/dhcpcd/dist/configure.h
U src/external/bsd/dhcpcd/dist/control.h
U src/external/bsd/dhcpcd/dist/defs.h
U src/external/bsd/dhcpcd/dist/dhcp.h
U src/external/bsd/dhcpcd/dist/dhcpcd.h
U src/external/bsd/dhcpcd/dist/duid.h
U src/external/bsd/dhcpcd/dist/eloop.h
U src/external/bsd/dhcpcd/dist/if-options.h
U src/external/bsd/dhcpcd/dist/if-pref.h
U src/external/bsd/dhcpcd/dist/ipv4ll.h
U src/external/bsd/dhcpcd/dist/ipv6rs.h
U src/external/bsd/dhcpcd/dist/net.h
U src/external/bsd/dhcpcd/dist/platform.h
U src/external/bsd/dhcpcd/dist/signals.h
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/01-test
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/02-dump
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-mtu
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ypbind

No conflicts created by this import



CVS commit: src/sys/kern

2012-02-06 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Mon Feb  6 12:13:44 UTC 2012

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

Log Message:
align allocations >=pagesize at a page boundary, to preserve traditional
malloc(9) semantics
fixes dri mappings shared per mmap (at least on i945)
approved by releng


To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/kern/kern_malloc.c

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

Modified files:

Index: src/sys/kern/kern_malloc.c
diff -u src/sys/kern/kern_malloc.c:1.137 src/sys/kern/kern_malloc.c:1.138
--- src/sys/kern/kern_malloc.c:1.137	Mon Jan 30 05:42:54 2012
+++ src/sys/kern/kern_malloc.c	Mon Feb  6 12:13:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_malloc.c,v 1.137 2012/01/30 05:42:54 mrg Exp $	*/
+/*	$NetBSD: kern_malloc.c,v 1.138 2012/02/06 12:13:44 drochner Exp $	*/
 
 /*
  * Copyright (c) 1987, 1991, 1993
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_malloc.c,v 1.137 2012/01/30 05:42:54 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_malloc.c,v 1.138 2012/02/06 12:13:44 drochner Exp $");
 
 #include 
 #include 
@@ -108,10 +108,18 @@ kern_malloc(unsigned long size, struct m
 #endif /* MALLOCLOG */
 {
 	const int kmflags = (flags & M_NOWAIT) ? KM_NOSLEEP : KM_SLEEP;
-	const size_t allocsize = sizeof(struct malloc_header) + size;
+	size_t allocsize, hdroffset;
 	struct malloc_header *mh;
 	void *p;
 
+	if (size >= PAGE_SIZE) {
+		allocsize = PAGE_SIZE + size; /* for page alignment */
+		hdroffset = PAGE_SIZE - sizeof(struct malloc_header);
+	} else {
+		allocsize = sizeof(struct malloc_header) + size;
+		hdroffset = 0;
+	}
+
 	p = kmem_intr_alloc(allocsize, kmflags);
 	if (p == NULL)
 		return NULL;
@@ -119,8 +127,8 @@ kern_malloc(unsigned long size, struct m
 	if ((flags & M_ZERO) != 0) {
 		memset(p, 0, allocsize);
 	}
-	mh = (void *)p;
-	mh->mh_size = allocsize;
+	mh = (void *)((char *)p + hdroffset);
+	mh->mh_size = allocsize - hdroffset;
 
 	return mh + 1;
 }
@@ -141,7 +149,11 @@ kern_free(void *addr, struct malloc_type
 	mh = addr;
 	mh--;
 
-	kmem_intr_free(mh, mh->mh_size);
+	if (mh->mh_size >= PAGE_SIZE + sizeof(struct malloc_header))
+		kmem_intr_free((char *)addr - PAGE_SIZE,
+		mh->mh_size + PAGE_SIZE - sizeof(struct malloc_header));
+	else
+		kmem_intr_free(mh, mh->mh_size);
 }
 
 /*



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

2012-02-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Feb  6 10:46:36 UTC 2012

Modified Files:
src/external/gpl3/gdb/dist/gdb/config/alpha: nbsd.mh
src/external/gpl3/gdb/dist/gdb/config/arm: nbsdelf.mh
src/external/gpl3/gdb/dist/gdb/config/i386: nbsd64.mh nbsdelf.mh
src/external/gpl3/gdb/dist/gdb/config/m68k: nbsdelf.mh
src/external/gpl3/gdb/dist/gdb/config/mips: nbsd.mh
src/external/gpl3/gdb/dist/gdb/config/pa: nbsd.mh
src/external/gpl3/gdb/dist/gdb/config/powerpc: nbsd.mh ppc64-nbsd.mh
src/external/gpl3/gdb/dist/gdb/config/sh: nbsd.mh
src/external/gpl3/gdb/dist/gdb/config/sparc: nbsd64.mh nbsdelf.mh
src/external/gpl3/gdb/dist/gdb/config/vax: nbsdelf.mh

Log Message:
Add nbsd-pthread.o.

OK releng@ 3 ack 0 nak.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/config/alpha/nbsd.mh
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/config/i386/nbsd64.mh
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl3/gdb/dist/gdb/config/i386/nbsdelf.mh
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/dist/gdb/config/m68k/nbsdelf.mh
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/config/mips/nbsd.mh
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/gdb/config/pa/nbsd.mh
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/dist/gdb/config/powerpc/nbsd.mh
cvs rdiff -u -r1.1 -r1.2 \
src/external/gpl3/gdb/dist/gdb/config/powerpc/ppc64-nbsd.mh
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/config/sh/nbsd.mh
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/gdb/dist/gdb/config/sparc/nbsd64.mh \
src/external/gpl3/gdb/dist/gdb/config/sparc/nbsdelf.mh
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/config/vax/nbsdelf.mh

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

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/config/alpha/nbsd.mh
diff -u src/external/gpl3/gdb/dist/gdb/config/alpha/nbsd.mh:1.2 src/external/gpl3/gdb/dist/gdb/config/alpha/nbsd.mh:1.3
--- src/external/gpl3/gdb/dist/gdb/config/alpha/nbsd.mh:1.2	Sun Sep 25 16:30:25 2011
+++ src/external/gpl3/gdb/dist/gdb/config/alpha/nbsd.mh	Mon Feb  6 10:46:34 2012
@@ -1,4 +1,5 @@
 # Host: NetBSD/alpha
-NATDEPFILES= fork-child.o inf-ptrace.o alphabsd-nat.o bsd-kvm.o nbsd-nat.o
+NATDEPFILES= fork-child.o inf-ptrace.o alphabsd-nat.o bsd-kvm.o nbsd-nat.o \
+	nbsd-thread.o
 
 LOADLIBES= -lkvm

Index: src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh
diff -u src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh:1.2 src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh:1.3
--- src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh:1.2	Sun Sep 25 16:30:25 2011
+++ src/external/gpl3/gdb/dist/gdb/config/arm/nbsdelf.mh	Mon Feb  6 10:46:35 2012
@@ -1,2 +1,3 @@
 # Host: NetBSD/arm
-NATDEPFILES= fork-child.o inf-ptrace.o corelow.o nbsd-nat.o armnbsd-nat.o bsd-kvm.o
+NATDEPFILES= fork-child.o inf-ptrace.o corelow.o nbsd-nat.o armnbsd-nat.o \
+	bsd-kvm.o nbsd-thread.o

Index: src/external/gpl3/gdb/dist/gdb/config/i386/nbsd64.mh
diff -u src/external/gpl3/gdb/dist/gdb/config/i386/nbsd64.mh:1.2 src/external/gpl3/gdb/dist/gdb/config/i386/nbsd64.mh:1.3
--- src/external/gpl3/gdb/dist/gdb/config/i386/nbsd64.mh:1.2	Sun Sep 25 16:30:25 2011
+++ src/external/gpl3/gdb/dist/gdb/config/i386/nbsd64.mh	Mon Feb  6 10:46:35 2012
@@ -1,5 +1,6 @@
 # Host: NetBSD/amd64
 NATDEPFILES= fork-child.o inf-ptrace.o \
-	amd64-nat.o amd64bsd-nat.o nbsd-nat.o amd64nbsd-nat.o bsd-kvm.o
+	amd64-nat.o amd64bsd-nat.o nbsd-nat.o amd64nbsd-nat.o bsd-kvm.o \
+	nbsd-thread.o
 
 LOADLIBES= -lkvm

Index: src/external/gpl3/gdb/dist/gdb/config/i386/nbsdelf.mh
diff -u src/external/gpl3/gdb/dist/gdb/config/i386/nbsdelf.mh:1.1.1.1 src/external/gpl3/gdb/dist/gdb/config/i386/nbsdelf.mh:1.2
--- src/external/gpl3/gdb/dist/gdb/config/i386/nbsdelf.mh:1.1.1.1	Sat Sep 24 20:14:57 2011
+++ src/external/gpl3/gdb/dist/gdb/config/i386/nbsdelf.mh	Mon Feb  6 10:46:35 2012
@@ -1,5 +1,6 @@
 # Host: NetBSD/i386 ELF
 NATDEPFILES= fork-child.o inf-ptrace.o \
-	nbsd-nat.o i386bsd-nat.o i386nbsd-nat.o bsd-kvm.o
+	nbsd-nat.o i386bsd-nat.o i386nbsd-nat.o bsd-kvm.o \
+	nbsd-thread.o
 
 LOADLIBES= -lkvm

Index: src/external/gpl3/gdb/dist/gdb/config/m68k/nbsdelf.mh
diff -u src/external/gpl3/gdb/dist/gdb/config/m68k/nbsdelf.mh:1.2 src/external/gpl3/gdb/dist/gdb/config/m68k/nbsdelf.mh:1.3
--- src/external/gpl3/gdb/dist/gdb/config/m68k/nbsdelf.mh:1.2	Sun Sep 25 16:30:25 2011
+++ src/external/gpl3/gdb/dist/gdb/config/m68k/nbsdelf.mh	Mon Feb  6 10:46:35 2012
@@ -1,4 +1,5 @@
 # Host: NetBSD/m68k ELF
-NATDEPFILES= nbsd-nat.o m68kbsd-nat.o bsd-kvm.o fork-child.o inf-ptrace.o
+NATDEPFILES= nbsd-nat.o m68kbsd-nat.o bsd-kvm.o fork-child.o inf-ptrace.o \
+	nbsd-thread.o
 
 LOADLIBES= -lkvm

Index: src/external/gpl3/gdb/dist/gdb/config/mips/nbsd.mh
diff

CVS commit: src/external/bsd/mdocml/dist

2012-02-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Feb  6 10:42:44 UTC 2012

Modified Files:
src/external/bsd/mdocml/dist: read.c

Log Message:
Pull read.c r1.27 from upstream repository:
Don't silently skip non-ASCII characters, but replace them with ``?''.
This is less likely to break the syntax of macros.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/mdocml/dist/read.c

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

Modified files:

Index: src/external/bsd/mdocml/dist/read.c
diff -u src/external/bsd/mdocml/dist/read.c:1.4 src/external/bsd/mdocml/dist/read.c:1.5
--- src/external/bsd/mdocml/dist/read.c:1.4	Mon Jan 30 17:03:01 2012
+++ src/external/bsd/mdocml/dist/read.c	Mon Feb  6 10:42:44 2012
@@ -1,4 +1,4 @@
-/*	$Vendor-Id: read.c,v 1.26 2011/11/07 01:24:40 schwarze Exp $ */
+/*	$Vendor-Id: read.c,v 1.27 2012/02/05 16:46:15 joerg Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons 
  * Copyright (c) 2010, 2011 Ingo Schwarze 
@@ -325,9 +325,9 @@ mparse_buf_r(struct mparse *curp, struct
 			 * Warn about bogus characters.  If you're using
 			 * non-ASCII encoding, you're screwing your
 			 * readers.  Since I'd rather this not happen,
-			 * I'll be helpful and drop these characters so
-			 * we don't display gibberish.  Note to manual
-			 * writers: use special characters.
+			 * I'll be helpful and replace these characters
+			 * with "?", so we don't display gibberish.
+			 * Note to manual writers: use special characters.
 			 */
 
 			c = (unsigned char) blk.buf[i];
@@ -335,8 +335,11 @@ mparse_buf_r(struct mparse *curp, struct
 			if ( ! (isascii(c) && 
 	(isgraph(c) || isblank(c {
 mandoc_msg(MANDOCERR_BADCHAR, curp,
-		curp->line, pos, "ignoring byte");
+		curp->line, pos, NULL);
 i++;
+if (pos >= (int)ln.sz)
+	resize_buf(&ln, 256);
+ln.buf[pos++] = '?';
 continue;
 			}
 



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

2012-02-06 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Feb  6 10:40:26 UTC 2012

Modified Files:
src/sys/arch/sparc64/sparc64: machdep.c pmap.c

Log Message:
Provide a module_map (16 MB for now) to load modules close to kernel text
and data.

Fixes PR port-sparc64/45895. Ok: releng


To generate a diff of this commit:
cvs rdiff -u -r1.264 -r1.265 src/sys/arch/sparc64/sparc64/machdep.c
cvs rdiff -u -r1.275 -r1.276 src/sys/arch/sparc64/sparc64/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/sparc64/sparc64/machdep.c
diff -u src/sys/arch/sparc64/sparc64/machdep.c:1.264 src/sys/arch/sparc64/sparc64/machdep.c:1.265
--- src/sys/arch/sparc64/sparc64/machdep.c:1.264	Fri Jan 27 18:53:03 2012
+++ src/sys/arch/sparc64/sparc64/machdep.c	Mon Feb  6 10:40:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.264 2012/01/27 18:53:03 para Exp $ */
+/*	$NetBSD: machdep.c,v 1.265 2012/02/06 10:40:26 martin Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -71,10 +71,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.264 2012/01/27 18:53:03 para Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.265 2012/02/06 10:40:26 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
+#include "opt_modular.h"
 #include "opt_compat_netbsd.h"
 #include "opt_compat_svr4.h"
 #include "opt_compat_sunos.h"
@@ -152,6 +153,11 @@ int sigpid = 0;
 #endif
 
 extern vaddr_t avail_end;
+#ifdef MODULAR
+vaddr_t module_start, module_end;
+static struct vm_map module_map_store;
+extern struct vm_map *module_map;
+#endif
 
 int	physmem;
 
@@ -208,6 +214,12 @@ cpu_startup(void)
 #if 0
 	pmap_redzone();
 #endif
+
+#ifdef MODULAR
+	uvm_map_setup(&module_map_store, module_start, module_end, 0);
+	module_map_store.pmap = pmap_kernel();
+	module_map = &module_map_store;
+#endif
 }
 
 /*

Index: src/sys/arch/sparc64/sparc64/pmap.c
diff -u src/sys/arch/sparc64/sparc64/pmap.c:1.275 src/sys/arch/sparc64/sparc64/pmap.c:1.276
--- src/sys/arch/sparc64/sparc64/pmap.c:1.275	Tue Jul 12 07:51:34 2011
+++ src/sys/arch/sparc64/sparc64/pmap.c	Mon Feb  6 10:40:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.275 2011/07/12 07:51:34 mrg Exp $	*/
+/*	$NetBSD: pmap.c,v 1.276 2012/02/06 10:40:26 martin Exp $	*/
 /*
  *
  * Copyright (C) 1996-1999 Eduardo Horvath.
@@ -26,13 +26,14 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.275 2011/07/12 07:51:34 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.276 2012/02/06 10:40:26 martin Exp $");
 
 #undef	NO_VCACHE /* Don't forget the locked TLB in dostart */
 #define	HWREF
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
+#include "opt_modular.h"
 
 #include 
 #include 
@@ -669,6 +670,9 @@ pmap_read_memlist(const char *device, co
 void
 pmap_bootstrap(u_long kernelstart, u_long kernelend)
 {
+#ifdef MODULAR
+	extern vaddr_t module_start, module_end;
+#endif
 	extern char etext[], data_start[];	/* start of data segment */
 	extern int msgbufmapped;
 	struct mem_region *mp, *mp1, *avail, *orig;
@@ -1176,6 +1180,18 @@ pmap_bootstrap(u_long kernelstart, u_lon
 
 	vmmap = (vaddr_t)reserve_dumppages((void *)(u_long)vmmap);
 
+#ifdef MODULAR
+	/*
+	 * Reserve 16 MB of VA for module loading. Right now our full
+	 * GENERIC kernel is about 13 MB, so this looks good enough.
+	 * If we make this bigger, we should adjust the KERNEND and
+	 * associated defines in param.h.
+	 */
+	module_start = vmmap;
+	vmmap += 16 * 1024*1024;
+	module_end = vmmap;
+#endif
+
 	/*
 	 * Set up bounds of allocatable memory for vmstat et al.
 	 */