CVS commit: src/sys/dev/ata

2016-08-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Aug  5 06:54:22 UTC 2016

Modified Files:
src/sys/dev/ata: wd.c

Log Message:
CID 1364758:  Integer handling issues, avoid sign extension to 64 bits.


To generate a diff of this commit:
cvs rdiff -u -r1.425 -r1.426 src/sys/dev/ata/wd.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/ata/wd.c
diff -u src/sys/dev/ata/wd.c:1.425 src/sys/dev/ata/wd.c:1.426
--- src/sys/dev/ata/wd.c:1.425	Fri Jul 22 08:55:34 2016
+++ src/sys/dev/ata/wd.c	Fri Aug  5 02:54:22 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: wd.c,v 1.425 2016/07/22 12:55:34 jakllsch Exp $ */
+/*	$NetBSD: wd.c,v 1.426 2016/08/05 06:54:22 christos Exp $ */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -54,7 +54,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.425 2016/07/22 12:55:34 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.426 2016/08/05 06:54:22 christos Exp $");
 
 #include "opt_ata.h"
 
@@ -394,8 +394,8 @@ wdattach(device_t parent, device_t self,
 	if ((wd->sc_params.atap_secsz & ATA_SECSZ_VALID_MASK) == ATA_SECSZ_VALID
 	&& ((wd->sc_params.atap_secsz & ATA_SECSZ_LLS) != 0)) {
 		wd->sc_blksize = 2ULL *
-		(wd->sc_params.atap_lls_secsz[1] << 16 |
-		 wd->sc_params.atap_lls_secsz[0] <<  0);
+		((uint32_t)((wd->sc_params.atap_lls_secsz[1] << 16) |
+		wd->sc_params.atap_lls_secsz[0]));
 	} else {
 		wd->sc_blksize = 512;
 	}



CVS commit: src/sys/arch/x68k/dev

2016-08-04 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Fri Aug  5 05:32:02 UTC 2016

Modified Files:
src/sys/arch/x68k/dev: zs.c

Log Message:
Revert a part of previous commit.
If addr is not specified as "zsc0 at intio0" in kernel config
(though it's not right of course), it will cause a panic.
intio_map_allocate_region() should be called after address check.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/x68k/dev/zs.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/x68k/dev/zs.c
diff -u src/sys/arch/x68k/dev/zs.c:1.43 src/sys/arch/x68k/dev/zs.c:1.44
--- src/sys/arch/x68k/dev/zs.c:1.43	Tue May 31 03:22:30 2016
+++ src/sys/arch/x68k/dev/zs.c	Fri Aug  5 05:32:02 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: zs.c,v 1.43 2016/05/31 03:22:30 dholland Exp $	*/
+/*	$NetBSD: zs.c,v 1.44 2016/08/05 05:32:02 isaki Exp $	*/
 
 /*-
  * Copyright (c) 1998 Minoura Makoto
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.43 2016/05/31 03:22:30 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.44 2016/08/05 05:32:02 isaki Exp $");
 
 #include 
 #include 
@@ -148,10 +148,6 @@ zs_match(device_t parent, cfdata_t cf, v
 	if (strcmp(ia->ia_name, "zsc") != 0)
 		return 0;
 
-	ia->ia_size = 8;
-	if (intio_map_allocate_region(parent, ia, INTIO_MAP_TESTONLY))
-		return 0;
-
 	for (i = 0; i < ZS_MAXDEV; i++)
 		if (zsaddr == (void *)zs_physaddr[i]) /* XXX */
 			break;
@@ -160,6 +156,10 @@ zs_match(device_t parent, cfdata_t cf, v
 		return 0;
 	}
 
+	ia->ia_size = 8;
+	if (intio_map_allocate_region(parent, ia, INTIO_MAP_TESTONLY))
+		return 0;
+
 	if (badaddr((void *)IIOV(zsaddr)))
 		return 0;
 



CVS commit: src/doc

2016-08-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Aug  5 04:21:01 UTC 2016

Modified Files:
src/doc: TODO.modules

Log Message:
The ppp compressors are already being handled correctly.  No new
work will be needed here.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/doc/TODO.modules

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

Modified files:

Index: src/doc/TODO.modules
diff -u src/doc/TODO.modules:1.3 src/doc/TODO.modules:1.4
--- src/doc/TODO.modules:1.3	Fri Aug  5 02:27:14 2016
+++ src/doc/TODO.modules	Fri Aug  5 04:21:01 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.modules,v 1.3 2016/08/05 02:27:14 pgoyette Exp $ */
+/* $NetBSD: TODO.modules,v 1.4 2016/08/05 04:21:01 pgoyette Exp $ */
 
 Some notes on the limitations of our current (as of 7.99.35) module
 subsystem.  This list was triggered by an Email exchange between
@@ -77,12 +77,3 @@ christos and pgoyette.
both testing-as-a-built-in module and testing-as-a-loaded-module, and
all dependencies need to be identified.
 
-10.Work is currently under way on creating a ppp module.  Once this is
-   complete, it will require additional work to possibly auto-load the
-   compression routines.  Until then, users would need to manually load
-   the ppp_deflate and ppp_bsdcompress modules.
-
-	Currently the compressors are separate modules which reside
-	on-top-of ppp, and which call back to ppp for "registration";
-	thus, ppp itself cannot list the compressors as dependencies.
-	See #1 above!



CVS commit: src/doc

2016-08-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Aug  5 02:27:14 UTC 2016

Modified Files:
src/doc: TODO.modules

Log Message:
Add some info regarding ppp


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/doc/TODO.modules

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

Modified files:

Index: src/doc/TODO.modules
diff -u src/doc/TODO.modules:1.2 src/doc/TODO.modules:1.3
--- src/doc/TODO.modules:1.2	Thu Aug  4 22:12:31 2016
+++ src/doc/TODO.modules	Fri Aug  5 02:27:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.modules,v 1.2 2016/08/04 22:12:31 pgoyette Exp $ */
+/* $NetBSD: TODO.modules,v 1.3 2016/08/05 02:27:14 pgoyette Exp $ */
 
 Some notes on the limitations of our current (as of 7.99.35) module
 subsystem.  This list was triggered by an Email exchange between
@@ -76,3 +76,13 @@ christos and pgoyette.
the module code adequately.  Testing of module code should include
both testing-as-a-built-in module and testing-as-a-loaded-module, and
all dependencies need to be identified.
+
+10.Work is currently under way on creating a ppp module.  Once this is
+   complete, it will require additional work to possibly auto-load the
+   compression routines.  Until then, users would need to manually load
+   the ppp_deflate and ppp_bsdcompress modules.
+
+	Currently the compressors are separate modules which reside
+	on-top-of ppp, and which call back to ppp for "registration";
+	thus, ppp itself cannot list the compressors as dependencies.
+	See #1 above!



CVS commit: src/sys/net

2016-08-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri Aug  5 00:52:02 UTC 2016

Modified Files:
src/sys/net: route.c

Log Message:
CID 1364759: fix using uninitialized value


To generate a diff of this commit:
cvs rdiff -u -r1.173 -r1.174 src/sys/net/route.c

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

Modified files:

Index: src/sys/net/route.c
diff -u src/sys/net/route.c:1.173 src/sys/net/route.c:1.174
--- src/sys/net/route.c:1.173	Mon Aug  1 03:15:30 2016
+++ src/sys/net/route.c	Fri Aug  5 00:52:02 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.173 2016/08/01 03:15:30 ozaki-r Exp $	*/
+/*	$NetBSD: route.c,v 1.174 2016/08/05 00:52:02 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.173 2016/08/01 03:15:30 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.174 2016/08/05 00:52:02 ozaki-r Exp $");
 
 #include 
 #ifdef RTFLUSH_DEBUG
@@ -757,7 +757,7 @@ rt_getifp(struct rt_addrinfo *info, stru
 struct ifaddr *
 rt_getifa(struct rt_addrinfo *info, struct psref *psref)
 {
-	struct ifaddr *ifa;
+	struct ifaddr *ifa = NULL;
 	const struct sockaddr *dst = info->rti_info[RTAX_DST];
 	const struct sockaddr *gateway = info->rti_info[RTAX_GATEWAY];
 	const struct sockaddr *ifaaddr = info->rti_info[RTAX_IFA];



CVS commit: src/sys/netinet6

2016-08-04 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri Aug  5 00:51:14 UTC 2016

Modified Files:
src/sys/netinet6: in6.c

Log Message:
CID 1364757: remove unnecessary branching


To generate a diff of this commit:
cvs rdiff -u -r1.214 -r1.215 src/sys/netinet6/in6.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/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.214 src/sys/netinet6/in6.c:1.215
--- src/sys/netinet6/in6.c:1.214	Mon Aug  1 04:37:53 2016
+++ src/sys/netinet6/in6.c	Fri Aug  5 00:51:14 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.214 2016/08/01 04:37:53 ozaki-r Exp $	*/
+/*	$NetBSD: in6.c,v 1.215 2016/08/05 00:51:14 ozaki-r Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.214 2016/08/01 04:37:53 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.215 2016/08/05 00:51:14 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -485,8 +485,7 @@ in6_control1(struct socket *so, u_long c
 
 	case SIOCGIFADDR_IN6:
 		ifr->ifr_addr = ia->ia_addr;
-		if ((error = sa6_recoverscope(&ifr->ifr_addr)) != 0)
-			break;
+		error = sa6_recoverscope(&ifr->ifr_addr);
 		break;
 
 	case SIOCGIFDSTADDR_IN6:
@@ -499,8 +498,7 @@ in6_control1(struct socket *so, u_long c
 		 * an error?
 		 */
 		ifr->ifr_dstaddr = ia->ia_dstaddr;
-		if ((error = sa6_recoverscope(&ifr->ifr_dstaddr)) != 0)
-			break;
+		error = sa6_recoverscope(&ifr->ifr_dstaddr);
 		break;
 
 	case SIOCGIFNETMASK_IN6:



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

2016-08-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Aug  4 23:54:45 UTC 2016

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

Log Message:
Update sets lists for new slcompress module


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/distrib/sets/lists/modules/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/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.86 src/distrib/sets/lists/modules/mi:1.87
--- src/distrib/sets/lists/modules/mi:1.86	Thu Jun  9 04:46:08 2016
+++ src/distrib/sets/lists/modules/mi	Thu Aug  4 23:54:45 2016
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.86 2016/06/09 04:46:08 pgoyette Exp $
+# $NetBSD: mi,v 1.87 2016/08/04 23:54:45 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -230,6 +230,8 @@
 ./@MODULEDIR@/securelevel/securelevel.kmod	base-kernel-modules	kmod
 ./@MODULEDIR@/skipjackbase-kernel-modules	kmod
 ./@MODULEDIR@/skipjack/skipjack.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/slcompress			base-kernel-modules kmod
+./@MODULEDIR@/slcompress/slcompress.kmod	base-kernel-modules kmod
 ./@MODULEDIR@/smbfsbase-kernel-modules	kmod
 ./@MODULEDIR@/smbfs/smbfs.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/solarisbase-kernel-modules kmod,solaris



CVS commit: src/sys/modules

2016-08-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Aug  4 23:53:47 UTC 2016

Modified Files:
src/sys/modules: Makefile
Added Files:
src/sys/modules/slcompress: Makefile

Log Message:
Add and enable a new module, slcompress

This is a prerequisite to modularizing the ppp pseudo-device


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/sys/modules/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/slcompress/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/modules/Makefile
diff -u src/sys/modules/Makefile:1.167 src/sys/modules/Makefile:1.168
--- src/sys/modules/Makefile:1.167	Thu Jun  9 04:44:18 2016
+++ src/sys/modules/Makefile	Thu Aug  4 23:53:47 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.167 2016/06/09 04:44:18 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.168 2016/08/04 23:53:47 pgoyette Exp $
 
 .include 
 
@@ -93,6 +93,7 @@ SUBDIR+=	secmodel_extensions
 SUBDIR+=	secmodel_overlay
 SUBDIR+=	securelevel
 SUBDIR+=	skipjack
+SUBDIR+=	slcompress
 SUBDIR+=	smbfs
 SUBDIR+=	spdmem
 SUBDIR+=	sysmon

Added files:

Index: src/sys/modules/slcompress/Makefile
diff -u /dev/null src/sys/modules/slcompress/Makefile:1.1
--- /dev/null	Thu Aug  4 23:53:47 2016
+++ src/sys/modules/slcompress/Makefile	Thu Aug  4 23:53:47 2016
@@ -0,0 +1,12 @@
+#	$NetBSD: Makefile,v 1.1 2016/08/04 23:53:47 pgoyette Exp $
+
+.include "../Makefile.inc"
+
+.PATH:	${S}/net
+
+KMOD=	slcompress
+SRCS=	slcompress.c
+
+CPPFLAGS+=	-DINET
+
+.include 



CVS commit: src/doc

2016-08-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Aug  4 22:12:31 UTC 2016

Modified Files:
src/doc: TODO.modules

Log Message:
Add some more notes


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/doc/TODO.modules

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

Modified files:

Index: src/doc/TODO.modules
diff -u src/doc/TODO.modules:1.1 src/doc/TODO.modules:1.2
--- src/doc/TODO.modules:1.1	Thu Aug  4 10:45:52 2016
+++ src/doc/TODO.modules	Thu Aug  4 22:12:31 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.modules,v 1.1 2016/08/04 10:45:52 pgoyette Exp $ */
+/* $NetBSD: TODO.modules,v 1.2 2016/08/04 22:12:31 pgoyette Exp $ */
 
 Some notes on the limitations of our current (as of 7.99.35) module
 subsystem.  This list was triggered by an Email exchange between
@@ -51,3 +51,28 @@ christos and pgoyette.
 	mechanism for identifying and loading drivers based on what
 	devices might be found.
 
+8. Even for existing modules, there are "surprise" dependencies with
+   code that has not yet been modularized.
+
+	For example, even though the bpf code has been modularized,
+	there is some shared code in bpf_filter.c which is needed by
+	both ipfilter and ppp.  ipf is already modularized, but ppp
+	is not.  Thus, even though bpf_filter is modular, it MUST be
+	included as a built-in module if you also have ppp in your
+	configuration.
+
+	Another example is sysmon_taskq module.  It is required by
+	other parts of the sysmon subsystem, including the
+	"sysmon_power" module.  Unfortunately, even though the
+	sysmon_power code is modularized, it is referenced by the
+	acpi code which has not been modularized.  Therefore, if your
+	configuration has acpi, then you must include the "sysmon_power"
+	module built-in the kernel.  And therefore your also need to
+	have "sysmon_taskq" and "sysmon" built-in since "sysmon_power"
+	rerefences them.
+
+9. As a corollary to #8 above, having dependencies on modules from code
+   which has not been modularized makes it extremely difficult to test
+   the module code adequately.  Testing of module code should include
+   both testing-as-a-built-in module and testing-as-a-loaded-module, and
+   all dependencies need to be identified.



CVS commit: src/sys/lib/libsa

2016-08-04 Thread Robert Swindells
Module Name:src
Committed By:   rjs
Date:   Thu Aug  4 21:39:20 UTC 2016

Modified Files:
src/sys/lib/libsa: ext2fs.c

Log Message:
Another header change.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/lib/libsa/ext2fs.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/lib/libsa/ext2fs.c
diff -u src/sys/lib/libsa/ext2fs.c:1.23 src/sys/lib/libsa/ext2fs.c:1.24
--- src/sys/lib/libsa/ext2fs.c:1.23	Thu Aug  4 06:58:41 2016
+++ src/sys/lib/libsa/ext2fs.c	Thu Aug  4 21:39:20 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs.c,v 1.23 2016/08/04 06:58:41 nonaka Exp $	*/
+/*	$NetBSD: ext2fs.c,v 1.24 2016/08/04 21:39:20 rjs Exp $	*/
 
 /*
  * Copyright (c) 1997 Manuel Bouyer.
@@ -960,7 +960,7 @@ void e2fs_i_bswap(struct ext2fs_dinode *
 	new->e2di_version	=	bswap32(old->e2di_version);
 	new->e2di_gen		=	bswap32(old->e2di_gen);
 	new->e2di_facl		=	bswap32(old->e2di_facl);
-	new->e2di_dacl		=	bswap32(old->e2di_dacl);
+	new->e2di_size_high	=	bswap32(old->e2di_size_high);
 	new->e2di_nblock_high	=	bswap16(old->e2di_nblock_high);
 	new->e2di_facl_high	=	bswap16(old->e2di_facl_high);
 	new->e2di_uid_high	=	bswap16(old->e2di_uid_high);



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

2016-08-04 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Aug  4 20:07:18 UTC 2016

Modified Files:
src/sys/arch/arm/omap: omap3_sdhc.c

Log Message:
TI_DM37xx does not currently have a working omapscm(4), which provides
omap_devid().  Avoid using omap_devid() until correctly fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/omap/omap3_sdhc.c

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

Modified files:

Index: src/sys/arch/arm/omap/omap3_sdhc.c
diff -u src/sys/arch/arm/omap/omap3_sdhc.c:1.22 src/sys/arch/arm/omap/omap3_sdhc.c:1.23
--- src/sys/arch/arm/omap/omap3_sdhc.c:1.22	Thu Aug  4 07:14:50 2016
+++ src/sys/arch/arm/omap/omap3_sdhc.c	Thu Aug  4 20:07:18 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap3_sdhc.c,v 1.22 2016/08/04 07:14:50 kiyohara Exp $	*/
+/*	$NetBSD: omap3_sdhc.c,v 1.23 2016/08/04 20:07:18 jakllsch Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.22 2016/08/04 07:14:50 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.23 2016/08/04 20:07:18 jakllsch Exp $");
 
 #include "opt_omap.h"
 #include "edma.h"
@@ -225,7 +225,7 @@ obiosdhc_attach(device_t parent, device_
 	sc->sc.sc_flags |= SDHC_FLAG_RSP136_CRC;
 	if (support8bit)
 		sc->sc.sc_flags |= SDHC_FLAG_8BIT_MODE;
-#if defined(OMAP_3430)
+#if defined(OMAP_3430) || /* XXX until TI_DM37XX has working omap_devid() */ defined(TI_DM37XX)
 	sc->sc.sc_flags |= SDHC_FLAG_SINGLE_ONLY;
 #elif defined(OMAP_3530) || defined(TI_DM37XX)
 	/*



CVS commit: src/sys/external/bsd/gnu-efi/dist/inc

2016-08-04 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Thu Aug  4 18:08:12 UTC 2016

Modified Files:
src/sys/external/bsd/gnu-efi/dist/inc: efiapi.h
Added Files:
src/sys/external/bsd/gnu-efi/dist/inc: efifpswa.h

Log Message:
PR port-ia64/50719

Remove duplicate EFI files for ia64


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h
cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/gnu-efi/dist/inc/efifpswa.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/external/bsd/gnu-efi/dist/inc/efiapi.h
diff -u src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h:1.1.1.1 src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h:1.2
--- src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h:1.1.1.1	Tue Apr  1 16:16:07 2014
+++ src/sys/external/bsd/gnu-efi/dist/inc/efiapi.h	Thu Aug  4 18:08:12 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: efiapi.h,v 1.1.1.1 2014/04/01 16:16:07 jakllsch Exp $	*/
+/*	$NetBSD: efiapi.h,v 1.2 2016/08/04 18:08:12 scole Exp $	*/
 
 #ifndef _EFI_API_H
 #define _EFI_API_H
@@ -848,6 +848,9 @@ typedef struct _EFI_BOOT_SERVICES {
 #define SAL_SYSTEM_TABLE_GUID\
 { 0xeb9d2d32, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
 
+/* DIG64 Headless Console & Debug Port Table. */
+#define	HCDP_TABLE_GUID\
+{ 0xf951938d, 0x620b, 0x42ef, {0x82, 0x79, 0xa8, 0x4b, 0x79, 0x61, 0x78, 0x98} }
 
 typedef struct _EFI_CONFIGURATION_TABLE {
 EFI_GUIDVendorGuid;

Added files:

Index: src/sys/external/bsd/gnu-efi/dist/inc/efifpswa.h
diff -u /dev/null src/sys/external/bsd/gnu-efi/dist/inc/efifpswa.h:1.1
--- /dev/null	Thu Aug  4 18:08:12 2016
+++ src/sys/external/bsd/gnu-efi/dist/inc/efifpswa.h	Thu Aug  4 18:08:12 2016
@@ -0,0 +1,41 @@
+/*	$NetBSD: efifpswa.h,v 1.1 2016/08/04 18:08:12 scole Exp $	*/
+/* $FreeBSD: releng/10.1/sys/boot/efi/include/efifpswa.h 96893 2002-05-19 03:17:22Z marcel $ */
+#ifndef _EFI_FPSWA_H
+#define _EFI_FPSWA_H
+
+/*
+ * EFI FP SWA Driver (Floating Point Software Assist)
+ */
+
+#define EFI_INTEL_FPSWA \
+{ 0xc41b6531, 0x97b9, 0x11d3, 0x9a, 0x29, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d }
+
+INTERFACE_DECL(_FPSWA_INTERFACE);
+
+typedef struct _FPSWA_RET {
+UINT64  status;
+UINT64  err1;
+UINT64  err2;
+UINT64  err3;
+} FPSWA_RET;
+
+typedef
+FPSWA_RET
+(EFIAPI *EFI_FPSWA) (
+IN UINTNTrapType,
+IN OUT VOID *Bundle,
+IN OUT UINT64   *pipsr,
+IN OUT UINT64   *pfsr,
+IN OUT UINT64   *pisr,
+IN OUT UINT64   *ppreds,
+IN OUT UINT64   *pifs,
+IN OUT VOID *fp_state
+);
+
+typedef struct _FPSWA_INTERFACE {
+UINT32  Revision;
+UINT32  Reserved;
+EFI_FPSWA   Fpswa;
+} FPSWA_INTERFACE;
+
+#endif



CVS commit: src/sys/arch/ia64

2016-08-04 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Thu Aug  4 18:07:43 UTC 2016

Modified Files:
src/sys/arch/ia64/stand/efi/libefi: bootinfo.c copy.c efi.c efifpswa.c
exec.c time.c
src/sys/arch/ia64/stand/ia64: Makefile.booters
src/sys/arch/ia64/stand/ia64/efi: main.c
Added Files:
src/sys/arch/ia64/include: efilib.h
Removed Files:
src/sys/arch/ia64/stand/efi/include: README efi.h efi_nii.h efiapi.h
eficon.h efidebug.h efidef.h efidevp.h efierr.h efifpswa.h efifs.h
efilib.h efinet.h efipart.h efiprot.h efipxebc.h efiser.h
efistdarg.h
src/sys/arch/ia64/stand/efi/include/ia64: efibind.h pe.h

Log Message:
PR port-ia64/50719

Remove duplicate EFI files for ia64


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/ia64/include/efilib.h
cvs rdiff -u -r1.2 -r0 src/sys/arch/ia64/stand/efi/include/README \
src/sys/arch/ia64/stand/efi/include/efi.h \
src/sys/arch/ia64/stand/efi/include/efi_nii.h \
src/sys/arch/ia64/stand/efi/include/efiapi.h \
src/sys/arch/ia64/stand/efi/include/eficon.h \
src/sys/arch/ia64/stand/efi/include/efidebug.h \
src/sys/arch/ia64/stand/efi/include/efidef.h \
src/sys/arch/ia64/stand/efi/include/efidevp.h \
src/sys/arch/ia64/stand/efi/include/efifpswa.h \
src/sys/arch/ia64/stand/efi/include/efifs.h \
src/sys/arch/ia64/stand/efi/include/efilib.h \
src/sys/arch/ia64/stand/efi/include/efinet.h \
src/sys/arch/ia64/stand/efi/include/efipart.h \
src/sys/arch/ia64/stand/efi/include/efiprot.h \
src/sys/arch/ia64/stand/efi/include/efipxebc.h \
src/sys/arch/ia64/stand/efi/include/efiser.h \
src/sys/arch/ia64/stand/efi/include/efistdarg.h
cvs rdiff -u -r1.3 -r0 src/sys/arch/ia64/stand/efi/include/efierr.h
cvs rdiff -u -r1.2 -r0 src/sys/arch/ia64/stand/efi/include/ia64/efibind.h \
src/sys/arch/ia64/stand/efi/include/ia64/pe.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/ia64/stand/efi/libefi/bootinfo.c \
src/sys/arch/ia64/stand/efi/libefi/copy.c \
src/sys/arch/ia64/stand/efi/libefi/efi.c \
src/sys/arch/ia64/stand/efi/libefi/efifpswa.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/stand/efi/libefi/exec.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/efi/libefi/time.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ia64/stand/ia64/Makefile.booters
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/stand/ia64/efi/main.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/ia64/stand/efi/libefi/bootinfo.c
diff -u src/sys/arch/ia64/stand/efi/libefi/bootinfo.c:1.4 src/sys/arch/ia64/stand/efi/libefi/bootinfo.c:1.5
--- src/sys/arch/ia64/stand/efi/libefi/bootinfo.c:1.4	Thu Dec 27 20:21:51 2012
+++ src/sys/arch/ia64/stand/efi/libefi/bootinfo.c	Thu Aug  4 18:07:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootinfo.c,v 1.4 2012/12/27 20:21:51 martin Exp $	*/
+/*	$NetBSD: bootinfo.c,v 1.5 2016/08/04 18:07:43 scole Exp $	*/
 
 /*-
  * Copyright (c) 1998 Michael Smith 
@@ -48,6 +48,8 @@
 #include 
 #include 
 
+#include 
+
 #include "bootstrap.h" 
 
 static EFI_GUID hcdp = HCDP_TABLE_GUID;
Index: src/sys/arch/ia64/stand/efi/libefi/copy.c
diff -u src/sys/arch/ia64/stand/efi/libefi/copy.c:1.4 src/sys/arch/ia64/stand/efi/libefi/copy.c:1.5
--- src/sys/arch/ia64/stand/efi/libefi/copy.c:1.4	Mon Oct 26 19:16:56 2009
+++ src/sys/arch/ia64/stand/efi/libefi/copy.c	Thu Aug  4 18:07:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: copy.c,v 1.4 2009/10/26 19:16:56 cegger Exp $	*/
+/*	$NetBSD: copy.c,v 1.5 2016/08/04 18:07:43 scole Exp $	*/
 
 /*-
  * Copyright (c) 1998 Michael Smith 
@@ -35,6 +35,7 @@
 #include 
 #include 
 
+#include 
 
 int
 efi_copyin(void *src, vaddr_t va, size_t len)
Index: src/sys/arch/ia64/stand/efi/libefi/efi.c
diff -u src/sys/arch/ia64/stand/efi/libefi/efi.c:1.4 src/sys/arch/ia64/stand/efi/libefi/efi.c:1.5
--- src/sys/arch/ia64/stand/efi/libefi/efi.c:1.4	Thu Dec 27 20:21:51 2012
+++ src/sys/arch/ia64/stand/efi/libefi/efi.c	Thu Aug  4 18:07:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: efi.c,v 1.4 2012/12/27 20:21:51 martin Exp $	*/
+/*	$NetBSD: efi.c,v 1.5 2016/08/04 18:07:43 scole Exp $	*/
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -34,6 +34,8 @@
 #include 
 #include 
 
+#include 
+
 EFI_HANDLE		IH;
 EFI_SYSTEM_TABLE	*ST;
 EFI_BOOT_SERVICES	*BS;
Index: src/sys/arch/ia64/stand/efi/libefi/efifpswa.c
diff -u src/sys/arch/ia64/stand/efi/libefi/efifpswa.c:1.4 src/sys/arch/ia64/stand/efi/libefi/efifpswa.c:1.5
--- src/sys/arch/ia64/stand/efi/libefi/efifpswa.c:1.4	Sun Jul 17 20:54:42 2011
+++ src/sys/arch/ia64/stand/efi/libefi/efifpswa.c	Thu Aug  4 18:07:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: efifpswa.c,v 1.4 2011/07/17 20:54:42 joerg Exp $	*/
+/*	$NetBSD: efifpswa.c,v 1.5 2016/08/04 18:07:43 scole Exp $	*/
 
 /*-
  * Copyright (c) 2001 Peter Wemm 
@@ -36,6 +36,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include "efiboot.h"

Index: src/sys/arch/ia64/stand/ef

CVS commit: src/sys/ufs/ext2fs

2016-08-04 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Thu Aug  4 17:50:52 UTC 2016

Modified Files:
src/sys/ufs/ext2fs: ext2fs_dinode.h

Log Message:
make E2MAXSYMLINKLEN just alias for EXT2_MAXSYMLINKLEN, they are the same


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/ufs/ext2fs/ext2fs_dinode.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/ufs/ext2fs/ext2fs_dinode.h
diff -u src/sys/ufs/ext2fs/ext2fs_dinode.h:1.33 src/sys/ufs/ext2fs/ext2fs_dinode.h:1.34
--- src/sys/ufs/ext2fs/ext2fs_dinode.h:1.33	Thu Aug  4 17:47:48 2016
+++ src/sys/ufs/ext2fs/ext2fs_dinode.h	Thu Aug  4 17:50:51 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs_dinode.h,v 1.33 2016/08/04 17:47:48 jdolecek Exp $	*/
+/*	$NetBSD: ext2fs_dinode.h,v 1.34 2016/08/04 17:50:51 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1982, 1989, 1993
@@ -105,6 +105,7 @@
 #define	EXT2FS_NIADDR	3		/* Indirect addresses in inode. */
 
 #define EXT2_MAXSYMLINKLEN ((EXT2FS_NDADDR+EXT2FS_NIADDR) * sizeof (uint32_t))
+#define E2MAXSYMLINKLEN	EXT2_MAXSYMLINKLEN
 
 struct ext2fs_dinode {
 	uint16_t	e2di_mode;	/*   0: IFMT, permissions; see below. */
@@ -142,9 +143,6 @@ struct ext2fs_dinode {
 	uint32_t	e2di_projid;/* 156: project id (not implemented) (ext4) */
 };
 
-/* XXX how does this differ from EXT2_MAXSYMLINKLEN above? */
-#define	E2MAXSYMLINKLEN	((EXT2FS_NDADDR + EXT2FS_NIADDR) * sizeof(uint32_t))
-
 #define	i_e2fs_mode		i_din.e2fs_din->e2di_mode
 #define	i_e2fs_uid		i_din.e2fs_din->e2di_uid
 #define	i_e2fs_size		i_din.e2fs_din->e2di_size



CVS commit: src/sys/ufs

2016-08-04 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Thu Aug  4 17:47:48 UTC 2016

Modified Files:
src/sys/ufs/ext2fs: ext2fs_dinode.h
src/sys/ufs/ufs: inode.h

Log Message:
move i_e2fs_* defines from ufs/inode.h to ext2fs/ext2fs_dinode.h, where they 
belong; they don't seem to be used anywhere else then ext2fs code any more


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/ufs/ext2fs/ext2fs_dinode.h
cvs rdiff -u -r1.73 -r1.74 src/sys/ufs/ufs/inode.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/ufs/ext2fs/ext2fs_dinode.h
diff -u src/sys/ufs/ext2fs/ext2fs_dinode.h:1.32 src/sys/ufs/ext2fs/ext2fs_dinode.h:1.33
--- src/sys/ufs/ext2fs/ext2fs_dinode.h:1.32	Thu Aug  4 17:43:48 2016
+++ src/sys/ufs/ext2fs/ext2fs_dinode.h	Thu Aug  4 17:47:48 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs_dinode.h,v 1.32 2016/08/04 17:43:48 jdolecek Exp $	*/
+/*	$NetBSD: ext2fs_dinode.h,v 1.33 2016/08/04 17:47:48 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1982, 1989, 1993
@@ -145,6 +145,27 @@ struct ext2fs_dinode {
 /* XXX how does this differ from EXT2_MAXSYMLINKLEN above? */
 #define	E2MAXSYMLINKLEN	((EXT2FS_NDADDR + EXT2FS_NIADDR) * sizeof(uint32_t))
 
+#define	i_e2fs_mode		i_din.e2fs_din->e2di_mode
+#define	i_e2fs_uid		i_din.e2fs_din->e2di_uid
+#define	i_e2fs_size		i_din.e2fs_din->e2di_size
+#define	i_e2fs_atime		i_din.e2fs_din->e2di_atime
+#define	i_e2fs_ctime		i_din.e2fs_din->e2di_ctime
+#define	i_e2fs_mtime		i_din.e2fs_din->e2di_mtime
+#define	i_e2fs_dtime		i_din.e2fs_din->e2di_dtime
+#define	i_e2fs_gid		i_din.e2fs_din->e2di_gid
+#define	i_e2fs_nlink		i_din.e2fs_din->e2di_nlink
+#define	i_e2fs_nblock		i_din.e2fs_din->e2di_nblock
+#define	i_e2fs_flags		i_din.e2fs_din->e2di_flags
+#define	i_e2fs_version		i_din.e2fs_din->e2di_version
+#define	i_e2fs_blocks		i_din.e2fs_din->e2di_blocks
+#define	i_e2fs_rdev		i_din.e2fs_din->e2di_rdev
+#define	i_e2fs_gen		i_din.e2fs_din->e2di_gen
+#define	i_e2fs_facl		i_din.e2fs_din->e2di_facl
+#define	i_e2fs_nblock_high	i_din.e2fs_din->e2di_nblock_high
+#define	i_e2fs_facl_high	i_din.e2fs_din->e2di_facl_high
+#define	i_e2fs_uid_high		i_din.e2fs_din->e2di_uid_high
+#define	i_e2fs_gid_high		i_din.e2fs_din->e2di_gid_high
+
 /* File permissions. */
 #define	EXT2_IEXEC		100		/* Executable. */
 #define	EXT2_IWRITE		200		/* Writable. */

Index: src/sys/ufs/ufs/inode.h
diff -u src/sys/ufs/ufs/inode.h:1.73 src/sys/ufs/ufs/inode.h:1.74
--- src/sys/ufs/ufs/inode.h:1.73	Thu Aug  4 17:43:48 2016
+++ src/sys/ufs/ufs/inode.h	Thu Aug  4 17:47:47 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: inode.h,v 1.73 2016/08/04 17:43:48 jdolecek Exp $	*/
+/*	$NetBSD: inode.h,v 1.74 2016/08/04 17:47:47 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1982, 1989, 1993
@@ -210,27 +210,6 @@ struct inode {
 #define	i_ffs2_extsize		i_din.ffs2_din->di_extsize
 #define	i_ffs2_extb		i_din.ffs2_din->di_extb
 
-#define	i_e2fs_mode		i_din.e2fs_din->e2di_mode
-#define	i_e2fs_uid		i_din.e2fs_din->e2di_uid
-#define	i_e2fs_size		i_din.e2fs_din->e2di_size
-#define	i_e2fs_atime		i_din.e2fs_din->e2di_atime
-#define	i_e2fs_ctime		i_din.e2fs_din->e2di_ctime
-#define	i_e2fs_mtime		i_din.e2fs_din->e2di_mtime
-#define	i_e2fs_dtime		i_din.e2fs_din->e2di_dtime
-#define	i_e2fs_gid		i_din.e2fs_din->e2di_gid
-#define	i_e2fs_nlink		i_din.e2fs_din->e2di_nlink
-#define	i_e2fs_nblock		i_din.e2fs_din->e2di_nblock
-#define	i_e2fs_flags		i_din.e2fs_din->e2di_flags
-#define	i_e2fs_version		i_din.e2fs_din->e2di_version
-#define	i_e2fs_blocks		i_din.e2fs_din->e2di_blocks
-#define	i_e2fs_rdev		i_din.e2fs_din->e2di_rdev
-#define	i_e2fs_gen		i_din.e2fs_din->e2di_gen
-#define	i_e2fs_facl		i_din.e2fs_din->e2di_facl
-#define	i_e2fs_nblock_high	i_din.e2fs_din->e2di_nblock_high
-#define	i_e2fs_facl_high	i_din.e2fs_din->e2di_facl_high
-#define	i_e2fs_uid_high		i_din.e2fs_din->e2di_uid_high
-#define	i_e2fs_gid_high		i_din.e2fs_din->e2di_gid_high
-
 /* These flags are kept in i_flag. */
 #define	IN_ACCESS	0x0001		/* Access time update request. */
 #define	IN_CHANGE	0x0002		/* Inode change time update request. */



CVS commit: src

2016-08-04 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Thu Aug  4 17:43:48 UTC 2016

Modified Files:
src/sbin/fsck_ext2fs: inode.c
src/sbin/newfs_ext2fs: mke2fs.c
src/sys/ufs/ext2fs: ext2fs.h ext2fs_bswap.c ext2fs_dinode.h
ext2fs_inode.c
src/sys/ufs/ufs: inode.h

Log Message:
rename struct ext2fs_dinode attribute e2di_dacl to correct
e2di_size_high; even Linux ext2 filesystem code actually uses it
unconditionally this way and ext4 code finally also calls it that way
in their struct definition too; if there was any trace of this for other
purpose it's long gone


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sbin/fsck_ext2fs/inode.c
cvs rdiff -u -r1.23 -r1.24 src/sbin/newfs_ext2fs/mke2fs.c
cvs rdiff -u -r1.39 -r1.40 src/sys/ufs/ext2fs/ext2fs.h
cvs rdiff -u -r1.21 -r1.22 src/sys/ufs/ext2fs/ext2fs_bswap.c
cvs rdiff -u -r1.31 -r1.32 src/sys/ufs/ext2fs/ext2fs_dinode.h
cvs rdiff -u -r1.83 -r1.84 src/sys/ufs/ext2fs/ext2fs_inode.c
cvs rdiff -u -r1.72 -r1.73 src/sys/ufs/ufs/inode.h

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

Modified files:

Index: src/sbin/fsck_ext2fs/inode.c
diff -u src/sbin/fsck_ext2fs/inode.c:1.36 src/sbin/fsck_ext2fs/inode.c:1.37
--- src/sbin/fsck_ext2fs/inode.c:1.36	Sun Jun 23 07:28:36 2013
+++ src/sbin/fsck_ext2fs/inode.c	Thu Aug  4 17:43:47 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: inode.c,v 1.36 2013/06/23 07:28:36 dholland Exp $	*/
+/*	$NetBSD: inode.c,v 1.37 2016/08/04 17:43:47 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -58,7 +58,7 @@
 #if 0
 static char sccsid[] = "@(#)inode.c	8.5 (Berkeley) 2/8/95";
 #else
-__RCSID("$NetBSD: inode.c,v 1.36 2013/06/23 07:28:36 dholland Exp $");
+__RCSID("$NetBSD: inode.c,v 1.37 2016/08/04 17:43:47 jdolecek Exp $");
 #endif
 #endif /* not lint */
 
@@ -141,7 +141,7 @@ inosize(struct ext2fs_dinode *dp)
 	u_int64_t size = fs2h32(dp->e2di_size);
 
 	if ((fs2h16(dp->e2di_mode) & IFMT) == IFREG)
-		size |= (u_int64_t)fs2h32(dp->e2di_dacl) << 32;
+		size |= (u_int64_t)fs2h32(dp->e2di_size_high) << 32;
 	if (size > INT32_MAX)
 		(void)setlarge();
 	return size;
@@ -151,7 +151,7 @@ void
 inossize(struct ext2fs_dinode *dp, u_int64_t size)
 {
 	if ((fs2h16(dp->e2di_mode) & IFMT) == IFREG) {
-		dp->e2di_dacl = h2fs32(size >> 32);
+		dp->e2di_size_high = h2fs32(size >> 32);
 		if (size > INT32_MAX)
 			if (!setlarge())
 return;

Index: src/sbin/newfs_ext2fs/mke2fs.c
diff -u src/sbin/newfs_ext2fs/mke2fs.c:1.23 src/sbin/newfs_ext2fs/mke2fs.c:1.24
--- src/sbin/newfs_ext2fs/mke2fs.c:1.23	Thu Aug  4 03:01:38 2016
+++ src/sbin/newfs_ext2fs/mke2fs.c	Thu Aug  4 17:43:47 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: mke2fs.c,v 1.23 2016/08/04 03:01:38 nonaka Exp $	*/
+/*	$NetBSD: mke2fs.c,v 1.24 2016/08/04 17:43:47 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 2007 Izumi Tsutsui.  All rights reserved.
@@ -100,7 +100,7 @@
 #if 0
 static char sccsid[] = "@(#)mkfs.c	8.11 (Berkeley) 5/3/95";
 #else
-__RCSID("$NetBSD: mke2fs.c,v 1.23 2016/08/04 03:01:38 nonaka Exp $");
+__RCSID("$NetBSD: mke2fs.c,v 1.24 2016/08/04 17:43:47 jdolecek Exp $");
 #endif
 #endif /* not lint */
 
@@ -1133,9 +1133,9 @@ init_resizeino(const struct timeval *tv)
 		"required to enable resize feature for this filesystem",
 		__func__);
 	}
-	/* upper 32bit is stored into e2di_dacl on REV1 feature */
-	node.e2di_size = isize & UINT32_MAX;
-	node.e2di_dacl = isize >> 32;
+	/* upper 32bit is stored into e2di_size_high on REV1 feature */
+	node.e2di_size 	= isize & UINT32_MAX;
+	node.e2di_size_high = isize >> 32;
 
 #define SINGLE	0	/* index of single indirect block */
 #define DOUBLE	1	/* index of double indirect block */

Index: src/sys/ufs/ext2fs/ext2fs.h
diff -u src/sys/ufs/ext2fs/ext2fs.h:1.39 src/sys/ufs/ext2fs/ext2fs.h:1.40
--- src/sys/ufs/ext2fs/ext2fs.h:1.39	Wed Aug  3 21:53:02 2016
+++ src/sys/ufs/ext2fs/ext2fs.h	Thu Aug  4 17:43:48 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs.h,v 1.39 2016/08/03 21:53:02 jdolecek Exp $	*/
+/*	$NetBSD: ext2fs.h,v 1.40 2016/08/04 17:43:48 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -318,7 +318,7 @@ struct m_ext2fs {
  * - EXT2F_ROCOMPAT_SPARSESUPER
  *superblock backups stored only in cg_has_sb(bno) groups
  * - EXT2F_ROCOMPAT_LARGEFILE
- *use e2di_dacl in struct ext2fs_dinode to store 
+ *use e2di_size_high in struct ext2fs_dinode to store 
  *upper 32bit of size for >2GB files
  * - EXT2F_INCOMPAT_FTYPE
  *store file type to e2d_type in struct ext2fs_direct

Index: src/sys/ufs/ext2fs/ext2fs_bswap.c
diff -u src/sys/ufs/ext2fs/ext2fs_bswap.c:1.21 src/sys/ufs/ext2fs/ext2fs_bswap.c:1.22
--- src/sys/ufs/ext2fs/ext2fs_bswap.c:1.21	Wed Aug  3 21:53:02 2016
+++ src/sys/ufs/ext2fs/ext2fs_bswap.c	Thu Aug  4 17:43:48 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs_bswap.c,v 1.21 2016/08/03 21:53:02 jdolecek Exp $	*/
+/*	$NetBSD: ext2fs_bswap.c,v 1.22 2016/08/04 17:43:48 jdolecek Exp $	*/
 
 /*
  * Copyri

CVS commit: src/external/cddl/osnet/lib

2016-08-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug  4 17:07:24 UTC 2016

Modified Files:
src/external/cddl/osnet/lib: Makefile.inc
src/external/cddl/osnet/lib/drti: Makefile
src/external/cddl/osnet/lib/libavl: Makefile
src/external/cddl/osnet/lib/libctf: Makefile
src/external/cddl/osnet/lib/libdtrace: Makefile
src/external/cddl/osnet/lib/libnvpair: Makefile
src/external/cddl/osnet/lib/libumem: Makefile
src/external/cddl/osnet/lib/libuutil: Makefile
src/external/cddl/osnet/lib/libzfs: Makefile
src/external/cddl/osnet/lib/libzpool: Makefile

Log Message:
include bsd.init.mnk for consistency and set NOLINT since this overrides
MKLINT which can be re-set from /etc/mk.conf.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/lib/Makefile.inc
cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/lib/drti/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/lib/libavl/Makefile
cvs rdiff -u -r1.8 -r1.9 src/external/cddl/osnet/lib/libctf/Makefile
cvs rdiff -u -r1.14 -r1.15 src/external/cddl/osnet/lib/libdtrace/Makefile
cvs rdiff -u -r1.7 -r1.8 src/external/cddl/osnet/lib/libnvpair/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/lib/libumem/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/lib/libuutil/Makefile
cvs rdiff -u -r1.7 -r1.8 src/external/cddl/osnet/lib/libzfs/Makefile
cvs rdiff -u -r1.10 -r1.11 src/external/cddl/osnet/lib/libzpool/Makefile

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

Modified files:

Index: src/external/cddl/osnet/lib/Makefile.inc
diff -u src/external/cddl/osnet/lib/Makefile.inc:1.4 src/external/cddl/osnet/lib/Makefile.inc:1.5
--- src/external/cddl/osnet/lib/Makefile.inc:1.4	Sat Jan 23 16:22:45 2016
+++ src/external/cddl/osnet/lib/Makefile.inc	Thu Aug  4 13:07:23 2016
@@ -1,5 +1,5 @@
-#	$NetBSD: Makefile.inc,v 1.4 2016/01/23 21:22:45 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.5 2016/08/04 17:07:23 christos Exp $
 
-MKLINT=no
-MKLINTLIB=no
+NOLINT=
+.include "../Makefile.inc"
 CPPFLAGS+=	-D_KERNTYPES

Index: src/external/cddl/osnet/lib/drti/Makefile
diff -u src/external/cddl/osnet/lib/drti/Makefile:1.5 src/external/cddl/osnet/lib/drti/Makefile:1.6
--- src/external/cddl/osnet/lib/drti/Makefile:1.5	Fri Mar 11 00:02:32 2016
+++ src/external/cddl/osnet/lib/drti/Makefile	Thu Aug  4 13:07:23 2016
@@ -1,6 +1,5 @@
-# $NetBSD: Makefile,v 1.5 2016/03/11 05:02:32 joerg Exp $
+# $NetBSD: Makefile,v 1.6 2016/08/04 17:07:23 christos Exp $
 .include	
-.include	"../../Makefile.inc"
 
 #.if ${MKPIC} == "yes"
 CFLAGS+=-fPIC

Index: src/external/cddl/osnet/lib/libavl/Makefile
diff -u src/external/cddl/osnet/lib/libavl/Makefile:1.4 src/external/cddl/osnet/lib/libavl/Makefile:1.5
--- src/external/cddl/osnet/lib/libavl/Makefile:1.4	Thu Jan 13 18:18:24 2011
+++ src/external/cddl/osnet/lib/libavl/Makefile	Thu Aug  4 13:07:24 2016
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile,v 1.4 2011/01/13 23:18:24 haad Exp $
+#	$NetBSD: Makefile,v 1.5 2016/08/04 17:07:24 christos Exp $
+
+.include 
 
 .PATH:	${.CURDIR}/../../dist/common/avl
 

Index: src/external/cddl/osnet/lib/libctf/Makefile
diff -u src/external/cddl/osnet/lib/libctf/Makefile:1.8 src/external/cddl/osnet/lib/libctf/Makefile:1.9
--- src/external/cddl/osnet/lib/libctf/Makefile:1.8	Thu Sep 24 10:36:54 2015
+++ src/external/cddl/osnet/lib/libctf/Makefile	Thu Aug  4 13:07:24 2016
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile,v 1.8 2015/09/24 14:36:54 christos Exp $
+#	$NetBSD: Makefile,v 1.9 2016/08/04 17:07:24 christos Exp $
 
 # $FreeBSD: src/cddl/lib/libctf/Makefile,v 1.2.2.1 2009/08/03 08:13:06 kensmith Exp $
 
-.include	"../../Makefile.inc"
+.include 
 
 LIB=		ctf
 MAN=		ctf.5

Index: src/external/cddl/osnet/lib/libdtrace/Makefile
diff -u src/external/cddl/osnet/lib/libdtrace/Makefile:1.14 src/external/cddl/osnet/lib/libdtrace/Makefile:1.15
--- src/external/cddl/osnet/lib/libdtrace/Makefile:1.14	Mon Oct  5 13:49:10 2015
+++ src/external/cddl/osnet/lib/libdtrace/Makefile	Thu Aug  4 13:07:24 2016
@@ -1,11 +1,9 @@
-#	$NetBSD: Makefile,v 1.14 2015/10/05 17:49:10 christos Exp $
+#	$NetBSD: Makefile,v 1.15 2016/08/04 17:07:24 christos Exp $
 
 # $FreeBSD: src/cddl/lib/libdtrace/Makefile,v 1.2.2.1 2009/08/03 08:13:06 kensmith Exp $
 
 WARNS=1
-.include 
-
-.include	"../../Makefile.inc"
+.include 
 
 LIB=		dtrace
 

Index: src/external/cddl/osnet/lib/libnvpair/Makefile
diff -u src/external/cddl/osnet/lib/libnvpair/Makefile:1.7 src/external/cddl/osnet/lib/libnvpair/Makefile:1.8
--- src/external/cddl/osnet/lib/libnvpair/Makefile:1.7	Fri Apr 10 18:44:20 2015
+++ src/external/cddl/osnet/lib/libnvpair/Makefile	Thu Aug  4 13:07:24 2016
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile,v 1.7 2015/04/10 22:44:20 riastradh Exp $
+#	$NetBSD: Makefile,v 1.8 2016/08/04 17:07:24 christos Exp $
+
+.include 
 
 .PATH:  ${.CURDIR}/../../dist/lib/libnvpair
 .PATH:  ${.CURDIR}/../../dist/common/nvpai

CVS commit: src/lib/libc/string

2016-08-04 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Thu Aug  4 16:36:46 UTC 2016

Modified Files:
src/lib/libc/string: memset.3

Log Message:
Grammar


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/string/memset.3

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

Modified files:

Index: src/lib/libc/string/memset.3
diff -u src/lib/libc/string/memset.3:1.12 src/lib/libc/string/memset.3:1.13
--- src/lib/libc/string/memset.3:1.12	Mon Jun 24 07:56:49 2013
+++ src/lib/libc/string/memset.3	Thu Aug  4 16:36:45 2016
@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)memset.3	8.1 (Berkeley) 6/4/93
-.\"	$NetBSD: memset.3,v 1.12 2013/06/24 07:56:49 wiz Exp $
+.\"	$NetBSD: memset.3,v 1.13 2016/08/04 16:36:45 sevan Exp $
 .\"
 .Dd June 23, 2013
 .Dt MEMSET 3
@@ -64,7 +64,7 @@ returns the original value of
 Note that the compiler may optimize away a call to
 .Fn memset
 if it can prove that the string will not be used by the program again,
-for example if it is allocated on the stack and about to out of scope.
+for example if it is allocated on the stack and about to go out of scope.
 If you want to guarantee that zeros are written to memory, for example
 to sanitize a buffer holding a cryptographic secret, use
 .Xr explicit_memset 3 .



CVS commit: src/sys/arch/ia64/stand

2016-08-04 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Thu Aug  4 16:22:40 UTC 2016

Modified Files:
src/sys/arch/ia64/stand/common: Makefile.inc dev_net.c dev_net.h
src/sys/arch/ia64/stand/efi/libefi: Makefile efiboot.h efinet.c
src/sys/arch/ia64/stand/ia64: Makefile.booters
src/sys/arch/ia64/stand/ia64/efi: conf.c main.c
src/sys/arch/ia64/stand/ia64/ski: conf.c time.c

Log Message:
PR port-ia64/49717

Minimal changes needed to add nfs netboot support


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/stand/common/Makefile.inc \
src/sys/arch/ia64/stand/common/dev_net.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/ia64/stand/common/dev_net.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/stand/efi/libefi/Makefile
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/stand/efi/libefi/efiboot.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/stand/efi/libefi/efinet.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/stand/ia64/Makefile.booters
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/ia64/efi/conf.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ia64/stand/ia64/efi/main.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/stand/ia64/ski/conf.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/stand/ia64/ski/time.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/ia64/stand/common/Makefile.inc
diff -u src/sys/arch/ia64/stand/common/Makefile.inc:1.2 src/sys/arch/ia64/stand/common/Makefile.inc:1.3
--- src/sys/arch/ia64/stand/common/Makefile.inc:1.2	Sun Jul  2 17:28:11 2006
+++ src/sys/arch/ia64/stand/common/Makefile.inc	Thu Aug  4 16:22:40 2016
@@ -1,6 +1,6 @@
-# $FreeBSD$
+#	$NetBSD: Makefile.inc,v 1.3 2016/08/04 16:22:40 scole Exp $
 
-SRCS+=	commands.c console.c devopen.c interp.c boot.c #XXX: Remove bcache.c 
+SRCS+=	commands.c console.c devopen.c interp.c boot.c dev_net.c
 SRCS+=	interp_backslash.c interp_parse.c ls.c misc.c 
 SRCS+=	panic.c calloc.c readdir.c pager.c environment.c fileload.c 
 SRCS+=  getopt.c gets.c strdup.c strtol.c strspn.c
@@ -9,7 +9,8 @@ SRCS+=  getopt.c gets.c strdup.c strtol.
 SRCS+=	load_elf64.c 
 .endif
 
-.if defined(LOADER_NET_SUPPORT)
+# XXX might need this for different loaders later
+#.if defined(LOADER_NET_SUPPORT)
 #SRCS+=	dev_net.c
-.endif
+#.endif
 
Index: src/sys/arch/ia64/stand/common/dev_net.h
diff -u src/sys/arch/ia64/stand/common/dev_net.h:1.2 src/sys/arch/ia64/stand/common/dev_net.h:1.3
--- src/sys/arch/ia64/stand/common/dev_net.h:1.2	Sat Apr 22 07:58:53 2006
+++ src/sys/arch/ia64/stand/common/dev_net.h	Thu Aug  4 16:22:40 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: dev_net.h,v 1.2 2006/04/22 07:58:53 cherry Exp $	*/
+/*	$NetBSD: dev_net.h,v 1.3 2016/08/04 16:22:40 scole Exp $	*/
 
 /*-
  * Copyright (c) 1998 Doug Rabson 
@@ -28,5 +28,7 @@
  * $FreeBSD: src/sys/boot/common/dev_net.h,v 1.2 1999/08/28 00:39:46 peter Exp $
  */
 
-extern struct devsw netdev;
-
+int	net_open(struct open_file *, ...);
+int	net_close(struct open_file *);
+int	net_ioctl(struct open_file *, u_long, void *);
+int	net_strategy(void *, int , daddr_t , size_t, void *, size_t *);

Index: src/sys/arch/ia64/stand/common/dev_net.c
diff -u src/sys/arch/ia64/stand/common/dev_net.c:1.10 src/sys/arch/ia64/stand/common/dev_net.c:1.11
--- src/sys/arch/ia64/stand/common/dev_net.c:1.10	Mon Feb  1 17:38:31 2016
+++ src/sys/arch/ia64/stand/common/dev_net.c	Thu Aug  4 16:22:40 2016
@@ -1,5 +1,5 @@
 /*	
- * $NetBSD: dev_net.c,v 1.10 2016/02/01 17:38:31 christos Exp $
+ * $NetBSD: dev_net.c,v 1.11 2016/08/04 16:22:40 scole Exp $
  */
 
 /*-
@@ -53,17 +53,15 @@
  */
 
 #include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 #include "dev_net.h"
 #include "bootstrap.h"
@@ -73,31 +71,8 @@ int debug = 0;
 static int netdev_sock = -1;
 static int netdev_opens;
 
-static int	net_init(void);
-static int	net_open(struct open_file *, ...);
-static int	net_close(struct open_file *);
-static int	net_strategy();
-static void	net_print(int);
-
 static int net_getparams(int sock);
 
-struct devsw netdev = {
-"net", 
-DEVT_NET, 
-net_init,
-net_strategy, 
-net_open, 
-net_close, 
-noioctl,
-net_print
-};
-
-int
-net_init(void)
-{
-return 0;
-}
-
 /*
  * Called by devopen after it sets f->f_dev to our devsw entry.
  * This opens the low-level device and sets f->f_devdata.
@@ -136,6 +111,23 @@ net_open(struct open_file *f, ...)
 		return (error);
 	}
 	}
+	if (debug)
+	printf("net_open: got rootip %s\n", inet_ntoa(rootip));
+
+	/*
+	 * Get the NFS file handle (mount).
+	 */
+	error = nfs_mount(netdev_sock, rootip, rootpath);
+	if (error) {
+	netif_close(netdev_sock);
+	netdev_sock = -1;
+	printf("net_open: error with nfs mount 0x%x\n", error);
+	return error;
+	}
+
+	if (debug)
+	printf("ro

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

2016-08-04 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Aug  4 14:08:23 UTC 2016

Modified Files:
src/sys/arch/arm/omap: if_cpsw.c

Log Message:
s/for(/for (/.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/omap/if_cpsw.c

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

Modified files:

Index: src/sys/arch/arm/omap/if_cpsw.c
diff -u src/sys/arch/arm/omap/if_cpsw.c:1.15 src/sys/arch/arm/omap/if_cpsw.c:1.16
--- src/sys/arch/arm/omap/if_cpsw.c:1.15	Thu Aug  4 14:05:20 2016
+++ src/sys/arch/arm/omap/if_cpsw.c	Thu Aug  4 14:08:23 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cpsw.c,v 1.15 2016/08/04 14:05:20 kiyohara Exp $	*/
+/*	$NetBSD: if_cpsw.c,v 1.16 2016/08/04 14:08:23 kiyohara Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -53,7 +53,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.15 2016/08/04 14:05:20 kiyohara Exp $");
+__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.16 2016/08/04 14:08:23 kiyohara Exp $");
 
 #include 
 #include 
@@ -745,7 +745,7 @@ cpsw_mii_wait(struct cpsw_softc * const 
 {
 	u_int tries;
 
-	for(tries = 0; tries < 1000; tries++) {
+	for (tries = 0; tries < 1000; tries++) {
 		if ((cpsw_read_4(sc, reg) & __BIT(31)) == 0)
 			return 0;
 		delay(1);



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

2016-08-04 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Aug  4 14:05:20 UTC 2016

Modified Files:
src/sys/arch/arm/omap: if_cpsw.c

Log Message:
Change message for aprint_normal() "CPSW Ethernet" to "Layer 2 3-Port Switch".
Its described in Technical Reference Manual.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/omap/if_cpsw.c

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

Modified files:

Index: src/sys/arch/arm/omap/if_cpsw.c
diff -u src/sys/arch/arm/omap/if_cpsw.c:1.14 src/sys/arch/arm/omap/if_cpsw.c:1.15
--- src/sys/arch/arm/omap/if_cpsw.c:1.14	Fri Jun 10 13:27:11 2016
+++ src/sys/arch/arm/omap/if_cpsw.c	Thu Aug  4 14:05:20 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cpsw.c,v 1.14 2016/06/10 13:27:11 ozaki-r Exp $	*/
+/*	$NetBSD: if_cpsw.c,v 1.15 2016/08/04 14:05:20 kiyohara Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -53,7 +53,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.14 2016/06/10 13:27:11 ozaki-r Exp $");
+__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.15 2016/08/04 14:05:20 kiyohara Exp $");
 
 #include 
 #include 
@@ -403,7 +403,7 @@ cpsw_attach(device_t parent, device_t se
 
 	sc->sc_dev = self;
 
-	aprint_normal(": TI CPSW Ethernet\n");
+	aprint_normal(": TI Layer 2 3-Port Switch\n");
 	aprint_naive("\n");
 
 	callout_init(&sc->sc_tick_ch, 0);



CVS commit: src/usr.bin/systat

2016-08-04 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Aug  4 12:56:31 UTC 2016

Modified Files:
src/usr.bin/systat: ifstat.c

Log Message:
Make this build with clang:
 - Remove unused static const variables
 - Adjust impossibleish comparision.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/systat/ifstat.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/systat/ifstat.c
diff -u src/usr.bin/systat/ifstat.c:1.2 src/usr.bin/systat/ifstat.c:1.3
--- src/usr.bin/systat/ifstat.c:1.2	Tue Aug  2 17:53:46 2016
+++ src/usr.bin/systat/ifstat.c	Thu Aug  4 12:56:31 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ifstat.c,v 1.2 2016/08/02 17:53:46 scole Exp $	*/
+/*	$NetBSD: ifstat.c,v 1.3 2016/08/04 12:56:31 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2003, Trent Nelson, .
@@ -32,7 +32,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: ifstat.c,v 1.2 2016/08/02 17:53:46 scole Exp $");
+__RCSID("$NetBSD: ifstat.c,v 1.3 2016/08/04 12:56:31 jakllsch Exp $");
 #endif /* not lint */
 
 #include 
@@ -60,12 +60,9 @@ __RCSID("$NetBSD: ifstat.c,v 1.2 2016/08
 #define C4	60		/* 60-80 */
 #define C5	80		/* Used for label positioning. */
 
-static const int col0 = 0;
-static const int col1 = C1;
 static const int col2 = C2;
 static const int col3 = C3;
 static const int col4 = C4;
-static const int col5 = C5;
 
 SLIST_HEAD(, if_stat)		curlist;
 
@@ -356,7 +353,7 @@ right_align_string(struct if_stat *ifp)
 	int	 str_len = 0, pad_len = 0;
 	char	*newstr = NULL, *ptr = NULL;
 
-	if (ifp == NULL || ifp->if_mib.ifdr_name == NULL)
+	if (ifp == NULL || ifp->if_mib.ifdr_name[0] == '\0')
 		return;
 	else {
 		/* string length + '\0' */



CVS commit: src/sys/external/bsd/acpica/dist/include

2016-08-04 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Aug  4 12:38:12 UTC 2016

Modified Files:
src/sys/external/bsd/acpica/dist/include: acoutput.h

Log Message:
Avoid 'const const'.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/acpica/dist/include/acoutput.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/external/bsd/acpica/dist/include/acoutput.h
diff -u src/sys/external/bsd/acpica/dist/include/acoutput.h:1.3 src/sys/external/bsd/acpica/dist/include/acoutput.h:1.4
--- src/sys/external/bsd/acpica/dist/include/acoutput.h:1.3	Mon Jul 18 17:26:12 2016
+++ src/sys/external/bsd/acpica/dist/include/acoutput.h	Thu Aug  4 12:38:11 2016
@@ -357,7 +357,7 @@
 
 #define ACPI_TRACE_ENTRY(Name, Function, Type, Param) \
 ACPI_FUNCTION_NAME (Name) \
-Function (ACPI_DEBUG_PARAMETERS, (const Type) (Param))
+Function (ACPI_DEBUG_PARAMETERS, (Type) (Param))
 
 /* The actual entry trace macros */
 
@@ -366,10 +366,10 @@
 AcpiUtTrace (ACPI_DEBUG_PARAMETERS)
 
 #define ACPI_FUNCTION_TRACE_PTR(Name, Pointer) \
-ACPI_TRACE_ENTRY (Name, AcpiUtTracePtr, void *, Pointer)
+ACPI_TRACE_ENTRY (Name, AcpiUtTracePtr, const void *, Pointer)
 
 #define ACPI_FUNCTION_TRACE_U32(Name, Value) \
-ACPI_TRACE_ENTRY (Name, AcpiUtTraceU32, UINT32, Value)
+ACPI_TRACE_ENTRY (Name, AcpiUtTraceU32, const UINT32, Value)
 
 #define ACPI_FUNCTION_TRACE_STR(Name, String) \
 ACPI_TRACE_ENTRY (Name, AcpiUtTraceStr, const char *, String)



CVS commit: src/sys/arch/x68k/stand/boot

2016-08-04 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Thu Aug  4 12:15:08 UTC 2016

Modified Files:
src/sys/arch/x68k/stand/boot: boot.c

Log Message:
gets -> kgets. the last part of PR/51200.
It was using libsa's gets, so it's possible to change to kgets
as rev 1.23.  I've confirmed that it works.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/x68k/stand/boot/boot.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/x68k/stand/boot/boot.c
diff -u src/sys/arch/x68k/stand/boot/boot.c:1.29 src/sys/arch/x68k/stand/boot/boot.c:1.30
--- src/sys/arch/x68k/stand/boot/boot.c:1.29	Sun Jun 26 04:17:17 2016
+++ src/sys/arch/x68k/stand/boot/boot.c	Thu Aug  4 12:15:07 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.29 2016/06/26 04:17:17 isaki Exp $	*/
+/*	$NetBSD: boot.c,v 1.30 2016/08/04 12:15:07 isaki Exp $	*/
 
 /*
  * Copyright (c) 2001 Minoura Makoto
@@ -333,7 +333,7 @@ bootmenu(void)
 		char *p, *options;
 
 		printf("> ");
-		gets(input);
+		kgets(input, sizeof(input));
 
 		for (p = &input[0]; p - &input[0] < 80 && *p == ' '; p++)
 			;



CVS commit: src/tests

2016-08-04 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Aug  4 11:49:07 UTC 2016

Modified Files:
src/tests: h_macros.h

Log Message:
use __dead


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/h_macros.h

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

Modified files:

Index: src/tests/h_macros.h
diff -u src/tests/h_macros.h:1.11 src/tests/h_macros.h:1.12
--- src/tests/h_macros.h:1.11	Wed Jan 14 22:57:27 2015
+++ src/tests/h_macros.h	Thu Aug  4 11:49:07 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: h_macros.h,v 1.11 2015/01/14 22:57:27 christos Exp $ */
+/* $NetBSD: h_macros.h,v 1.12 2016/08/04 11:49:07 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -51,7 +51,7 @@ do {	\
 	ATF_REQUIRE_MSG(RZ_rv == 0, "%s: %s", #x, strerror(RZ_rv));	\
 } while (/*CONSTCOND*/0)
 
-static __inline __printflike(1, 2) void
+__dead static __inline __printflike(1, 2) void
 atf_tc_fail_errno(const char *fmt, ...)
 {
 	va_list ap;



CVS commit: src/doc

2016-08-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Aug  4 10:45:52 UTC 2016

Added Files:
src/doc: TODO.modules

Log Message:
Add a list of "module issues" based on an Email discussion between myself
and christos@


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/doc/TODO.modules

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

Added files:

Index: src/doc/TODO.modules
diff -u /dev/null src/doc/TODO.modules:1.1
--- /dev/null	Thu Aug  4 10:45:52 2016
+++ src/doc/TODO.modules	Thu Aug  4 10:45:52 2016
@@ -0,0 +1,53 @@
+/* $NetBSD: TODO.modules,v 1.1 2016/08/04 10:45:52 pgoyette Exp $ */
+
+Some notes on the limitations of our current (as of 7.99.35) module
+subsystem.  This list was triggered by an Email exchange between
+christos and pgoyette.
+
+1. Builtin drivers can't depend on modularized drivers (the modularized
+   drivers are attempted to load as builtins).
+
+	The assumption is that dependencies are loaded before those
+	modules which depend on them.  At load time, a module's
+	undefined global symbols are resolved;  if any symbols can't
+	be resolved, the load fails.  Similarly, if a module is
+	included in (built-into) the kernel, all of its symbols must
+	be resolvable by the linker, otherwise the link fails.
+
+	There are ways around this (such as, having the parent
+	module's initialization command recursively call the module
+	load code), but they're gross hacks.
+
+2. Currently, config(1) has no way to "no define" drivers
+
+3. It is not always obvious by their names which drivers/options
+   correspond to which modules.
+
+4. Right now critical drivers that would need to be pre-loaded (ffs,
+   exec_elf64) are still built-in so that we don't need to alter the boot
+   blocks to boot.
+
+	This was a conscious decision by core@ some years ago.  It is
+	not a requirement that ffs or exec_* be built-in.  The only
+	requirement is that the root file-system's module must be
+	available when the module subsystem is initialized, in order
+	to load other modules.  This can be accomplished by having the
+	boot loader "push" the module at boot time.  (It used to do
+	this in all cases; currently the "push" only occurs if the
+	booted filesystem is not ffs.)
+
+5. Not all parent bus drivers are capable of rescan, so some drivers
+   just have to be built-in.
+
+6. Many (most?) drivers are not yet modularized
+
+7. There's currently no provisions for autoconfig to figure out which
+   modules are needed, and thus to load the required modules.
+
+	In the "normal" built-in world, autoconfigure can only ask
+	existing drivers if they're willing to manage (ie, attach) a
+	device.  Removing the built-in drivers tends to limit the
+	availability of possible managers.  There's currently no
+	mechanism for identifying and loading drivers based on what
+	devices might be found.
+



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

2016-08-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Aug  4 08:46:07 UTC 2016

Modified Files:
src/sys/arch/arm/arm32: pmap.c

Log Message:
provide and use 'ci' in pmap_remove_all_complete.


To generate a diff of this commit:
cvs rdiff -u -r1.339 -r1.340 src/sys/arch/arm/arm32/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/arm/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.339 src/sys/arch/arm/arm32/pmap.c:1.340
--- src/sys/arch/arm/arm32/pmap.c:1.339	Wed Aug  3 15:59:58 2016
+++ src/sys/arch/arm/arm32/pmap.c	Thu Aug  4 08:46:06 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.339 2016/08/03 15:59:58 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.340 2016/08/04 08:46:06 skrll Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -217,7 +217,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.339 2016/08/03 15:59:58 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.340 2016/08/04 08:46:06 skrll Exp $");
 
 //#define PMAP_DEBUG
 #ifdef PMAP_DEBUG
@@ -5022,10 +5022,11 @@ pmap_remove_all_complete(pmap_t pm)
 #else
 		struct pmap_tlb_info * const ti = &pmap_tlb0_info;
 #endif
+		struct cpu_info * const ci = curcpu();
 		TLBINFO_LOCK(ti);
 		struct pmap_asid_info * const pai = PMAP_PAI(pm, ti);
 		if (PMAP_PAI_ASIDVALID_P(pai, ti)) {
-			if (kcpuset_isset(pm->pm_onproc, cpu_index(curcpu( {
+			if (kcpuset_isset(pm->pm_onproc, cpu_index(ci))) {
 #if PMAP_TLB_MAX == 1
 KASSERT(cpu_tlb_info(ci) == ti);
 



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

2016-08-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug  4 07:22:42 UTC 2016

Added Files:
src/sys/arch/amd64/conf: MODULAR

Log Message:
An attempt to create a fully modular kernel by including GENERIC and
undefining all the drivers we have modules for. This is done to reduce
the kernel footprint for DTRACE and also to test that the modularized
drivers work. Current issues:

1. builtin drivers can't depend on modularized drivers (the modularized
   drivers are attempted to load as builtins).
2. there is no way to "no define" drivers
3. it is not always obvious by their names which drivers/options correspond
   to which modules.
4. right now critical drivers that would need to be pre-loaded (ffs,
   exec_elf64) are still built-in so that we don't need to alter the boot
   blocks to boot.

Ideally modstat should show none of the drivers as built-in but we are far
from that.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/amd64/conf/MODULAR

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

Added files:

Index: src/sys/arch/amd64/conf/MODULAR
diff -u /dev/null src/sys/arch/amd64/conf/MODULAR:1.1
--- /dev/null	Thu Aug  4 03:22:42 2016
+++ src/sys/arch/amd64/conf/MODULAR	Thu Aug  4 03:22:41 2016
@@ -0,0 +1,114 @@
+# $NetBSD: MODULAR,v 1.1 2016/08/04 07:22:41 christos Exp $
+#
+# Try to exclude all the drivers in GENERIC that have been modularized
+# XXX: incomplete
+
+include "arch/amd64/conf/GENERIC"
+options 	MODULAR		# new style module(7) framework
+options 	MODULAR_DEFAULT_AUTOLOAD
+
+no acpicpu*	at cpu?
+no est0		at cpu0
+no powernow0	at cpu0
+no vmt0		at cpu0
+
+no options 	COMPAT_15	# NetBSD 1.5,
+no options 	COMPAT_16	# NetBSD 1.6,
+no options 	COMPAT_20	# NetBSD 2.0,
+no options 	COMPAT_30	# NetBSD 3.0,
+no options 	COMPAT_40	# NetBSD 4.0,
+no options 	COMPAT_50	# NetBSD 5.0,
+no options 	COMPAT_60	# NetBSD 6.0, and
+no options 	COMPAT_70	# NetBSD 7.0 binary compatibility.
+no options 	COMPAT_43	# and 4.3BSD
+#options 	COMPAT_386BSD_MBRPART # recognize old partition ID
+
+no options 	COMPAT_OSSAUDIO
+no options 	COMPAT_NETBSD32
+no options 	COMPAT_LINUX
+no options 	COMPAT_LINUX32	# req. COMPAT_LINUX and COMPAT_NETBSD32
+no options 	EXEC_ELF32
+no options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
+
+no options	SYSVMSG		# System V-like message queues
+no options	SYSVSEM		# System V-like semaphores
+no options	SYSVSHM		# System V-like memory sharing
+
+# XXX: for now
+#no file-system 	FFS		# UFS
+no file-system	MFS		# memory file system
+no file-system 	NFS		# Network File System client
+no file-system	TMPFS		# Efficient memory file-system
+no file-system	EXT2FS		# second extended file system (linux)
+no file-system	LFS		# log-structured file system
+no file-system	NTFS		# Windows/NT file system (experimental)
+no file-system	CD9660		# ISO 9660 + Rock Ridge file system
+no file-system	MSDOSFS		# MS-DOS file system
+no file-system	FDESC		# /dev/fd
+no file-system	KERNFS		# /kern
+no file-system	NULLFS		# loopback file system
+no file-system	OVERLAY		# overlay file system
+no file-system	PROCFS		# /proc
+no file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g & sshfs)
+no file-system	SMBFS		# experimental - CIFS; also needs nsmb (below)
+no file-system	UMAPFS		# NULLFS + uid and gid remapping
+no file-system	UNION		# union file system
+no file-system	CODA		# Coda File System; also needs vcoda (below)
+no file-system	PTYFS		# /dev/ptm support
+
+no options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
+no options 	PPP_DEFLATE	# Deflate compression support for PPP
+
+no acpiacad*	at acpi?		# ACPI AC Adapter
+no acpibat*	at acpi?		# ACPI Battery
+no acpibut*	at acpi?		# ACPI Button
+no acpifan*	at acpi?		# ACPI Fan
+no acpilid*	at acpi?		# ACPI Lid Switch
+no acpitz* 	at acpi?		# ACPI Thermal Zone
+no acpivga*	at acpi?		# ACPI Display Adapter
+no acpiwdrt*	at acpi?		# ACPI Watchdog Resource Table
+no acpiwmi*	at acpi?		# ACPI WMI Mapper
+
+no options	NFSSERVER
+
+no axe*		at uhub?
+no rum*		at uhub?
+no urtwn*	at uhub?
+no urtw*	at uhub?
+no run*		at uhub?
+no athn*	at uhub?
+
+no pseudo-device 	crypto			# /dev/crypto device
+no pseudo-device	swcrypto		# software crypto implementation
+
+# disk/mass storage pseudo-devices
+no pseudo-device	ccd			# concatenated/striped disk devices
+no pseudo-device	cgd			# cryptographic disk devices
+no pseudo-device	raid			# RAIDframe disk driver
+no pseudo-device	fss			# file system snapshot device
+no pseudo-device	putter			# for puffs and pud
+
+no pseudo-device	vnd			# disk-like interface to files
+
+# network pseudo-devices
+no pseudo-device	bpfilter		# Berkeley packet filter
+no pseudo-device	ipfilter		# IP filter (firewall) and NAT
+no pseudo-device	npf			# NPF packet filter
+
+#
+# accept filters
+no pseudo-device   accf_data		# "dataready" accept filter
+no pseudo-device   accf_http		# "httpready" accept filter
+
+# miscellaneous pseudo-devices
+no 

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

2016-08-04 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Aug  4 07:14:50 UTC 2016

Modified Files:
src/sys/arch/arm/omap: omap3_sdhc.c omap3_sdmmcreg.h

Log Message:
Support OMAP 4430.  But ADMA2 don't working yet.
tested on Gumstix DuoVero.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/omap/omap3_sdhc.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/omap/omap3_sdmmcreg.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/arm/omap/omap3_sdhc.c
diff -u src/sys/arch/arm/omap/omap3_sdhc.c:1.21 src/sys/arch/arm/omap/omap3_sdhc.c:1.22
--- src/sys/arch/arm/omap/omap3_sdhc.c:1.21	Mon Jul  4 15:45:37 2016
+++ src/sys/arch/arm/omap/omap3_sdhc.c	Thu Aug  4 07:14:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap3_sdhc.c,v 1.21 2016/07/04 15:45:37 kiyohara Exp $	*/
+/*	$NetBSD: omap3_sdhc.c,v 1.22 2016/08/04 07:14:50 kiyohara Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.21 2016/07/04 15:45:37 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.22 2016/08/04 07:14:50 kiyohara Exp $");
 
 #include "opt_omap.h"
 #include "edma.h"
@@ -87,7 +87,6 @@ static void obiosdhc_attach(device_t, de
 static int obiosdhc_detach(device_t, int);
 
 static int obiosdhc_bus_width(struct sdhc_softc *, int);
-static int obiosdhc_bus_clock(struct sdhc_softc *, int);
 static int obiosdhc_rod(struct sdhc_softc *, int);
 static int obiosdhc_write_protect(struct sdhc_softc *);
 static int obiosdhc_card_detect(struct sdhc_softc *);
@@ -96,6 +95,7 @@ struct obiosdhc_softc {
 	struct sdhc_softc	sc;
 	bus_space_tag_t		sc_bst;
 	bus_space_handle_t	sc_bsh;
+	bus_space_handle_t	sc_hl_bsh;
 	bus_space_handle_t	sc_sdhc_bsh;
 	struct sdhc_host	*sc_hosts[1];
 	void 			*sc_ih;		/* interrupt vectoring */
@@ -173,19 +173,19 @@ obiosdhc_match(device_t parent, cfdata_t
 	if (oa->obio_addr == SDMMC1_BASE_3430
 	|| oa->obio_addr == SDMMC2_BASE_3430
 	|| oa->obio_addr == SDMMC3_BASE_3430)
-return 1;
+		return 1;
 #elif defined(OMAP_3530)
 	if (oa->obio_addr == SDMMC1_BASE_3530
 	|| oa->obio_addr == SDMMC2_BASE_3530
 	|| oa->obio_addr == SDMMC3_BASE_3530)
-return 1;
+		return 1;
 #elif defined(OMAP4) || defined(OMAP5)
 	if (oa->obio_addr == SDMMC1_BASE_4430
 	|| oa->obio_addr == SDMMC2_BASE_4430
 	|| oa->obio_addr == SDMMC3_BASE_4430
 	|| oa->obio_addr == SDMMC4_BASE_4430
 	|| oa->obio_addr == SDMMC5_BASE_4430)
-return 1;
+		return 1;
 #endif
 
 #ifdef TI_AM335X
@@ -195,7 +195,7 @@ obiosdhc_match(device_t parent, cfdata_t
 			return 1;
 #endif
 
-return 0;
+	return 0;
 }
 
 static void
@@ -208,6 +208,10 @@ obiosdhc_attach(device_t parent, device_
 	int error, timo, clksft, n;
 	bool support8bit = false;
 	const char *transfer_mode = "PIO";
+#if defined(OMAP4)
+	uint32_t v;
+	int x, y;
+#endif
 #ifdef TI_AM335X
 	size_t i;
 #endif
@@ -219,16 +223,44 @@ obiosdhc_attach(device_t parent, device_
 	sc->sc.sc_flags |= SDHC_FLAG_32BIT_ACCESS;
 	sc->sc.sc_flags |= SDHC_FLAG_NO_LED_ON;
 	sc->sc.sc_flags |= SDHC_FLAG_RSP136_CRC;
-	sc->sc.sc_flags |= SDHC_FLAG_SINGLE_ONLY;
 	if (support8bit)
 		sc->sc.sc_flags |= SDHC_FLAG_8BIT_MODE;
-#ifdef TI_AM335X
+#if defined(OMAP_3430)
+	sc->sc.sc_flags |= SDHC_FLAG_SINGLE_ONLY;
+#elif defined(OMAP_3530) || defined(TI_DM37XX)
+	/*
+	 * Advisory 2.1.1.128: MMC: Multiple Block Read Operation Issue
+	 * from "OMAP3530/25/15/03 Applications Processor Silicon Revisions
+	 * 3.1.2, 3.1, 3.0, 2.1, and 2.0".
+	 */
+	switch (omap_devid()) {
+	case DEVID_OMAP35X_ES10:
+	case DEVID_OMAP35X_ES20:
+	case DEVID_OMAP35X_ES21:
+	case DEVID_AMDM37X_ES10:	/*  ? */
+	case DEVID_AMDM37X_ES11:	/*  ? */
+	case DEVID_AMDM37X_ES12:	/*  ? */
+		sc->sc.sc_flags |= SDHC_FLAG_SINGLE_ONLY;
+		break;
+	default:
+		break;
+	}
+	sc->sc.sc_flags |= SDHC_FLAG_NO_HS_BIT;
+#elif defined(TI_AM335X)
 	sc->sc.sc_flags |= SDHC_FLAG_WAIT_RESET;
-	sc->sc.sc_flags &= ~SDHC_FLAG_SINGLE_ONLY;
-#endif
-#if defined(OMAP_3530)
-	if (omap_chipid() == CHIPID_OMAP3530)
-		sc->sc.sc_flags &= ~SDHC_FLAG_SINGLE_ONLY;
+#elif defined(OMAP_4430)
+	/*
+	 * MMCHS_HCTL.HSPE Is Not Functional
+	 * Errata ID: i626
+	 *
+	 * Due to design issue MMCHS_HCTL.HSPE bit does not work as intended.
+	 * This means that the configuration must always be the normal speed
+	 * mode configuration (MMCHS_HCTL.HSPE=0).
+	 */
+	sc->sc.sc_flags |= SDHC_FLAG_NO_HS_BIT;
+
+//	sc->sc.sc_flags |= SDHC_FLAG_USE_DMA;
+//	sc->sc.sc_flags |= SDHC_FLAG_USE_ADMA2;
 #endif
 	sc->sc.sc_host = sc->sc_hosts;
 	sc->sc.sc_clkbase = 96000;	/* 96MHZ */
@@ -237,7 +269,6 @@ obiosdhc_attach(device_t parent, device_
 	sc->sc.sc_vendor_rod = obiosdhc_rod;
 	sc->sc.sc_vendor_write_protect = obiosdhc_write_protect;
 	sc->sc.sc_vendor_card_detect = obiosdhc_card_detect;

CVS commit: src/lib/librt

2016-08-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug  4 07:09:15 UTC 2016

Modified Files:
src/lib/librt: sched.3

Log Message:
Flesh out sched_protect


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/librt/sched.3

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

Modified files:

Index: src/lib/librt/sched.3
diff -u src/lib/librt/sched.3:1.14 src/lib/librt/sched.3:1.15
--- src/lib/librt/sched.3:1.14	Wed Jul  6 11:55:02 2016
+++ src/lib/librt/sched.3	Thu Aug  4 03:09:15 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sched.3,v 1.14 2016/07/06 15:55:02 wiz Exp $
+.\"	$NetBSD: sched.3,v 1.15 2016/08/04 07:09:15 christos Exp $
 .\"
 .\" Copyright (c) 2008 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 July 5, 2016
+.Dd August 4, 2016
 .Dt SCHED 3
 .Os
 .Sh NAME
@@ -156,11 +156,33 @@ Get the affinity mask of the process spe
 into the
 .Fa cpuset .
 .It Fn sched_protect priority
-Performs priority protection for
+Performs priority protection using the
 .Dv PTHREAD_PRIO_PROTECT
 protocol.
-This function will increase the priority of the caller thread to
+This function will increase the protected priority of the caller thread to
+.Fa priority 
+if the current thread's protected priority is smaller than
 .Fa priority .
+Multiple calls to
+.Fn sched_protect
+with a positive priority will 
+.Dq push
+a priority level to the current thread, whereas calling
+.Fn sched_protect
+with a
+.Fa priority
+level of
+.Dv \-1
+will
+.Dq pop
+a priority level.
+When the level reaches
+.Dv 0 
+(the same number of
+.Dq pushes
+and
+.Dq pops
+have been issued) the original thread priority will be restored.
 .El
 .Sh IMPLEMENTATION NOTES
 Setting CPU
@@ -274,6 +296,21 @@ and the value of
 .Fa pid
 is not zero.
 .El
+.Pp
+The
+.Fn sched_protect
+function fails if:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+The thread was not priority protected.
+.It Bq Er EPERM
+The
+.Fa priority
+parameter was out of range (not in the range between
+.Dv SCHED_PRIO_MIN
+and
+.Dv SCHED_PRIO_MAX ) .
+.El
 .Sh SEE ALSO
 .Xr affinity 3 ,
 .Xr cpuset 3 ,



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

2016-08-04 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Aug  4 07:06:14 UTC 2016

Modified Files:
src/sys/arch/evbarm/conf: PANDABOARD

Log Message:
Fix address for omapgpio4.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/evbarm/conf/PANDABOARD

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/PANDABOARD
diff -u src/sys/arch/evbarm/conf/PANDABOARD:1.19 src/sys/arch/evbarm/conf/PANDABOARD:1.20
--- src/sys/arch/evbarm/conf/PANDABOARD:1.19	Sat Sep 26 11:16:12 2015
+++ src/sys/arch/evbarm/conf/PANDABOARD	Thu Aug  4 07:06:14 2016
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: PANDABOARD,v 1.19 2015/09/26 11:16:12 maxv Exp $
+#	$NetBSD: PANDABOARD,v 1.20 2016/08/04 07:06:14 kiyohara Exp $
 #
 #	PANDABOARD -- TI OMAP 4430 Eval Board Kernel
 #
@@ -190,7 +190,7 @@ omapgpio0	at obio1 addr 0x4a31 size 
 omapgpio1	at obio2 addr 0x48055000 size 0x0400 intrbase 192 intr 62
 omapgpio2	at obio2 addr 0x48057000 size 0x0400 intrbase 224 intr 63
 omapgpio3	at obio2 addr 0x48059000 size 0x0400 intrbase 256 intr 64
-omapgpio4	at obio2 addr 0x4805a000 size 0x0400 intrbase 288 intr 65
+omapgpio4	at obio2 addr 0x4805b000 size 0x0400 intrbase 288 intr 65
 omapgpio5	at obio2 addr 0x4805d000 size 0x0400 intrbase 320 intr 66
 
 gpio*		at omapgpio?



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

2016-08-04 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Aug  4 07:02:39 UTC 2016

Modified Files:
src/sys/arch/evbarm/conf: OVERO std.overo

Log Message:
Move BOARDTYPE and EVBARM_BOARDTYPE from std.overo to OVERO.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/evbarm/conf/OVERO
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/conf/std.overo

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/OVERO
diff -u src/sys/arch/evbarm/conf/OVERO:1.43 src/sys/arch/evbarm/conf/OVERO:1.44
--- src/sys/arch/evbarm/conf/OVERO:1.43	Sat Sep 26 11:16:12 2015
+++ src/sys/arch/evbarm/conf/OVERO	Thu Aug  4 07:02:39 2016
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: OVERO,v 1.43 2015/09/26 11:16:12 maxv Exp $
+#	$NetBSD: OVERO,v 1.44 2016/08/04 07:02:39 kiyohara Exp $
 #
 #	OVERO -- Gumstix. Inc. Overo COMS platforms kernel
 #
@@ -24,6 +24,9 @@ makeoptions	CPUFLAGS="-mcpu=cortex-a8 -m
 
 # Architecture options
 
+makeoptions	BOARDTYPE="overo"
+options 	EVBARM_BOARDTYPE=overo
+
 # Gumstix options
 options 	OVERO
 # Can specify 'expansion=' in args from u-boot.

Index: src/sys/arch/evbarm/conf/std.overo
diff -u src/sys/arch/evbarm/conf/std.overo:1.6 src/sys/arch/evbarm/conf/std.overo:1.7
--- src/sys/arch/evbarm/conf/std.overo:1.6	Fri Nov  1 18:41:06 2013
+++ src/sys/arch/evbarm/conf/std.overo	Thu Aug  4 07:02:39 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: std.overo,v 1.6 2013/11/01 18:41:06 skrll Exp $
+#	$NetBSD: std.overo,v 1.7 2016/08/04 07:02:39 kiyohara Exp $
 #
 # standard NetBSD/evbarm for OVERO options
 
@@ -13,8 +13,6 @@ options 	__HAVE_FAST_SOFTINTS		# should 
 
 options 	KERNEL_BASE_EXT=0x8000
 makeoptions	LOADADDRESS="0x8020"
-makeoptions	BOARDTYPE="overo"
-options 	EVBARM_BOARDTYPE=overo
 makeoptions	BOARDMKFRAG="${THISARM}/conf/mk.gumstix"
 
 options 	ARM_INTR_IMPL=""