CVS commit: src/share/zoneinfo

2012-11-13 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Tue Nov 13 10:57:49 UTC 2012

Update of /cvsroot/src/share/zoneinfo
In directory ivanova.netbsd.org:/tmp/cvs-serv2321

Log Message:
Import tzdata2012j from ftp://ftp.iana.org/tz/releases/tzdata2012j.tar.gz

Changes from tzdata2012i to tzdata2012j:

  Libya moved to CET this weekend, but with DST planned next year.
  (Thanks to Even Scharning, Steffen Thorsen, and Tim Parenti.)

  Various fixes to documentation and commentary.

Status:

Vendor Tag: ADO
Release Tags:   TZDATA2012J

U src/share/zoneinfo/antarctica
C src/share/zoneinfo/Makefile
U src/share/zoneinfo/africa
C src/share/zoneinfo/australasia
U src/share/zoneinfo/asia
U src/share/zoneinfo/northamerica
U src/share/zoneinfo/europe
U src/share/zoneinfo/yearistype.sh
U src/share/zoneinfo/southamerica
U src/share/zoneinfo/pacificnew
U src/share/zoneinfo/etcetera
U src/share/zoneinfo/backward
U src/share/zoneinfo/systemv
U src/share/zoneinfo/factory
U src/share/zoneinfo/solar87
U src/share/zoneinfo/solar88
U src/share/zoneinfo/solar89
U src/share/zoneinfo/iso3166.tab
U src/share/zoneinfo/zone.tab
U src/share/zoneinfo/leapseconds

2 conflicts created by this import.
Use the following command to help the merge:

cvs checkout -jADO:yesterday -jADO src/share/zoneinfo



CVS commit: src/share/zoneinfo

2012-11-13 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Tue Nov 13 10:59:59 UTC 2012

Modified Files:
src/share/zoneinfo: australasia

Log Message:
Merge tzdata2012j from ftp://ftp.iana.org/tz/releases/tzdata2012j.tar.gz

Changes from tzdata2012i to tzdata2012j:

  Libya moved to CET this weekend, but with DST planned next year.
  (Thanks to Even Scharning, Steffen Thorsen, and Tim Parenti.)

  Various fixes to documentation and commentary.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/share/zoneinfo/australasia

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

Modified files:

Index: src/share/zoneinfo/australasia
diff -u src/share/zoneinfo/australasia:1.28 src/share/zoneinfo/australasia:1.29
--- src/share/zoneinfo/australasia:1.28	Thu Oct 18 08:50:32 2012
+++ src/share/zoneinfo/australasia	Tue Nov 13 10:59:58 2012
@@ -780,7 +780,7 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 
 # This data is by no means authoritative; if you think you know better,
 # go ahead and edit the file (and please send any changes to
-# t...@elsie.nci.nih.gov for general use in the future).
+# t...@iana.org for general use in the future).
 
 # From Paul Eggert (2006-03-22):
 # A good source for time zone historical data outside the U.S. is



CVS commit: src/doc

2012-11-13 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Tue Nov 13 11:03:31 UTC 2012

Modified Files:
src/doc: 3RDPARTY

Log Message:
tzcode2012j and tzdata2012j have been released.
We have updated to tzcode2012j.


To generate a diff of this commit:
cvs rdiff -u -r1.981 -r1.982 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.981 src/doc/3RDPARTY:1.982
--- src/doc/3RDPARTY:1.981	Tue Nov 13 00:57:55 2012
+++ src/doc/3RDPARTY	Tue Nov 13 11:03:31 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.981 2012/11/13 00:57:55 jdf Exp $
+#	$NetBSD: 3RDPARTY,v 1.982 2012/11/13 11:03:31 apb Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1189,8 +1189,8 @@ Notes:
 Added changes from a5 - a12 manually.
 
 Package:	tz
-Version:	tzcode2012h / tzdata2012i
-Current Vers:	tzcode2012i / tzdata2012i
+Version:	tzcode2012h / tzdata2012j
+Current Vers:	tzcode2012j / tzdata2012j
 Maintainer:	Paul Eggert egg...@cs.ucla.edu
 Archive Site:	ftp://ftp.iana.org/tz/releases/
 Archive Site:	ftp://munnari.oz.au/pub/oldtz/



CVS commit: src/doc

2012-11-13 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Tue Nov 13 11:03:51 UTC 2012

Modified Files:
src/doc: CHANGES

Log Message:
zoneinfo: Import tzdata2012j. [apb 20121113]


To generate a diff of this commit:
cvs rdiff -u -r1.1757 -r1.1758 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.1757 src/doc/CHANGES:1.1758
--- src/doc/CHANGES:1.1757	Fri Nov  9 19:59:41 2012
+++ src/doc/CHANGES	Tue Nov 13 11:03:50 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1757 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1758 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -138,3 +138,4 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 		to shlock(1) [christos 20121101]
 	zoneinfo: Import tzdata2012i. [apb 20121104]
 	voodoofb(4): Add 3Dfx Voodoo Banshee support. [rkujawa 20121109]
+	zoneinfo: Import tzdata2012j. [apb 20121113]



CVS commit: src/sys/arch/x86

2012-11-13 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Nov 13 14:07:43 UTC 2012

Modified Files:
src/sys/arch/x86/include: pmap.h
src/sys/arch/x86/x86: pmap.c

Log Message:
add a pmap_kremove_local() that doesn't do TLB invalidations
on other CPUs.  this is only intended for use while writing
kernel crash dumps.  remove unused pmap_map().


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/x86/include/pmap.h
cvs rdiff -u -r1.178 -r1.179 src/sys/arch/x86/x86/pmap.c

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

Modified files:

Index: src/sys/arch/x86/include/pmap.h
diff -u src/sys/arch/x86/include/pmap.h:1.52 src/sys/arch/x86/include/pmap.h:1.53
--- src/sys/arch/x86/include/pmap.h:1.52	Fri Apr 20 22:23:24 2012
+++ src/sys/arch/x86/include/pmap.h	Tue Nov 13 14:07:42 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.52 2012/04/20 22:23:24 rmind Exp $	*/
+/*	$NetBSD: pmap.h,v 1.53 2012/11/13 14:07:42 chs Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -255,6 +255,7 @@ void		pmap_load(void);
 paddr_t		pmap_init_tmp_pgtbl(paddr_t);
 void		pmap_remove_all(struct pmap *);
 void		pmap_ldt_sync(struct pmap *);
+void		pmap_kremove_local(vaddr_t, vsize_t);
 
 void		pmap_emap_enter(vaddr_t, paddr_t, vm_prot_t);
 void		pmap_emap_remove(vaddr_t, vsize_t);

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.178 src/sys/arch/x86/x86/pmap.c:1.179
--- src/sys/arch/x86/x86/pmap.c:1.178	Fri Jun 15 13:53:40 2012
+++ src/sys/arch/x86/x86/pmap.c	Tue Nov 13 14:07:42 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.178 2012/06/15 13:53:40 yamt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.179 2012/11/13 14:07:42 chs Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.178 2012/06/15 13:53:40 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.179 2012/11/13 14:07:42 chs Exp $);
 
 #include opt_user_ldt.h
 #include opt_lockdebug.h
@@ -1118,8 +1118,8 @@ pmap_changeprot_local(vaddr_t va, vm_pro
  * = must be followed by call to pmap_update() before reuse of page
  */
 
-void
-pmap_kremove(vaddr_t sva, vsize_t len)
+static inline void
+pmap_kremove1(vaddr_t sva, vsize_t len, bool localonly)
 {
 	pt_entry_t *pte, opte;
 	vaddr_t va, eva;
@@ -1128,21 +1128,42 @@ pmap_kremove(vaddr_t sva, vsize_t len)
 
 	kpreempt_disable();
 	for (va = sva; va  eva; va += PAGE_SIZE) {
-		if (va  VM_MIN_KERNEL_ADDRESS)
-			pte = vtopte(va);
-		else
-			pte = kvtopte(va);
+		pte = kvtopte(va);
 		opte = pmap_pte_testset(pte, 0); /* zap! */
-		if ((opte  (PG_V | PG_U)) == (PG_V | PG_U)) {
+		if ((opte  (PG_V | PG_U)) == (PG_V | PG_U)  !localonly) {
 			pmap_tlb_shootdown(pmap_kernel(), va, opte,
 			TLBSHOOT_KREMOVE);
 		}
 		KASSERT((opte  PG_PS) == 0);
 		KASSERT((opte  PG_PVLIST) == 0);
 	}
+	if (localonly) {
+		tlbflushg();
+	}
 	kpreempt_enable();
 }
 
+void
+pmap_kremove(vaddr_t sva, vsize_t len)
+{
+
+	pmap_kremove1(sva, len, false);
+}
+
+/*
+ * pmap_kremove_local: like pmap_kremove(), but only worry about
+ * TLB invalidations on the current CPU.  this is only intended
+ * for use while writing kernel crash dumps.
+ */
+
+void
+pmap_kremove_local(vaddr_t sva, vsize_t len)
+{
+
+	KASSERT(panicstr != NULL);
+	pmap_kremove1(sva, len, true);
+}
+
 /*
  * p m a p   i n i t   f u n c t i o n s
  *
@@ -2984,25 +3005,6 @@ pmap_virtual_space(vaddr_t *startp, vadd
 }
 
 /*
- * pmap_map: map a range of PAs into kvm.
- *
- * = used during crash dump
- * = XXX: pmap_map() should be phased out?
- */
-
-vaddr_t
-pmap_map(vaddr_t va, paddr_t spa, paddr_t epa, vm_prot_t prot)
-{
-	while (spa  epa) {
-		pmap_kenter_pa(va, spa, prot, 0);
-		va += PAGE_SIZE;
-		spa += PAGE_SIZE;
-	}
-	pmap_update(pmap_kernel());
-	return va;
-}
-
-/*
  * pmap_zero_page: zero a page
  */
 



CVS commit: src/sys/kern

2012-11-13 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Nov 13 14:08:08 UTC 2012

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

Log Message:
in pmf_system_shutdown(), don't do anything if we're panicing.
this prevents a hang trying to shut down other CPUs on x86,
and in general we could be called in any context from a panic
so it's best to skip unnecessary operations in that case.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/kern/kern_pmf.c

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

Modified files:

Index: src/sys/kern/kern_pmf.c
diff -u src/sys/kern/kern_pmf.c:1.35 src/sys/kern/kern_pmf.c:1.36
--- src/sys/kern/kern_pmf.c:1.35	Sun Jun  5 09:04:22 2011
+++ src/sys/kern/kern_pmf.c	Tue Nov 13 14:08:07 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_pmf.c,v 1.35 2011/06/05 09:04:22 dsl Exp $ */
+/* $NetBSD: kern_pmf.c,v 1.36 2012/11/13 14:08:07 chs Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill jmcne...@invisible.ca
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_pmf.c,v 1.35 2011/06/05 09:04:22 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_pmf.c,v 1.36 2012/11/13 14:08:07 chs Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -381,6 +381,10 @@ shutdown_all(int how)
 void
 pmf_system_shutdown(int how)
 {
+
+	if (panicstr != NULL)
+		return;
+
 	aprint_debug(Shutting down devices:);
 	shutdown_all(how);
 }



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

2012-11-13 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Nov 13 14:09:36 UTC 2012

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

Log Message:
fix sparse crash dumps to contain enough data to be useful,
in particular the top-level page table pages.
use pmap_kremove_local() while writing crash dumps
to avoid spurious warning messages.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/arch/amd64/amd64/machdep.c

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

Modified files:

Index: src/sys/arch/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.190 src/sys/arch/amd64/amd64/machdep.c:1.191
--- src/sys/arch/amd64/amd64/machdep.c:1.190	Mon Sep  3 05:01:44 2012
+++ src/sys/arch/amd64/amd64/machdep.c	Tue Nov 13 14:09:36 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.190 2012/09/03 05:01:44 cherry Exp $	*/
+/*	$NetBSD: machdep.c,v 1.191 2012/11/13 14:09:36 chs Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.190 2012/09/03 05:01:44 cherry Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.191 2012/11/13 14:09:36 chs Exp $);
 
 /* #define XENDEBUG_LOW  */
 
@@ -317,7 +317,7 @@ int dump_seg_iter(int (*)(paddr_t, paddr
 
 #ifndef NO_SPARSE_DUMP
 void sparse_dump_reset(void);
-void sparse_dump_mark(vaddr_t, vaddr_t, int);
+void sparse_dump_mark(void);
 void cpu_dump_prep_sparse(void);
 #endif
 
@@ -821,7 +821,7 @@ haltsys:
  * XXXfvdl share dumpcode.
  */
 
- /*
+/*
  * Perform assorted dump-related initialization tasks.  Assumes that
  * the maximum physical memory address will not increase afterwards.
  */
@@ -873,34 +873,39 @@ sparse_dump_reset(void)
 }
 
 /*
- * Include or exclude pages in a sparse dump, by half-open virtual
- * address interval (which may wrap around the end of the space).
+ * Include or exclude pages in a sparse dump.
  */
 void
-sparse_dump_mark(vaddr_t vbegin, vaddr_t vend, int includep)
+sparse_dump_mark(void)
 {
-	pmap_t pmap;
-	paddr_t p;
-	vaddr_t v;
+	paddr_t p, pstart, pend;
+	struct vm_page *pg;
+	int i;
 
 	/*
-	 * If a partial page is called for, the whole page must be included.
+	 * Mark all memory pages, then unmark pages that are uninteresting.
+	 * Dereferenceing pg-uobject might crash again if another CPU
+	 * frees the object out from under us, but we can't lock anything
+	 * so it's a risk we have to take.
 	 */
-	if (includep) {
-		vbegin = rounddown(vbegin, PAGE_SIZE);
-		vend = roundup(vend, PAGE_SIZE);
-	} else {
-		vbegin = roundup(vbegin, PAGE_SIZE);
-		vend = rounddown(vend, PAGE_SIZE);
+
+	for (i = 0; i  mem_cluster_cnt; ++i) {
+		pstart = mem_clusters[i].start / PAGE_SIZE;
+		pend = pstart + mem_clusters[i].size / PAGE_SIZE;
+
+		for (p = pstart; p  pend; p++) {
+			setbit(sparse_dump_physmap, p);
+		}
 	}
+	for (i = 0; i  vm_nphysseg; i++) {
+		struct vm_physseg *seg = VM_PHYSMEM_PTR(i);
 
-	pmap = pmap_kernel();
-	for (v = vbegin; v != vend; v += PAGE_SIZE) {
-		if (pmap_extract(pmap, v, p)) {
-			if (includep)
-setbit(sparse_dump_physmap, p/PAGE_SIZE);
-			else
-clrbit(sparse_dump_physmap, p/PAGE_SIZE);
+		for (pg = seg-pgs; pg  seg-lastpg; pg++) {
+			if (pg-uanon || (pg-pqflags  PQ_FREE) ||
+			(pg-uobject  pg-uobject-pgops)) {
+p = VM_PAGE_TO_PHYS(pg) / PAGE_SIZE;
+clrbit(sparse_dump_physmap, p);
+			}
 		}
 	}
 }
@@ -914,7 +919,7 @@ cpu_dump_prep_sparse(void)
 {
 	sparse_dump_reset();
 	/* XXX could the alternate recursive page table be skipped? */
-	sparse_dump_mark((vaddr_t)PTE_BASE, (vaddr_t)KERN_BASE, 1);
+	sparse_dump_mark();
 	/* Memory for I/O buffers could be unmarked here, for example. */
 	/* The kernel text could also be unmarked, but gdb would be upset. */
 }
@@ -1206,6 +1211,7 @@ dumpsys_seg(paddr_t maddr, paddr_t bytes
 		pmap_update(pmap_kernel());
 
 		error = (*dump)(dumpdev, blkno, (void *)dumpspace, n);
+		pmap_kremove_local(dumpspace, n);
 		if (error)
 			return error;
 		maddr += n;



CVS commit: src/usr.bin/vmstat

2012-11-13 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Nov 13 14:09:58 UTC 2012

Modified Files:
src/usr.bin/vmstat: drvstats.c

Log Message:
fix operation on core files:  cur_drive.io_name is an embedded array
in the structure we already fetched, not a pointer, so don't try to
dereference its address as a kernel address.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/vmstat/drvstats.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/vmstat/drvstats.c
diff -u src/usr.bin/vmstat/drvstats.c:1.5 src/usr.bin/vmstat/drvstats.c:1.6
--- src/usr.bin/vmstat/drvstats.c:1.5	Sun Jan 18 07:20:00 2009
+++ src/usr.bin/vmstat/drvstats.c	Tue Nov 13 14:09:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: drvstats.c,v 1.5 2009/01/18 07:20:00 lukem Exp $	*/
+/*	$NetBSD: drvstats.c,v 1.6 2012/11/13 14:09:58 chs Exp $	*/
 
 /*
  * Copyright (c) 1996 John M. Vinopal
@@ -425,10 +425,8 @@ drvinit(int selected)
 	} else {
 		p = iostathead;
 		for (i = 0; i  ndrive; i++) {
-			char	buf[10];
 			deref_kptr(p, cur_drive, sizeof(cur_drive));
-			deref_kptr(cur_drive.io_name, buf, sizeof(buf));
-			cur.name[i] = strdup(buf);
+			cur.name[i] = strdup(cur_drive.io_name);
 			if (!cur.name[i])
 err(1, strdup);
 			cur.select[i] = selected;



CVS commit: src/sys/arch

2012-11-13 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Tue Nov 13 14:10:24 UTC 2012

Modified Files:
src/sys/arch/amd64/include: vmparam.h
src/sys/arch/i386/include: vmparam.h

Log Message:
bump VM_PHYSSEG_MAX to 32, we've seen a system where 16 wasn't enough.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/amd64/include/vmparam.h
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/i386/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/amd64/include/vmparam.h
diff -u src/sys/arch/amd64/include/vmparam.h:1.31 src/sys/arch/amd64/include/vmparam.h:1.32
--- src/sys/arch/amd64/include/vmparam.h:1.31	Wed Aug 15 08:09:57 2012
+++ src/sys/arch/amd64/include/vmparam.h	Tue Nov 13 14:10:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.31 2012/08/15 08:09:57 sborrill Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.32 2012/11/13 14:10:24 chs Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -148,7 +148,7 @@
 /* virtual sizes (bytes) for various kernel submaps */
 #define VM_PHYS_SIZE		(USRIOSIZE*PAGE_SIZE)
 
-#define VM_PHYSSEG_MAX		16	/* 1 hole + 15 free lists */
+#define VM_PHYSSEG_MAX		32	/* 1 hole + 31 free lists */
 #define VM_PHYSSEG_STRAT	VM_PSTRAT_BIGFIRST
 
 #define	VM_NFREELIST		3

Index: src/sys/arch/i386/include/vmparam.h
diff -u src/sys/arch/i386/include/vmparam.h:1.75 src/sys/arch/i386/include/vmparam.h:1.76
--- src/sys/arch/i386/include/vmparam.h:1.75	Wed Aug 15 08:10:28 2012
+++ src/sys/arch/i386/include/vmparam.h	Tue Nov 13 14:10:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.75 2012/08/15 08:10:28 sborrill Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.76 2012/11/13 14:10:24 chs Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -127,7 +127,7 @@
 #define	VM_PHYSSEG_MAX		1
 #define	VM_NFREELIST		1
 #else
-#define	VM_PHYSSEG_MAX		16	/* 1 hole + 15 free lists */
+#define	VM_PHYSSEG_MAX		32	/* 1 hole + 31 free lists */
 #define	VM_NFREELIST		2
 #define	VM_FREELIST_FIRST16	1
 #endif /* XEN */



CVS commit: src/share/man/man8/man8.vax

2012-11-13 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Nov 13 17:40:56 UTC 2012

Modified Files:
src/share/man/man8/man8.vax: format.8

Log Message:
Use mdoc macros for literal display block.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/share/man/man8/man8.vax/format.8

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/man8/man8.vax/format.8
diff -u src/share/man/man8/man8.vax/format.8:1.11 src/share/man/man8/man8.vax/format.8:1.12
--- src/share/man/man8/man8.vax/format.8:1.11	Wed Sep 24 18:19:13 2008
+++ src/share/man/man8/man8.vax/format.8	Tue Nov 13 17:40:56 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: format.8,v 1.11 2008/09/24 18:19:13 reed Exp $
+.\	$NetBSD: format.8,v 1.12 2012/11/13 17:40:56 njoly Exp $
 .\
 .\ Copyright (c) 1980, 1983, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -187,10 +187,7 @@ As usual,
 and
 .Dq @
 may be used to edit input.
-.nf
-.in +0.5i
-.ta  1i
-.sp 1
+.Bd -literal -offset 0.5i
 \*[Gt]\*[Gt]\*[Gt]\fBL FORMAT\fP
 	LOAD DONE, 4400 BYTES LOADED
 \*[Gt]\*[Gt]\*[Gt]\fBS 2\fP
@@ -206,12 +203,14 @@ Starting track (0):
 Ending cylinder (841):
 Ending track (19):
 Available test patterns are:
-.in +1.0i
+.Ed
+.Bd -literal -offset 1.5i -compact
 1 - (f00f) RH750 worst case
 2 - (ec6d) media worst case
 3 - (a5a5) alternating 1's and 0's
 4 - () Severe burnin (up to 48 passes)
-.in -1.0i
+.Ed
+.Bd -literal -offset 0.5i -compact
 Pattern (one of the above, other to restart)? \fB2\fP
 Maximum number of bit errors to allow for soft ECC (3):
 Start formatting...make sure the drive is online
@@ -233,8 +232,7 @@ Writing bad sector table at block 808272
 Done
 (\fI...program restarts to allow formatting other disks\fP)
 (\fI...to abort halt machine with ^P\fP)
-.fi
-.sp 1
+.Ed
 .Sh DIAGNOSTICS
 The diagnostics are intended to be self explanatory.
 .Sh USING DEC SOFTWARE TO FORMAT



CVS commit: src/sys/rump

2012-11-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Nov 13 19:12:43 UTC 2012

Modified Files:
src/sys/rump: Makefile.rump

Log Message:
add some -U's for linux builds


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/rump/Makefile.rump

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

Modified files:

Index: src/sys/rump/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.63 src/sys/rump/Makefile.rump:1.64
--- src/sys/rump/Makefile.rump:1.63	Fri Aug 10 16:05:27 2012
+++ src/sys/rump/Makefile.rump	Tue Nov 13 19:12:42 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.63 2012/08/10 16:05:27 joerg Exp $
+#	$NetBSD: Makefile.rump,v 1.64 2012/11/13 19:12:42 pooka Exp $
 #
 
 WARNS?=		3	# XXX: src/sys won't compile with -Wsign-compare yet
@@ -53,7 +53,9 @@ CPPFLAGS+=	-DLOCKDEBUG
 #LDFLAGS+=	-nodefaultlibs
 
 # make sure __NetBSD__ gets defined (for builds on non-NetBSD)
+# aaand make sure cc doesn't source files any wild ideas
 CPPFLAGS+=	-D__NetBSD__
+CPPFLAGS+=	-Ulinux -U__linux -U__linux__ -U__gnu_linux__
 
 RUMPKERNEL=	This is NetBSD and I am the rump.  Good evening.
 



CVS commit: src/sys

2012-11-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Nov 13 20:10:03 UTC 2012

Modified Files:
src/sys/kern: kern_tc.c
src/sys/rump/librump/rumpkern: lwproc.c scheduler.c vm.c
src/sys/secmodel/suser: secmodel_suser.c

Log Message:
kill some -Wunused-but-set-variable warnings


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/kern/kern_tc.c
cvs rdiff -u -r1.18 -r1.19 src/sys/rump/librump/rumpkern/lwproc.c
cvs rdiff -u -r1.29 -r1.30 src/sys/rump/librump/rumpkern/scheduler.c
cvs rdiff -u -r1.130 -r1.131 src/sys/rump/librump/rumpkern/vm.c
cvs rdiff -u -r1.39 -r1.40 src/sys/secmodel/suser/secmodel_suser.c

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

Modified files:

Index: src/sys/kern/kern_tc.c
diff -u src/sys/kern/kern_tc.c:1.43 src/sys/kern/kern_tc.c:1.44
--- src/sys/kern/kern_tc.c:1.43	Tue Feb 21 15:41:24 2012
+++ src/sys/kern/kern_tc.c	Tue Nov 13 20:10:02 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_tc.c,v 1.43 2012/02/21 15:41:24 martin Exp $ */
+/* $NetBSD: kern_tc.c,v 1.44 2012/11/13 20:10:02 pooka Exp $ */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
 
 #include sys/cdefs.h
 /* __FBSDID($FreeBSD: src/sys/kern/kern_tc.c,v 1.166 2005/09/19 22:16:31 andre Exp $); */
-__KERNEL_RCSID(0, $NetBSD: kern_tc.c,v 1.43 2012/02/21 15:41:24 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_tc.c,v 1.44 2012/11/13 20:10:02 pooka Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_ntp.h
@@ -935,7 +935,10 @@ pps_event(struct pps_state *pps, int eve
 	struct bintime bt;
 	struct timespec ts, *tsp, *osp;
 	u_int64_t tcount, *pcount;
-	int foff, fhard;
+	int foff;
+#ifdef PPS_SYNC
+	int fhard;
+#endif
 	pps_seq_t *pseq;
 
 	KASSERT(mutex_owned(timecounter_lock));
@@ -950,14 +953,18 @@ pps_event(struct pps_state *pps, int eve
 		tsp = pps-ppsinfo.assert_timestamp;
 		osp = pps-ppsparam.assert_offset;
 		foff = pps-ppsparam.mode  PPS_OFFSETASSERT;
+#ifdef PPS_SYNC
 		fhard = pps-kcmode  PPS_CAPTUREASSERT;
+#endif
 		pcount = pps-ppscount[0];
 		pseq = pps-ppsinfo.assert_sequence;
 	} else {
 		tsp = pps-ppsinfo.clear_timestamp;
 		osp = pps-ppsparam.clear_offset;
 		foff = pps-ppsparam.mode  PPS_OFFSETCLEAR;
+#ifdef PPS_SYNC
 		fhard = pps-kcmode  PPS_CAPTURECLEAR;
+#endif
 		pcount = pps-ppscount[1];
 		pseq = pps-ppsinfo.clear_sequence;
 	}

Index: src/sys/rump/librump/rumpkern/lwproc.c
diff -u src/sys/rump/librump/rumpkern/lwproc.c:1.18 src/sys/rump/librump/rumpkern/lwproc.c:1.19
--- src/sys/rump/librump/rumpkern/lwproc.c:1.18	Sun May  1 02:52:42 2011
+++ src/sys/rump/librump/rumpkern/lwproc.c	Tue Nov 13 20:10:02 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: lwproc.c,v 1.18 2011/05/01 02:52:42 pgoyette Exp $	*/
+/*  $NetBSD: lwproc.c,v 1.19 2012/11/13 20:10:02 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lwproc.c,v 1.18 2011/05/01 02:52:42 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: lwproc.c,v 1.19 2012/11/13 20:10:02 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -179,7 +179,6 @@ static void
 lwproc_freelwp(struct lwp *l)
 {
 	struct proc *p;
-	bool freeproc;
 
 	p = l-l_proc;
 	mutex_enter(p-p_lock);
@@ -195,7 +194,6 @@ lwproc_freelwp(struct lwp *l)
 		KASSERT(p != proc0);
 		p-p_stat = SDEAD;
 	}
-	freeproc = p-p_nlwps == 0;
 	cv_broadcast(p-p_lwpcv); /* nobody sleeps on this in rump? */
 	kauth_cred_free(l-l_cred);
 	mutex_exit(p-p_lock);

Index: src/sys/rump/librump/rumpkern/scheduler.c
diff -u src/sys/rump/librump/rumpkern/scheduler.c:1.29 src/sys/rump/librump/rumpkern/scheduler.c:1.30
--- src/sys/rump/librump/rumpkern/scheduler.c:1.29	Sat Sep 15 17:15:01 2012
+++ src/sys/rump/librump/rumpkern/scheduler.c	Tue Nov 13 20:10:02 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: scheduler.c,v 1.29 2012/09/15 17:15:01 pooka Exp $	*/
+/*  $NetBSD: scheduler.c,v 1.30 2012/11/13 20:10:02 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: scheduler.c,v 1.29 2012/09/15 17:15:01 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: scheduler.c,v 1.30 2012/11/13 20:10:02 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -127,7 +127,6 @@ getnextcpu(void)
 void
 rump_cpus_bootstrap(int *nump)
 {
-	struct rumpcpu *rcpu;
 	struct cpu_info *ci;
 	int num = *nump;
 	int i;
@@ -139,7 +138,6 @@ rump_cpus_bootstrap(int *nump)
 	}
 
 	for (i = 0; i  num; i++) {
-		rcpu = rcpu_storage[i];
 		ci = rump_cpus[i];
 		ci-ci_index = i;
 	}
@@ -514,14 +512,14 @@ void
 kpreempt_disable(void)
 {
 
-	KPREEMPT_DISABLE(curlwp);
+	//KPREEMPT_DISABLE(curlwp);
 }
 
 void
 kpreempt_enable(void)
 {
 
-	KPREEMPT_ENABLE(curlwp);
+	//KPREEMPT_ENABLE(curlwp);
 }
 
 void

Index: src/sys/rump/librump/rumpkern/vm.c
diff -u src/sys/rump/librump/rumpkern/vm.c:1.130 

CVS commit: src/sys/dev/wscons

2012-11-13 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Nov 13 20:29:03 UTC 2012

Modified Files:
src/sys/dev/wscons: wsdisplay_glyphcache.c

Log Message:
glyphcache_init(): bail if we don't have enough off-screen memory to be useful


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/wscons/wsdisplay_glyphcache.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/wscons/wsdisplay_glyphcache.c
diff -u src/sys/dev/wscons/wsdisplay_glyphcache.c:1.4 src/sys/dev/wscons/wsdisplay_glyphcache.c:1.5
--- src/sys/dev/wscons/wsdisplay_glyphcache.c:1.4	Thu Oct  4 10:26:32 2012
+++ src/sys/dev/wscons/wsdisplay_glyphcache.c	Tue Nov 13 20:29:03 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsdisplay_glyphcache.c,v 1.4 2012/10/04 10:26:32 macallan Exp $	*/
+/*	$NetBSD: wsdisplay_glyphcache.c,v 1.5 2012/11/13 20:29:03 macallan Exp $	*/
 
 /*
  * Copyright (c) 2012 Michael Lorenz
@@ -75,6 +75,14 @@ glyphcache_init(glyphcache *gc, int firs
 	buckets = (gc-gc_numcells / 223);
 	if ((buckets * 223)  gc-gc_numcells)
 		buckets++;
+
+	/*
+	 * if we don't have enough video memory to cache at least a few glyphs
+	 * we stop right here
+	 */
+	if (buckets  1)
+		return ENOMEM;
+
 	gc-gc_buckets = kmem_alloc(sizeof(gc_bucket) * buckets, KM_SLEEP);
 	if (gc-gc_buckets == NULL) {
 		aprint_error(%s: can't allocate memory\n, __func__);



CVS commit: src/sys/dev/sun

2012-11-13 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Nov 13 20:47:58 UTC 2012

Modified Files:
src/sys/dev/sun: cgsix.c

Log Message:
don't claim alpha font support unless we have enough off-screen memory to
cache a useful number of glyphs
this should probably be CPU speed dependent, most UltraSPARCs can likely
render anti-aliased fonts fast enough on the fly


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/sun/cgsix.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/sun/cgsix.c
diff -u src/sys/dev/sun/cgsix.c:1.59 src/sys/dev/sun/cgsix.c:1.60
--- src/sys/dev/sun/cgsix.c:1.59	Wed Jul 18 02:31:46 2012
+++ src/sys/dev/sun/cgsix.c	Tue Nov 13 20:47:58 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cgsix.c,v 1.59 2012/07/18 02:31:46 macallan Exp $ */
+/*	$NetBSD: cgsix.c,v 1.60 2012/11/13 20:47:58 macallan Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cgsix.c,v 1.59 2012/07/18 02:31:46 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: cgsix.c,v 1.60 2012/11/13 20:47:58 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -598,7 +598,7 @@ cg6attach(struct cgsix_softc *sc, const 
 	sc-sc_width = fb-fb_type.fb_width;
 	sc-sc_stride = fb-fb_type.fb_width;
 	sc-sc_height = fb-fb_type.fb_height;
-
+	
 	printf(%s: framebuffer size: %d MB\n, device_xname(sc-sc_dev), 
 	sc-sc_ramsize  20);
 
@@ -634,14 +634,15 @@ cg6attach(struct cgsix_softc *sc, const 
 		SCREEN_VISIBLE(cg6_console_screen);
 		sc-vd.active = cg6_console_screen;
 		wsdisplay_cnattach(cgsix_defaultscreen, ri, 0, 0, defattr);
-		glyphcache_init(sc-sc_gc, sc-sc_height + 5,
+		if (ri-ri_flg  RI_ENABLE_ALPHA) {
+			glyphcache_init(sc-sc_gc, sc-sc_height + 5,
 (sc-sc_ramsize / sc-sc_stride) - 
   sc-sc_height - 5,
 sc-sc_width,
 ri-ri_font-fontwidth,
 ri-ri_font-fontheight,
 defattr);
-		
+		}	
 		vcons_replay_msgbuf(cg6_console_screen);
 	} else {
 		/*
@@ -653,13 +654,15 @@ cg6attach(struct cgsix_softc *sc, const 
 			vcons_init_screen(sc-vd, cg6_console_screen, 1,
 			defattr);
 		}
-		glyphcache_init(sc-sc_gc, sc-sc_height + 5,
+		if (ri-ri_flg  RI_ENABLE_ALPHA) {
+			glyphcache_init(sc-sc_gc, sc-sc_height + 5,
 (sc-sc_ramsize / sc-sc_stride) - 
   sc-sc_height - 5,
 sc-sc_width,
 ri-ri_font-fontwidth,
 ri-ri_font-fontheight,
 defattr);
+		}
 	}
 	cg6_setup_palette(sc);
 	
@@ -1280,13 +1283,17 @@ cgsix_init_screen(void *cookie, struct v
 {
 	struct cgsix_softc *sc = cookie;
 	struct rasops_info *ri = scr-scr_ri;
+	int av;
 
 	ri-ri_depth = 8;
 	ri-ri_width = sc-sc_width;
 	ri-ri_height = sc-sc_height;
 	ri-ri_stride = sc-sc_stride;
-	ri-ri_flg = RI_CENTER | RI_ENABLE_ALPHA | RI_8BIT_IS_RGB;
-
+	av = sc-sc_ramsize - (sc-sc_height * sc-sc_stride);
+	ri-ri_flg = RI_CENTER  | RI_8BIT_IS_RGB;
+	if (av  (128 * 1024)) {
+		ri-ri_flg |= RI_ENABLE_ALPHA;
+	}
 	ri-ri_bits = sc-sc_fb.fb_pixels;
 	
 	/* We need unaccelerated initial screen clear on old revisions */



CVS commit: src/share/mk

2012-11-13 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Nov 13 22:30:38 UTC 2012

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

Log Message:
Make it easier build binaries against the host's libs, e.g.
libpthread which might be in /lib/x86_64-linux-gnu/libpthread.so.0
or some other unholy place.


To generate a diff of this commit:
cvs rdiff -u -r1.306 -r1.307 src/share/mk/bsd.README
cvs rdiff -u -r1.324 -r1.325 src/share/mk/bsd.lib.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.306 src/share/mk/bsd.README:1.307
--- src/share/mk/bsd.README:1.306	Sun Nov  4 16:27:28 2012
+++ src/share/mk/bsd.README	Tue Nov 13 22:30:38 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.306 2012/11/04 16:27:28 christos Exp $
+#	$NetBSD: bsd.README,v 1.307 2012/11/13 22:30:38 pooka Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make include files for the NetBSD
@@ -1165,6 +1165,11 @@ LIBDPLIBS	A list of the tuples:
 		 *	DPADD gets  ${LIBDO.libname}/liblibname.so  or
 ${LIBDO.libname}/liblibname.a   added.
 
+		The special value _external for LIBDO.lib makes the
+		build system to assume the library comes from outside
+		of the NetBSD source tree and only causes -llibname
+		to be added to LDADD.
+
 		This variable may be used for individual libraries, as
 		well as in parent directories to cache common libraries
 		as a build-time optimization.

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.324 src/share/mk/bsd.lib.mk:1.325
--- src/share/mk/bsd.lib.mk:1.324	Thu Aug 23 21:21:16 2012
+++ src/share/mk/bsd.lib.mk	Tue Nov 13 22:30:38 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.324 2012/08/23 21:21:16 joerg Exp $
+#	$NetBSD: bsd.lib.mk,v 1.325 2012/11/13 22:30:38 pooka Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include bsd.init.mk
@@ -54,8 +54,12 @@ AFLAGS+=${PIE_AFLAGS}
 LIBDO.${_lib}!=	cd ${_dir}  ${PRINTOBJDIR}
 .MAKEOVERRIDES+=LIBDO.${_lib}
 .endif
+.if ${LIBDO.${_lib}} == _external
+LDADD+=		-l${_lib}
+.else
 LDADD+=		-L${LIBDO.${_lib}} -l${_lib}
 DPADD+=		${LIBDO.${_lib}}/lib${_lib}.so
+.endif
 .endfor
 .endif	# }
 



CVS commit: src/sys/dev/pci

2012-11-13 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Nov 14 01:04:46 UTC 2012

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

Log Message:
don't attempt to re-unmap the interrupt on detach


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/pci/pciide_common.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/pciide_common.c
diff -u src/sys/dev/pci/pciide_common.c:1.57 src/sys/dev/pci/pciide_common.c:1.58
--- src/sys/dev/pci/pciide_common.c:1.57	Tue Jul 31 15:50:36 2012
+++ src/sys/dev/pci/pciide_common.c	Wed Nov 14 01:04:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pciide_common.c,v 1.57 2012/07/31 15:50:36 bouyer Exp $	*/
+/*	$NetBSD: pciide_common.c,v 1.58 2012/11/14 01:04:45 jakllsch Exp $	*/
 
 
 /*
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pciide_common.c,v 1.57 2012/07/31 15:50:36 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: pciide_common.c,v 1.58 2012/11/14 01:04:45 jakllsch Exp $);
 
 #include sys/param.h
 #include sys/malloc.h
@@ -249,12 +249,16 @@ pciide_detach(device_t self, int flags)
 	 channel++) {
 		cp = sc-pciide_channels[channel];
 		if (cp-compat != 0)
-			if (cp-ih != NULL)
+			if (cp-ih != NULL) {
 			   pciide_unmap_compat_intr(sc-sc_pc, cp, channel);
+			   cp-ih = NULL;
+			}
 	}
 
-	if (sc-sc_pci_ih != NULL)
+	if (sc-sc_pci_ih != NULL) {
 		pci_intr_disestablish(sc-sc_pc, sc-sc_pci_ih);
+		sc-sc_pci_ih = NULL;
+	}
 
 	return pciide_common_detach(sc, flags);
 }



CVS commit: src/sys/dev/ic

2012-11-13 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Wed Nov 14 01:52:48 UTC 2012

Added Files:
src/sys/dev/ic: msm6242b.c msm6242breg.h msm6242bvar.h

Log Message:
Add MI OKI MSM6242B RTC driver.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/dev/ic/msm6242b.c src/sys/dev/ic/msm6242breg.h \
src/sys/dev/ic/msm6242bvar.h

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

Added files:

Index: src/sys/dev/ic/msm6242b.c
diff -u /dev/null src/sys/dev/ic/msm6242b.c:1.1
--- /dev/null	Wed Nov 14 01:52:48 2012
+++ src/sys/dev/ic/msm6242b.c	Wed Nov 14 01:52:48 2012
@@ -0,0 +1,245 @@
+/*  $NetBSD: msm6242b.c,v 1.1 2012/11/14 01:52:48 rkujawa Exp $ */
+
+/*-
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Radoslaw Kujawa.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include sys/cdefs.h
+
+#include sys/param.h
+#include sys/device.h
+#include sys/bus.h
+
+#include dev/clock_subr.h
+
+#include dev/ic/msm6242bvar.h
+#include dev/ic/msm6242breg.h
+
+/* #define MSM6242B_DEBUG 1 */
+
+static int msm6242b_gettime_ymdhms(todr_chip_handle_t, struct clock_ymdhms *); 
+int msm6242b_settime_ymdhms(todr_chip_handle_t, struct clock_ymdhms *);
+
+bool msm6242b_hold(struct msm6242b_softc *sc);
+void msm6242b_free(struct msm6242b_softc *sc);
+static uint8_t msm6242b_read(struct msm6242b_softc *, uint8_t);
+static void msm6242b_write(struct msm6242b_softc *, uint8_t, uint8_t);
+static void msm6242b_set(struct msm6242b_softc *, uint8_t, uint8_t);
+static void msm6242b_unset(struct msm6242b_softc *, uint8_t, uint8_t);
+
+void
+msm6242b_attach(struct msm6242b_softc *sc)
+{
+	struct clock_ymdhms dt;
+
+	todr_chip_handle_t handle;
+	aprint_normal(: OKI MSM6242B\n);
+
+	handle = sc-sc_handle;
+	handle-cookie = sc;
+	handle-todr_gettime = NULL;
+	handle-todr_settime = NULL;
+	handle-todr_gettime_ymdhms = msm6242b_gettime_ymdhms;
+	handle-todr_settime_ymdhms = msm6242b_settime_ymdhms;
+	handle-todr_setwen = NULL;
+
+	if (msm6242b_gettime_ymdhms(handle, dt) != 0) {
+		aprint_error_dev(sc-sc_dev, RTC does not work correctly\n);
+		return;
+	}
+
+#ifdef MSM6242B_DEBUG
+	aprint_normal_dev(sc-sc_dev, the time is %d %d %d %d %d %d\n,
+	dt.dt_year, dt.dt_mon, dt.dt_day, dt.dt_hour, dt.dt_min, dt.dt_sec);
+#endif 
+/* MSM6242B_DEBUG */
+	todr_attach(handle);
+}
+
+static int
+msm6242b_gettime_ymdhms(todr_chip_handle_t handle, struct clock_ymdhms *dt)
+{
+	struct msm6242b_softc *sc;
+	
+	sc = handle-cookie;
+	/* XXX: splsched(); */
+
+	if(!msm6242b_hold(sc))
+		return (ENXIO);
+
+	dt-dt_sec = msm6242b_read(sc, MSM6242B_10SECOND) * 10 +
+	msm6242b_read(sc, MSM6242B_1SECOND);
+	dt-dt_min = msm6242b_read(sc, MSM6242B_10MINUTE) * 10 +
+	msm6242b_read(sc, MSM6242B_1MINUTE);
+	dt-dt_hour = (msm6242b_read(sc, MSM6242B_10HOUR_PMAM) 
+	MSM6242B_10HOUR_MASK) * 10 + msm6242b_read(sc, MSM6242B_1HOUR);
+	dt-dt_day = msm6242b_read(sc, MSM6242B_10DAY) * 10 +
+	msm6242b_read(sc, MSM6242B_1DAY);
+	dt-dt_mon = msm6242b_read(sc, MSM6242B_10MONTH) * 10 +
+	msm6242b_read(sc, MSM6242B_1MONTH);
+	dt-dt_year = msm6242b_read(sc, MSM6242B_10YEAR) * 10 +
+	msm6242b_read(sc, MSM6242B_1YEAR);
+	dt-dt_wday = msm6242b_read(sc, MSM6242B_WEEK);
+
+#ifdef MSM6242B_DEBUG
+	aprint_normal_dev(sc-sc_dev, the time is %d %d %d %d %d %d\n,
+	dt-dt_year, dt-dt_mon, dt-dt_day, dt-dt_hour, dt-dt_min, dt-dt_sec);
+#endif 
+
+	/* handle 12h mode */
+	if ((msm6242b_read(sc, MSM6242B_CONTROL_F)  
+	MSM6242B_CONTROL_F_24H) == 0) {
+		if ((msm6242b_read(sc, MSM6242B_10HOUR_PMAM)  

CVS commit: src/sys/arch/amiga

2012-11-13 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Wed Nov 14 01:55:25 UTC 2012

Modified Files:
src/sys/arch/amiga/conf: files.amiga
src/sys/arch/amiga/dev: a2kbbc.c

Log Message:
The a2kbbc is now based on MI MSM6242B driver.


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/sys/arch/amiga/conf/files.amiga
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amiga/dev/a2kbbc.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/amiga/conf/files.amiga
diff -u src/sys/arch/amiga/conf/files.amiga:1.163 src/sys/arch/amiga/conf/files.amiga:1.164
--- src/sys/arch/amiga/conf/files.amiga:1.163	Sat Oct 27 11:54:21 2012
+++ src/sys/arch/amiga/conf/files.amiga	Wed Nov 14 01:55:25 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amiga,v 1.163 2012/10/27 11:54:21 phx Exp $
+#	$NetBSD: files.amiga,v 1.164 2012/11/14 01:55:25 rkujawa Exp $
 
 # maxpartitions must be first item in files.${ARCH}.newconf
 maxpartitions 16			# NOTE THAT AMIGA IS SPECIAL!
@@ -76,7 +76,7 @@ attach	clock at mainbus
 file	arch/amiga/dev/clock.c
 
 # A2000 internal hwc
-device	a2kbbc
+device	a2kbbc: msm6242b
 attach	a2kbbc at mainbus
 file	arch/amiga/dev/a2kbbc.c		a2kbbc
 

Index: src/sys/arch/amiga/dev/a2kbbc.c
diff -u src/sys/arch/amiga/dev/a2kbbc.c:1.24 src/sys/arch/amiga/dev/a2kbbc.c:1.25
--- src/sys/arch/amiga/dev/a2kbbc.c:1.24	Sat Oct 27 17:17:26 2012
+++ src/sys/arch/amiga/dev/a2kbbc.c	Wed Nov 14 01:55:25 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: a2kbbc.c,v 1.24 2012/10/27 17:17:26 chs Exp $ */
+/*	$NetBSD: a2kbbc.c,v 1.25 2012/11/14 01:55:25 rkujawa Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,37 +39,42 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: a2kbbc.c,v 1.24 2012/10/27 17:17:26 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: a2kbbc.c,v 1.25 2012/11/14 01:55:25 rkujawa Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
 #include sys/device.h
 #include sys/systm.h
+#include sys/bus.h
 #include machine/psl.h
 #include machine/cpu.h
 #include amiga/amiga/device.h
 #include amiga/amiga/custom.h
 #include amiga/amiga/cia.h
-#include amiga/dev/rtc.h
 #include amiga/dev/zbusvar.h
 
 #include dev/clock_subr.h
 
-int a2kbbc_match(device_t, cfdata_t, void *);
-void a2kbbc_attach(device_t, device_t, void *);
+#include dev/ic/msm6242bvar.h
+#include dev/ic/msm6242breg.h
 
-CFATTACH_DECL_NEW(a2kbbc, 0,
-a2kbbc_match, a2kbbc_attach, NULL, NULL);
+#define	A2KBBC_ADDR	0xDC	/* XXX: possible D8 on A2000 A? */
+
+static int a2kbbc_match(device_t, cfdata_t, void *);
+static void a2kbbc_attach(device_t, device_t, void *);
 
-void *a2kclockaddr;
-int a2kugettod(todr_chip_handle_t, struct clock_ymdhms *);
-int a2kusettod(todr_chip_handle_t, struct clock_ymdhms *);
-static struct todr_chip_handle a2ktodr;
+struct a2kbbc_softc {
+	struct msm6242b_softc sc_msm6242b;
+	struct bus_space_tag sc_bst;
+};
+
+CFATTACH_DECL_NEW(a2kbbc, sizeof(struct a2kbbc_softc),
+a2kbbc_match, a2kbbc_attach, NULL, NULL);
 
-int
+static int
 a2kbbc_match(device_t parent, cfdata_t cf, void *aux)
 {
-	struct clock_ymdhms dt;
+	//struct clock_ymdhms dt;
 	static int a2kbbc_matched = 0;
 
 	if (!matchname(a2kbbc, aux))
@@ -86,10 +91,6 @@ a2kbbc_match(device_t parent, cfdata_t c
 	)
 		return (0);
 
-	a2kclockaddr = (void *)__UNVOLATILE(ztwomap(0xdc));
-	if (a2kugettod(a2ktodr, dt) != 0)
-		return (0);
-
 	a2kbbc_matched = 1;
 	return (1);
 }
@@ -100,141 +101,24 @@ a2kbbc_match(device_t parent, cfdata_t c
 void
 a2kbbc_attach(device_t parent, device_t self, void *aux)
 {
-	printf(\n);
-	a2kclockaddr = (void *)__UNVOLATILE(ztwomap(0xdc));
+	struct a2kbbc_softc *sc;
+	struct msm6242b_softc *msc;
 
-	a2ktodr.cookie = a2kclockaddr;
-	a2ktodr.todr_gettime_ymdhms = a2kugettod;
-	a2ktodr.todr_settime_ymdhms = a2kusettod;
-	todr_attach(a2ktodr);
-}
+	sc = device_private(self);
+	msc = sc-sc_msm6242b;
+	msc-sc_dev = self;
 
-int
-a2kugettod(todr_chip_handle_t h, struct clock_ymdhms *dt)
-{
-	struct rtclock2000 *rt;
-	int i;
+	sc-sc_bst.base = (bus_addr_t) __UNVOLATILE(ztwomap(A2KBBC_ADDR+1));
+	sc-sc_bst.absm = amiga_bus_stride_4;
 
-	rt = a2kclockaddr;
+	msc-sc_iot = sc-sc_bst;
 
-	/*
-	 * hold clock
-	 */
-	rt-control1 |= A2CONTROL1_HOLD;
-	i = 0x1000;
-	while (rt-control1  A2CONTROL1_BUSY  i--)
-		;
-	if (rt-control1  A2CONTROL1_BUSY)
-		return (ENXIO);		/* Give up and say it's not there */
-
-	/* Copy the info.  Careful about the order! */
-	dt-dt_sec   = rt-second1 * 10 + rt-second2;
-	dt-dt_min   = rt-minute1 * 10 + rt-minute2;
-	dt-dt_hour  = (rt-hour1  3) * 10 + rt-hour2;
-	dt-dt_day   = rt-day1* 10 + rt-day2;
-	dt-dt_mon   = rt-month1  * 10 + rt-month2;
-	dt-dt_year  = rt-year1   * 10 + rt-year2;
-	dt-dt_wday  = rt-weekday;
-
-	/*
-	 * The oki clock chip has a register to put the clock into
-	 * 12/24h mode.
-	 *
-	 *  clockmode   |A2HOUR1_PM
-	 *  24h   12h   |  am = 0, pm = 1
-	 * 

CVS commit: src/sys/conf

2012-11-13 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Wed Nov 14 02:03:25 UTC 2012

Modified Files:
src/sys/conf: files

Log Message:
Define msm6242b driver.


To generate a diff of this commit:
cvs rdiff -u -r1.1060 -r1.1061 src/sys/conf/files

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/files
diff -u src/sys/conf/files:1.1060 src/sys/conf/files:1.1061
--- src/sys/conf/files:1.1060	Sat Oct 27 22:36:13 2012
+++ src/sys/conf/files	Wed Nov 14 02:03:25 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1060 2012/10/27 22:36:13 alnsn Exp $
+#	$NetBSD: files,v 1.1061 2012/11/14 02:03:25 rkujawa Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20100430
@@ -1012,6 +1012,11 @@ file	dev/ic/aic6915.c		sf
 define	mk48txx
 file	dev/ic/mk48txx.c		mk48txx
 
+# OKI MSM6242B
+#
+define	msm6242b
+file	dev/ic/msm6242b.c		msm6242b
+
 # Intersil 7170 time-of-day clock
 #
 define	intersil7170



CVS commit: src/doc

2012-11-13 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Wed Nov 14 02:26:16 UTC 2012

Modified Files:
src/doc: CHANGES

Log Message:
Note MSM6242B driver.


To generate a diff of this commit:
cvs rdiff -u -r1.1758 -r1.1759 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.1758 src/doc/CHANGES:1.1759
--- src/doc/CHANGES:1.1758	Tue Nov 13 11:03:50 2012
+++ src/doc/CHANGES	Wed Nov 14 02:26:15 2012
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1758 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1759 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -139,3 +139,6 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	zoneinfo: Import tzdata2012i. [apb 20121104]
 	voodoofb(4): Add 3Dfx Voodoo Banshee support. [rkujawa 20121109]
 	zoneinfo: Import tzdata2012j. [apb 20121113]
+	msm6242b(4): Add MI OKI MSM6242B driver. [rkujawa 20121114]
+	amiga: A2000-style RTCs are now driven by the msm6242b(4) driver.
+		[rkujawa 20121114]



CVS commit: src/share/man/man4

2012-11-13 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Wed Nov 14 02:29:10 UTC 2012

Modified Files:
src/share/man/man4: Makefile
Added Files:
src/share/man/man4: msm6242b.4

Log Message:
Add man page for recently added msm6242b driver.


To generate a diff of this commit:
cvs rdiff -u -r1.591 -r1.592 src/share/man/man4/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/msm6242b.4

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/man4/Makefile
diff -u src/share/man/man4/Makefile:1.591 src/share/man/man4/Makefile:1.592
--- src/share/man/man4/Makefile:1.591	Sun Aug  5 14:28:50 2012
+++ src/share/man/man4/Makefile	Wed Nov 14 02:29:10 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.591 2012/08/05 14:28:50 riastradh Exp $
+#	$NetBSD: Makefile,v 1.592 2012/11/14 02:29:10 rkujawa Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/18/93
 
 MAN=	aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -39,7 +39,7 @@ MAN=	aac.4 ac97.4 acardide.4 aceride.4 a
 	lc.4 ld.4 lii.4 lo.4 lxtphy.4 \
 	mainbus.4 makphy.4 malo.4 mbe.4 mca.4 mcclock.4 md.4 mfb.4 mfi.4 mhzc.4 \
 	midi.4 mii.4 mk48txx.4 mlx.4 mly.4 mpls.4 mpii.4 mpt.4 mpu.4 mtd.4 \
-	mtio.4 multicast.4 mvsata.4 \
+	mtio.4 msm6242b.4 multicast.4 mvsata.4 \
 	nadb.4 ne.4 neo.4 netintro.4 nfe.4 nfsmb.4 njata.4 njs.4 \
 	nsclpcsio.4 nside.4 nsp.4 nsphy.4 nsphyter.4 ntwoc.4 null.4 nsmb.4 \
 	oak.4 oosiop.4 opl.4 options.4 optiide.4 osiop.4 otus.4 \

Added files:

Index: src/share/man/man4/msm6242b.4
diff -u /dev/null src/share/man/man4/msm6242b.4:1.1
--- /dev/null	Wed Nov 14 02:29:10 2012
+++ src/share/man/man4/msm6242b.4	Wed Nov 14 02:29:10 2012
@@ -0,0 +1,68 @@
+.\	$NetBSD: msm6242b.4,v 1.1 2012/11/14 02:29:10 rkujawa Exp $
+.\
+.\ Copyright (c) 2012 The NetBSD Foundation, Inc.
+.\ All rights reserved.
+.\
+.\ This code is derived from software contributed to The NetBSD Foundation
+.\ by Radoslaw Kujawa.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. Redistributions in binary form must reproduce the above copyright
+.\notice, this list of conditions and the following disclaimer in the
+.\documentation and/or other materials provided with the distribution.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\ POSSIBILITY OF SUCH DAMAGE.
+.\
+.Dd November 14, 2012
+.Dt MSM6242 4
+.Os
+.Sh NAME
+.Nm msm6242
+.Nd
+.Tn OKI MSM6242 time-of-day clock driver
+.Sh SYNOPSIS
+.In dev/ic/msm6242reg.h
+.In dev/ic/msm6242var.h
+.Cd define msm6242
+.Cd file   dev/ic/msm6242.cmsm6242
+.Sh DESCRIPTION
+The
+.Nm
+driver provides access to the
+.Tn OKI MSM6242
+time-of-day clock chip.
+Access methods to retrieve and set date and time
+are provided through the
+.Em TODR
+interface defined in
+.Xr todr 9 .
+.Sh SEE ALSO
+.Xr todr 9
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Nx 7.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Radoslaw Kujawa 
+.Aq radoslaw.kuj...@gmail.com .
+It was inspired by an earlier amiga-specific driver by
+.An Christian E. Hopps.



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

2012-11-13 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Wed Nov 14 02:36:54 UTC 2012

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

Log Message:
Add msm6242b(4) page to mi distribution list.


To generate a diff of this commit:
cvs rdiff -u -r1.1405 -r1.1406 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/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1405 src/distrib/sets/lists/man/mi:1.1406
--- src/distrib/sets/lists/man/mi:1.1405	Sun Nov  4 16:26:56 2012
+++ src/distrib/sets/lists/man/mi	Wed Nov 14 02:36:53 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1405 2012/11/04 16:26:56 christos Exp $
+# $NetBSD: mi,v 1.1406 2012/11/14 02:36:53 rkujawa Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -1321,6 +1321,7 @@
 ./usr/share/man/cat4/mr.0			man-obsolete		obsolete
 ./usr/share/man/cat4/msk.0			man-sys-catman		.cat
 ./usr/share/man/cat4/mskc.0			man-sys-catman		.cat
+./usr/share/man/cat4/msm6242b.0			man-sys-catman		.cat
 ./usr/share/man/cat4/mt2131.0			man-sys-catman		.cat
 ./usr/share/man/cat4/mtd.0			man-sys-catman		.cat
 ./usr/share/man/cat4/mtio.0			man-sys-catman		.cat
@@ -4197,6 +4198,7 @@
 ./usr/share/man/html4/mr.html			man-obsolete		obsolete
 ./usr/share/man/html4/msk.html			man-sys-htmlman		html
 ./usr/share/man/html4/mskc.html			man-sys-htmlman		html
+./usr/share/man/html4/msm6242b.html		man-sys-htmlman		html
 ./usr/share/man/html4/mt2131.html		man-sys-htmlman		html
 ./usr/share/man/html4/mtd.html			man-sys-htmlman		html
 ./usr/share/man/html4/mtio.html			man-sys-htmlman		html
@@ -6921,6 +6923,7 @@
 ./usr/share/man/man4/mr.4			man-obsolete		obsolete
 ./usr/share/man/man4/msk.4			man-sys-man		.man
 ./usr/share/man/man4/mskc.4			man-sys-man		.man
+./usr/share/man/man4/msm6242b.4			man-sys-man		.man
 ./usr/share/man/man4/mt2131.4			man-sys-man		.man
 ./usr/share/man/man4/mtd.4			man-sys-man		.man
 ./usr/share/man/man4/mtio.4			man-sys-man		.man



CVS commit: src/lib/libc/softfloat

2012-11-13 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Nov 14 03:47:31 UTC 2012

Modified Files:
src/lib/libc/softfloat: Makefile.inc

Log Message:
For arm, add -fno-tree-vrp to COPTS when compiling softfloat.c.
Without -fno-tree-vrp, -INF + -INF returns 0 by adddf3.
Fixes PR#46953.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/softfloat/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/lib/libc/softfloat/Makefile.inc
diff -u src/lib/libc/softfloat/Makefile.inc:1.10 src/lib/libc/softfloat/Makefile.inc:1.11
--- src/lib/libc/softfloat/Makefile.inc:1.10	Mon Jul  4 02:53:15 2011
+++ src/lib/libc/softfloat/Makefile.inc	Wed Nov 14 03:47:30 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.10 2011/07/04 02:53:15 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.11 2012/11/14 03:47:30 msaitoh Exp $
 
 SOFTFLOAT_BITS?=64
 .PATH:		${ARCHDIR}/softfloat \
@@ -20,9 +20,13 @@ SRCS.softfloat+=eqsf2.c nesf2.c gtsf2.c 
 SRCS+=		${SRCS.softfloat}
 
 # XXX
-.if defined(HAVE_GCC)  ${HAVE_GCC} = 45  \
-(${MACHINE_CPU} == arm || \
- ${MACHINE_CPU} == mips || \
+.if defined(HAVE_GCC)  ${HAVE_GCC} = 45
+.if (${MACHINE_CPU} == arm)
+# See doc/HACKS for more information.
+COPTS.softfloat.c+=	-Wno-enum-compare -fno-tree-vrp
+.elif
+(${MACHINE_CPU} == mips || \
  ${MACHINE_CPU} == sh3)
 COPTS.softfloat.c+=	-Wno-enum-compare
 .endif
+.endif



CVS commit: src/doc

2012-11-13 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Nov 14 04:13:44 UTC 2012

Modified Files:
src/doc: HACKS

Log Message:
Add note about lib/libc/softfloat/Makefile.inc hack for arm.

  Gcc has a bug in tree optimization. For adddf3, -INF + -INF returns 0 without
  -fno-tree-vrp. Debugging with -fdump-tree-all shows that
  softfloat.c.021t.cleanup_cfg is ok but softfloat.c.023t.ssa is broken.


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/doc/HACKS

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

Modified files:

Index: src/doc/HACKS
diff -u src/doc/HACKS:1.123 src/doc/HACKS:1.124
--- src/doc/HACKS:1.123	Sat Mar  3 03:21:16 2012
+++ src/doc/HACKS	Wed Nov 14 04:13:44 2012
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.123 2012/03/03 03:21:16 nakayama Exp $
+# $NetBSD: HACKS,v 1.124 2012/11/14 04:13:44 msaitoh Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -554,6 +554,24 @@ port	arm
 		http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48863#c4
 	kcah
 
+	hack	gcc-4.5 arm without -fno-tree-vrp generate broken code
+	cdate	Wed Nov 14 13:02:02 JST 2012
+	who	msaitoh
+	file	lib/libc/softfloat/Makefile.inc
+	pr	46953
+	regress	src/tests/lib/libm/t_cbrt
+	regress	src/tests/lib/libm/t_ceil
+	regress	src/tests/lib/libm/t_exp
+	regress	src/tests/lib/libm/t_log
+	regress	src/tests/lib/libm/t_scalbn
+	regress	src/tests/lib/libm/t_sinh
+	regress	src/tests/lib/libm/t_sqrt
+	descr	Gcc has a bug in tree optimization. For adddf3,
+		-INF + -INF returns 0 without -fno-tree-vrp.
+		Debugging with -fdump-tree-all shows that
+		softfloat.c.021t.cleanup_cfg is ok but softfloat.c.023t.ssa
+		is broken.
+	kcah
 
 port	sh3
 



CVS commit: src/share/man/man4

2012-11-13 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Nov 14 07:49:35 UTC 2012

Modified Files:
src/share/man/man4: msm6242b.4

Log Message:
Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/msm6242b.4

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/man4/msm6242b.4
diff -u src/share/man/man4/msm6242b.4:1.1 src/share/man/man4/msm6242b.4:1.2
--- src/share/man/man4/msm6242b.4:1.1	Wed Nov 14 02:29:10 2012
+++ src/share/man/man4/msm6242b.4	Wed Nov 14 07:49:34 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: msm6242b.4,v 1.1 2012/11/14 02:29:10 rkujawa Exp $
+.\	$NetBSD: msm6242b.4,v 1.2 2012/11/14 07:49:34 wiz Exp $
 .\
 .\ Copyright (c) 2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -62,7 +62,7 @@ driver first appeared in
 The
 .Nm
 driver was written by
-.An Radoslaw Kujawa 
+.An Radoslaw Kujawa
 .Aq radoslaw.kuj...@gmail.com .
 It was inspired by an earlier amiga-specific driver by
 .An Christian E. Hopps.