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

2012-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 16 08:08:25 UTC 2012

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

Log Message:
If we are building an INSTALL kernel and the ramdisk.fs exists in the object
tree, insert it into the kernel.  This needs to be done before the board
frag so it written into the kernel before the uboot images are created.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/evbarm/conf/Makefile.evbarm.inc

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

Modified files:

Index: src/sys/arch/evbarm/conf/Makefile.evbarm.inc
diff -u src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.21 src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.22
--- src/sys/arch/evbarm/conf/Makefile.evbarm.inc:1.21	Sun Mar  6 02:22:27 2011
+++ src/sys/arch/evbarm/conf/Makefile.evbarm.inc	Thu Feb 16 08:08:25 2012
@@ -1,4 +1,18 @@
-#	$NetBSD: Makefile.evbarm.inc,v 1.21 2011/03/06 02:22:27 jakllsch Exp $
+#	$NetBSD: Makefile.evbarm.inc,v 1.22 2012/02/16 08:08:25 matt Exp $
+
+#
+# If this is a install kernel and the ramdisk image exists in the object
+# tree, insert it into the kernel *before* we make the u-boot images.
+#
+.if ${KERNEL_BUILD:T:M*INSTALL} != ""
+RAMDISKDIR!=	cd ${NETBSDSRCDIR}/distrib/${THISARM:T}/instkernel/ramdisk && ${PRINTOBJDIR}
+
+.if exists(${RAMDISKDIR}/ramdisk.fs)
+SYSTEM_LD_TAIL_EXTRA+=; \
+	echo ${TOOL_MDSETIMAGE} -s $@ ${RAMDISKDIR}/ramdisk.fs; \
+	${TOOL_MDSETIMAGE} -s $@ ${RAMDISKDIR}/ramdisk.fs
+.endif
+.endif
 
 .if defined(BOARDMKFRAG)	# Must be a full pathname.
 .include "${BOARDMKFRAG}"



CVS commit: [matt-nb5-mips64] src/sys/ddb

2012-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 16 10:42:52 UTC 2012

Modified Files:
src/sys/ddb [matt-nb5-mips64]: db_xxx.c

Log Message:
Make ps /l also printout the uarea.


To generate a diff of this commit:
cvs rdiff -u -r1.52.4.1 -r1.52.4.1.4.1 src/sys/ddb/db_xxx.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/ddb/db_xxx.c
diff -u src/sys/ddb/db_xxx.c:1.52.4.1 src/sys/ddb/db_xxx.c:1.52.4.1.4.1
--- src/sys/ddb/db_xxx.c:1.52.4.1	Tue Feb 24 04:05:07 2009
+++ src/sys/ddb/db_xxx.c	Thu Feb 16 10:42:51 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_xxx.c,v 1.52.4.1 2009/02/24 04:05:07 snj Exp $	*/
+/*	db_xxx.c,v 1.52.4.1 2009/02/24 04:05:07 snj Exp	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_xxx.c,v 1.52.4.1 2009/02/24 04:05:07 snj Exp $");
+__KERNEL_RCSID(0, "db_xxx.c,v 1.52.4.1 2009/02/24 04:05:07 snj Exp");
 
 #include "opt_kgdb.h"
 
@@ -185,6 +185,7 @@ db_show_all_procs(db_expr_t addr, bool h
 	char db_nbuf[MAXCOMLEN + 1];
 	bool run;
 	int cpuno;
+	int ptrlen = MAX(2 * sizeof(long) + 2, sizeof("STRUCT LWP *")-1);
 
 	if (modif[0] == 0)
 		mode = "l";			/* default == lwp mode */
@@ -202,12 +203,17 @@ db_show_all_procs(db_expr_t addr, bool h
 
 	switch (*mode) {
 	case 'a':
-		db_printf("PID  %10s %18s %18s %18s\n",
-		"COMMAND", "STRUCT PROC *", "UAREA *", "VMSPACE/VM_MAP");
+		db_printf("PID  %10s %*s %*s %*s\n",
+		"COMMAND", ptrlen, "STRUCT PROC *",
+		 ptrlen, "UAREA *",
+		 ptrlen, "VMSPACE/VM_MAP");
 		break;
 	case 'l':
-		db_printf("PID   %4s S %3s %9s %18s %18s %-8s\n",
-		"LID", "CPU", "FLAGS", "STRUCT LWP *", "NAME", "WAIT");
+		db_printf("PID   %4s S %3s %9s %*s %*s %18s %-8s\n",
+		"LID", "CPU", "FLAGS",
+		 ptrlen, "STRUCT LWP *",
+		 ptrlen, "UAREA *",
+		"NAME", "WAIT");
 		break;
 	case 'n':
 		db_printf("PID  %8s %8s %10s S %7s %4s %16s %7s\n",
@@ -234,10 +240,11 @@ db_show_all_procs(db_expr_t addr, bool h
 			switch (*mode) {
 
 			case 'a':
-db_printf("%10.10s %18lx %18lx %18lx\n",
-p->p_comm, (long)p,
-(long)(l != NULL ? l->l_addr : 0),
-(long)p->p_vmspace);
+db_printf("%10.10s %*lx %*lx %*lx\n",
+p->p_comm,
+ptrlen, (long)p,
+ptrlen, (long)(l != NULL ? l->l_addr : 0),
+ptrlen, (long)p->p_vmspace);
 break;
 			case 'l':
  while (l != NULL) {
@@ -255,16 +262,17 @@ db_show_all_procs(db_expr_t addr, bool h
 		cpuno = cpu_index(l->l_cpu);
 	else
 		cpuno = -1;
-	db_printf("%c%4d %d %3d %9x %18lx %18s %-8s\n",
+	db_printf("%c%4d %d %3d %9x %*lx %*lx %18s %-8s\n",
 	(run ? '>' : ' '), l->l_lid,
-	l->l_stat, cpuno, l->l_flag, (long)l,
-	db_nbuf,
+	l->l_stat, cpuno, l->l_flag,
+	ptrlen, (long)l,
+	ptrlen, (long)l->l_addr, db_nbuf,
 	(l->l_wchan && l->l_wmesg) ?
 	l->l_wmesg : "");
 
 	l = LIST_NEXT(l, l_sibling);
 	if (l)
-		db_printf("%11s","");
+		db_printf("%5s","");
 }
 break;
 			case 'n':



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips

2012-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 16 10:44:30 UTC 2012

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: cache_r4k_subr.S

Log Message:
PTR_DSRL -> PTR_DSLL typo


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/mips/mips/cache_r4k_subr.S

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

Modified files:

Index: src/sys/arch/mips/mips/cache_r4k_subr.S
diff -u src/sys/arch/mips/mips/cache_r4k_subr.S:1.1.2.2 src/sys/arch/mips/mips/cache_r4k_subr.S:1.1.2.3
--- src/sys/arch/mips/mips/cache_r4k_subr.S:1.1.2.2	Thu Jan 19 08:28:49 2012
+++ src/sys/arch/mips/mips/cache_r4k_subr.S	Thu Feb 16 10:44:30 2012
@@ -37,7 +37,7 @@
 
 #include 
 
-RCSID("$NetBSD: cache_r4k_subr.S,v 1.1.2.2 2012/01/19 08:28:49 matt Exp $")
+RCSID("$NetBSD: cache_r4k_subr.S,v 1.1.2.3 2012/02/16 10:44:30 matt Exp $")
 
 #include 
 
@@ -103,7 +103,7 @@ STATIC_LEAF_NOPROFILE(OPNAME(doop))
 	beqz	t0, 3f# no more to do?
 	 move	ra, ta0# restore return address
 2:
-	PTR_SRL	t0, INT_SCALESHIFT		# shift to instruction index
+	PTR_SLL	t0, INT_SCALESHIFT		# shift to instruction index
 	PTR_ADDU t9, 32 << INT_SCALESHIFT	# point to end of table
 	PTR_SUBU t9, t0# backup N cacheops
 	jr	t9# and do them.



CVS commit: [matt-nb5-mips64] src/sys/arch/mips

2012-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 16 10:45:17 UTC 2012

Modified Files:
src/sys/arch/mips/include [matt-nb5-mips64]: db_machdep.h
src/sys/arch/mips/mips [matt-nb5-mips64]: db_disasm.c db_interface.c
db_trace.c

Log Message:
Change db_expr_t to an register_t so we can see the full register contents
on N32 kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.22.62.4 -r1.22.62.5 src/sys/arch/mips/include/db_machdep.h
cvs rdiff -u -r1.19.62.3 -r1.19.62.4 src/sys/arch/mips/mips/db_disasm.c
cvs rdiff -u -r1.64.16.23 -r1.64.16.24 src/sys/arch/mips/mips/db_interface.c
cvs rdiff -u -r1.35.38.5 -r1.35.38.6 src/sys/arch/mips/mips/db_trace.c

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

Modified files:

Index: src/sys/arch/mips/include/db_machdep.h
diff -u src/sys/arch/mips/include/db_machdep.h:1.22.62.4 src/sys/arch/mips/include/db_machdep.h:1.22.62.5
--- src/sys/arch/mips/include/db_machdep.h:1.22.62.4	Fri Apr 29 08:26:21 2011
+++ src/sys/arch/mips/include/db_machdep.h	Thu Feb 16 10:45:16 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.22.62.4 2011/04/29 08:26:21 matt Exp $ */
+/* db_machdep.h,v 1.22.62.4 2011/04/29 08:26:21 matt Exp */
 
 /*
  * Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author)
@@ -42,7 +42,7 @@
 
 
 typedef	vaddr_t		db_addr_t;	/* address - unsigned */
-typedef	long		db_expr_t;	/* expression - signed */
+typedef	register_t	db_expr_t;	/* expression - signed */
 
 typedef struct reg db_regs_t;
 

Index: src/sys/arch/mips/mips/db_disasm.c
diff -u src/sys/arch/mips/mips/db_disasm.c:1.19.62.3 src/sys/arch/mips/mips/db_disasm.c:1.19.62.4
--- src/sys/arch/mips/mips/db_disasm.c:1.19.62.3	Fri Apr 29 08:26:24 2011
+++ src/sys/arch/mips/mips/db_disasm.c	Thu Feb 16 10:45:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_disasm.c,v 1.19.62.3 2011/04/29 08:26:24 matt Exp $	*/
+/*	db_disasm.c,v 1.19.62.3 2011/04/29 08:26:24 matt Exp	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.19.62.3 2011/04/29 08:26:24 matt Exp $");
+__KERNEL_RCSID(0, "db_disasm.c,v 1.19.62.3 2011/04/29 08:26:24 matt Exp");
 
 #include 
 #include 
@@ -157,7 +157,7 @@ static void print_addr(db_addr_t);
 db_addr_t
 db_disasm(db_addr_t loc, bool altfmt)
 {
-	u_int32_t instr;
+	uint32_t instr;
 
 	/*
 	 * Take some care with addresses to not UTLB here as it
@@ -172,7 +172,7 @@ db_disasm(db_addr_t loc, bool altfmt)
 		}
 	}
 	else {
-		instr =  *(u_int32_t *)loc;
+		instr =  *(uint32_t *)(intptr_t)loc;
 	}
 
 	return (db_disasm_insn(instr, loc, altfmt));
@@ -596,7 +596,7 @@ print_addr(db_addr_t loc)
 		if (diff == 0)
 			db_printf("%s", symname);
 		else
-			db_printf("<%s+%lx>", symname, diff);
+			db_printf("<%s+%#"PRIxREGISTER">", symname, diff);
 		db_printf("\t[addr:%#"PRIxVADDR"]", loc);
 	} else {
 		db_printf("%#"PRIxVADDR, loc);

Index: src/sys/arch/mips/mips/db_interface.c
diff -u src/sys/arch/mips/mips/db_interface.c:1.64.16.23 src/sys/arch/mips/mips/db_interface.c:1.64.16.24
--- src/sys/arch/mips/mips/db_interface.c:1.64.16.23	Thu May 26 19:21:56 2011
+++ src/sys/arch/mips/mips/db_interface.c	Thu Feb 16 10:45:17 2012
@@ -266,7 +266,7 @@ db_kvtophys_cmd(db_expr_t addr, bool hav
 		 * Cast the physical address -- some platforms, while
 		 * being ILP32, may be using 64-bit paddr_t's.
 		 */
-		db_printf("0x%lx -> 0x%" PRIx64 "\n", addr,
+		db_printf("%#"PRIxPTR" -> 0x%" PRIx64 "\n", (intptr_t) addr,
 		(uint64_t) kvtophys(addr));
 	} else
 		printf("not a kernel virtual address\n");
@@ -672,7 +672,7 @@ db_mfcr_cmd(db_expr_t addr, bool have_ad
 		".set pop 			\n\t"			\
 	: "=r"(value) : "r"(addr));
 	
-	db_printf("control reg 0x%lx = 0x%" PRIx64 "\n", addr, value);
+	db_printf("control reg %#"PRIx64" = %#" PRIx64 "\n", addr, value);
 }
 
 void
@@ -702,7 +702,7 @@ db_mtcr_cmd(db_expr_t addr, bool have_ad
 		".set pop 			\n\t"			\
 	:: "r"(value), "r"(addr));
 
-	db_printf("control reg 0x%lx = 0x%lx\n", addr, value);
+	db_printf("control reg %#"PRIx64" = %#"PRIx64"\n", addr, value);
 }
 #endif /* (MIPS64_RMIXL + MIPS64R2_RMIXL) > 0 */
 

Index: src/sys/arch/mips/mips/db_trace.c
diff -u src/sys/arch/mips/mips/db_trace.c:1.35.38.5 src/sys/arch/mips/mips/db_trace.c:1.35.38.6
--- src/sys/arch/mips/mips/db_trace.c:1.35.38.5	Fri Apr 29 08:26:25 2011
+++ src/sys/arch/mips/mips/db_trace.c	Thu Feb 16 10:45:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_trace.c,v 1.35.38.5 2011/04/29 08:26:25 matt Exp $	*/
+/*	db_trace.c,v 1.35.38.5 2011/04/29 08:26:25 matt Exp	*/
 
 /*
  * Mach Operating System
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.35.38.5 2011/04/29 08:26:25 matt Exp $");
+__KERNEL_RCSID(0, "db_trace.c,v 1.35.38.5 2011/04/29 08:26:25 matt Exp");
 
 #include "opt_ddb.h"
 
@@ -169,7 +169,7 @@ db_stack_trace_print(db_expr_t addr, boo
 	}
 
 	if (lwpaddr) {
-		l = (struct lwp *)addr;

CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips

2012-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 16 10:47:07 UTC 2012

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: cpu_subr.c

Log Message:
When booting a N32 MP kernel, make sure to setup the ksegx mapping.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.23 -r1.1.2.24 src/sys/arch/mips/mips/cpu_subr.c

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

Modified files:

Index: src/sys/arch/mips/mips/cpu_subr.c
diff -u src/sys/arch/mips/mips/cpu_subr.c:1.1.2.23 src/sys/arch/mips/mips/cpu_subr.c:1.1.2.24
--- src/sys/arch/mips/mips/cpu_subr.c:1.1.2.23	Thu Jan 19 08:28:49 2012
+++ src/sys/arch/mips/mips/cpu_subr.c	Thu Feb 16 10:47:06 2012
@@ -141,7 +141,7 @@ cpu_info_alloc(struct pmap_tlb_info *ti,
 		const size_t ti_size = roundup2(sizeof(*ti), COHERENCY_UNIT)
 		+ 2*COHERENCY_UNIT;
 		if (cpu_info_offset >= ti_size) {
-			ti = (void *) va;
+			ti = (void *) (va + cpu_info_offset - ti_size);
 		} else {
 			KASSERT(PAGE_SIZE - cpu_info_offset + sizeof(*ci) >= ti_size);
 			ti = (struct pmap_tlb_info *)(va + PAGE_SIZE - ti_size);
@@ -930,6 +930,10 @@ cpu_hatch(struct cpu_info *ci)
 	tlb_invalidate_all();
 	mips3_cp0_wired_write(ti->ti_wired);
 
+#ifdef ENABLE_MIPS_KSEGX
+	pmap_ksegx_bootstrap();
+#endif
+
 	/*
 	 * Setup HWRENA and USERLOCAL COP0 registers (MIPSxxR2).
 	 */



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2012-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 16 10:48:39 UTC 2012

Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_machdep.c

Log Message:
Add mips_ksegx_tlb_slot.
When casting pointers, use intptr_t so we get proper sign extension.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/arch/mips/rmi/rmixl_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/mips/rmi/rmixl_machdep.c
diff -u src/sys/arch/mips/rmi/rmixl_machdep.c:1.1.2.3 src/sys/arch/mips/rmi/rmixl_machdep.c:1.1.2.4
--- src/sys/arch/mips/rmi/rmixl_machdep.c:1.1.2.3	Thu Feb  2 00:21:00 2012
+++ src/sys/arch/mips/rmi/rmixl_machdep.c	Thu Feb 16 10:48:39 2012
@@ -204,6 +204,7 @@ struct rmixl_config rmixl_configuration 
 #ifdef ENABLE_MIPS_KSEGX
 pt_entry_t mips_ksegx_pte;
 paddr_t mips_ksegx_start;
+int mips_ksegx_tlb_slot = -1;
 #endif
 
 /*
@@ -847,7 +848,7 @@ rmixl_fixup_curcpu(void)
 			 * just change the instruction bits around it.
 			 */
 			*insnp = insn ^ LOAD_CURCPU ^ MFC0_CURCPU;
-			mips_icache_sync_range((vaddr_t)insnp, 4);
+			mips_icache_sync_range((intptr_t)insnp, 4);
 		}
 	}
 }



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips

2012-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 16 10:51:33 UTC 2012

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: mips_fixup.c

Log Message:
Use (intptr_t) when casting pointers to get proper sign extension.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.13 -r1.1.2.14 src/sys/arch/mips/mips/mips_fixup.c

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

Modified files:

Index: src/sys/arch/mips/mips/mips_fixup.c
diff -u src/sys/arch/mips/mips/mips_fixup.c:1.1.2.13 src/sys/arch/mips/mips/mips_fixup.c:1.1.2.14
--- src/sys/arch/mips/mips/mips_fixup.c:1.1.2.13	Thu Feb  9 20:01:21 2012
+++ src/sys/arch/mips/mips/mips_fixup.c	Thu Feb 16 10:51:33 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_fixup.c,v 1.1.2.13 2012/02/09 20:01:21 matt Exp $	*/
+/*	mips_fixup.c,v 1.1.2.13 2012/02/09 20:01:21 matt Exp	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mips_fixup.c,v 1.1.2.13 2012/02/09 20:01:21 matt Exp $");
+__KERNEL_RCSID(0, "mips_fixup.c,v 1.1.2.13 2012/02/09 20:01:21 matt Exp");
 
 #include "opt_mips3_wired.h"
 #include "opt_multiprocessor.h"
@@ -138,9 +138,9 @@ mips_fixup_exceptions(mips_fixup_callbac
 	}
 
 	if (fixed)
-		mips_icache_sync_range((vaddr_t)start,
+		mips_icache_sync_range((intptr_t)start,
 		   sizeof(start[0]) * (end - start));
-		
+
 	return fixed;
 }
 



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/include

2012-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 16 10:52:13 UTC 2012

Modified Files:
src/sys/arch/mips/include [matt-nb5-mips64]: vmparam.h

Log Message:
Add extern int mips_ksegx_tlb_slot;


To generate a diff of this commit:
cvs rdiff -u -r1.41.28.26 -r1.41.28.27 src/sys/arch/mips/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/mips/include/vmparam.h
diff -u src/sys/arch/mips/include/vmparam.h:1.41.28.26 src/sys/arch/mips/include/vmparam.h:1.41.28.27
--- src/sys/arch/mips/include/vmparam.h:1.41.28.26	Thu Feb  9 03:14:45 2012
+++ src/sys/arch/mips/include/vmparam.h	Thu Feb 16 10:52:13 2012
@@ -217,6 +217,7 @@
 extern int mips_poolpage_vmfreelist;
 #ifdef ENABLE_MIPS_KSEGX
 extern paddr_t mips_ksegx_start;
+extern int mips_ksegx_tlb_slot;
 #endif
 #endif
 



CVS commit: src/sys/uvm

2012-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 16 11:46:15 UTC 2012

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

Log Message:
Add KASSERTs to uvm_pagealloc_pgfl to verify the page is actually free and has
the contents that it should.
Redo the KASSERTs for the pageq in uvm_pagefree.


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 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.181 src/sys/uvm/uvm_page.c:1.182
--- src/sys/uvm/uvm_page.c:1.181	Thu Feb  2 19:43:08 2012
+++ src/sys/uvm/uvm_page.c	Thu Feb 16 11:46:14 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.c,v 1.181 2012/02/02 19:43:08 tls Exp $	*/
+/*	$NetBSD: uvm_page.c,v 1.182 2012/02/16 11:46:14 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.181 2012/02/02 19:43:08 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.182 2012/02/16 11:46:14 matt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvmhist.h"
@@ -1126,6 +1126,10 @@ uvm_pagealloc_pgfl(struct uvm_cpu *ucpu,
 		/* cpu, try1 */
 		if ((pg = LIST_FIRST((freeq =
 		&pgfl->pgfl_buckets[color].pgfl_queues[try1]))) != NULL) {
+			KASSERT(pg->pqflags & PQ_FREE);
+			KASSERT(try1 == PGFL_ZEROS || !(pg->flags & PG_ZERO));
+			KASSERT(try1 == PGFL_UNKNOWN || (pg->flags & PG_ZERO));
+			KASSERT(ucpu == VM_FREE_PAGE_TO_CPU(pg));
 			VM_FREE_PAGE_TO_CPU(pg)->pages[try1]--;
 			uvmexp.cpuhit++;
 			goto gotit;
@@ -1133,6 +1137,10 @@ uvm_pagealloc_pgfl(struct uvm_cpu *ucpu,
 		/* global, try1 */
 		if ((pg = LIST_FIRST((freeq =
 		&gpgfl->pgfl_buckets[color].pgfl_queues[try1]))) != NULL) {
+			KASSERT(pg->pqflags & PQ_FREE);
+			KASSERT(try1 == PGFL_ZEROS || !(pg->flags & PG_ZERO));
+			KASSERT(try1 == PGFL_UNKNOWN || (pg->flags & PG_ZERO));
+			KASSERT(ucpu != VM_FREE_PAGE_TO_CPU(pg));
 			VM_FREE_PAGE_TO_CPU(pg)->pages[try1]--;
 			uvmexp.cpumiss++;
 			goto gotit;
@@ -1140,6 +1148,10 @@ uvm_pagealloc_pgfl(struct uvm_cpu *ucpu,
 		/* cpu, try2 */
 		if ((pg = LIST_FIRST((freeq =
 		&pgfl->pgfl_buckets[color].pgfl_queues[try2]))) != NULL) {
+			KASSERT(pg->pqflags & PQ_FREE);
+			KASSERT(try2 == PGFL_ZEROS || !(pg->flags & PG_ZERO));
+			KASSERT(try2 == PGFL_UNKNOWN || (pg->flags & PG_ZERO));
+			KASSERT(ucpu == VM_FREE_PAGE_TO_CPU(pg));
 			VM_FREE_PAGE_TO_CPU(pg)->pages[try2]--;
 			uvmexp.cpuhit++;
 			goto gotit;
@@ -1147,6 +1159,10 @@ uvm_pagealloc_pgfl(struct uvm_cpu *ucpu,
 		/* global, try2 */
 		if ((pg = LIST_FIRST((freeq =
 		&gpgfl->pgfl_buckets[color].pgfl_queues[try2]))) != NULL) {
+			KASSERT(pg->pqflags & PQ_FREE);
+			KASSERT(try2 == PGFL_ZEROS || !(pg->flags & PG_ZERO));
+			KASSERT(try2 == PGFL_UNKNOWN || (pg->flags & PG_ZERO));
+			KASSERT(ucpu != VM_FREE_PAGE_TO_CPU(pg));
 			VM_FREE_PAGE_TO_CPU(pg)->pages[try2]--;
 			uvmexp.cpumiss++;
 			goto gotit;
@@ -1486,7 +1502,7 @@ uvm_pagefree(struct vm_page *pg)
 
 	KASSERT((pg->flags & PG_PAGEOUT) == 0);
 	KASSERT(!(pg->pqflags & PQ_FREE));
-	KASSERT(mutex_owned(&uvm_pageqlock) || !uvmpdpol_pageisqueued_p(pg));
+	//KASSERT(mutex_owned(&uvm_pageqlock) || !uvmpdpol_pageisqueued_p(pg));
 	KASSERT(pg->uobject == NULL || mutex_owned(pg->uobject->vmobjlock));
 	KASSERT(pg->uobject != NULL || pg->uanon == NULL ||
 		mutex_owned(pg->uanon->an_lock));
@@ -1532,6 +1548,7 @@ uvm_pagefree(struct vm_page *pg)
 		if (pg->loan_count) {
 			KASSERT(pg->uobject == NULL);
 			if (pg->uanon == NULL) {
+KASSERT(mutex_owned(&uvm_pageqlock));
 uvm_pagedequeue(pg);
 			}
 			return;
@@ -1552,8 +1569,10 @@ uvm_pagefree(struct vm_page *pg)
 	/*
 	 * now remove the page from the queues.
 	 */
-
-	uvm_pagedequeue(pg);
+	if (uvmpdpol_pageisqueued_p(pg)) {
+		KASSERT(mutex_owned(&uvm_pageqlock));
+		uvm_pagedequeue(pg);
+	}
 
 	/*
 	 * if the page was wired, unwire it now.



CVS commit: src/share/man/man9

2012-02-16 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Thu Feb 16 12:10:10 UTC 2012

Modified Files:
src/share/man/man9: pmap.9

Log Message:
fix a description of PMAP_PREFER argument.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/share/man/man9/pmap.9

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

Modified files:

Index: src/share/man/man9/pmap.9
diff -u src/share/man/man9/pmap.9:1.43 src/share/man/man9/pmap.9:1.44
--- src/share/man/man9/pmap.9:1.43	Tue Jul  6 20:50:33 2010
+++ src/share/man/man9/pmap.9	Thu Feb 16 12:10:10 2012
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pmap.9,v 1.43 2010/07/06 20:50:33 cegger Exp $
+.\"	$NetBSD: pmap.9,v 1.44 2012/02/16 12:10:10 yamt Exp $
 .\"
 .\" Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd November 4, 2009
+.Dd February 16, 2012
 .Dt PMAP 9
 .Os
 .Sh NAME
@@ -1099,7 +1099,7 @@ will be advanced.
 .Fa hint
 is an object offset which will be mapped into the resulting virtual address, and
 .Fa sz
-is size of the object.
+is size of the region being mapped in bytes.
 .Fa td
 indicates if the machine dependent pmap uses the topdown VM.
 .Pp



CVS commit: src/distrib/sets/lists

2012-02-16 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Feb 16 12:29:12 UTC 2012

Modified Files:
src/distrib/sets/lists/base: mi
src/distrib/sets/lists/man: mi

Log Message:
Fix tags in set lists for window removal.


To generate a diff of this commit:
cvs rdiff -u -r1.985 -r1.986 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.1380 -r1.1381 src/distrib/sets/lists/man/mi

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.985 src/distrib/sets/lists/base/mi:1.986
--- src/distrib/sets/lists/base/mi:1.985	Thu Feb 16 04:52:49 2012
+++ src/distrib/sets/lists/base/mi	Thu Feb 16 12:29:11 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.985 2012/02/16 04:52:49 jmmv Exp $
+# $NetBSD: mi,v 1.986 2012/02/16 12:29:11 wiz Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -742,7 +742,7 @@
 ./usr/bin/who	base-util-bin
 ./usr/bin/whoamibase-util-bin
 ./usr/bin/whois	base-netutil-bin
-./usr/bin/windowbase-util-bin		obsolete
+./usr/bin/windowbase-obsolete		obsolete
 ./usr/bin/write	base-util-bin
 ./usr/bin/xargs	base-util-bin
 ./usr/bin/xz	base-util-bin

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1380 src/distrib/sets/lists/man/mi:1.1381
--- src/distrib/sets/lists/man/mi:1.1380	Thu Feb 16 04:52:50 2012
+++ src/distrib/sets/lists/man/mi	Thu Feb 16 12:29:11 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1380 2012/02/16 04:52:50 jmmv Exp $
+# $NetBSD: mi,v 1.1381 2012/02/16 12:29:11 wiz Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -573,7 +573,7 @@
 ./usr/share/man/cat1/who.0			man-util-catman		.cat
 ./usr/share/man/cat1/whoami.0			man-util-catman		.cat
 ./usr/share/man/cat1/whois.0			man-netutil-catman	.cat
-./usr/share/man/cat1/window.0			man-util-catman		obsolete
+./usr/share/man/cat1/window.0			man-obsolete		obsolete
 ./usr/share/man/cat1/write.0			man-util-catman		.cat
 ./usr/share/man/cat1/x68k/aout2hux.0		man-util-catman		.cat
 ./usr/share/man/cat1/x68k/bellctrl.0		man-util-catman		.cat
@@ -3494,7 +3494,7 @@
 ./usr/share/man/html1/who.html			man-util-htmlman	html
 ./usr/share/man/html1/whoami.html		man-util-htmlman	html
 ./usr/share/man/html1/whois.html		man-netutil-htmlman	html
-./usr/share/man/html1/window.html		man-util-htmlman	obsolete
+./usr/share/man/html1/window.html		man-obsolete	obsolete
 ./usr/share/man/html1/write.html		man-util-htmlman	html
 ./usr/share/man/html1/x68k/aout2hux.html	man-util-htmlman	html
 ./usr/share/man/html1/x68k/bellctrl.html	man-util-htmlman	html
@@ -6080,7 +6080,7 @@
 ./usr/share/man/man1/who.1			man-util-man		.man
 ./usr/share/man/man1/whoami.1			man-util-man		.man
 ./usr/share/man/man1/whois.1			man-netutil-man		.man
-./usr/share/man/man1/window.1			man-util-man		obsolete
+./usr/share/man/man1/window.1			man-obsolete		obsolete
 ./usr/share/man/man1/write.1			man-util-man		.man
 ./usr/share/man/man1/x68k/aout2hux.1		man-util-man		.man
 ./usr/share/man/man1/x68k/bellctrl.1		man-util-man		.man



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

2012-02-16 Thread Thomas Klausner
Module Name:othersrc
Committed By:   wiz
Date:   Thu Feb 16 14:05:16 UTC 2012

Modified Files:
othersrc/external/bsd/httpdev/dist: httpdev.8

Log Message:
The default blocksize is 4096 bytes.


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

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

Modified files:

Index: othersrc/external/bsd/httpdev/dist/httpdev.8
diff -u othersrc/external/bsd/httpdev/dist/httpdev.8:1.3 othersrc/external/bsd/httpdev/dist/httpdev.8:1.4
--- othersrc/external/bsd/httpdev/dist/httpdev.8:1.3	Thu Feb 16 04:06:57 2012
+++ othersrc/external/bsd/httpdev/dist/httpdev.8	Thu Feb 16 14:05:15 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: httpdev.8,v 1.3 2012/02/16 04:06:57 agc Exp $
+.\" $NetBSD: httpdev.8,v 1.4 2012/02/16 14:05:15 wiz Exp $
 .\"
 .\" Copyright (c) 2012 Alistair Crooks 
 .\" All rights reserved.
@@ -81,7 +81,7 @@ argument allows the name of the subdirec
 The
 .Fl b Ar blocksize
 argument sets the number of bytes which will be done in one HTTP request.
-The default blocksize is 512 bytes.
+The default blocksize is 4096 bytes.
 .Sh EXAMPLES
 .Bd -literal
 # httpdev http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/201202061530Z/iso/NetBSD-5.99.64-amd64.iso /mnt \*[Am]



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

2012-02-16 Thread Thomas Klausner
Module Name:othersrc
Committed By:   wiz
Date:   Thu Feb 16 14:52:03 UTC 2012

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

Log Message:
Document -n.


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

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

Modified files:

Index: othersrc/external/bsd/circa/dist/circa.1
diff -u othersrc/external/bsd/circa/dist/circa.1:1.2 othersrc/external/bsd/circa/dist/circa.1:1.3
--- othersrc/external/bsd/circa/dist/circa.1:1.2	Thu May 12 08:40:24 2011
+++ othersrc/external/bsd/circa/dist/circa.1	Thu Feb 16 14:52:03 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: circa.1,v 1.2 2011/05/12 08:40:24 wiz Exp $
+.\" $NetBSD: circa.1,v 1.3 2012/02/16 14:52:03 wiz Exp $
 .\"
 .\" Copyright (c) 2011 Alistair Crooks 
 .\" All rights reserved.
@@ -23,7 +23,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd April 28, 2011
+.Dd February 16, 2012
 .Dt CIRCA 1
 .Os
 .Sh NAME
@@ -31,7 +31,7 @@
 .Nd Data protection and integrity utility
 .Sh SYNOPSIS
 .Nm
-.Fl dv
+.Fl dnv
 .Op Fl o Ar filename
 .Op Fl s Ar sector-size
 .Op Ar file ...
@@ -55,6 +55,8 @@ The following options are available:
 Decode the file(s) given, or
 .Dv stdin
 if no files were specified.
+.It Fl n
+Do not write a circa-header to the output file.
 .It Fl o Ar output-file
 Use the specified file for output.
 By default, output will go to



CVS commit: src/usr.bin/xlint/arch/hppa

2012-02-16 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Feb 16 16:27:15 UTC 2012

Modified Files:
src/usr.bin/xlint/arch/hppa: targparam.h

Log Message:
Correct LDOUBLE_SIZE


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/xlint/arch/hppa/targparam.h

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

Modified files:

Index: src/usr.bin/xlint/arch/hppa/targparam.h
diff -u src/usr.bin/xlint/arch/hppa/targparam.h:1.3 src/usr.bin/xlint/arch/hppa/targparam.h:1.4
--- src/usr.bin/xlint/arch/hppa/targparam.h:1.3	Wed Jan 26 09:04:49 2005
+++ src/usr.bin/xlint/arch/hppa/targparam.h	Thu Feb 16 16:27:15 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: targparam.h,v 1.3 2005/01/26 09:04:49 christos Exp $	*/
+/*	$NetBSD: targparam.h,v 1.4 2012/02/16 16:27:15 skrll Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -49,6 +49,6 @@
 
 #define	FLOAT_SIZE		(4 * CHAR_BIT)
 #define	DOUBLE_SIZE		(8 * CHAR_BIT)
-#define	LDOUBLE_SIZE		(12 * CHAR_BIT) /* XXX double-check */
+#define	LDOUBLE_SIZE		(8 * CHAR_BIT)
 
 #define	ENUM_SIZE		(4 * CHAR_BIT)



CVS commit: src/sys/conf

2012-02-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 16 17:25:35 UTC 2012

Modified Files:
src/sys/conf: osrelease.sh

Log Message:
Don't eat _BETA. I am sure dsl will come up with something more elegant.


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 src/sys/conf/osrelease.sh

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

Modified files:

Index: src/sys/conf/osrelease.sh
diff -u src/sys/conf/osrelease.sh:1.120 src/sys/conf/osrelease.sh:1.121
--- src/sys/conf/osrelease.sh:1.120	Sun Nov 15 13:41:08 2009
+++ src/sys/conf/osrelease.sh	Thu Feb 16 12:25:35 2012
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: osrelease.sh,v 1.120 2009/11/15 18:41:08 dsl Exp $
+#	$NetBSD: osrelease.sh,v 1.121 2012/02/16 17:25:35 christos Exp $
 #
 # Copyright (c) 1997 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -67,9 +67,11 @@ rel_mm=${rel_MMmm#${rel_MM}}
 # Get patch from text version
 IFS=.
 set -- - $rel_text
+beta=${3#[0-9]}
+beta=${beta#[0-9]}
 shift 3
 IFS=' '
-set -- $rel_MM ${rel_mm#0} $*
+set -- $rel_MM ${rel_mm#0}$beta $*
 
 case "$option" in
 -m)



CVS commit: src/sys/dev/wscons

2012-02-16 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Feb 16 17:29:21 UTC 2012

Modified Files:
src/sys/dev/wscons: files.wscons
Added Files:
src/sys/dev/wscons: wsdisplay_glyphcache.c wsdisplay_glyphcachevar.h

Log Message:
generic support for caching glyphs in video memory
for speeding up anti-aliased fonts on slow CPUs


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/wscons/files.wscons
cvs rdiff -u -r0 -r1.1 src/sys/dev/wscons/wsdisplay_glyphcache.c \
src/sys/dev/wscons/wsdisplay_glyphcachevar.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/wscons/files.wscons
diff -u src/sys/dev/wscons/files.wscons:1.45 src/sys/dev/wscons/files.wscons:1.46
--- src/sys/dev/wscons/files.wscons:1.45	Wed Jun 29 03:09:37 2011
+++ src/sys/dev/wscons/files.wscons	Thu Feb 16 17:29:21 2012
@@ -1,4 +1,4 @@
-# $NetBSD: files.wscons,v 1.45 2011/06/29 03:09:37 macallan Exp $
+# $NetBSD: files.wscons,v 1.46 2012/02/16 17:29:21 macallan Exp $
 
 #
 # "Workstation Console" glue; attaches frame buffer to emulator & keyboard,
@@ -77,3 +77,7 @@ defflag opt_tpcalib.h		TPCALIBDEBUG
 file	dev/wscons/wsdisplay_vcons.c		vcons
 file	dev/wscons/wsdisplay_vcons_util.c	vcons
 defflag	opt_vcons.h		VCONS_DRAW_INTR VCONS_INTR_DEBUG
+
+# generic support code for caching rendered glyphs in video memory
+define	glyphcache
+file	dev/wscons/wsdisplay_glyphcache.c	glyphcache

Added files:

Index: src/sys/dev/wscons/wsdisplay_glyphcache.c
diff -u /dev/null src/sys/dev/wscons/wsdisplay_glyphcache.c:1.1
--- /dev/null	Thu Feb 16 17:29:21 2012
+++ src/sys/dev/wscons/wsdisplay_glyphcache.c	Thu Feb 16 17:29:21 2012
@@ -0,0 +1,118 @@
+/*	$NetBSD: wsdisplay_glyphcache.c,v 1.1 2012/02/16 17:29:21 macallan Exp $	*/
+
+/*
+ * Copyright (c) 2012 Michael Lorenz
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* 
+ * a simple glyph cache in offscreen memory
+ * For now it only caches glyphs with the default attribute ( assuming they're
+ * the most commonly used glyphs ) but the API should at least not prevent
+ * more sophisticated caching algorithms
+ */
+
+#include 
+#include 
+#include 
+
+/* first line, lines, width, attr */
+int
+glyphcache_init(glyphcache *gc, int first, int lines, int width,
+int cellwidth, int cellheight, long attr)
+{
+	int cache_lines;
+
+	gc->gc_cellwidth = cellwidth;
+	gc->gc_cellheight = cellheight;
+	gc->gc_firstline = first;
+	gc->gc_cellsperline = width / cellwidth;
+	cache_lines = lines / cellheight;
+	gc->gc_numcells = cache_lines * gc->gc_cellsperline;
+	if (gc->gc_numcells > 256)
+		gc->gc_numcells = 256;
+	gc->gc_attr = attr;
+	glyphcache_wipe(gc);
+	return 0;
+}
+
+void
+glyphcache_wipe(glyphcache *gc)
+{
+	int i;
+
+	gc->gc_usedcells = 0;
+	for (i = 0; i < 256; i++)
+		gc->gc_map[i] = -1;
+}
+
+/*
+ * add a glyph drawn at (x,y) to the cache as (c)
+ * call this only if glyphcache_try() returned GC_ADD
+ * caller or gc_bitblt must make sure the glyph is actually completely drawn
+ */
+int
+glyphcache_add(glyphcache *gc, int c, int x, int y)
+{
+	int cell;
+	int cx, cy;
+
+	if (gc->gc_map[c] != -1)
+		return EINVAL;
+	if (gc->gc_usedcells >= gc->gc_numcells)
+		return ENOMEM;
+	cell = atomic_add_int_nv(&gc->gc_usedcells, 1) - 1;
+	gc->gc_map[c] = cell;
+	cy = gc->gc_firstline +
+	(cell / gc->gc_cellsperline) * gc->gc_cellheight;
+	cx = (cell % gc->gc_cellsperline) * gc->gc_cellwidth;
+	gc->gc_bitblt(gc->gc_blitcookie, x, y, cx, cy,
+	gc->gc_cellwidth, gc->gc_cellheight, gc->gc_rop);
+	return 0;
+}
+
+/*
+ * check if (c) is in the cache, if so draw it at (x,y)
+ * return:
+ * - GC_OK when the glyph was found
+ * - GC_ADD when the g

CVS commit: src/sys/dev/pci

2012-02-16 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Feb 16 17:33:28 UTC 2012

Modified Files:
src/sys/dev/pci: files.pci r128fb.c radeonfb.c radeonfbvar.h

Log Message:
cache glyphs in video memory when using anti-aliased fonts on r128fb and
radeonfb


To generate a diff of this commit:
cvs rdiff -u -r1.354 -r1.355 src/sys/dev/pci/files.pci
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/pci/r128fb.c
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/pci/radeonfb.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/radeonfbvar.h

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

Modified files:

Index: src/sys/dev/pci/files.pci
diff -u src/sys/dev/pci/files.pci:1.354 src/sys/dev/pci/files.pci:1.355
--- src/sys/dev/pci/files.pci:1.354	Tue Jan 24 01:58:40 2012
+++ src/sys/dev/pci/files.pci	Thu Feb 16 17:33:28 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.pci,v 1.354 2012/01/24 01:58:40 rkujawa Exp $
+#	$NetBSD: files.pci,v 1.355 2012/02/16 17:33:28 macallan Exp $
 #
 # Config file and device description for machine-independent PCI code.
 # Included by ports that need it.  Requires that the SCSI files be
@@ -837,7 +837,7 @@ file	dev/pci/unichromefb.c		unichromefb 
 
 # ATI Radeon framebuffer console driver
 # (Note: to enable the BIOS parser, add options RADEON_BIOS_INIT to the config)
-device	radeonfb: wsemuldisplaydev, videomode, rasops8, rasops32, vcons, splash, i2cbus, i2c_bitbang, ddc_read_edid, edid, drm
+device	radeonfb: wsemuldisplaydev, videomode, rasops8, rasops32, vcons, splash, i2cbus, i2c_bitbang, ddc_read_edid, edid, drm, glyphcache
 attach	radeonfb at pci
 file	dev/pci/radeonfb.c	radeonfb
 file	dev/pci/radeonfb_i2c.c	radeonfb
@@ -980,7 +980,7 @@ attach	ichsmb at pci
 file	dev/pci/ichsmb.c		ichsmb
 
 # ATI Rage 128 framebuffer console driver
-device	r128fb: wsemuldisplaydev, rasops8, rasops32, vcons, videomode, i2cbus, i2c_bitbang
+device	r128fb: wsemuldisplaydev, rasops8, rasops32, vcons, videomode, i2cbus, i2c_bitbang, glyphcache
 attach	r128fb at pci
 file	dev/pci/r128fb.c		r128fb
 defflag	opt_r128fb.h	R128FB_DEBUG
@@ -1041,7 +1041,7 @@ defflag	opt_voyager.h	VOYAGER_DEBUG
 include "dev/pci/hdaudio/files.hdaudio"
 
 # Permedia 2 / Sun PGX32 / Raptor
-device	pm2fb: wsemuldisplaydev, rasops8, vcons, videomode, i2cbus, i2c_bitbang
+device	pm2fb: wsemuldisplaydev, rasops8, rasops32, vcons, videomode, i2cbus, i2c_bitbang, ddc_read_edid, edid
 attach	pm2fb at pci
 file	dev/pci/pm2fb.c		pm2fb
 defflag	opt_pm2fb.h	PM2FB_DEBUG

Index: src/sys/dev/pci/r128fb.c
diff -u src/sys/dev/pci/r128fb.c:1.28 src/sys/dev/pci/r128fb.c:1.29
--- src/sys/dev/pci/r128fb.c:1.28	Mon Jan 30 19:41:22 2012
+++ src/sys/dev/pci/r128fb.c	Thu Feb 16 17:33:28 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: r128fb.c,v 1.28 2012/01/30 19:41:22 drochner Exp $	*/
+/*	$NetBSD: r128fb.c,v 1.29 2012/02/16 17:33:28 macallan Exp $	*/
 
 /*
  * Copyright (c) 2007 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.28 2012/01/30 19:41:22 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.29 2012/02/16 17:33:28 macallan Exp $");
 
 #include 
 #include 
@@ -55,6 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -93,6 +94,7 @@ struct r128fb_softc {
 	u_char sc_cmap_blue[256];
 	/* engine stuff */
 	uint32_t sc_master_cntl;
+	glyphcache sc_gc;
 };
 
 static int	r128fb_match(device_t, cfdata_t, void *);
@@ -118,7 +120,7 @@ static void	r128fb_init(struct r128fb_so
 static void	r128fb_flush_engine(struct r128fb_softc *);
 static void	r128fb_rectfill(struct r128fb_softc *, int, int, int, int,
 			uint32_t);
-static void	r128fb_bitblt(struct r128fb_softc *, int, int, int, int, int,
+static void	r128fb_bitblt(void *, int, int, int, int, int,
 			int, int);
 
 static void	r128fb_cursor(void *, int, int, int);
@@ -309,6 +311,9 @@ r128fb_attach(device_t parent, device_t 
 		}
 	}
 
+	sc->sc_gc.gc_bitblt = r128fb_bitblt;
+	sc->sc_gc.gc_blitcookie = sc;
+	sc->sc_gc.gc_rop = R128_ROP3_S;
 	if (is_console) {
 		vcons_init_screen(&sc->vd, &sc->sc_console_screen, 1,
 		&defattr);
@@ -320,6 +325,12 @@ r128fb_attach(device_t parent, device_t 
 		sc->sc_defaultscreen_descr.capabilities = ri->ri_caps;
 		sc->sc_defaultscreen_descr.nrows = ri->ri_rows;
 		sc->sc_defaultscreen_descr.ncols = ri->ri_cols;
+		glyphcache_init(&sc->sc_gc, sc->sc_height,
+sc->sc_width,
+(0x80 / sc->sc_stride) - sc->sc_height,
+ri->ri_font->fontwidth,
+ri->ri_font->fontheight,
+defattr);
 		wsdisplay_cnattach(&sc->sc_defaultscreen_descr, ri, 0, 0,
 		defattr);
 		vcons_replay_msgbuf(&sc->sc_console_screen);
@@ -329,6 +340,12 @@ r128fb_attach(device_t parent, device_t 
 		 * until someone actually allocates a screen for us
 		 */
 		(*ri->ri_ops.allocattr)(ri, 0, 0, 0, &defattr);
+		glyphcache_init(&sc->sc_gc, sc->sc_height,
+sc->sc_width,
+(0x80 / sc->sc_stride) - sc->sc_height,
+ri->ri_font

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

2012-02-16 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Feb 16 18:40:31 UTC 2012

Modified Files:
src/distrib/sets/lists/comp: mi

Log Message:
window.debug is now obsolete.


To generate a diff of this commit:
cvs rdiff -u -r1.1738 -r1.1739 src/distrib/sets/lists/comp/mi

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1738 src/distrib/sets/lists/comp/mi:1.1739
--- src/distrib/sets/lists/comp/mi:1.1738	Wed Feb 15 17:55:15 2012
+++ src/distrib/sets/lists/comp/mi	Thu Feb 16 18:40:29 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1738 2012/02/15 17:55:15 riz Exp $
+#	$NetBSD: mi,v 1.1739 2012/02/16 18:40:29 njoly Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3892,7 +3892,7 @@
 ./usr/libdata/debug/usr/bin/whereis.debug	comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/who.debug		comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/whois.debug		comp-netutil-debug	debug
-./usr/libdata/debug/usr/bin/window.debug	comp-util-debug		debug
+./usr/libdata/debug/usr/bin/window.debug	comp-obsolete		obsolete
 ./usr/libdata/debug/usr/bin/write.debug		comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/xargs.debug		comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/xgettext.debug	comp-c-debug		debug



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi

2012-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 16 18:57:16 UTC 2012

Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_fmnvar.h

Log Message:
enable_cp2 needs a early clobber


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/arch/mips/rmi/rmixl_fmnvar.h

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

Modified files:

Index: src/sys/arch/mips/rmi/rmixl_fmnvar.h
diff -u src/sys/arch/mips/rmi/rmixl_fmnvar.h:1.1.2.8 src/sys/arch/mips/rmi/rmixl_fmnvar.h:1.1.2.9
--- src/sys/arch/mips/rmi/rmixl_fmnvar.h:1.1.2.8	Thu Jan 19 10:29:34 2012
+++ src/sys/arch/mips/rmi/rmixl_fmnvar.h	Thu Feb 16 18:57:15 2012
@@ -239,7 +239,7 @@ rmixl_cp2_enable(void)
 		"or	%[sr],%[mask]"		"\n\t"
 		"mtc0	%[sr],$%[c0_status]"	"\n\t"
 		".set pop"			"\n\t"
-	:	[rv] "=r" (rv),
+	:	[rv] "=&r" (rv),
 		[sr] "=r" (sr)
 	:	[c0_status] "n" (MIPS_COP_0_STATUS),
 		[mask] "r" (MIPS_SR_COP_2_BIT));



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips

2012-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 16 18:58:01 UTC 2012

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]:
bus_space_alignstride_chipdep.c

Log Message:
Allow KSEG1 even on _LP64.


To generate a diff of this commit:
cvs rdiff -u -r1.10.18.15 -r1.10.18.16 \
src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c

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

Modified files:

Index: src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c
diff -u src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.10.18.15 src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.10.18.16
--- src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c:1.10.18.15	Thu Jan 19 08:28:49 2012
+++ src/sys/arch/mips/mips/bus_space_alignstride_chipdep.c	Thu Feb 16 18:58:01 2012
@@ -896,8 +896,10 @@ __BS(unmap)(void *v, bus_space_handle_t 
 #if !defined(_LP64) || defined(CHIP_EXTENT)
 	bus_addr_t addr = 0;	/* initialize to appease gcc */
 #endif
+#if defined(CHIP_EXTENT) || !defined(_LP64)
+	bool handle_is_km = false;
+#endif
 #ifndef _LP64
-	bool handle_is_km;
 
 	/* determine if h is addr obtained from uvm_km_alloc */
 	handle_is_km = !(MIPS_KSEG0_P(h) || MIPS_KSEG1_P(h));
@@ -936,15 +938,11 @@ __BS(unmap)(void *v, bus_space_handle_t 
 	if (acct == 0)
 		return;
 
-#ifdef EXTENT_DEBUG
+#if defined(EXTENT_DEBUG) || 1
 	printf("%s: freeing handle %#"PRIxBSH" for %#"PRIxBUSSIZE"\n",
 		__S(__BS(unmap)), h, size);
 #endif
 
-#ifdef _LP64
-	KASSERT(MIPS_XKPHYS_P(h));
-	addr = MIPS_XKPHYS_TO_PHYS(h);
-#else
 	if (handle_is_km == false) {
 		if (MIPS_KSEG0_P(h)) {
 			addr = MIPS_KSEG0_TO_PHYS(h);
@@ -952,11 +950,12 @@ __BS(unmap)(void *v, bus_space_handle_t 
 		} else if (MIPS_XKPHYS_P(h)) {
 			addr = MIPS_XKPHYS_TO_PHYS(h);
 #endif
-		} else {
+		} else if (MIPS_KSEG1_P(h)) {
 			addr = MIPS_KSEG1_TO_PHYS(h);
+		} else {
+			panic("%s: unknown handle %#"PRIxBSH, __func__, h);
 		}
 	}
-#endif
 
 #ifdef CHIP_W1_BUS_START
 	if (addr >= CHIP_W1_SYS_START(v) && addr <= CHIP_W1_SYS_END(v)) {



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips

2012-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 16 18:58:58 UTC 2012

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: mips_machdep.c vm_machdep.c

Log Message:
mips_nfreelist is the one past the highest freelist used.


To generate a diff of this commit:
cvs rdiff -u -r1.205.4.1.2.1.2.66 -r1.205.4.1.2.1.2.67 \
src/sys/arch/mips/mips/mips_machdep.c
cvs rdiff -u -r1.121.6.1.2.28 -r1.121.6.1.2.29 \
src/sys/arch/mips/mips/vm_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/mips/mips/mips_machdep.c
diff -u src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.66 src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.67
--- src/sys/arch/mips/mips/mips_machdep.c:1.205.4.1.2.1.2.66	Tue Feb 14 01:51:11 2012
+++ src/sys/arch/mips/mips/mips_machdep.c	Thu Feb 16 18:58:57 2012
@@ -2392,7 +2392,7 @@ mips_page_physload(vaddr_t vkernstart, v
 	/*
 	 * Now to get the number of freelists in use.
 	 */
-	mips_nfreelist = popcount32(mips_freelist_mask);
+	mips_nfreelist = 32 - __builtin_clz(mips_freelist_mask);
 }
 
 /* 

Index: src/sys/arch/mips/mips/vm_machdep.c
diff -u src/sys/arch/mips/mips/vm_machdep.c:1.121.6.1.2.28 src/sys/arch/mips/mips/vm_machdep.c:1.121.6.1.2.29
--- src/sys/arch/mips/mips/vm_machdep.c:1.121.6.1.2.28	Tue Feb 14 01:51:12 2012
+++ src/sys/arch/mips/mips/vm_machdep.c	Thu Feb 16 18:58:57 2012
@@ -102,7 +102,7 @@ mips_page_to_pggroup(struct vm_page *pg,
 		lcv = VM_FREELIST_DEFAULT;
 	}
 	KDASSERT(lcv == uvm_page_lookup_freelist(pg));
-	KASSERT(lcv < mips_nfreelist);
+	KASSERT((1 << lcv) & mips_freelist_mask);
 	return lcv * ncolors + color;
 #endif
 }



CVS commit: [netbsd-6] src/sys/conf

2012-02-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Feb 16 18:59:43 UTC 2012

Modified Files:
src/sys/conf [netbsd-6]: osrelease.sh

Log Message:
Pull up following revision(s) (requested by christos in ticket #3):
sys/conf/osrelease.sh: revision 1.121
Don't eat _BETA. I am sure dsl will come up with something more elegant.


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.120.18.1 src/sys/conf/osrelease.sh

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

Modified files:

Index: src/sys/conf/osrelease.sh
diff -u src/sys/conf/osrelease.sh:1.120 src/sys/conf/osrelease.sh:1.120.18.1
--- src/sys/conf/osrelease.sh:1.120	Sun Nov 15 18:41:08 2009
+++ src/sys/conf/osrelease.sh	Thu Feb 16 18:59:42 2012
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: osrelease.sh,v 1.120 2009/11/15 18:41:08 dsl Exp $
+#	$NetBSD: osrelease.sh,v 1.120.18.1 2012/02/16 18:59:42 riz Exp $
 #
 # Copyright (c) 1997 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -67,9 +67,11 @@ rel_mm=${rel_MMmm#${rel_MM}}
 # Get patch from text version
 IFS=.
 set -- - $rel_text
+beta=${3#[0-9]}
+beta=${beta#[0-9]}
 shift 3
 IFS=' '
-set -- $rel_MM ${rel_mm#0} $*
+set -- $rel_MM ${rel_mm#0}$beta $*
 
 case "$option" in
 -m)



CVS commit: [netbsd-6] src

2012-02-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Feb 16 19:56:43 UTC 2012

Modified Files:
src [netbsd-6]: UPDATING
src/etc [netbsd-6]: daily weekly

Log Message:
Pull up following revision(s) (requested by joerg in ticket #2):
etc/weekly: revision 1.26
etc/daily: revision 1.81
UPDATING: revision 1.235
Run makemandb with the normal 022 umask, not the restrictive 077.
Extend entry to makemandb permission issue.


To generate a diff of this commit:
cvs rdiff -u -r1.234 -r1.234.2.1 src/UPDATING
cvs rdiff -u -r1.80 -r1.80.2.1 src/etc/daily
cvs rdiff -u -r1.25 -r1.25.2.1 src/etc/weekly

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

Modified files:

Index: src/UPDATING
diff -u src/UPDATING:1.234 src/UPDATING:1.234.2.1
--- src/UPDATING:1.234	Thu Feb  9 21:49:31 2012
+++ src/UPDATING	Thu Feb 16 19:56:43 2012
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.234 2012/02/09 21:49:31 spz Exp $
+$NetBSD: UPDATING,v 1.234.2.1 2012/02/16 19:56:43 riz Exp $
 
 This file (UPDATING) is intended to be a brief reference to recent
 changes that might cause problems in the build process, and a guide for
@@ -16,9 +16,12 @@ See also: BUILDING, build.sh, Makefile.
 Recent changes:
 ^^^
 
-20120207:
+20120216:
 	Default for MKCATPAGES changed to NO. Update builds will fail
-	unless DESTDIR is cleaned manually.
+	unless DESTDIR is cleaned manually. If you built between 20120207
+	and 20120216, daily and weekly could have created an unreable
+	/var/db/man.db index for apropos. Running makemandb -f or
+	the next run of weekly will fix it.
 
 20111227:
 	If you built between 20111225 and 20111227 you need to remove

Index: src/etc/daily
diff -u src/etc/daily:1.80 src/etc/daily:1.80.2.1
--- src/etc/daily:1.80	Thu Feb  9 13:38:44 2012
+++ src/etc/daily	Thu Feb 16 19:56:43 2012
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: daily,v 1.80 2012/02/09 13:38:44 joerg Exp $
+#	$NetBSD: daily,v 1.80.2.1 2012/02/16 19:56:43 riz Exp $
 #	@(#)daily	8.2 (Berkeley) 1/25/94
 #
 
@@ -294,7 +294,7 @@ if checkyesno run_makemandb; then
 	if [ -f /etc/man.conf -a -x /usr/sbin/makemandb ]; then
 		echo ""
 		echo "Updating man page index:"
-		nice -n 5 /usr/sbin/makemandb
+		(umask 022; nice -n 5 /usr/sbin/makemandb)
 	fi
 fi
 

Index: src/etc/weekly
diff -u src/etc/weekly:1.25 src/etc/weekly:1.25.2.1
--- src/etc/weekly:1.25	Tue Feb  7 19:13:30 2012
+++ src/etc/weekly	Thu Feb 16 19:56:43 2012
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: weekly,v 1.25 2012/02/07 19:13:30 joerg Exp $
+#	$NetBSD: weekly,v 1.25.2.1 2012/02/16 19:56:43 riz Exp $
 #	from: @(#)weekly	8.2 (Berkeley) 1/2/94
 #
 
@@ -94,7 +94,7 @@ if checkyesno rebuild_mandb; then
 	echo ""
 	if [ -f /etc/man.conf -a -x /usr/sbin/makemandb ]; then
 		echo "Rebuilding man page index:"
-		nice -n 5 /usr/sbin/makemandb -f
+		(umask 022; nice -n 5 /usr/sbin/makemandb -f)
 	else
 		echo "Not rebuilding man page index"
 	fi



CVS commit: [netbsd-6] src/doc

2012-02-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Feb 16 19:57:07 UTC 2012

Modified Files:
src/doc [netbsd-6]: CHANGES-6.0

Log Message:
Tickets 2,3


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/doc/CHANGES-6.0

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

Modified files:

Index: src/doc/CHANGES-6.0
diff -u src/doc/CHANGES-6.0:1.1.2.1 src/doc/CHANGES-6.0:1.1.2.2
--- src/doc/CHANGES-6.0:1.1.2.1	Wed Feb 15 23:46:47 2012
+++ src/doc/CHANGES-6.0	Thu Feb 16 19:57:07 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.1 2012/02/15 23:46:47 riz Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.2 2012/02/16 19:57:07 riz Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -8,3 +8,15 @@ sys/sys/param.h	patched by hand
 
 	Welcome to 6.0_BETA!
 
+sys/conf/osrelease.sh1.121
+
+	Don't eat _BETA or other textual tags after the version.
+	[christos, ticket #3]
+
+UPDATING	1.235
+etc/daily	1.81
+etc/weekly	1.26
+
+	Run makemandb with the normal 022 umask, not the restrictive 077.
+	[joerg, ticket #2]
+



CVS commit: src/usr.sbin/crash

2012-02-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 16 20:36:13 UTC 2012

Modified Files:
src/usr.sbin/crash: Makefile

Log Message:
use -n too, so that we don't get a dup note.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/crash/Makefile

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

Modified files:

Index: src/usr.sbin/crash/Makefile
diff -u src/usr.sbin/crash/Makefile:1.17 src/usr.sbin/crash/Makefile:1.18
--- src/usr.sbin/crash/Makefile:1.17	Wed Feb 15 21:37:43 2012
+++ src/usr.sbin/crash/Makefile	Thu Feb 16 15:36:13 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.17 2012/02/16 02:37:43 christos Exp $
+#	$NetBSD: Makefile,v 1.18 2012/02/16 20:36:13 christos Exp $
 
 PROG=		crash
 MAN=		crash.8
@@ -78,7 +78,7 @@ COPTS.db_output.c += -Wno-format-nonlite
 # vers.c
 SRCS+=	vers.c
 vers.c:	${S}/conf/newvers.sh
-	${HOST_SH} ${S}/conf/newvers.sh -r
+	${HOST_SH} ${S}/conf/newvers.sh -r -n
 CLEANFILES+=	vers.c version
 
 .else# } {



CVS commit: src/sys/dev/pci

2012-02-16 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Feb 16 20:45:21 UTC 2012

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

Log Message:
remove debug spam


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/pci/r128fb.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/r128fb.c
diff -u src/sys/dev/pci/r128fb.c:1.29 src/sys/dev/pci/r128fb.c:1.30
--- src/sys/dev/pci/r128fb.c:1.29	Thu Feb 16 17:33:28 2012
+++ src/sys/dev/pci/r128fb.c	Thu Feb 16 20:45:21 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: r128fb.c,v 1.29 2012/02/16 17:33:28 macallan Exp $	*/
+/*	$NetBSD: r128fb.c,v 1.30 2012/02/16 20:45:21 macallan Exp $	*/
 
 /*
  * Copyright (c) 2007 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.29 2012/02/16 17:33:28 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.30 2012/02/16 20:45:21 macallan Exp $");
 
 #include 
 #include 
@@ -567,10 +567,8 @@ r128fb_init_screen(void *cookie, struct 
 	ri->ri_ops.cursor = r128fb_cursor;
 	if (FONT_IS_ALPHA(ri->ri_font)) {
 		ri->ri_ops.putchar = r128fb_putchar_aa;
-		printf("before: %08x\n", (uint32_t)sc->sc_gc.gc_attr);
 		ri->ri_ops.allocattr(ri, WS_DEFAULT_FG, WS_DEFAULT_BG,
 		 0, &sc->sc_gc.gc_attr);
-		printf("after: %08x\n", (uint32_t)sc->sc_gc.gc_attr);
 	} else
 		ri->ri_ops.putchar = r128fb_putchar;
 }



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

2012-02-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Feb 16 20:58:23 UTC 2012

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

Log Message:
Merge mandoc.h r1.99 and read.c 1.28 from upstream:
Add mparse_readmem, which allows application to run the parser directly
from memory, e.g. after de-compressing a document.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.9 -r1.2 src/external/bsd/mdocml/dist/mandoc.h
cvs rdiff -u -r1.5 -r1.6 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/mandoc.h
diff -u src/external/bsd/mdocml/dist/mandoc.h:1.1.1.9 src/external/bsd/mdocml/dist/mandoc.h:1.2
--- src/external/bsd/mdocml/dist/mandoc.h:1.1.1.9	Mon Jan 30 16:44:19 2012
+++ src/external/bsd/mdocml/dist/mandoc.h	Thu Feb 16 20:58:23 2012
@@ -1,4 +1,4 @@
-/*	$Vendor-Id: mandoc.h,v 1.98 2011/11/08 00:15:23 kristaps Exp $ */
+/*	$Vendor-Id: mandoc.h,v 1.99 2012/02/16 20:51:31 joerg Exp $ */
 /*
  * Copyright (c) 2010, 2011 Kristaps Dzonsons 
  *
@@ -418,6 +418,8 @@ struct mparse	 *mparse_alloc(enum mparse
 void		  mparse_free(struct mparse *);
 void		  mparse_keep(struct mparse *);
 enum mandoclevel  mparse_readfd(struct mparse *, int, const char *);
+enum mandoclevel  mparse_readmem(struct mparse *, const void *, size_t,
+			const char *);
 void		  mparse_reset(struct mparse *);
 void		  mparse_result(struct mparse *, 
 			struct mdoc **, struct man **);

Index: src/external/bsd/mdocml/dist/read.c
diff -u src/external/bsd/mdocml/dist/read.c:1.5 src/external/bsd/mdocml/dist/read.c:1.6
--- src/external/bsd/mdocml/dist/read.c:1.5	Mon Feb  6 10:42:44 2012
+++ src/external/bsd/mdocml/dist/read.c	Thu Feb 16 20:58:23 2012
@@ -1,4 +1,4 @@
-/*	$Vendor-Id: read.c,v 1.27 2012/02/05 16:46:15 joerg Exp $ */
+/*	$Vendor-Id: read.c,v 1.28 2012/02/16 20:51:31 joerg Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons 
  * Copyright (c) 2010, 2011 Ingo Schwarze 
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -37,6 +38,7 @@
 #include "libmandoc.h"
 #include "mdoc.h"
 #include "man.h"
+#include "main.h"
 
 #ifndef MAP_FILE
 #define	MAP_FILE	0
@@ -70,7 +72,6 @@ static	void	  resize_buf(struct buf *, s
 static	void	  mparse_buf_r(struct mparse *, struct buf, int);
 static	void	  mparse_readfd_r(struct mparse *, int, const char *, int);
 static	void	  pset(const char *, int, struct mparse *);
-static	void	  pdesc(struct mparse *, const char *, int);
 static	int	  read_whole_file(const char *, int, struct buf *, int *);
 static	void	  mparse_end(struct mparse *);
 
@@ -547,38 +548,6 @@ rerun:
 	free(ln.buf);
 }
 
-static void
-pdesc(struct mparse *curp, const char *file, int fd)
-{
-	struct buf	 blk;
-	int		 with_mmap;
-
-	/*
-	 * Run for each opened file; may be called more than once for
-	 * each full parse sequence if the opened file is nested (i.e.,
-	 * from `so').  Simply sucks in the whole file and moves into
-	 * the parse phase for the file.
-	 */
-
-	if ( ! read_whole_file(file, fd, &blk, &with_mmap)) {
-		curp->file_status = MANDOCLEVEL_SYSERR;
-		return;
-	}
-
-	/* Line number is per-file. */
-
-	curp->line = 1;
-
-	mparse_buf_r(curp, blk, 1);
-
-#ifdef	HAVE_MMAP
-	if (with_mmap)
-		munmap(blk.buf, blk.sz);
-	else
-#endif
-		free(blk.buf);
-}
-
 static int
 read_whole_file(const char *file, int fd, struct buf *fb, int *with_mmap)
 {
@@ -674,29 +643,72 @@ mparse_end(struct mparse *curp)
 }
 
 static void
-mparse_readfd_r(struct mparse *curp, int fd, const char *file, int re)
+mparse_parse_buffer(struct mparse *curp, struct buf blk, const char *file,
+		int re)
 {
 	const char	*svfile;
 
+	/* Line number is per-file. */
+	svfile = curp->file;
+	curp->file = file;
+	curp->line = 1;
+
+	mparse_buf_r(curp, blk, 1);
+
+	if (0 == re && MANDOCLEVEL_FATAL > curp->file_status)
+		mparse_end(curp);
+
+	curp->file = svfile;
+}
+
+enum mandoclevel
+mparse_readmem(struct mparse *curp, const void *buf, size_t len,
+		const char *file)
+{
+	struct buf blk;
+
+	blk.buf = UNCONST(buf);
+	blk.sz = len;
+
+	mparse_parse_buffer(curp, blk, file, 0);
+	return(curp->file_status);
+}
+
+static void
+mparse_readfd_r(struct mparse *curp, int fd, const char *file, int re)
+{
+	struct buf	 blk;
+	int		 with_mmap;
+
 	if (-1 == fd)
 		if (-1 == (fd = open(file, O_RDONLY, 0))) {
 			perror(file);
 			curp->file_status = MANDOCLEVEL_SYSERR;
 			return;
 		}
+	/*
+	 * Run for each opened file; may be called more than once for
+	 * each full parse sequence if the opened file is nested (i.e.,
+	 * from `so').  Simply sucks in the whole file and moves into
+	 * the parse phase for the file.
+	 */
 
-	svfile = curp->file;
-	curp->file = file;
+	if ( ! read_whole_file(file, fd, &blk, &with_mmap)) {
+		curp->file_status = MANDOCLEVEL_SYSERR;
+		return;
+	}
 
-	pdesc(curp, file, fd);
+	mparse_parse_buffer(curp, blk,

CVS commit: src/usr.sbin/makemandb

2012-02-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Feb 16 20:58:55 UTC 2012

Modified Files:
src/usr.sbin/makemandb: Makefile makemandb.c

Log Message:
Add support for compressed man pages in all the usual formats.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/makemandb/Makefile
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/makemandb/makemandb.c

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

Modified files:

Index: src/usr.sbin/makemandb/Makefile
diff -u src/usr.sbin/makemandb/Makefile:1.1 src/usr.sbin/makemandb/Makefile:1.2
--- src/usr.sbin/makemandb/Makefile:1.1	Tue Feb  7 19:13:32 2012
+++ src/usr.sbin/makemandb/Makefile	Thu Feb 16 20:58:55 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2012/02/07 19:13:32 joerg Exp $
+# $NetBSD: Makefile,v 1.2 2012/02/16 20:58:55 joerg Exp $
 
 .include 
 
@@ -22,8 +22,8 @@ CPPFLAGS+=-I${MDIST} -I${.OBJDIR}
 MDOCMLOBJDIR!=	cd ${MDOCDIR}/lib/libmandoc && ${PRINTOBJDIR}
 MDOCMLLIB=	${MDOCMLOBJDIR}/libmandoc.a
 
-DPADD.makemandb+= 	${MDOCMLLIB}
-LDADD.makemandb+= 	-L${MDOCMLOBJDIR} -lmandoc
+DPADD.makemandb+= 	${MDOCMLLIB} ${LIBARCHIVE} ${LIBBZ2} ${LIBLZMA}
+LDADD.makemandb+= 	-L${MDOCMLOBJDIR} -lmandoc -larchive -lbz2 -llzma
 DPADD+=		${LIBSQLITE3} ${LIBM} ${LIBZ} ${LIBUTIL}
 LDADD+=		-lsqlite3 -lm -lz -lutil
 

Index: src/usr.sbin/makemandb/makemandb.c
diff -u src/usr.sbin/makemandb/makemandb.c:1.4 src/usr.sbin/makemandb/makemandb.c:1.5
--- src/usr.sbin/makemandb/makemandb.c:1.4	Wed Feb 15 23:36:10 2012
+++ src/usr.sbin/makemandb/makemandb.c	Thu Feb 16 20:58:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: makemandb.c,v 1.4 2012/02/15 23:36:10 joerg Exp $	*/
+/*	$NetBSD: makemandb.c,v 1.5 2012/02/16 20:58:55 joerg Exp $	*/
 /*
  * Copyright (c) 2011 Abhinav Upadhyay 
  * Copyright (c) 2011 Kristaps Dzonsons 
@@ -17,7 +17,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: makemandb.c,v 1.4 2012/02/15 23:36:10 joerg Exp $");
+__RCSID("$NetBSD: makemandb.c,v 1.5 2012/02/16 20:58:55 joerg Exp $");
 
 #include 
 #include 
@@ -26,6 +26,7 @@ __RCSID("$NetBSD: makemandb.c,v 1.4 2012
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -94,12 +95,13 @@ typedef struct mandb_rec {
 static void append(secbuff *sbuff, const char *src);
 static void init_secbuffs(mandb_rec *);
 static void free_secbuffs(mandb_rec *);
-static int check_md5(const char *, sqlite3 *, const char *, char **);
+static int check_md5(const char *, sqlite3 *, const char *, char **, void *, size_t);
 static void cleanup(mandb_rec *);
 static void set_section(const struct mdoc *, const struct man *, mandb_rec *);
 static void set_machine(const struct mdoc *, mandb_rec *);
 static int insert_into_db(sqlite3 *, mandb_rec *);
-static	void begin_parse(const char *, struct mparse *, mandb_rec *);
+static	void begin_parse(const char *, struct mparse *, mandb_rec *,
+			 const void *, size_t len);
 static void pmdoc_node(const struct mdoc_node *, mandb_rec *);
 static void pmdoc_Nm(const struct mdoc_node *, mandb_rec *);
 static void pmdoc_Nd(const struct mdoc_node *, mandb_rec *);
@@ -591,6 +593,59 @@ update_existing_entry(sqlite3 *db, const
 	sqlite3_finalize(inner_stmt);
 }
 
+/* read_and_decompress --
+ *	Reads the given file into memory. If it is compressed, decompres
+ *	it before returning to the caller.
+ */
+static int
+read_and_decompress(const char *file, void **buf, size_t *len)
+{
+	size_t off;
+	ssize_t r;
+	struct archive *a;
+	struct archive_entry *ae;
+
+	if ((a = archive_read_new()) == NULL)
+		errx(EXIT_FAILURE, "memory allocation failed");
+
+	if (archive_read_support_compression_all(a) != ARCHIVE_OK ||
+	archive_read_support_format_raw(a) != ARCHIVE_OK ||
+	archive_read_open_filename(a, file, 65536) != ARCHIVE_OK ||
+	archive_read_next_header(a, &ae) != ARCHIVE_OK)
+		goto archive_error;
+	*len = 65536;
+	*buf = emalloc(*len);
+	off = 0;
+	for (;;) {
+		r = archive_read_data(a, (char *)*buf + off, *len - off);
+		if (r == ARCHIVE_OK) {
+			archive_read_close(a);
+			*len = off;
+			return 0;
+		}
+		if (r <= 0) {
+			free(*buf);
+			break;
+		}
+		off += r;
+		if (off == *len) {
+			*len *= 2;
+			if (*len < off) {
+warnx("File too large: %s", file);
+free(*buf);
+archive_read_close(a);
+return -1;
+			}
+			*buf = erealloc(*buf, *len);
+		}
+	}
+
+archive_error:
+	warnx("Error while reading `%s': %s", file, archive_error_string(a));
+	archive_read_close(a);
+	return -1;
+}
+
 /* update_db --
  *	Does an incremental updation of the database by checking the file_cache.
  *	It parses and adds the pages which are present in file_cache,
@@ -605,7 +660,9 @@ update_db(sqlite3 *db, struct mparse *mp
 	sqlite3_stmt *stmt = NULL;
 	const char *file;
 	char *errmsg = NULL;
-	char *buf = NULL;
+	char *md5sum;
+	void *buf;
+	size_t buflen;
 	int new_count = 0;	/* Counter for newly indexed/updated pages */
 	int total_count = 0;	/* Counter for total number of pages */
 	in

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

2012-02-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 16 21:13:51 UTC 2012

Modified Files:
src/sys/arch/arm/include: Makefile

Log Message:
Added cpuconf.h needed by libkvm build.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/arm/include/Makefile

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

Modified files:

Index: src/sys/arch/arm/include/Makefile
diff -u src/sys/arch/arm/include/Makefile:1.40 src/sys/arch/arm/include/Makefile:1.41
--- src/sys/arch/arm/include/Makefile:1.40	Sun Jul 17 19:52:12 2011
+++ src/sys/arch/arm/include/Makefile	Thu Feb 16 16:13:50 2012
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.40 2011/07/17 23:52:12 dyoung Exp $
+#	$NetBSD: Makefile,v 1.41 2012/02/16 21:13:50 christos Exp $
 
 INCSDIR= /usr/include/arm
 
 INCS=	ansi.h aout_machdep.h armreg.h asm.h atomic.h \
 	bswap.h byte_swap.h \
-	cdefs.h cpu.h \
+	cdefs.h cpu.h cpuconf.h \
 	disklabel.h \
 	elf_machdep.h endian.h endian_machdep.h \
 	float.h fp.h frame.h \



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

2012-02-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 16 21:15:05 UTC 2012

Modified Files:
src/distrib/sets/lists/comp: ad.arm

Log Message:
add cpuconf.h to the sets


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/distrib/sets/lists/comp/ad.arm

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

Modified files:

Index: src/distrib/sets/lists/comp/ad.arm
diff -u src/distrib/sets/lists/comp/ad.arm:1.38 src/distrib/sets/lists/comp/ad.arm:1.39
--- src/distrib/sets/lists/comp/ad.arm:1.38	Mon Jul 18 13:39:05 2011
+++ src/distrib/sets/lists/comp/ad.arm	Thu Feb 16 16:15:05 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ad.arm,v 1.38 2011/07/18 17:39:05 dyoung Exp $
+# $NetBSD: ad.arm,v 1.39 2012/02/16 21:15:05 christos Exp $
 ./usr/include/gcc-4.5/arm_neon.h		comp-c-include		gcccmds,gcc=45
 ./usr/include/gcc-4.5/mmintrin.h		comp-c-include		gcccmds,gcc=45
 ./usr/include/gcc-4.5/tgmath.h			comp-c-include		gcccmds,gcc=45
@@ -27,6 +27,7 @@
 ./usr/include/arm/byte_swap.h			comp-c-include
 ./usr/include/arm/cdefs.h			comp-c-include
 ./usr/include/arm/cpu.hcomp-c-include
+./usr/include/arm/cpuconf.h			comp-c-include
 ./usr/include/arm/db_machdep.h			comp-obsolete		obsolete
 ./usr/include/arm/disklabel.h			comp-c-include
 ./usr/include/arm/disklabel_acorn.h		comp-obsolete		obsolete



CVS commit: src/etc/mtree

2012-02-16 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Feb 16 22:22:27 UTC 2012

Modified Files:
src/etc/mtree: NetBSD.dist.base

Log Message:
Do not create obsolete ./usr/include/quota directory anymore.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/etc/mtree/NetBSD.dist.base

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

Modified files:

Index: src/etc/mtree/NetBSD.dist.base
diff -u src/etc/mtree/NetBSD.dist.base:1.97 src/etc/mtree/NetBSD.dist.base:1.98
--- src/etc/mtree/NetBSD.dist.base:1.97	Tue Feb 14 14:03:35 2012
+++ src/etc/mtree/NetBSD.dist.base	Thu Feb 16 22:22:27 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.97 2012/02/14 14:03:35 wiz Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.98 2012/02/16 22:22:27 njoly Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -172,7 +172,6 @@
 ./usr/include/ppath
 ./usr/include/prop
 ./usr/include/protocols
-./usr/include/quota
 ./usr/include/readline
 ./usr/include/rpc
 ./usr/include/rpcsvc



CVS commit: src/external/bsd/mdocml

2012-02-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Feb 16 22:56:13 UTC 2012

Modified Files:
src/external/bsd/mdocml: Makefile.inc

Log Message:
Use mmap when dealing with plain files.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/external/bsd/mdocml/Makefile.inc

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

Modified files:

Index: src/external/bsd/mdocml/Makefile.inc
diff -u src/external/bsd/mdocml/Makefile.inc:1.14 src/external/bsd/mdocml/Makefile.inc:1.15
--- src/external/bsd/mdocml/Makefile.inc:1.14	Wed Oct 12 15:33:38 2011
+++ src/external/bsd/mdocml/Makefile.inc	Thu Feb 16 22:56:12 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.14 2011/10/12 15:33:38 njoly Exp $
+# $NetBSD: Makefile.inc,v 1.15 2012/02/16 22:56:12 joerg Exp $
 
 .include 
 
@@ -7,7 +7,7 @@ VERSION!=	cd ${.PARSEDIR}/dist && ${MAKE
 CPPFLAGS+=	-DVERSION=\"${VERSION}\" -DUGLY
 
 .if (${HOSTPROG:U} == "")
-CPPFLAGS+=	-DHAVE_STRLCAT -DHAVE_STRLCPY -DHAVE_STRPTIME
+CPPFLAGS+=	-DHAVE_STRLCAT -DHAVE_STRLCPY -DHAVE_STRPTIME -DHAVE_MMAP
 .endif
 
 DISTDIR:=	${.PARSEDIR}/dist



CVS commit: src/etc

2012-02-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Feb 16 22:57:19 UTC 2012

Modified Files:
src/etc: man.conf

Log Message:
Add entries for bzip2 and xz.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/etc/man.conf

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

Modified files:

Index: src/etc/man.conf
diff -u src/etc/man.conf:1.29 src/etc/man.conf:1.30
--- src/etc/man.conf:1.29	Tue Feb 14 14:03:35 2012
+++ src/etc/man.conf	Thu Feb 16 22:57:19 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: man.conf,v 1.29 2012/02/14 14:03:35 wiz Exp $
+#	$NetBSD: man.conf,v 1.30 2012/02/16 22:57:19 joerg Exp $
 
 # Sheer, raging paranoia...
 _version	BSD.2
@@ -17,18 +17,26 @@ _subdir		cat1 man1 cat8 man8 cat6 man6 c
 # Note the order, .Z must come after .[1-9].Z, or it will match first.
 _suffix		.0
 _build		.0.Z		/usr/bin/zcat %s
-_build		.0.gz		/usr/bin/gunzip -c %s
+_build		.0.bz2		/usr/bin/bzcat %s
+_build		.0.gz		/usr/bin/zcat %s
+_build		.0.xz		/usr/bin/xzcat %s
 _build		.[1-9ln]	/usr/bin/mandoc %s
 _build		.[1-9ln].Z	/usr/bin/zcat %s | /usr/bin/mandoc
-_build		.[1-9ln].gz	/usr/bin/gunzip -c %s | /usr/bin/mandoc
+_build		.[1-9ln].bz2	/usr/bin/bzcat %s | /usr/bin/mandoc
+_build		.[1-9ln].gz	/usr/bin/zcat %s | /usr/bin/mandoc
+_build		.[1-9ln].xz	/usr/bin/xzcat %s | /usr/bin/mandoc
 _build		.tbl		/usr/bin/mandoc %s
 _build		.tbl.Z		/usr/bin/zcat %s | /usr/bin/mandoc
-_build		.tbl.gz		/usr/bin/gunzip -c %s | /usr/bin/mandoc
+_build		.tbl.bz2	/usr/bin/bzcat %s | /usr/bin/mandoc
+_build		.tbl.gz		/usr/bin/zcat %s | /usr/bin/mandoc
+_build		.tbl.xz		/usr/bin/xzcat %s | /usr/bin/mandoc
 
 _build		.me		/usr/bin/nroff -msafer -me %s 2>/dev/null | cat -s
 
-_crunch		.Z		/usr/bin/compress -c > %s
-_crunch		.gz		/usr/bin/gzip -c > %s
+_crunch		.Z		/usr/bin/zcat > %s
+_crunch		.bz		/usr/bin/bzcat > %s
+_crunch		.gz		/usr/bin/zcat > %s
+_crunch		.xz		/usr/bin/xzcat > %s
 
 # Sections and their directories.
 # All paths ending in '/' are the equivalent of entries specifying that



CVS commit: src

2012-02-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Feb 16 23:00:39 UTC 2012

Modified Files:
src/distrib/sets/lists/base: ad.mips64eb ad.mips64el md.amd64
md.sparc64 shl.mi
src/distrib/sets/lists/comp: ad.mips64eb ad.mips64el md.amd64
md.sparc64 shl.mi
src/include: dlfcn.h
src/lib/libc: shlib_version
src/lib/libc/dlfcn: dlfcn_elf.c
src/lib/libc/misc: initfini.c
src/libexec/ld.elf_so: rtld.c rtld.h symbol.c

Log Message:
Add _dlauxinfo helper function to provide access to the ELF auxilary
vector. This can normally be found via __ps_strings, but libc is
initialised too early when linked dynamically and doesn't have access to
it yet, so provide an alternative mechanism via ld.elf_so.
Bump libc minor.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/distrib/sets/lists/base/ad.mips64eb
cvs rdiff -u -r1.81 -r1.82 src/distrib/sets/lists/base/ad.mips64el
cvs rdiff -u -r1.156 -r1.157 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.147 -r1.148 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.616 -r1.617 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.69 -r1.70 src/distrib/sets/lists/comp/ad.mips64eb \
src/distrib/sets/lists/comp/ad.mips64el
cvs rdiff -u -r1.155 -r1.156 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.138 -r1.139 src/distrib/sets/lists/comp/md.sparc64
cvs rdiff -u -r1.209 -r1.210 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.23 -r1.24 src/include/dlfcn.h
cvs rdiff -u -r1.227 -r1.228 src/lib/libc/shlib_version
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/dlfcn/dlfcn_elf.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/misc/initfini.c
cvs rdiff -u -r1.155 -r1.156 src/libexec/ld.elf_so/rtld.c
cvs rdiff -u -r1.107 -r1.108 src/libexec/ld.elf_so/rtld.h
cvs rdiff -u -r1.59 -r1.60 src/libexec/ld.elf_so/symbol.c

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

Modified files:

Index: src/distrib/sets/lists/base/ad.mips64eb
diff -u src/distrib/sets/lists/base/ad.mips64eb:1.82 src/distrib/sets/lists/base/ad.mips64eb:1.83
--- src/distrib/sets/lists/base/ad.mips64eb:1.82	Sat Feb 11 23:31:22 2012
+++ src/distrib/sets/lists/base/ad.mips64eb	Thu Feb 16 23:00:38 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.82 2012/02/11 23:31:22 martin Exp $
+# $NetBSD: ad.mips64eb,v 1.83 2012/02/16 23:00:38 joerg Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ -66,7 +66,7 @@
 ./usr/lib/64/libbz2.so.1			base-compat-shlib	compat,pic
 ./usr/lib/64/libbz2.so.1.1			base-compat-shlib	compat,pic
 ./usr/lib/64/libc.so.12base-compat-shlib	compat,pic
-./usr/lib/64/libc.so.12.181			base-compat-shlib	compat,pic
+./usr/lib/64/libc.so.12.182			base-compat-shlib	compat,pic
 ./usr/lib/64/libcom_err.so.7			base-compat-shlib	compat,pic,kerberos
 ./usr/lib/64/libcom_err.so.7.0			base-compat-shlib	compat,pic,kerberos
 ./usr/lib/64/libcrypt.so.1			base-compat-shlib	compat,pic
@@ -362,7 +362,7 @@
 ./usr/lib/o32/libbz2.so.1			base-compat-shlib	compat,pic
 ./usr/lib/o32/libbz2.so.1.1			base-compat-shlib	compat,pic
 ./usr/lib/o32/libc.so.12			base-compat-shlib	compat,pic
-./usr/lib/o32/libc.so.12.181			base-compat-shlib	compat,pic
+./usr/lib/o32/libc.so.12.182			base-compat-shlib	compat,pic
 ./usr/lib/o32/libcom_err.so.7			base-compat-shlib	compat,pic,kerberos
 ./usr/lib/o32/libcom_err.so.7.0			base-compat-shlib	compat,pic,kerberos
 ./usr/lib/o32/libcrypt.so.1			base-compat-shlib	compat,pic

Index: src/distrib/sets/lists/base/ad.mips64el
diff -u src/distrib/sets/lists/base/ad.mips64el:1.81 src/distrib/sets/lists/base/ad.mips64el:1.82
--- src/distrib/sets/lists/base/ad.mips64el:1.81	Sat Feb 11 23:31:22 2012
+++ src/distrib/sets/lists/base/ad.mips64el	Thu Feb 16 23:00:38 2012
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64el,v 1.81 2012/02/11 23:31:22 martin Exp $
+# $NetBSD: ad.mips64el,v 1.82 2012/02/16 23:00:38 joerg Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ -66,7 +66,7 @@
 ./usr/lib/64/libbz2.so.1			base-compat-shlib	compat,pic
 ./usr/lib/64/libbz2.so.1.1			base-compat-shlib	compat,pic
 ./usr/lib/64/libc.so.12base-compat-shlib	compat,pic
-./usr/lib/64/libc.so.12.181			base-compat-shlib	compat,pic
+./usr/lib/64/libc.so.12.182			base-compat-shlib	compat,pic
 ./usr/lib/64/libcom_err.so.7			base-compat-shlib	compat,pic,kerberos
 ./usr/lib/64/libcom_err.so.7.0			base-compat-shlib	compat,pic,kerberos
 ./usr/lib/64/libcrypt.so.1			base-compat-shlib	compat,pic
@@ -362,7 +362,7 @@
 ./usr/lib/o32/libbz2.so.1			base-compat-shlib	compat,pic
 ./usr/lib/o32/libbz2.so.1.1			base-compat-shlib	compat,pic
 ./usr/lib/o32/libc.so.12			base-compat-shlib	compat,pic
-./usr/lib/o32/libc.so.12.181			base-compat-shlib	compat,pic
+./usr/lib/o32/libc.so.12.182			base-compat-s

CVS commit: [matt-nb5-mips64] src/sys/arch/mips

2012-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Feb 16 23:02:22 UTC 2012

Modified Files:
src/sys/arch/mips/include [matt-nb5-mips64]: pmap.h
src/sys/arch/mips/mips [matt-nb5-mips64]: pmap.c pmap_tlb.c

Log Message:
Move the ksegx tlb init code into its own function.
Fix a problem with concurrent shootdowns by tracking what cpus want a
shootdown for a pmap, and if anoter cpu wants a shootdown, perform the
shootdown on ourselves.


To generate a diff of this commit:
cvs rdiff -u -r1.54.26.23 -r1.54.26.24 src/sys/arch/mips/include/pmap.h
cvs rdiff -u -r1.179.16.42 -r1.179.16.43 src/sys/arch/mips/mips/pmap.c
cvs rdiff -u -r1.1.2.22 -r1.1.2.23 src/sys/arch/mips/mips/pmap_tlb.c

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

Modified files:

Index: src/sys/arch/mips/include/pmap.h
diff -u src/sys/arch/mips/include/pmap.h:1.54.26.23 src/sys/arch/mips/include/pmap.h:1.54.26.24
--- src/sys/arch/mips/include/pmap.h:1.54.26.23	Thu Jan 19 08:28:48 2012
+++ src/sys/arch/mips/include/pmap.h	Thu Feb 16 23:02:21 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.54.26.23 2012/01/19 08:28:48 matt Exp $	*/
+/*	pmap.h,v 1.54.26.23 2012/01/19 08:28:48 matt Exp	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -180,7 +180,7 @@ typedef struct pmap {
 #ifdef MULTIPROCESSOR
 	volatile uint32_t	pm_active;	/* pmap was active on ... */
 	volatile uint32_t	pm_onproc;	/* pmap is active on ... */
-	volatile u_int		pm_shootdown_pending;
+	volatile uint32_t	pm_shootdown_pending;
 #endif
 	union segtab		*pm_segtab;	/* pointers to pages of PTEs */
 	u_int			pm_count;	/* pmap reference count */
@@ -254,6 +254,7 @@ extern vaddr_t mips_virtual_end;
  *	Bootstrap the system enough to run with virtual memory.
  */
 void	pmap_bootstrap(void);
+void	pmap_ksegx_bootstrap(void);
 
 void	pmap_remove_all(pmap_t);
 void	pmap_set_modified(paddr_t);
@@ -262,7 +263,7 @@ void	pmap_procwr(struct proc *, vaddr_t,
 
 #ifdef MULTIPROCESSOR
 void	pmap_tlb_shootdown_process(void);
-bool	pmap_tlb_shootdown_bystanders(pmap_t pmap);
+bool	pmap_tlb_shootdown_bystanders(pmap_t pmap, uint32_t);
 void	pmap_tlb_info_attach(struct pmap_tlb_info *, struct cpu_info *);
 #endif
 void	pmap_syncicache_page(struct vm_page *, uint32_t);

Index: src/sys/arch/mips/mips/pmap.c
diff -u src/sys/arch/mips/mips/pmap.c:1.179.16.42 src/sys/arch/mips/mips/pmap.c:1.179.16.43
--- src/sys/arch/mips/mips/pmap.c:1.179.16.42	Tue Feb 14 01:51:11 2012
+++ src/sys/arch/mips/mips/pmap.c	Thu Feb 16 23:02:22 2012
@@ -443,6 +443,37 @@ pmap_unmap_ephemeral_page(struct vm_page
 #endif
 }
 
+#ifdef ENABLE_MIPS_KSEGX
+void
+pmap_ksegx_bootstrap(void)
+{
+	const vaddr_t kva_inc = 1 << ((VM_KSEGX_SHIFT - 1) & ~1);
+	const uint32_t tlb_mask = (2 * kva_inc - 1) & 0x1c00;
+
+	if (mips_ksegx_tlb_slot < 0) {
+		mips_ksegx_tlb_slot = pmap_tlb0_info.ti_wired;
+		pmap_tlb0_info.ti_wired += VM_KSEGX_SIZE / (2 * kva_inc);
+		mips3_cp0_wired_write(pmap_tlb0_info.ti_wired);
+	}
+
+	u_int tlb_slot = mips_ksegx_tlb_slot;
+	for (vaddr_t kva = 0;
+	 kva < VM_KSEGX_SIZE;
+	 kva += 2 * kva_inc, tlb_slot++) {
+		extern pt_entry_t mips_ksegx_pte;
+		struct tlbmask tlb = {
+		.tlb_hi = VM_KSEGX_ADDRESS + kva,
+		.tlb_lo0 = mips_ksegx_pte.pt_entry
+			+ mips_paddr_to_tlbpfn(kva),
+		.tlb_lo1 = mips_ksegx_pte.pt_entry
+			+ mips_paddr_to_tlbpfn(kva + kva_inc),
+		.tlb_mask = tlb_mask,
+		};
+		tlb_write_indexed(tlb_slot, &tlb);
+	}
+}
+#endif
+
 /*
  *	Bootstrap the system enough to run with virtual memory.
  *	firstaddr is the first unused kseg0 address (not page aligned).
@@ -460,22 +491,7 @@ pmap_bootstrap(void)
 	pmap_tlb_info_init(&pmap_tlb0_info);		/* init the lock */
 
 #ifdef ENABLE_MIPS_KSEGX
-	const vaddr_t kva_inc = 1 << ((VM_KSEGX_SHIFT - 1) & ~1);
-	const uint32_t tlb_mask = (2 * kva_inc - 1) & 0x1c00;
-	for (vaddr_t kva = 0; kva < VM_KSEGX_SIZE; kva += 2 * kva_inc) {
-		extern pt_entry_t mips_ksegx_pte;
-		struct tlbmask tlb = {
-		.tlb_hi = VM_KSEGX_ADDRESS + kva,
-		.tlb_lo0 = mips_ksegx_pte.pt_entry
-			+ mips_paddr_to_tlbpfn(kva),
-		.tlb_lo1 = mips_ksegx_pte.pt_entry
-			+ mips_paddr_to_tlbpfn(kva + kva_inc),
-		.tlb_mask = tlb_mask,
-		};
-		tlb_write_indexed(pmap_tlb0_info.ti_wired, &tlb);
-		pmap_tlb0_info.ti_wired++;
-	}
-	mips3_cp0_wired_write(pmap_tlb0_info.ti_wired);
+	pmap_ksegx_bootstrap();
 #endif
 
 	/*
@@ -918,7 +934,7 @@ pmap_update(struct pmap *pm)
 	kpreempt_disable();
 #ifdef MULTIPROCESSOR
 	u_int pending = atomic_swap_uint(&pm->pm_shootdown_pending, 0);
-	if (pending && pmap_tlb_shootdown_bystanders(pm))
+	if (pending && pmap_tlb_shootdown_bystanders(pm, pending))
 		PMAP_COUNT(shootdown_ipis);
 #endif
 	/*

Index: src/sys/arch/mips/mips/pmap_tlb.c
diff -u src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.22 src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.23
--- src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.22	Thu Jan 19 08:28:50 2012
+++ src/sys/arch/mips/mips/pmap_tlb.c	Thu Feb 16 23:02:

CVS commit: src/sys/conf

2012-02-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 16 23:56:58 UTC 2012

Modified Files:
src/sys/conf: osrelease.sh

Log Message:
Add new -k (for kernel modules) flag to return MM.99.pp for current and MM.mm
for the release branch.


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/conf/osrelease.sh

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

Modified files:

Index: src/sys/conf/osrelease.sh
diff -u src/sys/conf/osrelease.sh:1.121 src/sys/conf/osrelease.sh:1.122
--- src/sys/conf/osrelease.sh:1.121	Thu Feb 16 12:25:35 2012
+++ src/sys/conf/osrelease.sh	Thu Feb 16 18:56:57 2012
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: osrelease.sh,v 1.121 2012/02/16 17:25:35 christos Exp $
+#	$NetBSD: osrelease.sh,v 1.122 2012/02/16 23:56:57 christos Exp $
 #
 # Copyright (c) 1997 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -54,6 +54,7 @@ done
 # return the next major number (e.g. for 5.99.nn, return 6)
 # -n: return MM.mm
 # -s: return MMmmpp (no dots)
+# -k: return MM.mm on release branch, MM.mm.pp on current.
 
 option="$1"
 
@@ -74,6 +75,16 @@ IFS=' '
 set -- $rel_MM ${rel_mm#0}$beta $*
 
 case "$option" in
+-k)
+	if [ ${rel_mm#0} = 99 ]
+	then
+		IFS=.
+		echo "$*"
+	else
+		echo "${rel_MM}.${rel_mm#0}"
+	fi
+	;;
+	 
 -m)
 	echo "$(((${rel_MMmm}+1)/100))"
 	;;



CVS commit: src/share/mk

2012-02-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 16 23:58:16 UTC 2012

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

Log Message:
use osrelease -k to avoid that the path is 6.0_BETA


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/share/mk/bsd.kmodule.mk

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

Modified files:

Index: src/share/mk/bsd.kmodule.mk
diff -u src/share/mk/bsd.kmodule.mk:1.33 src/share/mk/bsd.kmodule.mk:1.34
--- src/share/mk/bsd.kmodule.mk:1.33	Sun Sep 11 14:38:03 2011
+++ src/share/mk/bsd.kmodule.mk	Thu Feb 16 18:58:15 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.kmodule.mk,v 1.33 2011/09/11 18:38:03 mbalmer Exp $
+#	$NetBSD: bsd.kmodule.mk,v 1.34 2012/02/16 23:58:15 christos Exp $
 
 # We are not building this with PIE
 MKPIE=no
@@ -85,7 +85,7 @@ ${PROG}: ${OBJS} ${DPADD}
 # Install rules
 .if !target(kmodinstall)
 .if !defined(KMODULEDIR)
-_OSRELEASE!=	${HOST_SH} $S/conf/osrelease.sh
+_OSRELEASE!=	${HOST_SH} $S/conf/osrelease.sh -k
 # Ensure these are recorded properly in METALOG on unprived installes:
 KMODULEARCHDIR?= ${MACHINE}
 _INST_DIRS=	${DESTDIR}/stand/${KMODULEARCHDIR}



CVS commit: src/share/mk

2012-02-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Feb 17 00:00:02 UTC 2012

Modified Files:
src/share/mk: bsd.README bsd.own.mk

Log Message:
Derive MANINSTALL from MKCATPAGES and MKHTML.


To generate a diff of this commit:
cvs rdiff -u -r1.292 -r1.293 src/share/mk/bsd.README
cvs rdiff -u -r1.696 -r1.697 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.292 src/share/mk/bsd.README:1.293
--- src/share/mk/bsd.README:1.292	Tue Feb  7 22:58:49 2012
+++ src/share/mk/bsd.README	Fri Feb 17 00:00:02 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.292 2012/02/07 22:58:49 joerg Exp $
+#	$NetBSD: bsd.README,v 1.293 2012/02/17 00:00:02 joerg Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make "include" files for the NetBSD
@@ -512,7 +512,7 @@ MANMODE		Manual mode.  [${NONBINMODE}]
 
 MANINSTALL	Manual installation type.  Space separated list:
 			catinstall, htmlinstall, maninstall
-		[catinstall maninstall htmlinstall]
+		Default value derived from MKCATPAGES and MKHTML.
 
 LDSTATIC	Control program linking; if set blank, link everything
 		dynamically.  If set to "-static", link everything statically.

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.696 src/share/mk/bsd.own.mk:1.697
--- src/share/mk/bsd.own.mk:1.696	Fri Feb 10 05:57:42 2012
+++ src/share/mk/bsd.own.mk	Fri Feb 17 00:00:02 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.696 2012/02/10 05:57:42 matt Exp $
+#	$NetBSD: bsd.own.mk,v 1.697 2012/02/17 00:00:02 joerg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -525,7 +525,7 @@ MANDIR?=	/usr/share/man
 MANGRP?=	wheel
 MANOWN?=	root
 MANMODE?=	${NONBINMODE}
-MANINSTALL?=	catinstall htmlinstall maninstall
+MANINSTALL?=	${_MANINSTALL}
 
 INFODIR?=	/usr/share/info
 INFOGRP?=	wheel
@@ -883,6 +883,14 @@ MKCATPAGES:=	no
 MKHTML:=	no
 .endif
 
+_MANINSTALL=	maninstall
+.if ${MKCATPAGES} != "no"
+_MANINSTALL+=	catinstall
+.endif
+.if ${MKHTML} != "no"
+_MANINSTALL+=	htmlinstall
+.endif
+
 .if ${MKLINKLIB} == "no"
 MKLINT:=	no
 MKPICINSTALL:=	no



CVS commit: src/distrib/sets

2012-02-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 17 00:00:40 UTC 2012

Modified Files:
src/distrib/sets: sets.subr

Log Message:
use osrelease.sh -k instead of hand-rolled logic.


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/distrib/sets/sets.subr

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

Modified files:

Index: src/distrib/sets/sets.subr
diff -u src/distrib/sets/sets.subr:1.135 src/distrib/sets/sets.subr:1.136
--- src/distrib/sets/sets.subr:1.135	Tue Feb  7 14:13:24 2012
+++ src/distrib/sets/sets.subr	Thu Feb 16 19:00:39 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.135 2012/02/07 19:13:24 joerg Exp $
+#	$NetBSD: sets.subr,v 1.136 2012/02/17 00:00:39 christos Exp $
 #
 
 #
@@ -159,11 +159,7 @@ nlists="base comp etc games man misc $mo
 xlists="xbase xcomp xetc xfont xserver"
 extlists="extbase extcomp extetc"
 
-OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh -n`
-# for release branches, use X.Y version, for -current use X.Y.Z
-if [ ! "${OSRELEASE%.99}" = "${OSRELEASE}" ]; then
-	OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh`
-fi
+OSRELEASE=$(${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh -k)
 MODULEDIR="stand/${MACHINE}/${OSRELEASE}/modules"
 SUBST="s#@MODULEDIR@#${MODULEDIR}#g"
 SUBST="${SUBST};s#@OSRELEASE@#${OSRELEASE}#g"
@@ -176,7 +172,7 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.135 2012/02/07 19:13:24 joerg Exp $
+# 	# $NetBSD: sets.subr,v 1.136 2012/02/17 00:00:39 christos Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root
@@ -500,7 +496,7 @@ echo_if_exist_foreach()
 print_set_lists()
 {
 	for setname; do
-		list=`list_set_lists $setname`
+		list=$(list_set_lists $setname)
 		for l in $list; do
 			echo $l
 			if $verbose; then



CVS commit: [netbsd-6] src

2012-02-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 17 00:08:38 UTC 2012

Modified Files:
src/distrib/sets [netbsd-6]: sets.subr
src/share/mk [netbsd-6]: bsd.kmodule.mk
src/sys/conf [netbsd-6]: osrelease.sh

Log Message:
Pull up following revision(s) (requested by christos in ticket #6):
distrib/sets/sets.subr: revision 1.136
share/mk/bsd.kmodule.mk: revision 1.34
sys/conf/osrelease.sh: revision 1.122
Add new -k (for kernel modules) flag to return MM.99.pp for current and MM.mm
for the release branch.
use osrelease -k to avoid that the path is 6.0_BETA
use osrelease.sh -k instead of hand-rolled logic.


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.135.2.1 src/distrib/sets/sets.subr
cvs rdiff -u -r1.33 -r1.33.4.1 src/share/mk/bsd.kmodule.mk
cvs rdiff -u -r1.120.18.1 -r1.120.18.2 src/sys/conf/osrelease.sh

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

Modified files:

Index: src/distrib/sets/sets.subr
diff -u src/distrib/sets/sets.subr:1.135 src/distrib/sets/sets.subr:1.135.2.1
--- src/distrib/sets/sets.subr:1.135	Tue Feb  7 19:13:24 2012
+++ src/distrib/sets/sets.subr	Fri Feb 17 00:08:37 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.135 2012/02/07 19:13:24 joerg Exp $
+#	$NetBSD: sets.subr,v 1.135.2.1 2012/02/17 00:08:37 riz Exp $
 #
 
 #
@@ -159,11 +159,7 @@ nlists="base comp etc games man misc $mo
 xlists="xbase xcomp xetc xfont xserver"
 extlists="extbase extcomp extetc"
 
-OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh -n`
-# for release branches, use X.Y version, for -current use X.Y.Z
-if [ ! "${OSRELEASE%.99}" = "${OSRELEASE}" ]; then
-	OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh`
-fi
+OSRELEASE=$(${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh -k)
 MODULEDIR="stand/${MACHINE}/${OSRELEASE}/modules"
 SUBST="s#@MODULEDIR@#${MODULEDIR}#g"
 SUBST="${SUBST};s#@OSRELEASE@#${OSRELEASE}#g"
@@ -176,7 +172,7 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.135 2012/02/07 19:13:24 joerg Exp $
+# 	# $NetBSD: sets.subr,v 1.135.2.1 2012/02/17 00:08:37 riz Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root
@@ -500,7 +496,7 @@ echo_if_exist_foreach()
 print_set_lists()
 {
 	for setname; do
-		list=`list_set_lists $setname`
+		list=$(list_set_lists $setname)
 		for l in $list; do
 			echo $l
 			if $verbose; then

Index: src/share/mk/bsd.kmodule.mk
diff -u src/share/mk/bsd.kmodule.mk:1.33 src/share/mk/bsd.kmodule.mk:1.33.4.1
--- src/share/mk/bsd.kmodule.mk:1.33	Sun Sep 11 18:38:03 2011
+++ src/share/mk/bsd.kmodule.mk	Fri Feb 17 00:08:37 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.kmodule.mk,v 1.33 2011/09/11 18:38:03 mbalmer Exp $
+#	$NetBSD: bsd.kmodule.mk,v 1.33.4.1 2012/02/17 00:08:37 riz Exp $
 
 # We are not building this with PIE
 MKPIE=no
@@ -85,7 +85,7 @@ ${PROG}: ${OBJS} ${DPADD}
 # Install rules
 .if !target(kmodinstall)
 .if !defined(KMODULEDIR)
-_OSRELEASE!=	${HOST_SH} $S/conf/osrelease.sh
+_OSRELEASE!=	${HOST_SH} $S/conf/osrelease.sh -k
 # Ensure these are recorded properly in METALOG on unprived installes:
 KMODULEARCHDIR?= ${MACHINE}
 _INST_DIRS=	${DESTDIR}/stand/${KMODULEARCHDIR}

Index: src/sys/conf/osrelease.sh
diff -u src/sys/conf/osrelease.sh:1.120.18.1 src/sys/conf/osrelease.sh:1.120.18.2
--- src/sys/conf/osrelease.sh:1.120.18.1	Thu Feb 16 18:59:42 2012
+++ src/sys/conf/osrelease.sh	Fri Feb 17 00:08:38 2012
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: osrelease.sh,v 1.120.18.1 2012/02/16 18:59:42 riz Exp $
+#	$NetBSD: osrelease.sh,v 1.120.18.2 2012/02/17 00:08:38 riz Exp $
 #
 # Copyright (c) 1997 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -54,6 +54,7 @@ done
 # return the next major number (e.g. for 5.99.nn, return 6)
 # -n: return MM.mm
 # -s: return MMmmpp (no dots)
+# -k: return MM.mm on release branch, MM.mm.pp on current.
 
 option="$1"
 
@@ -74,6 +75,16 @@ IFS=' '
 set -- $rel_MM ${rel_mm#0}$beta $*
 
 case "$option" in
+-k)
+	if [ ${rel_mm#0} = 99 ]
+	then
+		IFS=.
+		echo "$*"
+	else
+		echo "${rel_MM}.${rel_mm#0}"
+	fi
+	;;
+	 
 -m)
 	echo "$(((${rel_MMmm}+1)/100))"
 	;;



CVS commit: [netbsd-6] src/doc

2012-02-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 17 00:08:49 UTC 2012

Modified Files:
src/doc [netbsd-6]: CHANGES-6.0

Log Message:
Ticket #6.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/doc/CHANGES-6.0

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

Modified files:

Index: src/doc/CHANGES-6.0
diff -u src/doc/CHANGES-6.0:1.1.2.2 src/doc/CHANGES-6.0:1.1.2.3
--- src/doc/CHANGES-6.0:1.1.2.2	Thu Feb 16 19:57:07 2012
+++ src/doc/CHANGES-6.0	Fri Feb 17 00:08:49 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.2 2012/02/16 19:57:07 riz Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.3 2012/02/17 00:08:49 riz Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -20,3 +20,11 @@ etc/weekly	1.26
 	Run makemandb with the normal 022 umask, not the restrictive 077.
 	[joerg, ticket #2]
 
+distrib/sets/sets.subr1.136
+share/mk/bsd.kmodule.mk1.34
+sys/conf/osrelease.sh1.122
+
+	Reconcile the various methods of telling what kernel version
+	modules are for.
+	[christos, ticket #6]
+



CVS commit: src/distrib

2012-02-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 17 00:33:25 UTC 2012

Modified Files:
src/distrib/amd64/kmod: Makefile
src/distrib/common: Makefile.distrib
src/distrib/i386/kmod: Makefile

Log Message:
Use a new variable, MODULEVER, for kernel modules, tracking what's been
done elsewhere.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/amd64/kmod/Makefile
cvs rdiff -u -r1.8 -r1.9 src/distrib/common/Makefile.distrib
cvs rdiff -u -r1.10 -r1.11 src/distrib/i386/kmod/Makefile

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

Modified files:

Index: src/distrib/amd64/kmod/Makefile
diff -u src/distrib/amd64/kmod/Makefile:1.1 src/distrib/amd64/kmod/Makefile:1.2
--- src/distrib/amd64/kmod/Makefile:1.1	Tue Jan 18 00:22:56 2011
+++ src/distrib/amd64/kmod/Makefile	Fri Feb 17 00:33:24 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2011/01/18 00:22:56 jym Exp $
+#	$NetBSD: Makefile,v 1.2 2012/02/17 00:33:24 riz Exp $
 
 .include 
 .include "../../common/Makefile.distrib"
@@ -6,7 +6,7 @@
 MKMAN=		no
 PROG=		miniroot.kmod
 
-SRCMOD=		${DESTDIR}/stand/${MACHINE}/${DISTRIBVER}/modules/miniroot/miniroot.kmod
+SRCMOD=		${DESTDIR}/stand/${MACHINE}/${MODULEVER}/modules/miniroot/miniroot.kmod
 DSTMOD=		${.OBJDIR}/miniroot.kmod
 RAMDISK=	ramdisk
 RAMDISKDIR!=	cd ${.CURDIR}/../ramdisks/${RAMDISK} && ${PRINTOBJDIR}

Index: src/distrib/common/Makefile.distrib
diff -u src/distrib/common/Makefile.distrib:1.8 src/distrib/common/Makefile.distrib:1.9
--- src/distrib/common/Makefile.distrib:1.8	Sun Feb  7 18:50:49 2010
+++ src/distrib/common/Makefile.distrib	Fri Feb 17 00:33:25 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.distrib,v 1.8 2010/02/07 18:50:49 snj Exp $
+#	$NetBSD: Makefile.distrib,v 1.9 2012/02/17 00:33:25 riz Exp $
 #
 # Makefile snippet to setup various make variables variables used in distrib/:
 #
@@ -22,6 +22,7 @@ _MAKEFILE_DISTRIB_=1
 DISTRIBDIR=	${NETBSDSRCDIR}/distrib
 DISTRIBREV!=	${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh -s
 DISTRIBVER!=	${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh
+MODULEVER!=	${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh -k
 DISTRIBVERDEP=	${NETBSDSRCDIR}/sys/sys/param.h \
 		${NETBSDSRCDIR}/sys/conf/osrelease.sh
 

Index: src/distrib/i386/kmod/Makefile
diff -u src/distrib/i386/kmod/Makefile:1.10 src/distrib/i386/kmod/Makefile:1.11
--- src/distrib/i386/kmod/Makefile:1.10	Fri Apr  3 22:36:35 2009
+++ src/distrib/i386/kmod/Makefile	Fri Feb 17 00:33:25 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2009/04/03 22:36:35 perry Exp $
+#	$NetBSD: Makefile,v 1.11 2012/02/17 00:33:25 riz Exp $
 
 .include 
 .include "../../common/Makefile.distrib"
@@ -6,7 +6,7 @@
 MKMAN=		no
 PROG=		miniroot.kmod
 
-SRCMOD=		${DESTDIR}/stand/${MACHINE}/${DISTRIBVER}/modules/miniroot/miniroot.kmod
+SRCMOD=		${DESTDIR}/stand/${MACHINE}/${MODULEVER}/modules/miniroot/miniroot.kmod
 DSTMOD=		${.OBJDIR}/miniroot.kmod
 RAMDISK=	ramdisk-big
 RAMDISKDIR!=	cd ${.CURDIR}/../ramdisks/${RAMDISK} && ${PRINTOBJDIR}



CVS commit: [netbsd-6] src/distrib

2012-02-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 17 00:42:28 UTC 2012

Modified Files:
src/distrib/amd64/kmod [netbsd-6]: Makefile
src/distrib/common [netbsd-6]: Makefile.distrib
src/distrib/i386/kmod [netbsd-6]: Makefile

Log Message:
Pull up following revision(s) (requested by martin in ticket #6):
distrib/common/Makefile.distrib: revision 1.9
distrib/i386/kmod/Makefile: revision 1.11
distrib/amd64/kmod/Makefile: revision 1.2
Use a new variable, MODULEVER, for kernel modules, tracking what's been
done elsewhere.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.8.1 src/distrib/amd64/kmod/Makefile
cvs rdiff -u -r1.8 -r1.8.8.1 src/distrib/common/Makefile.distrib
cvs rdiff -u -r1.10 -r1.10.8.1 src/distrib/i386/kmod/Makefile

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

Modified files:

Index: src/distrib/amd64/kmod/Makefile
diff -u src/distrib/amd64/kmod/Makefile:1.1 src/distrib/amd64/kmod/Makefile:1.1.8.1
--- src/distrib/amd64/kmod/Makefile:1.1	Tue Jan 18 00:22:56 2011
+++ src/distrib/amd64/kmod/Makefile	Fri Feb 17 00:42:28 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2011/01/18 00:22:56 jym Exp $
+#	$NetBSD: Makefile,v 1.1.8.1 2012/02/17 00:42:28 riz Exp $
 
 .include 
 .include "../../common/Makefile.distrib"
@@ -6,7 +6,7 @@
 MKMAN=		no
 PROG=		miniroot.kmod
 
-SRCMOD=		${DESTDIR}/stand/${MACHINE}/${DISTRIBVER}/modules/miniroot/miniroot.kmod
+SRCMOD=		${DESTDIR}/stand/${MACHINE}/${MODULEVER}/modules/miniroot/miniroot.kmod
 DSTMOD=		${.OBJDIR}/miniroot.kmod
 RAMDISK=	ramdisk
 RAMDISKDIR!=	cd ${.CURDIR}/../ramdisks/${RAMDISK} && ${PRINTOBJDIR}

Index: src/distrib/common/Makefile.distrib
diff -u src/distrib/common/Makefile.distrib:1.8 src/distrib/common/Makefile.distrib:1.8.8.1
--- src/distrib/common/Makefile.distrib:1.8	Sun Feb  7 18:50:49 2010
+++ src/distrib/common/Makefile.distrib	Fri Feb 17 00:42:27 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.distrib,v 1.8 2010/02/07 18:50:49 snj Exp $
+#	$NetBSD: Makefile.distrib,v 1.8.8.1 2012/02/17 00:42:27 riz Exp $
 #
 # Makefile snippet to setup various make variables variables used in distrib/:
 #
@@ -22,6 +22,7 @@ _MAKEFILE_DISTRIB_=1
 DISTRIBDIR=	${NETBSDSRCDIR}/distrib
 DISTRIBREV!=	${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh -s
 DISTRIBVER!=	${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh
+MODULEVER!=	${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh -k
 DISTRIBVERDEP=	${NETBSDSRCDIR}/sys/sys/param.h \
 		${NETBSDSRCDIR}/sys/conf/osrelease.sh
 

Index: src/distrib/i386/kmod/Makefile
diff -u src/distrib/i386/kmod/Makefile:1.10 src/distrib/i386/kmod/Makefile:1.10.8.1
--- src/distrib/i386/kmod/Makefile:1.10	Fri Apr  3 22:36:35 2009
+++ src/distrib/i386/kmod/Makefile	Fri Feb 17 00:42:28 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2009/04/03 22:36:35 perry Exp $
+#	$NetBSD: Makefile,v 1.10.8.1 2012/02/17 00:42:28 riz Exp $
 
 .include 
 .include "../../common/Makefile.distrib"
@@ -6,7 +6,7 @@
 MKMAN=		no
 PROG=		miniroot.kmod
 
-SRCMOD=		${DESTDIR}/stand/${MACHINE}/${DISTRIBVER}/modules/miniroot/miniroot.kmod
+SRCMOD=		${DESTDIR}/stand/${MACHINE}/${MODULEVER}/modules/miniroot/miniroot.kmod
 DSTMOD=		${.OBJDIR}/miniroot.kmod
 RAMDISK=	ramdisk-big
 RAMDISKDIR!=	cd ${.CURDIR}/../ramdisks/${RAMDISK} && ${PRINTOBJDIR}



CVS commit: [netbsd-6] src/doc

2012-02-16 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Fri Feb 17 00:43:14 UTC 2012

Modified Files:
src/doc [netbsd-6]: CHANGES-6.0

Log Message:
Ticket #6.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/doc/CHANGES-6.0

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

Modified files:

Index: src/doc/CHANGES-6.0
diff -u src/doc/CHANGES-6.0:1.1.2.3 src/doc/CHANGES-6.0:1.1.2.4
--- src/doc/CHANGES-6.0:1.1.2.3	Fri Feb 17 00:08:49 2012
+++ src/doc/CHANGES-6.0	Fri Feb 17 00:43:14 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.3 2012/02/17 00:08:49 riz Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.4 2012/02/17 00:43:14 riz Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -20,6 +20,9 @@ etc/weekly	1.26
 	Run makemandb with the normal 022 umask, not the restrictive 077.
 	[joerg, ticket #2]
 
+distrib/amd64/kmod/Makefile			1.2
+distrib/common/Makefile.distrib			1.9
+distrib/i386/kmod/Makefile			1.11
 distrib/sets/sets.subr1.136
 share/mk/bsd.kmodule.mk1.34
 sys/conf/osrelease.sh1.122



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

2012-02-16 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Fri Feb 17 02:06:54 UTC 2012

Modified Files:
othersrc/external/bsd/httpdev/dist: main.c

Log Message:
return the number of characters read/written in the small target operation,
not the size that was requested.


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

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

Modified files:

Index: othersrc/external/bsd/httpdev/dist/main.c
diff -u othersrc/external/bsd/httpdev/dist/main.c:1.3 othersrc/external/bsd/httpdev/dist/main.c:1.4
--- othersrc/external/bsd/httpdev/dist/main.c:1.3	Thu Feb 16 04:06:57 2012
+++ othersrc/external/bsd/httpdev/dist/main.c	Fri Feb 17 02:06:54 2012
@@ -125,7 +125,7 @@ inquiry(const char *uri, targetinfo_t *i
 }
 
 /* read info from the target - method depends on size of data being read */
-static int 
+static ssize_t 
 targetop(const char *uri, uint64_t offset, uint32_t length, char *buf, const int writing)
 {
 	if (writing) {
@@ -235,15 +235,16 @@ httpdev_read(const char *path, char *buf
 	virt_dirent_t	*ep;
 	smalltgt_t	*smalltgt;
 	const int	 reading = 0;
+	ssize_t		 rc;
 
 	if ((ep = virtdir_find(&httpdev, path, strlen(path))) == NULL) {
 		return -ENOENT;
 	}
 	smalltgt = (smalltgt_t *)ep->tgt;
-	if (targetop(smalltgt->uri, offset, size, buf, reading) < 0) {
+	if ((rc = targetop(smalltgt->uri, offset, size, buf, reading)) < 0) {
 		return -EPERM;
 	}
-	return size;
+	return rc;
 }
 
 /* write the file's contents to the file system */
@@ -254,15 +255,16 @@ httpdev_write(const char *path, const ch
 	virt_dirent_t	*ep;
 smalltgt_t	*smalltgt;
 	const int	 writing = 1;
+	ssize_t		 wc;
 
 	if ((ep = virtdir_find(&httpdev, path, strlen(path))) == NULL) {
 		return -ENOENT;
 	}
 	smalltgt = (smalltgt_t *)ep->tgt;
-	if (targetop(smalltgt->uri, offset, size, __UNCONST(buf), writing) < 0) {
+	if ((wc = targetop(smalltgt->uri, offset, size, __UNCONST(buf), writing)) < 0) {
 		return -EPERM;
 	}
-	return size;
+	return wc;
 }
 
 /* fill in the statvfs struct */



CVS commit: othersrc/crypto/external/bsd/ssss/dist/src/libssss

2012-02-16 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Fri Feb 17 02:11:18 UTC 2012

Modified Files:
othersrc/crypto/external/bsd//dist/src/lib: threshold.c

Log Message:
don't rely on an application (such as (1)) being able to mmap(2) the
shares it presents via lib - allocate space using calloc(3) if the mmap
fails.

this change allows us to use (1) to combine shares from different
websites, mounted using httpdev(8).


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
othersrc/crypto/external/bsd//dist/src/lib/threshold.c

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

Modified files:

Index: othersrc/crypto/external/bsd//dist/src/lib/threshold.c
diff -u othersrc/crypto/external/bsd//dist/src/lib/threshold.c:1.1.1.1 othersrc/crypto/external/bsd//dist/src/lib/threshold.c:1.2
--- othersrc/crypto/external/bsd//dist/src/lib/threshold.c:1.1.1.1	Mon Mar 21 05:43:35 2011
+++ othersrc/crypto/external/bsd//dist/src/lib/threshold.c	Fri Feb 17 02:11:18 2012
@@ -85,6 +85,21 @@ swapheader(thresh_head_t *head)
 head->size = (*(char *)(void *)&indian) ? head->size : (uint64_t)BSWAP64(head->size);
 }
 
+/* allocate space from heap */
+static int
+allocate(thresh_str_t *share, const void *data, size_t size)
+{
+	if ((share->io.base = calloc(1, size)) == NULL) {
+		(void) fprintf(stderr, "allocate: can't calloc %zu\n", size);
+		return 0;
+	}
+	if (data) {
+		(void) memcpy(share->io.base, data, size);
+	}
+	share->io.size = size;
+	return 1;
+}
+
 /**/
 
 /* check we have a sane header */
@@ -134,6 +149,8 @@ _add_share(threshold_t *thresh, unsi
 {
 	thresh_str_t	*share;
 	struct stat	 st;
+	ssize_t		 rc;
+	ssize_t		 cc;
 	FILE		*fp;
 
 	if (n != THRESH_MAX_SHARES) {
@@ -149,19 +166,23 @@ _add_share(threshold_t *thresh, unsi
 		share->io.size = (size_t)st.st_size;
 		share->io.base = mmap(NULL, share->io.size, PROT_READ, MAP_PRIVATE, fileno(fp), 0);
 		if (share->io.base == MAP_FAILED) {
-			(void) fprintf(stderr, "ida_add_share: can't mmap file '%s'\n", (const char *)data);
-			(void) fclose(fp);
-			return 0;
+			if (!allocate(share, NULL, (size_t)st.st_size)) {
+return 0;
+			}
+			for (cc = 0 ; cc < st.st_size ; cc += rc) {
+if ((rc = read(fileno(fp), &share->io.base[cc], st.st_size - cc)) < 0) {
+	break;
+}
+			}
+			thresh->mapped[n] = ALLOCATED;
+		} else {
+			thresh->mapped[n] = MMAPPED;
 		}
-		thresh->mapped[n] = MMAPPED;
+		(void) fclose(fp);
 	} else {
-		if ((share->io.base = calloc(1, (size_t)size)) == NULL) {
-			(void) fprintf(stderr, "ida_add_share: can't calloc %zu\n",
-(size_t)size);
+		if (!allocate(share, data, size)) {
 			return 0;
 		}
-		(void) memcpy(share->io.base, data, (size_t)size);
-		share->io.size = (size_t)size;
 		thresh->mapped[n] = ALLOCATED;
 	}
 	return 1;



CVS commit: src/doc

2012-02-16 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Feb 17 06:11:30 UTC 2012

Modified Files:
src/doc: 3RDPARTY

Log Message:
ACPICA 20120215 is out, including support for ACPI 5.0.


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

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.909 src/doc/3RDPARTY:1.910
--- src/doc/3RDPARTY:1.909	Fri Feb 10 23:46:25 2012
+++ src/doc/3RDPARTY	Fri Feb 17 06:11:29 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.909 2012/02/10 23:46:25 riz Exp $
+#	$NetBSD: 3RDPARTY,v 1.910 2012/02/17 06:11:29 jruoho Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -25,16 +25,15 @@
 # remaining lines until the end of the record are notes.
 
 Package:	acpica
-Version:	20110922
-Current Vers:	20110623
+Version:	20110623
+Current Vers:	20120215
 Maintainer:	Intel
 Archive Site:	http://www.acpica.org/downloads/unix2_source_code.php
 Home Page:	http://www.acpica.org/
 Mailing List:	de...@acpica.org
 License:	BSD-like
-Responsible:	jmcneill, jruoho
+Responsible:	jruoho
 Notes:
-The sources were integrated into src/sys/dev/acpi/acpica/Subsystem.
 Please read src/sys/dev/acpi/acpica/README before any modification.
 
 Package:	am-utils [amd]



CVS commit: [matt-nb5-mips64] src/usr.bin/ldd

2012-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Feb 17 07:43:45 UTC 2012

Modified Files:
src/usr.bin/ldd [matt-nb5-mips64]: Makefile.common

Log Message:
MIPS uses a variable page size now


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.2.4.1 src/usr.bin/ldd/Makefile.common

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

Modified files:

Index: src/usr.bin/ldd/Makefile.common
diff -u src/usr.bin/ldd/Makefile.common:1.1.2.2 src/usr.bin/ldd/Makefile.common:1.1.2.2.4.1
--- src/usr.bin/ldd/Makefile.common:1.1.2.2	Fri Jan 16 22:21:30 2009
+++ src/usr.bin/ldd/Makefile.common	Fri Feb 17 07:43:45 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.common,v 1.1.2.2 2009/01/16 22:21:30 bouyer Exp $
+#	$NetBSD: Makefile.common,v 1.1.2.2.4.1 2012/02/17 07:43:45 matt Exp $
 
 LDELFSO=${NETBSDSRCDIR}/libexec/ld.elf_so
 CPPFLAGS+= -I${LDELFSO} -DLIBDIR=\"${LIBDIR}\"
@@ -8,6 +8,6 @@ CPPFLAGS+= -D_RTLD_SOURCE
 
 .if (${MACHINE_ARCH} == "sparc") || (${MACHINE_ARCH} == "sparc64") || \
 (${MACHINE_ARCH} == "arm") || (${MACHINE_ARCH} == "m68k") || \
-(${MACHINE_ARCH} == "powerpc")
+(${MACHINE_ARCH} == "powerpc") || (${MACHINE_ARCH:Mmips*} != "")
 CPPFLAGS+= -DVARPSZ
 .endif



CVS commit: [matt-nb5-mips64] src/usr.bin/ldd

2012-02-16 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Feb 17 07:44:30 UTC 2012

Modified Files:
src/usr.bin/ldd [matt-nb5-mips64]: ldd.c ldd.h ldd_elfxx.c

Log Message:
Move fmtprint and print_needed since they are dependent on ELFSIZE.


To generate a diff of this commit:
cvs rdiff -u -r1.2.12.2.4.2 -r1.2.12.2.4.3 src/usr.bin/ldd/ldd.c
cvs rdiff -u -r1.1.2.3.4.1 -r1.1.2.3.4.2 src/usr.bin/ldd/ldd.h
cvs rdiff -u -r1.1.2.3 -r1.1.2.3.4.1 src/usr.bin/ldd/ldd_elfxx.c

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

Modified files:

Index: src/usr.bin/ldd/ldd.c
diff -u src/usr.bin/ldd/ldd.c:1.2.12.2.4.2 src/usr.bin/ldd/ldd.c:1.2.12.2.4.3
--- src/usr.bin/ldd/ldd.c:1.2.12.2.4.2	Wed Apr 21 05:27:11 2010
+++ src/usr.bin/ldd/ldd.c	Fri Feb 17 07:44:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ldd.c,v 1.2.12.2.4.2 2010/04/21 05:27:11 matt Exp $	*/
+/*	$NetBSD: ldd.c,v 1.2.12.2.4.3 2012/02/17 07:44:29 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: ldd.c,v 1.2.12.2.4.2 2010/04/21 05:27:11 matt Exp $");
+__RCSID("$NetBSD: ldd.c,v 1.2.12.2.4.3 2012/02/17 07:44:29 matt Exp $");
 #endif /* not lint */
 
 #include 
@@ -90,6 +90,10 @@ __RCSID("$NetBSD: ldd.c,v 1.2.12.2.4.2 2
  */
 static char *error_message;	/* Message for dlopen(), or NULL */
 bool _rtld_trust;		/* False for setuid and setgid programs */
+/*
+ * This may be ELF64 or ELF32 but since they are used opaquely it doesn't
+ * really matter.
+ */
 Obj_Entry *_rtld_objlist;	/* Head of linked list of shared objects */
 Obj_Entry **_rtld_objtail = &_rtld_objlist;
 /* Link field of last object in list */
@@ -191,108 +195,3 @@ dlerror()
 	error_message = NULL;
 	return msg;
 }
-
-void
-fmtprint(const char *libname, Obj_Entry *obj, const char *fmt1,
-const char *fmt2)
-{
-	const char *libpath = obj ? obj->path : "not found";
-	char libnamebuf[200];
-	char *libmajor = NULL;
-	const char *fmt;
-	char *cp;
-	int c;
-
-	if (strncmp(libname, "lib", 3) == 0 &&
-	(cp = strstr(libname, ".so")) != NULL) {
-		int i = cp - (libname + 3);
-
-		if (i >= sizeof(libnamebuf))
-			i = sizeof(libnamebuf) - 1;
-		(void)memcpy(libnamebuf, libname + 3, i);
-		libnamebuf[i] = '\0';
-		if (cp[3] && isdigit((unsigned char)cp[4]))
-			libmajor = &cp[4];
-		libname = libnamebuf;
-	}
-
-	if (fmt1 == NULL)
-		fmt1 = libmajor != NULL ?
-		"\t-l%o.%m => %p\n" :
-		"\t-l%o => %p\n";
-	if (fmt2 == NULL)
-		fmt2 = "\t%o => %p\n";
-
-	fmt = libname == libnamebuf ? fmt1 : fmt2;
-	while ((c = *fmt++) != '\0') {
-		switch (c) {
-		default:
-			putchar(c);
-			continue;
-		case '\\':
-			switch (c = *fmt) {
-			case '\0':
-continue;
-			case 'n':
-putchar('\n');
-break;
-			case 't':
-putchar('\t');
-break;
-			}
-			break;
-		case '%':
-			switch (c = *fmt) {
-			case '\0':
-continue;
-			case '%':
-			default:
-putchar(c);
-break;
-			case 'A':
-printf("%s", main_local);
-break;
-			case 'a':
-printf("%s", main_progname);
-break;
-			case 'o':
-printf("%s", libname);
-break;
-			case 'm':
-printf("%s", libmajor);
-break;
-			case 'n':
-/* XXX: not supported for elf */
-break;
-			case 'p':
-printf("%s", libpath);
-break;
-			case 'x':
-printf("%p", obj ? obj->mapbase : 0);
-break;
-			}
-			break;
-		}
-		++fmt;
-	}
-}
-
-void
-print_needed(Obj_Entry *obj, const char *fmt1, const char *fmt2)
-{
-	const Needed_Entry *needed;
-
-	for (needed = obj->needed; needed != NULL; needed = needed->next) {
-		const char *libname = obj->strtab + needed->name;
-
-		if (needed->obj != NULL) {
-			if (!needed->obj->printed) {
-fmtprint(libname, needed->obj, fmt1, fmt2);
-needed->obj->printed = 1;
-print_needed(needed->obj, fmt1, fmt2);
-			}
-		} else {
-			fmtprint(libname, needed->obj, fmt1, fmt2);
-		}
-	}
-}

Index: src/usr.bin/ldd/ldd.h
diff -u src/usr.bin/ldd/ldd.h:1.1.2.3.4.1 src/usr.bin/ldd/ldd.h:1.1.2.3.4.2
--- src/usr.bin/ldd/ldd.h:1.1.2.3.4.1	Wed Dec 23 03:14:47 2009
+++ src/usr.bin/ldd/ldd.h	Fri Feb 17 07:44:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ldd.h,v 1.1.2.3.4.1 2009/12/23 03:14:47 mrg Exp $	*/
+/*	$NetBSD: ldd.h,v 1.1.2.3.4.2 2012/02/17 07:44:29 matt Exp $	*/
 
 /*
  * Copyright (c) 2008 Matthew R. Green
@@ -44,8 +44,5 @@ int elf64_ldd(int, char *, char *, char 
 #define elf_ldd elf32_ldd
 #endif
 
-void fmtprint(const char *, Obj_Entry *, const char *, const char *);
-void print_needed(Obj_Entry *, const char *, const char *);
-
 extern char *main_local;
 extern char *main_progname;

Index: src/usr.bin/ldd/ldd_elfxx.c
diff -u src/usr.bin/ldd/ldd_elfxx.c:1.1.2.3 src/usr.bin/ldd/ldd_elfxx.c:1.1.2.3.4.1
--- src/usr.bin/ldd/ldd_elfxx.c:1.1.2.3	Wed Feb 25 03:09:31 2009
+++ src/usr.bin/ldd/ldd_elfxx.c	Fri Feb 17 07:44:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ldd_elfxx.c,v 1.1.2.3 2009/02/25 03:09:31 snj Exp $	*/
+/*	$NetBSD: ldd_elfxx.c,

CVS commit: src/doc

2012-02-16 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Feb 17 07:46:54 UTC 2012

Modified Files:
src/doc: CHANGES

Log Message:
s/tmux/tmux(1)/ in the entry about removal of window(1)


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1672 src/doc/CHANGES:1.1673
--- src/doc/CHANGES:1.1672	Thu Feb 16 04:52:49 2012
+++ src/doc/CHANGES	Fri Feb 17 07:46:54 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1672 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1673 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -25,5 +25,5 @@
 
 
 Changes from NetBSD 6.0 to NetBSD 7.0:
-	window(1): Removed from the base system in favor of tmux.  Use the
+	window(1): Removed from the base system in favor of tmux(1).  Use the
 		pkgsrc/misc/window package from now on.  [jmmv 20120215]



CVS commit: src/usr.sbin/postinstall

2012-02-16 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Feb 17 07:51:20 UTC 2012

Modified Files:
src/usr.sbin/postinstall: postinstall

Log Message:
Add "pwd_mkdb" item, which checks whether /etc/pwd.db is in the
new format, and runs "pwd_mkdb -V 1 /etc/master.passwd" to fix it.


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 src/usr.sbin/postinstall/postinstall

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

Modified files:

Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.129 src/usr.sbin/postinstall/postinstall:1.130
--- src/usr.sbin/postinstall/postinstall:1.129	Wed Feb 15 13:01:00 2012
+++ src/usr.sbin/postinstall/postinstall	Fri Feb 17 07:51:20 2012
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.129 2012/02/15 13:01:00 joerg Exp $
+# $NetBSD: postinstall,v 1.130 2012/02/17 07:51:20 apb Exp $
 #
 # Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -53,10 +53,12 @@
 # This script is executed as part of a cross build.  Allow the build
 # environment to override the locations of some tools.
 : ${AWK:=awk}
+: ${DB:=db}
 : ${EGREP:=egrep}
 : ${FGREP:=fgrep}
 : ${GREP:=grep}
 : ${MAKE:=make}
+: ${PWD_MKDB:=/usr/sbin/pwd_mkdb}
 
 #
 #	helper functions
@@ -1107,6 +1109,43 @@ do_pf()
 }
 
 #
+#	pwd_mkdb
+#
+additem pwd_mkdb "passwd database version"
+do_pwd_mkdb()
+{
+	[ -n "$1" ] || err 3 "USAGE: do_pwd_mkdb  fix|check"
+	op="$1"
+	failed=0
+
+	# XXX Ideally, we should figure out the endianness of the
+	# target machine, and add "-E B"/"-E L" to the db(1) flags,
+	# and "-B"/"-L" to the pwd_mkdb(8) flags if the target is not
+	# the same as the host machine.  It probably doesn't matter,
+	# because we don't expect "postinstall fix pwd_mkdb" to be
+	# invoked during a cross build.
+
+	set -- $(${DB} -q -Sb -Ub -To -N hash ${DEST_DIR}/etc/pwd.db \
+		'VERSION\0')
+	case "$2" in
+	'\001\000\000\000') return 0 ;; # version 1, little-endian
+	'\000\000\000\001') return 0 ;; # version 1, big-endian
+	esac
+
+	if [ "${op}" = "check" ]; then
+		msg "Update format of passwd database"
+		failed=1
+	elif ! ${PWD_MKDB} -V 1 ${DEST_DIR}/etc/master.passwd; then
+		msg "Can't update format of passwd database"
+		failed=1
+	else
+		msg "Updated format of passwd database"
+	fi
+
+	return ${failed}
+}
+
+#
 #	rc
 #
 additem rc "/etc/rc* and /etc/rc.d/ being up to date"



CVS commit: src/doc

2012-02-16 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Feb 17 07:51:51 UTC 2012

Modified Files:
src/doc: CHANGES

Log Message:
document postinstall pwd_mkdb item


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1673 src/doc/CHANGES:1.1674
--- src/doc/CHANGES:1.1673	Fri Feb 17 07:46:54 2012
+++ src/doc/CHANGES	Fri Feb 17 07:51:51 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1673 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1674 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -27,3 +27,6 @@
 Changes from NetBSD 6.0 to NetBSD 7.0:
 	window(1): Removed from the base system in favor of tmux(1).  Use the
 		pkgsrc/misc/window package from now on.  [jmmv 20120215]
+
+	postinstall(8): Added pwd_mkdb item, to run "pwd_mkdb -V 1
+		/etc/master.passwd" if necessary.  [apb 20120217]