CVS commit: [netbsd-7] src/sys/arch/arm/arm32

2014-11-14 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Nov 14 08:16:56 UTC 2014

Modified Files:
src/sys/arch/arm/arm32 [netbsd-7]: kobj_machdep.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #228):
sys/arch/arm/arm32/kobj_machdep.c: revision 1.10
PR port-arm/49299: add support for BE8 byte swapped instructions.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.4.1 src/sys/arch/arm/arm32/kobj_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/arm/arm32/kobj_machdep.c
diff -u src/sys/arch/arm/arm32/kobj_machdep.c:1.9 src/sys/arch/arm/arm32/kobj_machdep.c:1.9.4.1
--- src/sys/arch/arm/arm32/kobj_machdep.c:1.9	Tue Aug 27 06:41:05 2013
+++ src/sys/arch/arm/arm32/kobj_machdep.c	Fri Nov 14 08:16:56 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kobj_machdep.c,v 1.9 2013/08/27 06:41:05 skrll Exp $	*/
+/*	$NetBSD: kobj_machdep.c,v 1.9.4.1 2014/11/14 08:16:56 snj Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kobj_machdep.c,v 1.9 2013/08/27 06:41:05 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: kobj_machdep.c,v 1.9.4.1 2014/11/14 08:16:56 snj Exp $);
 
 #define	ELFSIZE		ARCH_ELFSIZE
 
@@ -61,8 +61,12 @@ __KERNEL_RCSID(0, $NetBSD: kobj_machdep
 #include sys/kobj.h
 #include sys/exec.h
 #include sys/exec_elf.h
+#include sys/kmem.h
+#include sys/ksyms.h
+#include sys/kobj_impl.h
 
 #include arm/cpufunc.h
+#include arm/locore.h
 
 int
 kobj_reloc(kobj_t ko, uintptr_t relocbase, const void *data,
@@ -203,11 +207,201 @@ kobj_reloc(kobj_t ko, uintptr_t relocbas
 	return -1;
 }
 
+#if __ARMEB__
+
+enum be8_magic_sym_type {
+	Other, ArmStart, ThumbStart, DataStart
+};
+
+struct be8_marker {
+	enum be8_magic_sym_type type;
+	void *addr;
+};
+
+struct be8_marker_list {
+	size_t cnt;
+	struct be8_marker *markers;
+};
+
+/*
+ * See ELF for the ARM Architecture, Section 4.5.5: Mapping Symbols
+ * ARM reserves $a/$d/$t (and variants like $a.2) to mark start of
+ * arm/thumb code sections to allow conversion from ARM32-EB to -BE8
+ * format.
+ */
+static enum be8_magic_sym_type
+be8_sym_type(const char *name, int info)
+{
+	if (ELF_ST_BIND(info) != STB_LOCAL)
+		return Other;
+	if (ELF_ST_TYPE(info) != STT_NOTYPE)
+		return Other;
+	if (name[0] != '$' || name[1] == '\0' ||
+	(name[2] != '\0'  name[2] != '.'))
+		return Other;
+
+	switch (name[1]) {
+	case 'a':
+		return ArmStart;
+	case 'd':
+		return DataStart;
+	case 't':
+		return ThumbStart;
+	default:
+		return Other;
+	}
+}
+
+static int
+be8_ksym_count(const char *name, int symindex, void *value, uint32_t size,
+	int info, void *cookie)
+{
+	size_t *res = cookie;
+	enum be8_magic_sym_type t = be8_sym_type(name, info);
+
+	if (t != Other)
+		(*res)++;
+	return 0;
+}
+
+static int
+be8_ksym_add(const char *name, int symindex, void *value, uint32_t size,
+	int info, void *cookie)
+{
+	size_t ndx;
+	struct be8_marker_list *list = cookie;
+	enum be8_magic_sym_type t = be8_sym_type(name, info);
+
+	if (t == Other)
+		return 0;
+
+	ndx = list-cnt++;
+	list-markers[ndx].type = t;
+	list-markers[ndx].addr = value;
+
+	return 0;
+}
+
+static int
+be8_ksym_comp(const void *a, const void *b)
+{
+	const struct be8_marker *ma = a, *mb = b;
+	uintptr_t va = (uintptr_t)ma-addr, vb = (uintptr_t)mb-addr;
+
+	if (va == vb)
+		return 0;
+	if (va  vb)
+		return -1;
+	return 1;
+}
+
+static void
+be8_ksym_swap(void *start, size_t size, const struct be8_marker_list *list)
+{
+	uintptr_t va_end = (uintptr_t)start + size;
+	size_t i;
+	uint32_t *p32, *p32_end, v32;
+	uint16_t *p16, *p16_end, v16;
+
+	/* find first relevant list entry */
+	for (i = 0; i  list-cnt; i++)
+		if (start = list-markers[i].addr)
+			break;
+
+	/* swap all arm and thumb code parts of this section */
+	for ( ; i  list-cnt; i++) {
+		switch (list-markers[i].type) {
+		case ArmStart:
+			p32 = (uint32_t*)list-markers[i].addr;
+			p32_end = (uint32_t*)va_end;
+			if (i+1  list-cnt) {
+if ((uintptr_t)list-markers[i+1].addr
+ va_end)
+	p32_end = (uint32_t*)
+		list-markers[i+1].addr;
+			}
+			while (p32  p32_end) {
+v32 = bswap32(*p32);
+*p32++ = v32;
+			}
+			break;
+		case ThumbStart:
+			p16 = (uint16_t*)list-markers[i].addr;
+			p16_end = (uint16_t*)va_end;
+			if (i+1  list-cnt) {
+if ((uintptr_t)list-markers[i+1].addr
+ va_end)
+	p16_end = (uint16_t*)
+		list-markers[i+1].addr;
+			}
+			while (p16  p16_end) {
+v16 = bswap16(*p16);
+*p16++ = v16;
+			}
+			break;
+		default:
+			break;
+		}
+	}
+}
+ 
+static void
+kobj_be8_fixup(kobj_t ko)
+{
+	size_t relsym_cnt = 0, i, msize;
+	struct be8_marker_list list;
+	struct be8_marker tmp;
+
+	/*
+	 * Count all special relocations symbols
+	 */
+	ksyms_mod_foreach(ko-ko_name, be8_ksym_count, relsym_cnt);
+
+	/*
+	 * Provide storage for the address list and add the symbols
+	 

CVS commit: [netbsd-7] src/doc

2014-11-14 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Nov 14 08:17:38 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
228


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.96 -r1.1.2.97 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.96 src/doc/CHANGES-7.0:1.1.2.97
--- src/doc/CHANGES-7.0:1.1.2.96	Fri Nov 14 07:30:06 2014
+++ src/doc/CHANGES-7.0	Fri Nov 14 08:17:38 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.96 2014/11/14 07:30:06 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.97 2014/11/14 08:17:38 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -2440,3 +2440,9 @@ usr.sbin/etcupdate/etcupdate			1.59
 	must use multiple -s options instead.
 	[apb, ticket #225]
 
+sys/arch/arm/arm32/kobj_machdep.c		1.10
+
+	PR port-arm/49299: add support for BE8 byte swapped instructions.
+	Avoids a kernel crash when loading modules.
+	[martin, ticket #228]
+



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

2014-11-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Nov 14 08:20:22 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner: awin_usb.c

Log Message:
IPL_SCHED - IPL_VM

Something isn't MP safe.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/allwinner/awin_usb.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/allwinner/awin_usb.c
diff -u src/sys/arch/arm/allwinner/awin_usb.c:1.16 src/sys/arch/arm/allwinner/awin_usb.c:1.17
--- src/sys/arch/arm/allwinner/awin_usb.c:1.16	Wed Nov  5 01:07:26 2014
+++ src/sys/arch/arm/allwinner/awin_usb.c	Fri Nov 14 08:20:22 2014
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: awin_usb.c,v 1.16 2014/11/05 01:07:26 jmcneill Exp $);
+__KERNEL_RCSID(1, $NetBSD: awin_usb.c,v 1.17 2014/11/14 08:20:22 skrll Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -151,7 +151,7 @@ ohci_awinusb_attach(device_t parent, dev
 	const int irq = awin_chip_id() == AWIN_CHIP_ID_A31 ?
 			awinusb_ohci_irqs_a31[usbaa-usbaa_port] :
 			awinusb_ohci_irqs[usbaa-usbaa_port];
-	usbsc-usbsc_ohci_ih = intr_establish(irq, IPL_SCHED,
+	usbsc-usbsc_ohci_ih = intr_establish(irq, IPL_VM,
 	IST_LEVEL, ohci_intr, sc);
 	if (usbsc-usbsc_ohci_ih == NULL) {
 		aprint_error_dev(self, failed to establish interrupt %d\n,
@@ -228,7 +228,7 @@ ehci_awinusb_attach(device_t parent, dev
 	const int irq = awin_chip_id() == AWIN_CHIP_ID_A31 ?
 			awinusb_ehci_irqs_a31[usbaa-usbaa_port] :
 			awinusb_ehci_irqs[usbaa-usbaa_port];
-	usbsc-usbsc_ehci_ih = intr_establish(irq, IPL_SCHED,
+	usbsc-usbsc_ehci_ih = intr_establish(irq, IPL_VM,
 	IST_LEVEL, ehci_intr, sc);
 	if (usbsc-usbsc_ehci_ih == NULL) {
 		aprint_error_dev(self, failed to establish interrupt %d\n,



CVS commit: src

2014-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Nov 14 09:03:39 UTC 2014

Modified Files:
src/distrib/sets/lists/tests: mi
src/etc/mtree: NetBSD.dist.tests
src/tests/usr.bin: Makefile
Added Files:
src/tests/usr.bin/ld: Makefile t_script.sh

Log Message:
Minimal linker script test.


To generate a diff of this commit:
cvs rdiff -u -r1.596 -r1.597 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.111 -r1.112 src/etc/mtree/NetBSD.dist.tests
cvs rdiff -u -r1.19 -r1.20 src/tests/usr.bin/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/ld/Makefile \
src/tests/usr.bin/ld/t_script.sh

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.596 src/distrib/sets/lists/tests/mi:1.597
--- src/distrib/sets/lists/tests/mi:1.596	Wed Oct 29 16:24:32 2014
+++ src/distrib/sets/lists/tests/mi	Fri Nov 14 09:03:39 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.596 2014/10/29 16:24:32 uebayasi Exp $
+# $NetBSD: mi,v 1.597 2014/11/14 09:03:39 uebayasi Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -3463,6 +3463,10 @@
 ./usr/tests/usr.bin/jot/Kyuafile		tests-usr.bin-tests	atf,kyua
 ./usr/tests/usr.bin/jot/d_basic.out		tests-usr.bin-tests	atf
 ./usr/tests/usr.bin/jot/t_jot			tests-usr.bin-tests	atf
+./usr/tests/usr.bin/ldtests-usr.bin-tests
+./usr/tests/usr.bin/ld/Atffile			tests-usr.bin-tests	atf
+./usr/tests/usr.bin/ld/Kyuafile			tests-usr.bin-tests	atf,kyua
+./usr/tests/usr.bin/ld/t_script			tests-usr.bin-tests	atf
 ./usr/tests/usr.bin/m4tests-usr.bin-tests
 ./usr/tests/usr.bin/m4/Atffile			tests-usr.bin-tests	atf
 ./usr/tests/usr.bin/m4/Kyuafile			tests-usr.bin-tests	atf,kyua

Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.111 src/etc/mtree/NetBSD.dist.tests:1.112
--- src/etc/mtree/NetBSD.dist.tests:1.111	Sun Oct 12 12:32:15 2014
+++ src/etc/mtree/NetBSD.dist.tests	Fri Nov 14 09:03:39 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.tests,v 1.111 2014/10/12 12:32:15 uebayasi Exp $
+#	$NetBSD: NetBSD.dist.tests,v 1.112 2014/11/14 09:03:39 uebayasi Exp $
 
 ./usr/libdata/debug/usr/tests
 ./usr/libdata/debug/usr/tests/atf
@@ -359,6 +359,7 @@
 ./usr/tests/usr.bin/netpgpverify
 ./usr/tests/usr.bin/infocmp
 ./usr/tests/usr.bin/jot
+./usr/tests/usr.bin/ld
 ./usr/tests/usr.bin/m4
 ./usr/tests/usr.bin/make
 ./usr/tests/usr.bin/make/unit-tests

Index: src/tests/usr.bin/Makefile
diff -u src/tests/usr.bin/Makefile:1.19 src/tests/usr.bin/Makefile:1.20
--- src/tests/usr.bin/Makefile:1.19	Tue Jan  7 16:47:13 2014
+++ src/tests/usr.bin/Makefile	Fri Nov 14 09:03:39 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.19 2014/01/07 16:47:13 gson Exp $
+#	$NetBSD: Makefile,v 1.20 2014/11/14 09:03:39 uebayasi Exp $
 #
 
 .include bsd.own.mk
@@ -6,7 +6,7 @@
 TESTSDIR=   ${TESTSBASE}/usr.bin
 
 TESTS_SUBDIRS=	awk basename bzip2 cc cmp config cut \
-		diff dirname find grep gzip id infocmp jot m4 make mkdep \
+		diff dirname find grep gzip id infocmp jot ld m4 make mkdep \
 		nbperf netpgpverify pr rump_server shmif_dumpbus sdiff \
 		sed sort tmux tr unifdef vmstat xlint
 

Added files:

Index: src/tests/usr.bin/ld/Makefile
diff -u /dev/null src/tests/usr.bin/ld/Makefile:1.1
--- /dev/null	Fri Nov 14 09:03:39 2014
+++ src/tests/usr.bin/ld/Makefile	Fri Nov 14 09:03:39 2014
@@ -0,0 +1,9 @@
+# $NetBSD: Makefile,v 1.1 2014/11/14 09:03:39 uebayasi Exp $
+
+.include bsd.own.mk
+
+TESTSDIR=	${TESTSBASE}/usr.bin/ld
+
+TESTS_SH=	t_script
+
+.include bsd.test.mk
Index: src/tests/usr.bin/ld/t_script.sh
diff -u /dev/null src/tests/usr.bin/ld/t_script.sh:1.1
--- /dev/null	Fri Nov 14 09:03:39 2014
+++ src/tests/usr.bin/ld/t_script.sh	Fri Nov 14 09:03:39 2014
@@ -0,0 +1,83 @@
+#	$NetBSD: t_script.sh,v 1.1 2014/11/14 09:03:39 uebayasi Exp $
+#
+# Copyright (c) 2014 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE 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 

CVS commit: [netbsd-7] src

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 10:04:40 UTC 2014

Modified Files:
src/etc/etc.evbarm [netbsd-7]: Makefile.inc
src/sys/dev/i2c [netbsd-7]: files.i2c
Added Files:
src/sys/arch/evbarm/conf [netbsd-7]: HUMMINGBIRD_A31
HUMMINGBIRD_A31_INSTALL
src/sys/dev/i2c [netbsd-7]: axp22x.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #230):
sys/dev/i2c/axp22x.c: revision 1.1
etc/etc.evbarm/Makefile.inc: revisions 1.65-1.66
sys/arch/evbarm/conf/HUMMINGBIRD_A31: revisions 1.1-1.15
sys/arch/evbarm/conf/HUMMINGBIRD_A31_INSTALL: revisions 1.1-1.3
sys/dev/i2c/axp22x.c: revision 1.1
sys/dev/i2c/files.i2c: revision 1.57

Add Merrii Hummingbird A31 board kernels.
Add AXP22x Power Management Unit driver.


To generate a diff of this commit:
cvs rdiff -u -r1.63.2.1 -r1.63.2.2 src/etc/etc.evbarm/Makefile.inc
cvs rdiff -u -r0 -r1.19.2.2 src/sys/arch/evbarm/conf/HUMMINGBIRD_A31
cvs rdiff -u -r0 -r1.3.2.2 src/sys/arch/evbarm/conf/HUMMINGBIRD_A31_INSTALL
cvs rdiff -u -r0 -r1.1.2.2 src/sys/dev/i2c/axp22x.c
cvs rdiff -u -r1.54.2.1 -r1.54.2.2 src/sys/dev/i2c/files.i2c

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

Modified files:

Index: src/etc/etc.evbarm/Makefile.inc
diff -u src/etc/etc.evbarm/Makefile.inc:1.63.2.1 src/etc/etc.evbarm/Makefile.inc:1.63.2.2
--- src/etc/etc.evbarm/Makefile.inc:1.63.2.1	Wed Nov 12 19:54:46 2014
+++ src/etc/etc.evbarm/Makefile.inc	Fri Nov 14 10:04:40 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.63.2.1 2014/11/12 19:54:46 martin Exp $
+#	$NetBSD: Makefile.inc,v 1.63.2.2 2014/11/14 10:04:40 martin Exp $
 #
 #	etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
 #
@@ -25,6 +25,10 @@ EVBARM_BOARDS.armv7+=		BPI
 EVBARM_BOARDS.armv7hf+=		BPI
 EVBARM_BOARDS.armv7+=		CUBIEBOARD
 EVBARM_BOARDS.armv7hf+=		CUBIEBOARD
+EVBARM_BOARDS.armv7+=		CUBIETRUCK
+EVBARM_BOARDS.armv7hf+=		CUBIETRUCK
+EVBARM_BOARDS.armv7+=		HUMMINGBIRD_A31
+EVBARM_BOARDS.armv7hf+=		HUMMINGBIRD_A31
 .else
 # little endian boards
 #EVBARM_BOARDS.armv4+=		ARMADILLO210
@@ -84,6 +88,10 @@ EVBARM_BOARDS.armv7+=		BPI
 EVBARM_BOARDS.armv7hf+= 	BPI
 EVBARM_BOARDS.armv7+=		CUBIEBOARD
 EVBARM_BOARDS.armv7hf+= 	CUBIEBOARD
+EVBARM_BOARDS.armv7+=		CUBIETRUCK
+EVBARM_BOARDS.armv7hf+= 	CUBIETRUCK
+EVBARM_BOARDS.armv7+=		HUMMINGBIRD_A31
+EVBARM_BOARDS.armv7hf+=		HUMMINGBIRD_A31
 #EVBARM_BOARDS.armv7+=		IGEPV2
 EVBARM_BOARDS.armv7+=		MIRABOX
 EVBARM_BOARDS.armv7hf+=		MIRABOX

Index: src/sys/dev/i2c/files.i2c
diff -u src/sys/dev/i2c/files.i2c:1.54.2.1 src/sys/dev/i2c/files.i2c:1.54.2.2
--- src/sys/dev/i2c/files.i2c:1.54.2.1	Wed Nov 12 20:07:20 2014
+++ src/sys/dev/i2c/files.i2c	Fri Nov 14 10:04:40 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files.i2c,v 1.54.2.1 2014/11/12 20:07:20 martin Exp $
+#	$NetBSD: files.i2c,v 1.54.2.2 2014/11/14 10:04:40 martin Exp $
 
 obsolete defflag	opt_i2cbus.h		I2C_SCAN
 define	i2cbus { }
@@ -219,3 +219,8 @@ filedev/i2c/mpl115a.c		mpl115a
 device	axp20x: sysmon_envsys
 attach	axp20x at iic
 file	dev/i2c/axp20x.c			axp20x
+
+# AXP22x Power Management Unit
+device	axp22x: sysmon_envsys
+attach	axp22x at iic
+file	dev/i2c/axp22x.c			axp22x

Added files:

Index: src/sys/arch/evbarm/conf/HUMMINGBIRD_A31
diff -u /dev/null src/sys/arch/evbarm/conf/HUMMINGBIRD_A31:1.19.2.2
--- /dev/null	Fri Nov 14 10:04:40 2014
+++ src/sys/arch/evbarm/conf/HUMMINGBIRD_A31	Fri Nov 14 10:04:40 2014
@@ -0,0 +1,281 @@
+#	$NetBSD: HUMMINGBIRD_A31,v 1.19.2.2 2014/11/14 10:04:40 martin Exp $
+#
+#	HUMMINGBIRD_A31 - Merrii Hummingbird A31
+#
+
+include	arch/evbarm/conf/std.awin
+
+# estimated number of users
+
+maxusers	32
+
+# Standard system options
+
+options 	RTC_OFFSET=0	# hardware clock is this many mins. west of GMT
+#options 	NTP		# NTP phase/frequency locked loop
+
+# CPU options
+
+no makeoptions	CPUFLAGS
+makeoptions	CPUFLAGS=-mcpu=cortex-a7 -mfpu=neon
+no makeoptions	BOARDTYPE
+makeoptions	BOARDTYPE=hummingbird_a31
+#options 	UVMHIST,UVMHIST_PRINT
+options 	CPU_CORTEXA7
+options 	ALLWINNER_A31
+options 	PMAPCOUNTERS
+options 	AWIN_CONSOLE_EARLY
+options 	AWIN_GPIO_IGNORE_FW
+
+# Architecture options
+
+# File systems
+
+file-system	FFS		# UFS
+#file-system	LFS		# log-structured file system
+file-system	MFS		# memory file system
+file-system	NFS		# Network file system
+#file-system 	ADOSFS		# AmigaDOS-compatible file system
+#file-system 	EXT2FS		# second extended file system (linux)
+#file-system	CD9660		# ISO 9660 + Rock Ridge file system
+file-system	MSDOSFS		# MS-DOS file system
+#file-system	FDESC		# /dev/fd
+file-system	KERNFS		# /kern
+#file-system	NULLFS		# loopback file system
+file-system	PROCFS		# /proc
+#file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
+#file-system	UMAPFS		# NULLFS + uid and gid remapping
+#file-system	UNION		# union file system
+file-system	TMPFS		# memory file system
+file-system	

CVS commit: src/sys

2014-11-14 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Nov 14 10:09:50 UTC 2014

Modified Files:
src/sys/kern: vfs_mount.c
src/sys/ufs/ffs: ffs_vfsops.c
src/sys/ufs/ufs: ufs_extattr.c

Log Message:
Fix use-after-free on failed unmount with extended attribute enabled

When unmount failed, for instance because the mount is still busy,
UFS1 extended attributes structures were left freed while the kernel
assumes extended attributes were still enabled. This led to using
UFS1 extended attributes structures after free. With LOCKDEBUG, with
quickly triggers a panic.

The problem is fixed by:
1) clear MNT_EXTATTR flag after extended attributes structures are freed
2) attempt to restart extended attributes after failed unmount
2) set MNT_EXTATTR correctly after extended attributes restart

As a side effect, extended attribute structures are now only initialized
when extended attributes are started for the filesystem.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/kern/vfs_mount.c
cvs rdiff -u -r1.301 -r1.302 src/sys/ufs/ffs/ffs_vfsops.c
cvs rdiff -u -r1.43 -r1.44 src/sys/ufs/ufs/ufs_extattr.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/vfs_mount.c
diff -u src/sys/kern/vfs_mount.c:1.30 src/sys/kern/vfs_mount.c:1.31
--- src/sys/kern/vfs_mount.c:1.30	Fri May 30 08:46:00 2014
+++ src/sys/kern/vfs_mount.c	Fri Nov 14 10:09:50 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_mount.c,v 1.30 2014/05/30 08:46:00 hannken Exp $	*/
+/*	$NetBSD: vfs_mount.c,v 1.31 2014/11/14 10:09:50 manu Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_mount.c,v 1.30 2014/05/30 08:46:00 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_mount.c,v 1.31 2014/11/14 10:09:50 manu Exp $);
 
 #define _VFS_VNODE_PRIVATE
 
@@ -616,6 +616,22 @@ mount_checkdirs(vnode_t *olddp)
 	vput(newdp);
 }
 
+/*
+ * Start extended attributes
+ */
+static int
+start_extattr(struct mount *mp)
+{
+	int error;
+
+	error = VFS_EXTATTRCTL(mp, EXTATTR_CMD_START, NULL, 0, NULL);
+	if (error) 
+		printf(%s: failed to start extattr: error = %d\n,
+		   mp-mnt_stat.f_mntonname, error);
+
+	return error;
+}
+
 int
 mount_domount(struct lwp *l, vnode_t **vpp, struct vfsops *vfsops,
 const char *path, int flags, void *data, size_t *data_len)
@@ -721,13 +737,9 @@ mount_domount(struct lwp *l, vnode_t **v
 	error = VFS_START(mp, 0);
if (error) {
 		vrele(vp);
-   } else if (flags  MNT_EXTATTR) {
-	   error = VFS_EXTATTRCTL(vp-v_mountedhere, 
-		   EXTATTR_CMD_START, NULL, 0, NULL);
-	   if (error) 
-		   printf(%s: failed to start extattr: error = %d\n,
-			   vp-v_mountedhere-mnt_stat.f_mntonname, error);
-   }
+	} else if (flags  MNT_EXTATTR) {
+		(void)start_extattr(mp);
+	}
 	/* Drop reference held for VFS_START(). */
 	vfs_destroy(mp);
 	*vpp = NULL;
@@ -762,7 +774,7 @@ int
 dounmount(struct mount *mp, int flags, struct lwp *l)
 {
 	vnode_t *coveredvp;
-	int error, async, used_syncer;
+	int error, async, used_syncer, used_extattr;
 
 #if NVERIEXEC  0
 	error = veriexec_unmountchk(mp);
@@ -796,6 +808,7 @@ dounmount(struct mount *mp, int flags, s
 	}
 
 	used_syncer = (mp-mnt_syncer != NULL);
+	used_extattr = mp-mnt_flag  MNT_EXTATTR;
 
 	/*
 	 * XXX Syncer must be frozen when we get here.  This should really
@@ -835,6 +848,12 @@ dounmount(struct mount *mp, int flags, s
 		mutex_exit(mp-mnt_updating);
 		if (used_syncer)
 			mutex_exit(syncer_mutex);
+		if (used_extattr) {
+			if (start_extattr(mp) != 0)
+mp-mnt_flag = ~MNT_EXTATTR;
+			else
+mp-mnt_flag |= MNT_EXTATTR;
+		}
 		return (error);
 	}
 	mutex_exit(mp-mnt_updating);

Index: src/sys/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.301 src/sys/ufs/ffs/ffs_vfsops.c:1.302
--- src/sys/ufs/ffs/ffs_vfsops.c:1.301	Thu Oct 30 17:13:41 2014
+++ src/sys/ufs/ffs/ffs_vfsops.c	Fri Nov 14 10:09:50 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.301 2014/10/30 17:13:41 maxv Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.302 2014/11/14 10:09:50 manu Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ffs_vfsops.c,v 1.301 2014/10/30 17:13:41 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_vfsops.c,v 1.302 2014/11/14 10:09:50 manu Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -1272,14 +1272,6 @@ ffs_mountfs(struct vnode *devvp, struct 
 		}
 #endif
 	 }
-#ifdef UFS_EXTATTR
-	/*
-	 * Initialize file-backed extended attributes on UFS1 file
-	 * systems.
-	 */
-	if (ump-um_fstype == UFS1)
-		ufs_extattr_uepm_init(ump-um_extattr);	
-#endif /* UFS_EXTATTR */
 
 	if (mp-mnt_flag  MNT_DISCARD)
 		ump-um_discarddata = ffs_discard_init(devvp, fs);
@@ -1527,6 +1519,7 @@ ffs_flushfiles(struct mount *mp, int fla
 			ufs_extattr_stop(mp, l);
 		if 

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

2014-11-14 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Nov 14 11:58:00 UTC 2014

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

Log Message:
Import dhcpcd-6.6.2 with the following changes:
  *  TAILQ macros are now pulled in via config.h only so dhcpcd compiles
 on systems where sys/queue.h does not exist at all.
  *  Remove DHCP state correctly when the interface departs
  *  End the IPv4LL state when DHCP is stopped
  *  Ensure that any DHCP leased offered still exists when assigning an
 IPv4LL address

Status:

Vendor Tag: roy
Release Tags:   dhcpcd-6-6-2

C src/external/bsd/dhcpcd/dist/common.c
U src/external/bsd/dhcpcd/dist/control.c
C src/external/bsd/dhcpcd/dist/dhcpcd.c
U src/external/bsd/dhcpcd/dist/duid.c
C src/external/bsd/dhcpcd/dist/eloop.c
U src/external/bsd/dhcpcd/dist/if.c
C src/external/bsd/dhcpcd/dist/if-options.c
U src/external/bsd/dhcpcd/dist/script.c
U src/external/bsd/dhcpcd/dist/dhcp-common.c
U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.c
U src/external/bsd/dhcpcd/dist/if-bsd.c
C src/external/bsd/dhcpcd/dist/arp.c
C src/external/bsd/dhcpcd/dist/dhcp.c
C src/external/bsd/dhcpcd/dist/ipv4.c
C src/external/bsd/dhcpcd/dist/ipv4ll.c
U src/external/bsd/dhcpcd/dist/ipv6.c
U src/external/bsd/dhcpcd/dist/ipv6nd.c
U src/external/bsd/dhcpcd/dist/dhcp6.c
C src/external/bsd/dhcpcd/dist/auth.c
U src/external/bsd/dhcpcd/dist/dhcpcd.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-definitions.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.c.in
U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.h.in
U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in
U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in
U src/external/bsd/dhcpcd/dist/dhcpcd.8.in
U src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in
U src/external/bsd/dhcpcd/dist/arp.h
C src/external/bsd/dhcpcd/dist/auth.h
U src/external/bsd/dhcpcd/dist/bpf-filter.h
U src/external/bsd/dhcpcd/dist/common.h
C src/external/bsd/dhcpcd/dist/config.h
U src/external/bsd/dhcpcd/dist/control.h
C src/external/bsd/dhcpcd/dist/defs.h
U src/external/bsd/dhcpcd/dist/dev.h
U src/external/bsd/dhcpcd/dist/dhcp-common.h
U src/external/bsd/dhcpcd/dist/dhcp.h
U src/external/bsd/dhcpcd/dist/dhcp6.h
U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.h
C src/external/bsd/dhcpcd/dist/dhcpcd.h
U src/external/bsd/dhcpcd/dist/duid.h
U src/external/bsd/dhcpcd/dist/eloop.h
U src/external/bsd/dhcpcd/dist/if-options.h
U src/external/bsd/dhcpcd/dist/if.h
U src/external/bsd/dhcpcd/dist/ipv4.h
C src/external/bsd/dhcpcd/dist/ipv4ll.h
C src/external/bsd/dhcpcd/dist/ipv6.h
C src/external/bsd/dhcpcd/dist/ipv6nd.h
U src/external/bsd/dhcpcd/dist/script.h
U src/external/bsd/dhcpcd/dist/crypt/hmac_md5.c
U src/external/bsd/dhcpcd/dist/crypt/crypt.h
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/01-test
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/02-dump
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-mtu
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-wpa_supplicant
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/15-timezone
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/29-lookup-hostname
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ntp.conf
U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ypbind

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

cvs checkout -jroy:yesterday -jroy src/external/bsd/dhcpcd/dist



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

2014-11-14 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Nov 14 12:00:54 UTC 2014

Modified Files:
src/external/bsd/dhcpcd/dist: arp.c auth.c auth.h common.c config.h
defs.h dhcp.c dhcpcd.c dhcpcd.h eloop.c if-options.c ipv4.c
ipv4ll.c ipv4ll.h ipv6.h ipv6nd.h

Log Message:
Sync


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/dhcpcd/dist/arp.c \
src/external/bsd/dhcpcd/dist/auth.c src/external/bsd/dhcpcd/dist/auth.h \
src/external/bsd/dhcpcd/dist/common.c \
src/external/bsd/dhcpcd/dist/config.h src/external/bsd/dhcpcd/dist/defs.h \
src/external/bsd/dhcpcd/dist/dhcpcd.h \
src/external/bsd/dhcpcd/dist/eloop.c src/external/bsd/dhcpcd/dist/ipv4.c \
src/external/bsd/dhcpcd/dist/ipv4ll.c \
src/external/bsd/dhcpcd/dist/ipv4ll.h src/external/bsd/dhcpcd/dist/ipv6.h \
src/external/bsd/dhcpcd/dist/ipv6nd.h
cvs rdiff -u -r1.22 -r1.23 src/external/bsd/dhcpcd/dist/dhcp.c
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/dhcpcd/dist/dhcpcd.c
cvs rdiff -u -r1.17 -r1.18 src/external/bsd/dhcpcd/dist/if-options.c

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

Modified files:

Index: src/external/bsd/dhcpcd/dist/arp.c
diff -u src/external/bsd/dhcpcd/dist/arp.c:1.6 src/external/bsd/dhcpcd/dist/arp.c:1.7
--- src/external/bsd/dhcpcd/dist/arp.c:1.6	Fri Nov  7 20:51:02 2014
+++ src/external/bsd/dhcpcd/dist/arp.c	Fri Nov 14 12:00:54 2014
@@ -1,5 +1,5 @@
 #include sys/cdefs.h
- __RCSID($NetBSD: arp.c,v 1.6 2014/11/07 20:51:02 roy Exp $);
+ __RCSID($NetBSD: arp.c,v 1.7 2014/11/14 12:00:54 roy Exp $);
 
 /*
  * dhcpcd - DHCP client daemon
@@ -320,8 +320,10 @@ arp_free(struct arp_state *astate)
 		eloop_timeout_delete(astate-iface-ctx-eloop, NULL, astate);
 		state = D_STATE(astate-iface);
 		TAILQ_REMOVE(state-arp_states, astate, next);
-		if (state-arp_ipv4ll == astate)
+		if (state-arp_ipv4ll == astate) {
+			ipv4ll_stop(astate-iface);
 			state-arp_ipv4ll = NULL;
+		}
 		free(astate);
 	}
 }
@@ -355,6 +357,10 @@ arp_close(struct interface *ifp)
 	}
 
 	while ((astate = TAILQ_FIRST(state-arp_states))) {
+#ifndef __clang_analyzer__
+		/* clang guard needed for a more compex variant on this bug:
+		 * http://llvm.org/bugs/show_bug.cgi?id=18222 */
 		arp_free(astate);
+#endif
 	}
 }
Index: src/external/bsd/dhcpcd/dist/auth.c
diff -u src/external/bsd/dhcpcd/dist/auth.c:1.6 src/external/bsd/dhcpcd/dist/auth.c:1.7
--- src/external/bsd/dhcpcd/dist/auth.c:1.6	Fri Nov  7 20:51:02 2014
+++ src/external/bsd/dhcpcd/dist/auth.c	Fri Nov 14 12:00:54 2014
@@ -1,5 +1,5 @@
 #include sys/cdefs.h
- __RCSID($NetBSD: auth.c,v 1.6 2014/11/07 20:51:02 roy Exp $);
+ __RCSID($NetBSD: auth.c,v 1.7 2014/11/14 12:00:54 roy Exp $);
 
 /*
  * dhcpcd - DHCP client daemon
@@ -29,7 +29,6 @@
  */
 
 #include sys/file.h
-#include sys/queue.h
 #include errno.h
 #include fcntl.h
 #include inttypes.h
Index: src/external/bsd/dhcpcd/dist/auth.h
diff -u src/external/bsd/dhcpcd/dist/auth.h:1.6 src/external/bsd/dhcpcd/dist/auth.h:1.7
--- src/external/bsd/dhcpcd/dist/auth.h:1.6	Fri Nov  7 20:51:02 2014
+++ src/external/bsd/dhcpcd/dist/auth.h	Fri Nov 14 12:00:54 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: auth.h,v 1.6 2014/11/07 20:51:02 roy Exp $ */
+/* $NetBSD: auth.h,v 1.7 2014/11/14 12:00:54 roy Exp $ */
 
 /*
  * dhcpcd - DHCP client daemon
@@ -30,7 +30,7 @@
 #ifndef AUTH_H
 #define AUTH_H
 
-#include sys/queue.h
+#include config.h
 
 #define DHCPCD_AUTH_SEND	(1  0)
 #define DHCPCD_AUTH_REQUIRE	(1  1)
Index: src/external/bsd/dhcpcd/dist/common.c
diff -u src/external/bsd/dhcpcd/dist/common.c:1.6 src/external/bsd/dhcpcd/dist/common.c:1.7
--- src/external/bsd/dhcpcd/dist/common.c:1.6	Fri Nov  7 20:51:02 2014
+++ src/external/bsd/dhcpcd/dist/common.c	Fri Nov 14 12:00:54 2014
@@ -1,5 +1,5 @@
 #include sys/cdefs.h
- __RCSID($NetBSD: common.c,v 1.6 2014/11/07 20:51:02 roy Exp $);
+ __RCSID($NetBSD: common.c,v 1.7 2014/11/14 12:00:54 roy Exp $);
 
 /*
  * dhcpcd - DHCP client daemon
@@ -33,10 +33,6 @@
 #  define _GNU_SOURCE
 #endif
 
-#ifndef __sun
-#  include sys/cdefs.h
-#endif
-
 #ifdef __APPLE__
 #  include mach/mach_time.h
 #  include mach/kern_return.h
Index: src/external/bsd/dhcpcd/dist/config.h
diff -u src/external/bsd/dhcpcd/dist/config.h:1.6 src/external/bsd/dhcpcd/dist/config.h:1.7
--- src/external/bsd/dhcpcd/dist/config.h:1.6	Fri Nov  7 20:51:02 2014
+++ src/external/bsd/dhcpcd/dist/config.h	Fri Nov 14 12:00:54 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: config.h,v 1.6 2014/11/07 20:51:02 roy Exp $ */
+/* $NetBSD: config.h,v 1.7 2014/11/14 12:00:54 roy Exp $ */
 
 /* netbsd */
 #define SYSCONFDIR	/etc
@@ -7,6 +7,7 @@
 #define LIBEXECDIR	/libexec
 #define DBDIR		/var/db
 #define RUNDIR		/var/run
+#include		sys/queue.h
 #define HAVE_SPAWN_H
 #define HAVE_MD5_H
 #define SHA2_H		sha2.h
Index: src/external/bsd/dhcpcd/dist/defs.h
diff -u src/external/bsd/dhcpcd/dist/defs.h:1.6 src/external/bsd/dhcpcd/dist/defs.h:1.7
--- 

CVS commit: src/doc

2014-11-14 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Fri Nov 14 12:02:20 UTC 2014

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Note import of dhcpcd-6.6.2


To generate a diff of this commit:
cvs rdiff -u -r1.1171 -r1.1172 src/doc/3RDPARTY
cvs rdiff -u -r1.2016 -r1.2017 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1171 src/doc/3RDPARTY:1.1172
--- src/doc/3RDPARTY:1.1171	Fri Nov  7 20:59:38 2014
+++ src/doc/3RDPARTY	Fri Nov 14 12:02:20 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1171 2014/11/07 20:59:38 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.1172 2014/11/14 12:02:20 roy Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -305,8 +305,8 @@ Notes:
 Use the dhcp2netbsd script.
 
 Package:	dhcpcd
-Version:	6.6.1
-Current Vers:	6.6.1
+Version:	6.6.2
+Current Vers:	6.6.2
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/dhcpcd/
 Home Page:	http://roy.marples.name/projects/dhcpcd/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2016 src/doc/CHANGES:1.2017
--- src/doc/CHANGES:1.2016	Tue Nov 11 17:20:43 2014
+++ src/doc/CHANGES	Fri Nov 14 12:02:20 2014
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.2016 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.2017 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -101,3 +101,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 		backend (DE-BE). [jmcneill 20141110]
 	awinhdmiaudio(4): Add support for Allwinner A20/A31 HDMI audio
 		controller. [jmcneill 2014]
+	dhcpcd(8): Import dhcpcd-6.6.2. [roy 20141114]



CVS commit: [netbsd-7] src/sys

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 13:26:47 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner [netbsd-7]: awin_board.c awin_hdmi.c
awin_io.c awin_reg.h awin_var.h files.awin
src/sys/arch/evbarm/awin [netbsd-7]: awin_machdep.c
src/sys/arch/evbarm/conf [netbsd-7]: BPI CUBIEBOARD HUMMINGBIRD_A31
src/sys/dev/wscons [netbsd-7]: wsconsio.h
Added Files:
src/sys/arch/arm/allwinner [netbsd-7]: awin_debe.c awin_fb.c
awin_tcon.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #210):
sys/arch/arm/allwinner/awin_board.c: revisions 1.26-1.27
sys/arch/arm/allwinner/awin_debe.c: revisions 1.1-1.6
sys/arch/arm/allwinner/awin_fb.c: revisions 1.1-1.4
sys/arch/arm/allwinner/awin_hdmi.c: revisions 1.3-1.6,1.9-1.12
sys/arch/arm/allwinner/awin_io.c: revision 1.27
sys/arch/arm/allwinner/awin_reg.h: revisions 1.46-1.47,1.49
sys/arch/arm/allwinner/awin_tcon.c: revisions 1.1-1.5
sys/arch/arm/allwinner/awin_var.h: revisions 1.20-1.22
sys/arch/arm/allwinner/files.awin: revisions 1.22-1.23,1.25
sys/arch/evbarm/awin/awin_machdep.c: revision 1.26
sys/arch/evbarm/conf/BPI: revision 1.10
sys/arch/evbarm/conf/CUBIEBOARD: revision 1.32
sys/arch/evbarm/conf/HUMMINGBIRD_A31: revisions 1.17-1.18
sys/dev/wscons/wsconsio.h: revision 1.109

HDMI framebuffer for Allwinner boards.


To generate a diff of this commit:
cvs rdiff -u -r1.14.6.1 -r1.14.6.2 src/sys/arch/arm/allwinner/awin_board.c
cvs rdiff -u -r0 -r1.6.2.2 src/sys/arch/arm/allwinner/awin_debe.c
cvs rdiff -u -r0 -r1.4.2.2 src/sys/arch/arm/allwinner/awin_fb.c
cvs rdiff -u -r1.4.2.2 -r1.4.2.3 src/sys/arch/arm/allwinner/awin_hdmi.c
cvs rdiff -u -r1.8.10.1 -r1.8.10.2 src/sys/arch/arm/allwinner/awin_io.c \
src/sys/arch/arm/allwinner/files.awin
cvs rdiff -u -r1.14.2.2 -r1.14.2.3 src/sys/arch/arm/allwinner/awin_reg.h
cvs rdiff -u -r0 -r1.5.2.2 src/sys/arch/arm/allwinner/awin_tcon.c
cvs rdiff -u -r1.10.2.1 -r1.10.2.2 src/sys/arch/arm/allwinner/awin_var.h
cvs rdiff -u -r1.8.2.5 -r1.8.2.6 src/sys/arch/evbarm/awin/awin_machdep.c
cvs rdiff -u -r1.2.2.4 -r1.2.2.5 src/sys/arch/evbarm/conf/BPI
cvs rdiff -u -r1.12.2.2 -r1.12.2.3 src/sys/arch/evbarm/conf/CUBIEBOARD
cvs rdiff -u -r1.19.2.2 -r1.19.2.3 src/sys/arch/evbarm/conf/HUMMINGBIRD_A31
cvs rdiff -u -r1.108 -r1.108.10.1 src/sys/dev/wscons/wsconsio.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/allwinner/awin_board.c
diff -u src/sys/arch/arm/allwinner/awin_board.c:1.14.6.1 src/sys/arch/arm/allwinner/awin_board.c:1.14.6.2
--- src/sys/arch/arm/allwinner/awin_board.c:1.14.6.1	Sun Nov  9 14:42:33 2014
+++ src/sys/arch/arm/allwinner/awin_board.c	Fri Nov 14 13:26:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: awin_board.c,v 1.14.6.1 2014/11/09 14:42:33 martin Exp $	*/
+/*	$NetBSD: awin_board.c,v 1.14.6.2 2014/11/14 13:26:46 martin Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -36,7 +36,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: awin_board.c,v 1.14.6.1 2014/11/09 14:42:33 martin Exp $);
+__KERNEL_RCSID(1, $NetBSD: awin_board.c,v 1.14.6.2 2014/11/14 13:26:46 martin Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -323,18 +323,25 @@ awin_pll6_enable(void)
 	 */
 	const uint32_t ocfg = bus_space_read_4(bst, bsh,
 	AWIN_CCM_OFFSET + AWIN_PLL6_CFG_REG);
-	const u_int k = __SHIFTOUT(ocfg, AWIN_PLL_CFG_FACTOR_K);
 
 	/*
 	 * Output freq is 24MHz * n * k / m / 6.
 	 * To get to 100MHz, k  m must be equal and n must be 25.
 	 */
 	uint32_t ncfg = ocfg;
-	ncfg = ~(AWIN_PLL_CFG_FACTOR_M|AWIN_PLL_CFG_FACTOR_N);
 	ncfg = ~(AWIN_PLL_CFG_BYPASS);
-	ncfg |= __SHIFTIN(k, AWIN_PLL_CFG_FACTOR_M);
-	ncfg |= __SHIFTIN(25, AWIN_PLL_CFG_FACTOR_N);
-	ncfg |= AWIN_PLL_CFG_ENABLE | AWIN_PLL6_CFG_SATA_CLK_EN;
+	if (awin_chip_id() == AWIN_CHIP_ID_A31) {
+		ncfg = ~(AWIN_PLL_CFG_FACTOR_N|AWIN_PLL_CFG_FACTOR_K);
+		ncfg |= __SHIFTIN(1, AWIN_PLL_CFG_FACTOR_K);
+		ncfg |= __SHIFTIN(24, AWIN_PLL_CFG_FACTOR_N);
+	} else {
+		const u_int k = __SHIFTOUT(ocfg, AWIN_PLL_CFG_FACTOR_K);
+		ncfg = ~(AWIN_PLL_CFG_FACTOR_M|AWIN_PLL_CFG_FACTOR_N);
+		ncfg |= __SHIFTIN(k, AWIN_PLL_CFG_FACTOR_M);
+		ncfg |= __SHIFTIN(25, AWIN_PLL_CFG_FACTOR_N);
+		ncfg |= AWIN_PLL6_CFG_SATA_CLK_EN;
+	}
+	ncfg |= AWIN_PLL_CFG_ENABLE;
 	if (ncfg != ocfg) {
 		bus_space_write_4(bst, bsh,
 		AWIN_CCM_OFFSET + AWIN_PLL6_CFG_REG, ncfg);
@@ -387,6 +394,44 @@ awin_pll2_enable(void)
 }
 
 void
+awin_pll3_enable(void)
+{
+	bus_space_tag_t bst = awin_bs_tag;
+	bus_space_handle_t bsh = awin_core_bsh;
+
+	/*
+	 * HDMI needs PLL3 to be 2970 Hz
+	 */
+	const uint32_t ocfg = bus_space_read_4(bst, bsh,
+	AWIN_CCM_OFFSET + AWIN_PLL3_CFG_REG);
+
+	uint32_t ncfg = ocfg;
+
+	if (awin_chip_id() == AWIN_CHIP_ID_A31) {
+		

CVS commit: src

2014-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Nov 14 13:30:48 UTC 2014

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/usr.bin/ld: Makefile
Added Files:
src/tests/usr.bin/ld: t_section.sh

Log Message:
Test __start_xxx/__stop_xxx symbol generation.


To generate a diff of this commit:
cvs rdiff -u -r1.597 -r1.598 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/ld/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/ld/t_section.sh

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.597 src/distrib/sets/lists/tests/mi:1.598
--- src/distrib/sets/lists/tests/mi:1.597	Fri Nov 14 09:03:39 2014
+++ src/distrib/sets/lists/tests/mi	Fri Nov 14 13:30:48 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.597 2014/11/14 09:03:39 uebayasi Exp $
+# $NetBSD: mi,v 1.598 2014/11/14 13:30:48 uebayasi Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -3467,6 +3467,7 @@
 ./usr/tests/usr.bin/ld/Atffile			tests-usr.bin-tests	atf
 ./usr/tests/usr.bin/ld/Kyuafile			tests-usr.bin-tests	atf,kyua
 ./usr/tests/usr.bin/ld/t_script			tests-usr.bin-tests	atf
+./usr/tests/usr.bin/ld/t_section		tests-usr.bin-tests	atf
 ./usr/tests/usr.bin/m4tests-usr.bin-tests
 ./usr/tests/usr.bin/m4/Atffile			tests-usr.bin-tests	atf
 ./usr/tests/usr.bin/m4/Kyuafile			tests-usr.bin-tests	atf,kyua

Index: src/tests/usr.bin/ld/Makefile
diff -u src/tests/usr.bin/ld/Makefile:1.1 src/tests/usr.bin/ld/Makefile:1.2
--- src/tests/usr.bin/ld/Makefile:1.1	Fri Nov 14 09:03:39 2014
+++ src/tests/usr.bin/ld/Makefile	Fri Nov 14 13:30:48 2014
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.1 2014/11/14 09:03:39 uebayasi Exp $
+# $NetBSD: Makefile,v 1.2 2014/11/14 13:30:48 uebayasi Exp $
 
 .include bsd.own.mk
 
 TESTSDIR=	${TESTSBASE}/usr.bin/ld
 
-TESTS_SH=	t_script
+TESTS_SH=	t_script \
+		t_section
 
 .include bsd.test.mk

Added files:

Index: src/tests/usr.bin/ld/t_section.sh
diff -u /dev/null src/tests/usr.bin/ld/t_section.sh:1.1
--- /dev/null	Fri Nov 14 13:30:48 2014
+++ src/tests/usr.bin/ld/t_section.sh	Fri Nov 14 13:30:48 2014
@@ -0,0 +1,48 @@
+#	$NetBSD: t_section.sh,v 1.1 2014/11/14 13:30:48 uebayasi Exp $
+#
+# Copyright (c) 2014 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE 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.
+#
+
+atf_test_case startstop
+startstop_head() {
+	atf_set descr check if __start_*/__stop_* symbols are generated
+	atf_set require.progs cc
+}
+
+startstop_body() {
+	cat  test.c  EOF
+#include sys/cdefs.h
+int i __section(hoge);
+extern int __start_hoge[], __stop_hoge[];
+int main = __start_hoge[0] + __stop_hoge[0];
+EOF
+	atf_check -s exit:0 -o ignore -e ignore cc -o test test.c
+}
+
+atf_init_test_cases()
+{
+
+	atf_add_test_case startstop
+}



CVS commit: [netbsd-7] src/sys/arch

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 13:37:39 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner [netbsd-7]: awin_board.c awin_dma_a10.c
awin_hdmi.c awin_io.c awin_reg.h files.awin
src/sys/arch/evbarm/conf [netbsd-7]: BPI CUBIEBOARD
Added Files:
src/sys/arch/arm/allwinner [netbsd-7]: awin_hdmiaudio.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #214):
sys/arch/evbarm/conf/BPI: revision 1.11
sys/arch/arm/allwinner/awin_hdmi.c: revision 1.10
sys/arch/arm/allwinner/awin_hdmiaudio.c: revision 1.1
sys/arch/arm/allwinner/awin_hdmiaudio.c: revision 1.2
sys/arch/arm/allwinner/awin_hdmiaudio.c: revision 1.3
sys/arch/evbarm/conf/CUBIEBOARD: revision 1.34
sys/arch/arm/allwinner/awin_io.c: revision 1.28
sys/arch/arm/allwinner/awin_reg.h: revision 1.48
sys/arch/arm/allwinner/awin_debe.c: revision 1.5
sys/arch/arm/allwinner/awin_dma_a10.c: revision 1.3
sys/arch/evbarm/conf/HUMMINGBIRD_A31: revision 1.19
sys/arch/arm/allwinner/files.awin: revision 1.24
sys/arch/arm/allwinner/awin_board.c: revision 1.28
sys/arch/arm/allwinner/awin_hdmi.c: revision 1.7
sys/arch/arm/allwinner/awin_hdmi.c: revision 1.8
HDMI audio driver for Allwinner boards.


To generate a diff of this commit:
cvs rdiff -u -r1.14.6.2 -r1.14.6.3 src/sys/arch/arm/allwinner/awin_board.c
cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/sys/arch/arm/allwinner/awin_dma_a10.c
cvs rdiff -u -r1.4.2.3 -r1.4.2.4 src/sys/arch/arm/allwinner/awin_hdmi.c
cvs rdiff -u -r0 -r1.3.2.2 src/sys/arch/arm/allwinner/awin_hdmiaudio.c
cvs rdiff -u -r1.8.10.2 -r1.8.10.3 src/sys/arch/arm/allwinner/awin_io.c \
src/sys/arch/arm/allwinner/files.awin
cvs rdiff -u -r1.14.2.3 -r1.14.2.4 src/sys/arch/arm/allwinner/awin_reg.h
cvs rdiff -u -r1.2.2.5 -r1.2.2.6 src/sys/arch/evbarm/conf/BPI
cvs rdiff -u -r1.12.2.3 -r1.12.2.4 src/sys/arch/evbarm/conf/CUBIEBOARD

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/allwinner/awin_board.c
diff -u src/sys/arch/arm/allwinner/awin_board.c:1.14.6.2 src/sys/arch/arm/allwinner/awin_board.c:1.14.6.3
--- src/sys/arch/arm/allwinner/awin_board.c:1.14.6.2	Fri Nov 14 13:26:46 2014
+++ src/sys/arch/arm/allwinner/awin_board.c	Fri Nov 14 13:37:39 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: awin_board.c,v 1.14.6.2 2014/11/14 13:26:46 martin Exp $	*/
+/*	$NetBSD: awin_board.c,v 1.14.6.3 2014/11/14 13:37:39 martin Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -36,7 +36,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: awin_board.c,v 1.14.6.2 2014/11/14 13:26:46 martin Exp $);
+__KERNEL_RCSID(1, $NetBSD: awin_board.c,v 1.14.6.3 2014/11/14 13:37:39 martin Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -518,7 +518,7 @@ awin_pll5x_get_rate(void)
 	AWIN_CCM_OFFSET + AWIN_PLL5_CFG_REG);
 
 	n = __SHIFTOUT(cfg, AWIN_PLL_CFG_FACTOR_N);
-	k = __SHIFTOUT(cfg, AWIN_PLL_CFG_FACTOR_K);
+	k = __SHIFTOUT(cfg, AWIN_PLL_CFG_FACTOR_K) + 1;
 	p = __SHIFTOUT(cfg, AWIN_PLL5_OUT_EXT_DIV_P);
 
 	return (AWIN_REF_FREQ * n * k)  p;

Index: src/sys/arch/arm/allwinner/awin_dma_a10.c
diff -u src/sys/arch/arm/allwinner/awin_dma_a10.c:1.2.2.2 src/sys/arch/arm/allwinner/awin_dma_a10.c:1.2.2.3
--- src/sys/arch/arm/allwinner/awin_dma_a10.c:1.2.2.2	Sun Nov  9 14:42:33 2014
+++ src/sys/arch/arm/allwinner/awin_dma_a10.c	Fri Nov 14 13:37:39 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_dma_a10.c,v 1.2.2.2 2014/11/09 14:42:33 martin Exp $ */
+/* $NetBSD: awin_dma_a10.c,v 1.2.2.3 2014/11/14 13:37:39 martin Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include opt_ddb.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: awin_dma_a10.c,v 1.2.2.2 2014/11/09 14:42:33 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: awin_dma_a10.c,v 1.2.2.3 2014/11/14 13:37:39 martin Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -179,7 +179,8 @@ awin_dma_a10_alloc(struct awin_dma_softc
 	uint32_t irqen;
 	uint8_t ch_count, index;
 
-	if (strcmp(type, ddma) == 0) {
+	if (strcmp(type, ddma) == 0 ||
+	strcmp(type, hdmiaudio) == 0) {
 		ch_list = awin_ddma_channels;
 		ch_count = DDMA_CHANNELS;
 	} else {
@@ -239,7 +240,11 @@ awin_dma_a10_get_config(void *priv)
 {
 	struct awin_dma_a10_channel *ch = priv;
 
-	return DMACH_READ(ch, AWIN_NDMA_CTL_REG);
+	if (ch-ch_type == CH_NDMA) {
+		return DMACH_READ(ch, AWIN_NDMA_CTL_REG);
+	} else {
+		return DMACH_READ(ch, AWIN_DDMA_CTL_REG);
+	}
 }
 
 static void
@@ -247,7 +252,11 @@ awin_dma_a10_set_config(void *priv, uint
 {
 	struct awin_dma_a10_channel *ch = priv;
 
-	DMACH_WRITE(ch, AWIN_NDMA_CTL_REG, val);
+	if (ch-ch_type == CH_NDMA) {
+		DMACH_WRITE(ch, AWIN_NDMA_CTL_REG, val);
+	} else {
+		DMACH_WRITE(ch, AWIN_DDMA_CTL_REG, val);
+	}
 }
 
 static int
@@ -275,6 

CVS commit: [netbsd-7] src

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 14:17:12 UTC 2014

Modified Files:
src [netbsd-7]: build.sh

Log Message:
Pull up following revision(s) (requested by apb in ticket #219):
build.sh: revision 1.301
Replace '.' and '-' in ${op} with '_', before setting d_${op}=true.
Also remove or simplify older code that did the same thing in a
different way.  The old code handled most cases, but did not change
op=kernel.gdb to op=kernel_gdb.


To generate a diff of this commit:
cvs rdiff -u -r1.294.2.1 -r1.294.2.2 src/build.sh

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

Modified files:

Index: src/build.sh
diff -u src/build.sh:1.294.2.1 src/build.sh:1.294.2.2
--- src/build.sh:1.294.2.1	Fri Aug 15 23:59:24 2014
+++ src/build.sh	Fri Nov 14 14:17:12 2014
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.294.2.1 2014/08/15 23:59:24 riz Exp $
+#	$NetBSD: build.sh,v 1.294.2.2 2014/11/14 14:17:12 martin Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1314,25 +1314,6 @@ parseoptions()
 			exit $?
 			;;
 
-		makewrapper|cleandir|obj|tools|build|distribution|release|sets|sourcesets|syspkgs|params)
-			;;
-
-		iso-image)
-			op=iso_image	# used as part of a variable name
-			;;
-
-		iso-image-source)
-			op=iso_image_source   # used as part of a variable name
-			;;
-
-		live-image)
-			op=live_image	# used as part of a variable name
-			;;
-
-		install-image)
-			op=install_image # used as part of a variable name
-			;;
-
 		kernel=*|releasekernel=*|kernel.gdb=*)
 			arg=${op#*=}
 			op=${op%%=*}
@@ -1348,10 +1329,6 @@ parseoptions()
 
 			;;
 
-		modules)
-			op=modules
-			;;
-
 		install=*|installmodules=*)
 			arg=${op#*=}
 			op=${op%%=*}
@@ -1359,8 +1336,24 @@ parseoptions()
 			bomb Must supply a directory with \`install=...'
 			;;
 
-		rump|rumptest)
-			op=${op}
+		build|\
+		cleandir|\
+		distribution|\
+		install-image|\
+		iso-image-source|\
+		iso-image|\
+		live-image|\
+		makewrapper|\
+		modules|\
+		obj|\
+		params|\
+		release|\
+		rump|\
+		rumptest|\
+		sets|\
+		sourcesets|\
+		syspkgs|\
+		tools)
 			;;
 
 		*)
@@ -1368,6 +1361,9 @@ parseoptions()
 			;;
 
 		esac
+		# ${op} may contain chars that are not allowed in variable
+		# names.  Replace them with '_' before setting do_${op}.
+		op=$( echo $op | tr -s '.-' '__')
 		eval do_${op}=true
 	done
 	[ -n ${operations} ] || usage Missing operation to perform.
@@ -1867,7 +1863,7 @@ createmakewrapper()
 	eval cat EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy make building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.294.2.1 2014/08/15 23:59:24 riz Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.294.2.2 2014/11/14 14:17:12 martin Exp $
 # with these arguments: ${_args}
 #
 



CVS commit: [netbsd-7] src/sys/external/bsd/drm2

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 14:22:41 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915 [netbsd-7]: i915_gem_tiling.c
intel_display.c intel_dp.c intel_overlay.c intel_tv.c
src/sys/external/bsd/drm2/dist/drm/radeon [netbsd-7]: atombios_dp.c
ci_dpm.c evergreen_cs.c kv_dpm.c r100.c radeon_drv.c rv770_dpm.c
si_dpm.c sumo_dpm.c trinity_dpm.c
src/sys/external/bsd/drm2/ttm [netbsd-7]: ttm_bo_vm.c

Log Message:
Pull up following revision(s) (requested by snj in ticket #224):
sys/external/bsd/drm2/dist/drm/radeon/radeon_drv.c: revision 1.5
sys/external/bsd/drm2/dist/drm/i915/intel_overlay.c: revision 1.6
sys/external/bsd/drm2/dist/drm/radeon/sumo_dpm.c: revision 1.3
sys/external/bsd/drm2/dist/drm/radeon/atombios_dp.c: revision 1.4
sys/external/bsd/drm2/dist/drm/i915/intel_dp.c: revision 1.9
sys/external/bsd/drm2/dist/drm/radeon/trinity_dpm.c: revision 1.3
sys/external/bsd/drm2/dist/drm/radeon/r100.c: revision 1.3
sys/external/bsd/drm2/dist/drm/radeon/rv770_dpm.c: revision 1.3
sys/external/bsd/drm2/dist/drm/radeon/evergreen_cs.c: revision 1.3
sys/external/bsd/drm2/dist/drm/i915/i915_gem_tiling.c: revision 1.4
sys/external/bsd/drm2/dist/drm/radeon/evergreen_cs.c: revision 1.4
sys/external/bsd/drm2/dist/drm/i915/intel_display.c: revision 1.13
sys/external/bsd/drm2/dist/drm/radeon/si_dpm.c: revision 1.3
sys/external/bsd/drm2/dist/drm/radeon/kv_dpm.c: revision 1.3
sys/external/bsd/drm2/dist/drm/radeon/kv_dpm.c: revision 1.4
sys/external/bsd/drm2/dist/drm/radeon/ci_dpm.c: revision 1.3
sys/external/bsd/drm2/dist/drm/radeon/ci_dpm.c: revision 1.4
sys/external/bsd/drm2/dist/drm/i915/intel_tv.c: revision 1.6
sys/external/bsd/drm2/ttm/ttm_bo_vm.c: revision 1.8
test some pointers and return EINVAL instead of blindly assuming
they're valid.  converts kernel crashes in to app failures.
GL is still not working on evergreen for me.
Use %hhx for uint8_t, not %hx.
Mark some unused variables as such to shut up Clang.
Ifdef out nonsensical comparison until we update from upstream.
We don't use radeon_(un)register_atpx_handler at the moment.
Ifdef out another nonsensical comparison.
fix uninitialized
fix shadowing for min() and max() from libkern
Fix little C issues in i915drmkms hindering the Clang build.
- Test `x == NULL', not `container_of(x, t, base)-base == NULL'.
- Fix format strings in intel_dp_probe_oui to use %hhx for uint8_t.
- Omit needless ioread32 in intel_overlay.c.
- Ifdef out unused definitions in intel_tv.c.
Update comment to reflect recent change to.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.2.1 \
src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_tiling.c
cvs rdiff -u -r1.10.2.1 -r1.10.2.2 \
src/sys/external/bsd/drm2/dist/drm/i915/intel_display.c
cvs rdiff -u -r1.7.2.1 -r1.7.2.2 \
src/sys/external/bsd/drm2/dist/drm/i915/intel_dp.c
cvs rdiff -u -r1.5 -r1.5.2.1 \
src/sys/external/bsd/drm2/dist/drm/i915/intel_overlay.c
cvs rdiff -u -r1.4.2.1 -r1.4.2.2 \
src/sys/external/bsd/drm2/dist/drm/i915/intel_tv.c
cvs rdiff -u -r1.2.4.1 -r1.2.4.2 \
src/sys/external/bsd/drm2/dist/drm/radeon/atombios_dp.c
cvs rdiff -u -r1.2 -r1.2.4.1 \
src/sys/external/bsd/drm2/dist/drm/radeon/ci_dpm.c \
src/sys/external/bsd/drm2/dist/drm/radeon/evergreen_cs.c \
src/sys/external/bsd/drm2/dist/drm/radeon/kv_dpm.c \
src/sys/external/bsd/drm2/dist/drm/radeon/r100.c \
src/sys/external/bsd/drm2/dist/drm/radeon/rv770_dpm.c \
src/sys/external/bsd/drm2/dist/drm/radeon/si_dpm.c \
src/sys/external/bsd/drm2/dist/drm/radeon/sumo_dpm.c \
src/sys/external/bsd/drm2/dist/drm/radeon/trinity_dpm.c
cvs rdiff -u -r1.4 -r1.4.4.1 \
src/sys/external/bsd/drm2/dist/drm/radeon/radeon_drv.c
cvs rdiff -u -r1.2.4.4 -r1.2.4.5 src/sys/external/bsd/drm2/ttm/ttm_bo_vm.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/external/bsd/drm2/dist/drm/i915/i915_gem_tiling.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_tiling.c:1.3 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_tiling.c:1.3.2.1
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_tiling.c:1.3	Wed Jul 16 20:03:56 2014
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_tiling.c	Fri Nov 14 14:22:41 2014
@@ -295,12 +295,14 @@ i915_gem_set_tiling(struct drm_device *d
 {
 	struct drm_i915_gem_set_tiling *args = data;
 	struct drm_i915_private *dev_priv = dev-dev_private;
+	struct drm_gem_object *gobj;
 	struct drm_i915_gem_object *obj;
 	int ret = 0;
 
-	obj = to_intel_bo(drm_gem_object_lookup(dev, file, args-handle));
-	if (obj-base == NULL)
+	gobj = drm_gem_object_lookup(dev, file, args-handle);
+	if (gobj == NULL)
 		return -ENOENT;
+	obj = to_intel_bo(gobj);
 
 	if 

CVS commit: src/sys/dev/raidframe

2014-11-14 Thread Greg Oster
Module Name:src
Committed By:   oster
Date:   Fri Nov 14 14:29:16 UTC 2014

Modified Files:
src/sys/dev/raidframe: raidframevar.h rf_netbsdkintf.c rf_reconstruct.c

Log Message:
Fix a long-standing bug related to rebooting while a
reconstruct-to-spare is underway but not yet complete.

The issue was that a component was being marked as a used_spare when
the rebuild started, not when the rebuild was actually finished.
Marking it as a used_spare meant that the component label on the spare
was being updated such that after a reboot the component would be
considered up-to-date, regardless of whether the rebuild actually
completed!

This fix includes:
 1) Add an additional state rf_ds_rebuilding_spare which is used
to denote that a spare is currently being rebuilt from the live
components.
 2) Update the comments on the disk states, which were out-of-sync
with reality.
 3) When rebuilding to a spare component, that spare now enters the
state rf_ds_rebuilding_spare instead of the state rf_ds_used_spare.
 4) When the rebuild is actually complete then the spare component
enters the rf_ds_used_spare state.  rf_ds_used_spare is now used
exclusively for the case where the rebuilding to the spare has
completed successfully.

XXX: Someday we need to teach raidctl(8) about this new state, and
take out the backwards compatibility code in rf_netbsdkintf.c (see
RAIDFRAME_GET_INFO in raidioctl()).  For today, this fix needs to be
generic enough that it can get backported without major grief.

XXX: Needs pullup to netbsd-5*, netbsd-6*, and netbsd-7

Fixes PR#49244.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/raidframe/raidframevar.h
cvs rdiff -u -r1.315 -r1.316 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.120 -r1.121 src/sys/dev/raidframe/rf_reconstruct.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/raidframe/raidframevar.h
diff -u src/sys/dev/raidframe/raidframevar.h:1.16 src/sys/dev/raidframe/raidframevar.h:1.17
--- src/sys/dev/raidframe/raidframevar.h:1.16	Fri Feb 28 10:16:51 2014
+++ src/sys/dev/raidframe/raidframevar.h	Fri Nov 14 14:29:16 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: raidframevar.h,v 1.16 2014/02/28 10:16:51 skrll Exp $ */
+/*	$NetBSD: raidframevar.h,v 1.17 2014/11/14 14:29:16 oster Exp $ */
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -383,17 +383,17 @@ struct RF_SparetWait_s {
  * IF YOU ADD A STATE, CHECK TO SEE IF YOU NEED TO MODIFY RF_DEAD_DISK().
  */
 enum RF_DiskStatus_e {
-rf_ds_optimal,  /* no problems */
-rf_ds_failed,   /* reconstruction ongoing */
-rf_ds_reconstructing,   /* reconstruction complete to spare, dead disk
- * not yet replaced */
-rf_ds_dist_spared,  /* reconstruction complete to distributed
+	rf_ds_optimal,  /* no problems */
+	rf_ds_failed,   /* disk has failed */
+	rf_ds_reconstructing,   /* reconstruction ongoing */
+	rf_ds_dist_spared,  /* reconstruction complete to distributed
  * spare space, dead disk not yet replaced */
-rf_ds_spared,   /* reconstruction complete to distributed
- * spare space, dead disk not yet replaced */
-rf_ds_spare,/* an available spare disk */
-rf_ds_used_spare/* a spare which has been used, and hence is
+	rf_ds_spared,   /* reconstruction complete, dead disk not 
+   yet replaced */
+	rf_ds_spare,/* an available spare disk */
+	rf_ds_used_spare,   /* a spare which has been used, and hence is
  * not available */
+	rf_ds_rebuilding_spare	/* a spare which is being rebuilt to */
 };
 typedef enum RF_DiskStatus_e RF_DiskStatus_t;
 

Index: src/sys/dev/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.315 src/sys/dev/raidframe/rf_netbsdkintf.c:1.316
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.315	Tue Nov  4 07:51:55 2014
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Fri Nov 14 14:29:16 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.315 2014/11/04 07:51:55 mlelstv Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.316 2014/11/14 14:29:16 oster Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  ***/
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.315 2014/11/04 07:51:55 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.316 2014/11/14 14:29:16 oster Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -1532,6 +1532,10 @@ raidioctl(dev_t dev, u_long cmd, void *d
 		}
 		for (j = d_cfg-cols, i = 0; i  d_cfg-nspares; i++, j++) {
 			d_cfg-spares[i] = 

CVS commit: src/sys/external/bsd/drm2/i915drm

2014-11-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Nov 14 14:32:49 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/i915drm: files.i915drmkms

Log Message:
Fix build with clang.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/i915drm/files.i915drmkms

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/drm2/i915drm/files.i915drmkms
diff -u src/sys/external/bsd/drm2/i915drm/files.i915drmkms:1.8 src/sys/external/bsd/drm2/i915drm/files.i915drmkms:1.9
--- src/sys/external/bsd/drm2/i915drm/files.i915drmkms:1.8	Wed Nov  5 23:46:09 2014
+++ src/sys/external/bsd/drm2/i915drm/files.i915drmkms	Fri Nov 14 14:32:49 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files.i915drmkms,v 1.8 2014/11/05 23:46:09 nonaka Exp $
+#	$NetBSD: files.i915drmkms,v 1.9 2014/11/14 14:32:49 joerg Exp $
 
 define	intelfbbus	{ }
 device	i915drmkms: drmkms, drmkms_pci, intelfbbus, agp_i810
@@ -10,8 +10,9 @@ attach	intelfb at intelfbbus
 makeoptions	i915drmkms	CPPFLAGS+=-I$S/external/bsd/drm2/dist/drm/i915
 makeoptions	i915drmkms	CPPFLAGS+=-I$S/external/bsd/drm2/i915drm
 
-makeoptions 	i915drmkms 	CWARNFLAGS.i915_drv.c+=-Wno-override-init
-makeoptions 	i915drmkms 	CWARNFLAGS.intel_display.c+=-Wno-shadow
+makeoptions 	i915drmkms 	CWARNFLAGS.i915_drv.c+=${${ACTIVE_CC} == gcc:? -Wno-override-init :}
+makeoptions 	i915drmkms 	CWARNFLAGS.i915_drv.c+=${${ACTIVE_CC} == clang:? -Wno-initializer-overrides :}
+makeoptions 	i915drmkms 	CWARNFLAGS.intel_display.c+=-Wno-shadow -Wno-conversion
 makeoptions 	i915drmkms 	CWARNFLAGS.intel_panel.c+=-Wno-shadow
 makeoptions 	i915drmkms 	CWARNFLAGS.intel_pm.c+=-Wno-shadow
 



CVS commit: [netbsd-7] src/share/man/man7

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 14:44:37 UTC 2014

Modified Files:
src/share/man/man7 [netbsd-7]: release.7

Log Message:
Pull up following revision(s) (requested by snj in ticket #226):
share/man/man7/release.7: revision 1.35
share/man/man7/release.7: revision 1.36
fix cksum syntax, CDROM - CD-ROM, give a specific example of a kernel set
rather than kern.tgz, add dd(1) xref for usb images
bump date


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.34.10.1 src/share/man/man7/release.7

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/man7/release.7
diff -u src/share/man/man7/release.7:1.34 src/share/man/man7/release.7:1.34.10.1
--- src/share/man/man7/release.7:1.34	Fri Sep  7 07:07:15 2012
+++ src/share/man/man7/release.7	Fri Nov 14 14:44:37 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: release.7,v 1.34 2012/09/07 07:07:15 wiz Exp $
+.\	$NetBSD: release.7,v 1.34.10.1 2014/11/14 14:44:37 martin Exp $
 .\
 .\ Copyright (c) 1997, 2000, 2005 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 September 6, 2012
+.Dd November 3, 2014
 .Dt RELEASE 7
 .Os
 .Sh NAME
@@ -79,7 +79,7 @@ All
 .Sy MD5
 files are MD5 digests for the various files in that directory, in the
 format produced by the command:
-.Sy cksum -m Aq Sy file .
+.Sy cksum -a MD5 Aq Sy file .
 .Pp
 All
 .Sy SHA512
@@ -151,7 +151,7 @@ These images are usually bootable.
 .It Sy MD5
 .It Sy SHA512
 .It Sy NetBSD- Ns Ao Em rel Ac Ns Sy - Ns Ao Em machine Ac Ns Sy .iso
-CDROM images in ISO 9660 format, usually created with
+CD-ROM images in ISO 9660 format, usually created with
 .Dq ./build.sh ... iso-image ...
 after a
 .Dq ./build.sh -x ... release ...
@@ -288,8 +288,12 @@ This set contains the system configurati
 and in several other places throughout the file system hierarchy.
 .It Sy games.tgz
 This set includes the games and their manual pages.
-.It Sy kern.tgz
-This set includes a generic kernel.
+.It Sy kern-GENERIC.tgz
+This set includes a kernel built from the
+.Sy GENERIC
+kernel configuration file.
+This is meant as an example only; different
+platforms may have differently named kernels.
 .It Sy man.tgz
 This set includes all of the manual pages for the binaries and other
 software contained in the
@@ -336,7 +340,7 @@ platforms may have differently named ker
 installation helper items
 .Bl -tag -width diskimage/
 .It Sy cdrom/
-CDROM images in ISO 9660 format, created as part of
+CD-ROM images in ISO 9660 format, created as part of
 .Dq build.sh ... release ...
 in
 .Pa src .
@@ -412,6 +416,7 @@ tape images, on those platforms that pro
 .El
 .Sh SEE ALSO
 .Xr cksum 1 ,
+.Xr dd 1 ,
 .Xr gzip 1 ,
 .Xr split 1 ,
 .Xr tar 1



CVS commit: src/sys/dev/raidframe

2014-11-14 Thread Greg Oster
Module Name:src
Committed By:   oster
Date:   Fri Nov 14 14:45:34 UTC 2014

Modified Files:
src/sys/dev/raidframe: rf_map.c

Log Message:
Adjust comment to reflect reality.  (5th arg, not 4th)


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/raidframe/rf_map.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/raidframe/rf_map.c
diff -u src/sys/dev/raidframe/rf_map.c:1.45 src/sys/dev/raidframe/rf_map.c:1.46
--- src/sys/dev/raidframe/rf_map.c:1.45	Wed May 11 18:13:12 2011
+++ src/sys/dev/raidframe/rf_map.c	Fri Nov 14 14:45:34 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_map.c,v 1.45 2011/05/11 18:13:12 mrg Exp $	*/
+/*	$NetBSD: rf_map.c,v 1.46 2014/11/14 14:45:34 oster Exp $	*/
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -33,7 +33,7 @@
  **/
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rf_map.c,v 1.45 2011/05/11 18:13:12 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: rf_map.c,v 1.46 2014/11/14 14:45:34 oster Exp $);
 
 #include dev/raidframe/raidframevar.h
 
@@ -848,7 +848,7 @@ rf_ASMParityAdjust(RF_PhysDiskAddr_t *to
 }
 
 /* Check if a disk has been spared or failed. If spared, redirect the
- * I/O.  If it has been failed, record it in the asm pointer.  Fourth
+ * I/O.  If it has been failed, record it in the asm pointer.  Fifth
  * arg is whether data or parity.  */
 void
 rf_ASMCheckStatus(RF_Raid_t *raidPtr, RF_PhysDiskAddr_t *pda_p,



CVS commit: src/lib/libm

2014-11-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Nov 14 14:53:17 UTC 2014

Modified Files:
src/lib/libm/arch/vax: n_support.S
src/lib/libm/src: namespace.h s_copysign.c s_copysignl.c

Log Message:
Define copysignl on !long double platforms. Be consistent in the use of
weak aliases.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libm/arch/vax/n_support.S
cvs rdiff -u -r1.12 -r1.13 src/lib/libm/src/namespace.h
cvs rdiff -u -r1.11 -r1.12 src/lib/libm/src/s_copysign.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libm/src/s_copysignl.c

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

Modified files:

Index: src/lib/libm/arch/vax/n_support.S
diff -u src/lib/libm/arch/vax/n_support.S:1.9 src/lib/libm/arch/vax/n_support.S:1.10
--- src/lib/libm/arch/vax/n_support.S:1.9	Sat Mar 15 14:12:56 2014
+++ src/lib/libm/arch/vax/n_support.S	Fri Nov 14 14:53:17 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: n_support.S,v 1.9 2014/03/15 14:12:56 martin Exp $	*/
+/*	$NetBSD: n_support.S,v 1.10 2014/11/14 14:53:17 joerg Exp $	*/
 /*
  * Copyright (c) 1985, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,8 @@
 #include machine/asm.h
 
 WEAK_ALIAS(logbl,logb)
-WEAK_ALIAS(copysignl, copysign)
+WEAK_ALIAS(copysignl, _copysignl)
+WEAK_ALIAS(_copysignl, copysign)
 
 	.text
 _sccsid:

Index: src/lib/libm/src/namespace.h
diff -u src/lib/libm/src/namespace.h:1.12 src/lib/libm/src/namespace.h:1.13
--- src/lib/libm/src/namespace.h:1.12	Fri Nov 14 03:31:41 2014
+++ src/lib/libm/src/namespace.h	Fri Nov 14 14:53:17 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: namespace.h,v 1.12 2014/11/14 03:31:41 christos Exp $ */
+/* $NetBSD: namespace.h,v 1.13 2014/11/14 14:53:17 joerg Exp $ */
 
 #define atan2 _atan2
 #define atan2f _atan2f
@@ -46,6 +46,7 @@
 #define scalblnf _scalblnf
 #define scalblnl _scalblnl
 
+#define copysignl _copysignl
 #define sqrtl _sqrtl
 #define cbrtl _cbrtl
 #define ceill _ceill

Index: src/lib/libm/src/s_copysign.c
diff -u src/lib/libm/src/s_copysign.c:1.11 src/lib/libm/src/s_copysign.c:1.12
--- src/lib/libm/src/s_copysign.c:1.11	Sun May 26 22:01:54 2002
+++ src/lib/libm/src/s_copysign.c	Fri Nov 14 14:53:17 2014
@@ -12,7 +12,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBM_SCCS)  !defined(lint)
-__RCSID($NetBSD: s_copysign.c,v 1.11 2002/05/26 22:01:54 wiz Exp $);
+__RCSID($NetBSD: s_copysign.c,v 1.12 2014/11/14 14:53:17 joerg Exp $);
 #endif
 
 /*
@@ -24,6 +24,11 @@ __RCSID($NetBSD: s_copysign.c,v 1.11 20
 #include math.h
 #include math_private.h
 
+#ifndef __HAVE_LONG_DOUBLE
+__strong_alias(_copysignl, copysign)
+__weak_alias(copysignl, copysign)
+#endif
+
 double
 copysign(double x, double y)
 {

Index: src/lib/libm/src/s_copysignl.c
diff -u src/lib/libm/src/s_copysignl.c:1.3 src/lib/libm/src/s_copysignl.c:1.4
--- src/lib/libm/src/s_copysignl.c:1.3	Wed Oct 22 10:32:50 2014
+++ src/lib/libm/src/s_copysignl.c	Fri Nov 14 14:53:17 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: s_copysignl.c,v 1.3 2014/10/22 10:32:50 joerg Exp $	*/
+/*	$NetBSD: s_copysignl.c,v 1.4 2014/11/14 14:53:17 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -26,11 +26,18 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: s_copysignl.c,v 1.3 2014/10/22 10:32:50 joerg Exp $);
+__RCSID($NetBSD: s_copysignl.c,v 1.4 2014/11/14 14:53:17 joerg Exp $);
+#include namespace.h
 
 #include math.h
 #include machine/ieee.h
 
+#ifdef __HAVE_LONG_DOUBLE
+
+#ifdef __weak_alias
+__weak_alias(copysignl, _copysignl)
+#endif
+
 /*
  * copysignl(long double x, long double y)
  * This function returns a value with the magnitude of x and the sign of y.
@@ -62,3 +69,4 @@ copysignl(long double x, long double y)
 	return ux.ldblu_ld;
 }
 #endif
+#endif /* __HAVE_LONG_DOUBLE */



CVS commit: [netbsd-7] src

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 14:58:28 UTC 2014

Modified Files:
src [netbsd-7]: BUILDING Makefile build.sh
src/distrib/notes/arc [netbsd-7]: prep
src/distrib/notes/cats [netbsd-7]: prep
src/distrib/notes/common [netbsd-7]: main
src/distrib/notes/macppc [netbsd-7]: prep.OPENFIRMWARE
src/distrib/notes/sparc [netbsd-7]: install
src/doc [netbsd-7]: BUILDING.mdoc
src/share/man/man8/man8.macppc [netbsd-7]: ofwboot.8

Log Message:
Pull up following revision(s) (requested by snj in ticket #227):
Makefile: revision 1.311
build.sh: revision 1.299
doc/BUILDING.mdoc: revision 1.105
distrib/notes/macppc/prep.OPENFIRMWARE: revision 1.16
distrib/notes/macppc/prep.OPENFIRMWARE: revision 1.17
BUILDING: revision 1.110
distrib/notes/arc/prep: revision 1.3
distrib/notes/arc/prep: revision 1.4
distrib/notes/cats/prep: revision 1.12
distrib/notes/cats/prep: revision 1.13
distrib/notes/sparc/install: revision 1.58
distrib/notes/common/main: revision 1.512
share/man/man8/man8.macppc/ofwboot.8: revision 1.13
Update path to release ISOs.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.109.2.1 src/BUILDING
cvs rdiff -u -r1.309 -r1.309.2.1 src/Makefile
cvs rdiff -u -r1.294.2.2 -r1.294.2.3 src/build.sh
cvs rdiff -u -r1.2 -r1.2.26.1 src/distrib/notes/arc/prep
cvs rdiff -u -r1.11 -r1.11.26.1 src/distrib/notes/cats/prep
cvs rdiff -u -r1.510 -r1.510.4.1 src/distrib/notes/common/main
cvs rdiff -u -r1.15 -r1.15.20.1 src/distrib/notes/macppc/prep.OPENFIRMWARE
cvs rdiff -u -r1.57 -r1.57.20.1 src/distrib/notes/sparc/install
cvs rdiff -u -r1.104 -r1.104.2.1 src/doc/BUILDING.mdoc
cvs rdiff -u -r1.12 -r1.12.10.1 src/share/man/man8/man8.macppc/ofwboot.8

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

Modified files:

Index: src/BUILDING
diff -u src/BUILDING:1.109 src/BUILDING:1.109.2.1
--- src/BUILDING:1.109	Thu Aug  7 21:46:43 2014
+++ src/BUILDING	Fri Nov 14 14:58:27 2014
@@ -632,8 +632,8 @@ BUILDING
set (see above).
 
  iso-image Create a NetBSD installation CD-ROM image in the
-   RELEASEDIR/iso directory.  The CD-ROM file system will have
-   a layout as described in release(7).
+   RELEASEDIR/images directory.  The CD-ROM file system will
+   have a layout as described in release(7).
 
For most machine types, the CD-ROM will be bootable, and
will automatically run the sysinst(8) menu-based
@@ -649,8 +649,8 @@ BUILDING
the RELEASEDIR/RELEASEMACHINEDIR/installation/cdrom
directory by ``make release''.  These smaller images
usually contain the same tools as the larger images in
-   RELEASEDIR/iso, but do not contain additional content such
-   as the distribution sets.
+   RELEASEDIR/images, but do not contain additional content
+   such as the distribution sets.
 
Note that the mac68k port still uses an older method of
creating CD-ROM images.  This requires the mkisofs(1)
@@ -659,8 +659,8 @@ BUILDING
 
  iso-image-source
Create a NetBSD installation CD-ROM image in the
-   RELEASEDIR/iso directory.  The CD-ROM file system will have
-   a layout as described in release(7).  It will have top
+   RELEASEDIR/images directory.  The CD-ROM file system will
+   have a layout as described in release(7).  It will have top
level directories for the machine type and source.
 
For most machine types, the CD-ROM will be bootable, and
@@ -678,8 +678,8 @@ BUILDING
the RELEASEDIR/RELEASEMACHINEDIR/installation/cdrom
directory by ``make release''.  These smaller images
usually contain the same tools as the larger images in
-   RELEASEDIR/iso, but do not contain additional content such
-   as the distribution sets.
+   RELEASEDIR/images, but do not contain additional content
+   such as the distribution sets.
 
Note that the mac68k port still uses an older method of
creating CD-ROM images.  This requires the mkisofs(1)

Index: src/Makefile
diff -u src/Makefile:1.309 src/Makefile:1.309.2.1
--- src/Makefile:1.309	Mon Jun 16 09:06:26 2014
+++ src/Makefile	Fri Nov 14 14:58:27 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.309 2014/06/16 09:06:26 apb Exp $
+#	$NetBSD: Makefile,v 1.309.2.1 2014/11/14 14:58:27 martin Exp $
 
 #
 # This is the top-level makefile for building NetBSD. For an outline of
@@ -64,11 

CVS commit: [netbsd-7] src/external/gpl3/gcc/lib/libgcc/libgcc

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 15:01:02 UTC 2014

Modified Files:
src/external/gpl3/gcc/lib/libgcc/libgcc [netbsd-7]: Makefile

Log Message:
Pull up following revision(s) (requested by skrll in ticket #229):
external/gpl3/gcc/lib/libgcc/libgcc/Makefile: revision 1.23
Avoid using ld -x.  Instead use ${OBJCOPY} ${OBJCOPYLIBFLAGS} to strip
local symbols.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.22.2.1 \
src/external/gpl3/gcc/lib/libgcc/libgcc/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/gpl3/gcc/lib/libgcc/libgcc/Makefile
diff -u src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.22 src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.22.2.1
--- src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.22	Sun Jun  1 19:51:01 2014
+++ src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile	Fri Nov 14 15:01:02 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.22 2014/06/01 19:51:01 mrg Exp $
+#	$NetBSD: Makefile,v 1.22.2.1 2014/11/14 15:01:02 martin Exp $
 
 REQUIRETOOLS=	yes
 NOLINT=		# defined
@@ -50,11 +50,12 @@ CLEANFILES+=	${SOBJS:=.tmp1} ${SOBJS:=.t
 	${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}.tmp1
 	${NM} -pg ${.TARGET}.tmp1 | \
 	${TOOL_AWK} 'NF == 3 { print \t.hidden, $$3 }' | \
-	${CC} ${COPTS} -Wl,-x -r -nostdinc -nostdlib ${CPUFLAGS} -o ${.TARGET}.tmp2 ${.TARGET}.tmp1 -xassembler -
+	${CC} ${COPTS} -r -nostdinc -nostdlib ${CPUFLAGS} -o ${.TARGET}.tmp2 ${.TARGET}.tmp1 -xassembler -
+	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}.tmp2
 .if defined(COPTS)  !empty(COPTS:M*-g*)
 	mv ${.TARGET}.tmp2 ${.TARGET}
 .else
-	${LD} -x -r ${.TARGET}.tmp2 -o ${.TARGET}
+	${LD} -r ${.TARGET}.tmp2 -o ${.TARGET}
 	rm -f ${.TARGET}.tmp2
 .endif
 	rm -f ${.TARGET}.tmp1
@@ -64,11 +65,12 @@ CLEANFILES+=	${SOBJS:=.tmp1} ${SOBJS:=.t
 	${COMPILE.S} ${PICFLAGS} ${CFLAGS:M-[ID]*} ${.IMPSRC} -o ${.TARGET}.tmp1
 	${NM} -pg ${.TARGET}.tmp1 | \
 	${TOOL_AWK} 'NF == 3 { print \t.hidden, $$3 }' | \
-	${CC} ${COPTS} -Wl,-x -r -nostdinc -nostdlib -o ${.TARGET}.tmp2 ${.TARGET}.tmp1 -xassembler -
+	${CC} ${COPTS} -r -nostdinc -nostdlib -o ${.TARGET}.tmp2 ${.TARGET}.tmp1 -xassembler -
+	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}.tmp2
 .if defined(COPTS)  !empty(COPTS:M*-g*)
 	mv ${.TARGET}.tmp2 ${.TARGET}
 .else
-	${LD} -x -r ${.TARGET}.tmp2 -o ${.TARGET}
+	${LD} -r ${.TARGET}.tmp2 -o ${.TARGET}
 	rm -f ${.TARGET}.tmp2
 .endif
 	rm -f ${.TARGET}.tmp1



CVS commit: [netbsd-7] src/lib/libperfuse

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 15:06:36 UTC 2014

Modified Files:
src/lib/libperfuse [netbsd-7]: ops.c

Log Message:
Pull up following revision(s) (requested by manu in ticket #231):
lib/libperfuse/ops.c: revision 1.81
Allow setxattr to be called with a NULL value, instead of crashing.


To generate a diff of this commit:
cvs rdiff -u -r1.66.2.12 -r1.66.2.13 src/lib/libperfuse/ops.c

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

Modified files:

Index: src/lib/libperfuse/ops.c
diff -u src/lib/libperfuse/ops.c:1.66.2.12 src/lib/libperfuse/ops.c:1.66.2.13
--- src/lib/libperfuse/ops.c:1.66.2.12	Sun Nov  9 10:06:34 2014
+++ src/lib/libperfuse/ops.c	Fri Nov 14 15:06:36 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: ops.c,v 1.66.2.12 2014/11/09 10:06:34 msaitoh Exp $ */
+/*  $NetBSD: ops.c,v 1.66.2.13 2014/11/14 15:06:36 martin Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -3460,6 +3460,7 @@ perfuse_node_setextattr(struct puffs_use
 	perfuse_msg_t *pm;
 	struct fuse_setxattr_in *fsi;
 	size_t attrnamelen;
+	size_t datalen;
 	size_t len;
 	char *np;
 	int error;
@@ -3472,23 +3473,27 @@ perfuse_node_setextattr(struct puffs_use
 	ps = puffs_getspecific(pu);
 	attrname = perfuse_native_ns(attrns, attrname, fuse_attrname);
 	attrnamelen = strlen(attrname) + 1;
-	len = sizeof(*fsi) + attrnamelen + *resid;
+
+	datalen = (resid != NULL) ? *resid : 0;
+	len = sizeof(*fsi) + attrnamelen + datalen;
 
 	pm = ps-ps_new_msg(pu, opc, FUSE_SETXATTR, len, pcr);
 	fsi = GET_INPAYLOAD(ps, pm, fuse_setxattr_in);
-	fsi-size = (unsigned int)*resid;
+	fsi-size = (unsigned int)datalen;
 	fsi-flags = 0;
 	np = (char *)(void *)(fsi + 1);
 	(void)strlcpy(np, attrname, attrnamelen);
 	np += attrnamelen;
-	(void)memcpy(np, (char *)attr, *resid);
+	if (datalen)
+		(void)memcpy(np, (char *)attr, datalen);
 
 	if ((error = xchg_msg(pu, opc, pm, 
 			  NO_PAYLOAD_REPLY_LEN, wait_reply)) != 0)
 		goto out;
 
 	ps-ps_destroy_msg(pm);
-	*resid = 0;
+	if (resid)
+		*resid = 0;
 	error = 0;
 
 out:



CVS commit: [netbsd-7] src/sys/arch

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 15:16:19 UTC 2014

Modified Files:
src/sys/arch/acorn26/conf [netbsd-7]: GENERIC
src/sys/arch/acorn32/conf [netbsd-7]: GENERIC
src/sys/arch/alpha/conf [netbsd-7]: GENERIC
src/sys/arch/amd64/conf [netbsd-7]: GENERIC XEN3_DOM0 XEN3_DOMU
src/sys/arch/amiga/conf [netbsd-7]: GENERIC GENERIC.in
src/sys/arch/amigappc/conf [netbsd-7]: GENERIC
src/sys/arch/arc/conf [netbsd-7]: GENERIC
src/sys/arch/bebox/conf [netbsd-7]: GENERIC
src/sys/arch/cats/conf [netbsd-7]: GENERIC
src/sys/arch/cesfic/conf [netbsd-7]: GENERIC
src/sys/arch/cobalt/conf [netbsd-7]: GENERIC
src/sys/arch/dreamcast/conf [netbsd-7]: GENERIC
src/sys/arch/emips/conf [netbsd-7]: GENERIC
src/sys/arch/epoc32/conf [netbsd-7]: GENERIC
src/sys/arch/ews4800mips/conf [netbsd-7]: GENERIC
src/sys/arch/hp300/conf [netbsd-7]: GENERIC
src/sys/arch/hpcmips/conf [netbsd-7]: GENERIC
src/sys/arch/hpcsh/conf [netbsd-7]: GENERIC
src/sys/arch/hppa/conf [netbsd-7]: GENERIC
src/sys/arch/i386/conf [netbsd-7]: GENERIC XEN3_DOM0 XEN3_DOMU
src/sys/arch/ibmnws/conf [netbsd-7]: GENERIC
src/sys/arch/iyonix/conf [netbsd-7]: GENERIC
src/sys/arch/landisk/conf [netbsd-7]: GENERIC
src/sys/arch/luna68k/conf [netbsd-7]: GENERIC
src/sys/arch/mac68k/conf [netbsd-7]: GENERIC
src/sys/arch/macppc/conf [netbsd-7]: GENERIC MAMBO POWERMAC_G5
src/sys/arch/mipsco/conf [netbsd-7]: GENERIC
src/sys/arch/mmeye/conf [netbsd-7]: GENERIC
src/sys/arch/mvme68k/conf [netbsd-7]: GENERIC
src/sys/arch/mvmeppc/conf [netbsd-7]: GENERIC
src/sys/arch/netwinder/conf [netbsd-7]: GENERIC
src/sys/arch/news68k/conf [netbsd-7]: GENERIC
src/sys/arch/newsmips/conf [netbsd-7]: GENERIC
src/sys/arch/next68k/conf [netbsd-7]: GENERIC
src/sys/arch/ofppc/conf [netbsd-7]: GENERIC
src/sys/arch/pmax/conf [netbsd-7]: GENERIC GENERIC64
src/sys/arch/prep/conf [netbsd-7]: GENERIC
src/sys/arch/rs6000/conf [netbsd-7]: GENERIC
src/sys/arch/sandpoint/conf [netbsd-7]: GENERIC
src/sys/arch/sbmips/conf [netbsd-7]: GENERIC
src/sys/arch/sgimips/conf [netbsd-7]: GENERIC32_IP12 GENERIC32_IP2x
GENERIC32_IP3x
src/sys/arch/shark/conf [netbsd-7]: GENERIC
src/sys/arch/sparc/conf [netbsd-7]: GENERIC TADPOLE3GX
src/sys/arch/sparc64/conf [netbsd-7]: GENERIC NONPLUS64
src/sys/arch/sun2/conf [netbsd-7]: GENERIC
src/sys/arch/sun3/conf [netbsd-7]: GENERIC
src/sys/arch/vax/conf [netbsd-7]: GENERIC VAX780
src/sys/arch/x68k/conf [netbsd-7]: GENERIC
src/sys/arch/zaurus/conf [netbsd-7]: GENERIC

Log Message:
Pull up following revision(s) (requested by manu in ticket #232):
sys/arch/next68k/conf/GENERIC: revision 1.138
sys/arch/cobalt/conf/GENERIC: revision 1.146
sys/arch/mvme68k/conf/GENERIC: revision 1.93
sys/arch/vax/conf/VAX780: revision 1.18
sys/arch/newsmips/conf/GENERIC: revision 1.128
sys/arch/luna68k/conf/GENERIC: revision 1.118
sys/arch/sbmips/conf/GENERIC: revision 1.100
sys/arch/pmax/conf/GENERIC: revision 1.184
sys/arch/alpha/conf/GENERIC: revision 1.361
sys/arch/sparc64/conf/GENERIC: revision 1.176
sys/arch/sun3/conf/GENERIC: revision 1.170
sys/arch/shark/conf/GENERIC: revision 1.120
sys/arch/landisk/conf/GENERIC: revision 1.44
sys/arch/bebox/conf/GENERIC: revision 1.144
sys/arch/sparc64/conf/NONPLUS64: revision 1.43
sys/arch/sandpoint/conf/GENERIC: revision 1.87
sys/arch/emips/conf/GENERIC: revision 1.14
sys/arch/amd64/conf/XEN3_DOM0: revision 1.111
sys/arch/dreamcast/conf/GENERIC: revision 1.120
sys/arch/cesfic/conf/GENERIC: revision 1.64
sys/arch/mmeye/conf/GENERIC: revision 1.119
sys/arch/epoc32/conf/GENERIC: revision 1.7
sys/arch/x68k/conf/GENERIC: revision 1.178
sys/arch/iyonix/conf/GENERIC: revision 1.87
sys/arch/sun2/conf/GENERIC: revision 1.93
sys/arch/ews4800mips/conf/GENERIC: revision 1.50
sys/arch/amd64/conf/XEN3_DOMU: revision 1.59
sys/arch/acorn26/conf/GENERIC: revision 1.80
sys/arch/acorn32/conf/GENERIC: revision 1.115
sys/arch/macppc/conf/POWERMAC_G5: revision 1.24
sys/arch/i386/conf/GENERIC: revision 1.1117
sys/arch/arc/conf/GENERIC: revision 1.183
sys/arch/cats/conf/GENERIC: revision 1.154
sys/arch/amiga/conf/GENERIC.in: revision 1.128
sys/arch/zaurus/conf/GENERIC: revision 1.64
sys/arch/netwinder/conf/GENERIC: revision 1.125
sys/arch/hppa/conf/GENERIC: revision 1.5
sys/arch/mvmeppc/conf/GENERIC: revision 1.23
sys/arch/macppc/conf/GENERIC: revision 1.319
   

CVS commit: [netbsd-7] src/doc

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 15:22:40 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Tickets #230, #210, #214, #219, #224, #226, #227, #229, #231, #232


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.97 -r1.1.2.98 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.97 src/doc/CHANGES-7.0:1.1.2.98
--- src/doc/CHANGES-7.0:1.1.2.97	Fri Nov 14 08:17:38 2014
+++ src/doc/CHANGES-7.0	Fri Nov 14 15:22:40 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.97 2014/11/14 08:17:38 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.98 2014/11/14 15:22:40 martin Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -2446,3 +2446,172 @@ sys/arch/arm/arm32/kobj_machdep.c		1.10
 	Avoids a kernel crash when loading modules.
 	[martin, ticket #228]
 
+etc/etc.evbarm/Makefile.inc			1.65-1.66
+sys/arch/evbarm/conf/HUMMINGBIRD_A31		1.1-1.15
+sys/arch/evbarm/conf/HUMMINGBIRD_A31_INSTALL	1.1-1.3
+sys/dev/i2c/axp22x.c1.1
+sys/dev/i2c/files.i2c1.57
+
+	Add Merrii Hummingbird A31 board kernels.
+	Add AXP22x Power Management Unit driver.
+	[skrll, ticket #230]
+
+sys/arch/arm/allwinner/awin_board.c		1.26-1.27
+sys/arch/arm/allwinner/awin_debe.c		1.1-1.6
+sys/arch/arm/allwinner/awin_fb.c		1.1-1.4
+sys/arch/arm/allwinner/awin_hdmi.c		1.3-1.6,1.9,1.11-1.12
+sys/arch/arm/allwinner/awin_io.c		1.27
+sys/arch/arm/allwinner/awin_reg.h		1.46-1.47,1.49
+sys/arch/arm/allwinner/awin_tcon.c		1.1-1.5
+sys/arch/arm/allwinner/awin_var.h		1.20-1.22
+sys/arch/arm/allwinner/files.awin		1.22-1.23,1.25
+sys/arch/evbarm/awin/awin_machdep.c		1.26
+sys/arch/evbarm/conf/BPI			1.10
+sys/arch/evbarm/conf/CUBIEBOARD			1.32
+sys/arch/evbarm/conf/HUMMINGBIRD_A31		1.17-1.18
+sys/dev/wscons/wsconsio.h			1.109
+
+	HDMI framebuffer for Allwinner boards.
+	[jmcneill, ticket #210]
+
+sys/arch/arm/allwinner/awin_board.c		1.28
+sys/arch/arm/allwinner/awin_dma_a10.c		1.3
+sys/arch/arm/allwinner/awin_hdmi.c		1.7-1.8,1.10
+sys/arch/arm/allwinner/awin_hdmiaudio.c		1.1-1.3
+sys/arch/arm/allwinner/awin_io.c		1.28
+sys/arch/arm/allwinner/awin_reg.h		1.48
+sys/arch/arm/allwinner/files.awin		1.24
+sys/arch/evbarm/conf/BPI			1.11
+sys/arch/evbarm/conf/CUBIEBOARD			1.34
+sys/arch/evbarm/conf/HUMMINGBIRD_A31		1.19
+
+	HDMI audio driver for Allwinner boards.
+	[jmcneill, ticket #214]
+
+build.sh	1.301 (via patch)
+
+	Replace '.' and '-' in ${op} with '_', before setting d_${op}=true.
+
+	Also remove or simplify older code that did the same thing in a
+	different way.  The old code handled most cases, but did not change
+	op=kernel.gdb to op=kernel_gdb.
+	[apb, ticket #219]
+
+sys/external/bsd/drm2/dist/drm/i915/i915_gem_tiling.c 1.4
+sys/external/bsd/drm2/dist/drm/i915/intel_display.c 1.13
+sys/external/bsd/drm2/dist/drm/i915/intel_dp.c	1.9
+sys/external/bsd/drm2/dist/drm/i915/intel_overlay.c 1.6
+sys/external/bsd/drm2/dist/drm/i915/intel_tv.c	1.6
+sys/external/bsd/drm2/dist/drm/radeon/atombios_dp.c 1.4
+sys/external/bsd/drm2/dist/drm/radeon/ci_dpm.c	1.3-1.4
+sys/external/bsd/drm2/dist/drm/radeon/evergreen_cs.c 1.3-1.4
+sys/external/bsd/drm2/dist/drm/radeon/kv_dpm.c	1.3-1.4
+sys/external/bsd/drm2/dist/drm/radeon/r100.c	1.3
+sys/external/bsd/drm2/dist/drm/radeon/radeon_drv.c 1.5
+sys/external/bsd/drm2/dist/drm/radeon/rv770_dpm.c 1.3
+sys/external/bsd/drm2/dist/drm/radeon/si_dpm.c	1.3
+sys/external/bsd/drm2/dist/drm/radeon/sumo_dpm.c 1.3
+sys/external/bsd/drm2/dist/drm/radeon/trinity_dpm.c 1.3
+sys/external/bsd/drm2/ttm/ttm_bo_vm.c		1.8
+
+	Code cleanup and minor bugfixes for drm2.
+	[snj, ticket #224]
+
+share/man/man7/release.7			1.35-1.36
+
+	Fix cksum syntax, CDROM - CD-ROM, give a specific example of a
+	kernel set rather than kern.tgz, add dd(1) xref for usb images.
+	[snj, ticket #226]
+
+BUILDING	1.110
+Makefile	1.311
+build.sh	1.299
+distrib/notes/arc/prep1.3-1.4
+distrib/notes/cats/prep1.12-1.13
+distrib/notes/common/main			1.512
+distrib/notes/macppc/prep.OPENFIRMWARE		1.16-1.17
+distrib/notes/sparc/install			1.58
+doc/BUILDING.mdoc1.105
+share/man/man8/man8.macppc/ofwboot.8		1.13
+
+	Update path to release ISOs.
+	[snj, ticket #227]
+
+external/gpl3/gcc/lib/libgcc/libgcc/Makefile	1.23
+
+	Avoid using ld -x.  Instead use ${OBJCOPY} ${OBJCOPYLIBFLAGS} to strip
+	local symbols.
+	[skrll, ticket #229]
+
+lib/libperfuse/ops.c1.81
+
+	Allow setxattr to be called with a NULL value, instead of crashing.
+	[manu, ticket #231]
+
+sys/arch/acorn26/conf/GENERIC			1.80
+sys/arch/acorn32/conf/GENERIC			1.115
+sys/arch/alpha/conf/GENERIC			1.361
+sys/arch/amd64/conf/GENERIC			1.403
+sys/arch/amd64/conf/XEN3_DOM0			1.111
+sys/arch/amd64/conf/XEN3_DOMU			1.59
+sys/arch/amiga/conf/GENERIC			1.310
+sys/arch/amiga/conf/GENERIC.in			1.128

CVS commit: [netbsd-7] src/sbin/fsck_msdos

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 15:49:16 UTC 2014

Modified Files:
src/sbin/fsck_msdos [netbsd-7]: boot.c dosfs.h

Log Message:
Pull up following revision(s) (requested by jakllsch in ticket #234):
sbin/fsck_msdos/boot.c: revision 1.18
sbin/fsck_msdos/dosfs.h: revision 1.7
sbin/fsck_msdos/boot.c: revision 1.17
ClusterOffset actually needs to be able to be negative.
 Add #include inttypes.h for intmax_t to fix compile error.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.2.1 src/sbin/fsck_msdos/boot.c
cvs rdiff -u -r1.6 -r1.6.38.1 src/sbin/fsck_msdos/dosfs.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_msdos/boot.c
diff -u src/sbin/fsck_msdos/boot.c:1.16 src/sbin/fsck_msdos/boot.c:1.16.2.1
--- src/sbin/fsck_msdos/boot.c:1.16	Mon Jul  7 19:04:37 2014
+++ src/sbin/fsck_msdos/boot.c	Fri Nov 14 15:49:16 2014
@@ -27,12 +27,13 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: boot.c,v 1.16 2014/07/07 19:04:37 christos Exp $);
+__RCSID($NetBSD: boot.c,v 1.16.2.1 2014/11/14 15:49:16 martin Exp $);
 #endif /* not lint */
 
 #include stdlib.h
 #include string.h
 #include strings.h
+#include inttypes.h
 #include stdio.h
 #include unistd.h
 
@@ -184,7 +185,7 @@ readboot(int dosfs, struct bootblock *bo
 		return FSFATAL;
 	}
 
-	boot-ClusterOffset = (boot-RootDirEnts * 32 + boot-BytesPerSec - 1)
+	boot-ClusterOffset = (int)(boot-RootDirEnts * 32 + boot-BytesPerSec - 1)
 	/ boot-BytesPerSec
 	+ boot-ResSectors
 	+ boot-FATs * boot-FATsecs
@@ -205,8 +206,8 @@ readboot(int dosfs, struct bootblock *bo
 		boot-NumSectors = boot-HugeSectors;
 	boot-NumClusters = (boot-NumSectors - boot-ClusterOffset) / boot-SecPerClust;
 
-	if (boot-ClusterOffset  boot-NumSectors) {
-		pfatal(Cluster offset too large (%u clusters)\n,
+	if (boot-ClusterOffset  (intmax_t)boot-NumSectors) {
+		pfatal(Cluster offset too large (%d sectors)\n,
 		boot-ClusterOffset);
 		return FSFATAL;
 	}

Index: src/sbin/fsck_msdos/dosfs.h
diff -u src/sbin/fsck_msdos/dosfs.h:1.6 src/sbin/fsck_msdos/dosfs.h:1.6.38.1
--- src/sbin/fsck_msdos/dosfs.h:1.6	Fri Jun 13 20:46:09 2008
+++ src/sbin/fsck_msdos/dosfs.h	Fri Nov 14 15:49:16 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dosfs.h,v 1.6 2008/06/13 20:46:09 martin Exp $	*/
+/*	$NetBSD: dosfs.h,v 1.6.38.1 2014/11/14 15:49:16 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997 Wolfgang Solfrank
@@ -70,7 +70,7 @@ struct bootblock {
 	u_int32_t NumSectors;		/* how many sectors are there */
 	u_int32_t FATsecs;		/* how many sectors are in FAT */
 	u_int32_t NumFatEntries;	/* how many entries really are there */
-	u_int	ClusterOffset;		/* at what sector would sector 0 start */
+	int	ClusterOffset;		/* at what sector would sector 0 start */
 	u_int	ClusterSize;		/* Cluster size in bytes */
 
 	/* Now some statistics: */



CVS commit: [netbsd-7] src/sys/arch/evbarm/conf

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 15:51:20 UTC 2014

Modified Files:
src/sys/arch/evbarm/conf [netbsd-7]: RPI

Log Message:
Pull up following revision(s) (requested by jakllsch in ticket #235):
sys/arch/evbarm/conf/RPI: revision 1.55
enable NFS root FS support in RPI


To generate a diff of this commit:
cvs rdiff -u -r1.46.2.3 -r1.46.2.4 src/sys/arch/evbarm/conf/RPI

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/RPI
diff -u src/sys/arch/evbarm/conf/RPI:1.46.2.3 src/sys/arch/evbarm/conf/RPI:1.46.2.4
--- src/sys/arch/evbarm/conf/RPI:1.46.2.3	Fri Oct  3 18:53:56 2014
+++ src/sys/arch/evbarm/conf/RPI	Fri Nov 14 15:51:20 2014
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: RPI,v 1.46.2.3 2014/10/03 18:53:56 martin Exp $
+#	$NetBSD: RPI,v 1.46.2.4 2014/11/14 15:51:20 martin Exp $
 #
 #	RPi -- Raspberry Pi
 #
@@ -70,8 +70,8 @@ options 	INET6		# IPV6
 #options 	PPP_FILTER	# Active filter support for PPP (requires bpf)
 #options 	TCP_DEBUG	# Record last TCP_NDEBUG packets with SO_DEBUG
 
-#options 	NFS_BOOT_BOOTP
-#options 	NFS_BOOT_DHCP
+options 	NFS_BOOT_BOOTP
+options 	NFS_BOOT_DHCP
 #options		NFS_BOOT_BOOTSTATIC
 #options		NFS_BOOTSTATIC_MYIP=\192.168.1.4\
 #options		NFS_BOOTSTATIC_GWIP=\192.168.1.1\
@@ -259,7 +259,7 @@ spi* at spibus?
 
 # PIFace or other boards using that chip (needs gpio)
 #mcp23s17gpio0 at spi? slave 0 flags 0
-#mcp23s17gpio1 at spi? slave 0 flags 1 
+#mcp23s17gpio1 at spi? slave 0 flags 1
 #mcp23s17gpio2 at spi? slave 0 flags 2
 #mcp23s17gpio3 at spi? slave 0 flags 3
 



CVS commit: [netbsd-7] src/doc

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 15:52:27 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Tickets #234 and #235


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.98 -r1.1.2.99 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.98 src/doc/CHANGES-7.0:1.1.2.99
--- src/doc/CHANGES-7.0:1.1.2.98	Fri Nov 14 15:22:40 2014
+++ src/doc/CHANGES-7.0	Fri Nov 14 15:52:27 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.98 2014/11/14 15:22:40 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.99 2014/11/14 15:52:27 martin Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -2615,3 +2615,14 @@ sys/arch/zaurus/conf/GENERIC			1.64
 	kernels.
 	[manu, ticket #232]
 
+sbin/fsck_msdos/boot.c1.17-1.18
+sbin/fsck_msdos/dosfs.h1.7
+
+	ClusterOffset actually needs to be able to be negative.
+	[jakllsch, ticket #234]
+
+sys/arch/evbarm/conf/RPI			1.55
+
+	Enable NFS root FS support in RPI.
+	[jakllsch, ticket #235]
+



CVS commit: src/external/bsd/llvm

2014-11-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Nov 14 15:56:12 UTC 2014

Modified Files:
src/external/bsd/llvm: Makefile.inc
src/external/bsd/llvm/include: Makefile

Log Message:
LLVM switched to three component point release version, so follow here.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/external/bsd/llvm/Makefile.inc
cvs rdiff -u -r1.33 -r1.34 src/external/bsd/llvm/include/Makefile

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

Modified files:

Index: src/external/bsd/llvm/Makefile.inc
diff -u src/external/bsd/llvm/Makefile.inc:1.74 src/external/bsd/llvm/Makefile.inc:1.75
--- src/external/bsd/llvm/Makefile.inc:1.74	Sun Aug 10 17:34:19 2014
+++ src/external/bsd/llvm/Makefile.inc	Fri Nov 14 15:56:12 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.74 2014/08/10 17:34:19 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.75 2014/11/14 15:56:12 joerg Exp $
 
 .if !defined(LLVM_TOPLEVEL_MK)
 LLVM_TOPLEVEL_MK=
@@ -17,8 +17,9 @@ LLVM_REVISION=		${COMMON_REVISION}
 MCLINKER_REVISION=	deeb2a77b4165827316f88e0a7ba4ba6b743a080
 MCLINKER_ROOT=		https://code.google.com/p/mclinker/
 
-LLVM_VERSION=		3.6
-CLANG_VERSION=		3.6
+LLVM_VERSION=		3.6.0
+CLANG_VERSION=		3.6.0
+LLD_VERSION=		3.6.0
 
 CLANG_SRCDIR:=	${.PARSEDIR}/dist/clang
 LLD_SRCDIR:=	${.PARSEDIR}/dist/lld
@@ -63,7 +64,7 @@ LLVM_PLATFORM=${MACHINE_GNU_ARCH}--netbs
 
 LLVM_CONFIGURE_ARGS=	\
 	--enable-targets=x86,powerpc,sparc,aarch64,arm,mips \
-	--with-c-include-dirs=/usr/include/clang-${CLANG_VERSION}:/usr/include \
+	--with-c-include-dirs=/usr/include/clang-${CLANG_VERSION:R}:/usr/include \
 	--disable-timestamps --prefix=/usr --sysconfdir=/etc/llvm \
 	--with-clang-srcdir=${CLANG_SRCDIR} \
 	--host=${LLVM_PLATFORM} --disable-compiler-version-checks \

Index: src/external/bsd/llvm/include/Makefile
diff -u src/external/bsd/llvm/include/Makefile:1.33 src/external/bsd/llvm/include/Makefile:1.34
--- src/external/bsd/llvm/include/Makefile:1.33	Sat Sep  6 01:02:21 2014
+++ src/external/bsd/llvm/include/Makefile	Fri Nov 14 15:56:12 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.33 2014/09/06 01:02:21 joerg Exp $
+#	$NetBSD: Makefile,v 1.34 2014/11/14 15:56:12 joerg Exp $
 
 .include bsd.init.mk
 
@@ -43,17 +43,7 @@ INCS=	altivec.h
 .elif ${MACHINE_CPU} == arm
 INCS=	arm_acle.h
 .endif
-INCSDIR=	/usr/include/clang-${CLANG_VERSION}
-
-HEADER=	\
-  float.h \
-  iso646.h \
-  limits.h \
-  stdarg.h \
-  stdbool.h \
-  stddef.h \
-  stdint.h \
-  tgmath.h
+INCSDIR=	/usr/include/clang-${CLANG_VERSION:R}
 
 .PATH:	${LLVM_SRCDIR}/include/llvm/IR \
 	${CLANG_SRCDIR}/include/clang/AST \
@@ -137,8 +127,8 @@ CLEANFILES+=	clang/Basic/Version.inc
 clang/Basic/Version.inc: ${LLVM_TOPLEVEL}/Makefile.inc
 	mkdir -p ${.TARGET:H}
 	printf '#define CLANG_VERSION ${CLANG_VERSION}\n'  ${.TARGET}.tmp
-	printf '#define CLANG_VERSION_MAJOR ${CLANG_VERSION:C,\.[0-9]*,,}\n'  ${.TARGET}.tmp
-	printf '#define CLANG_VERSION_MINOR ${CLANG_VERSION:C,[0-9]*\.,,}\n'  ${.TARGET}.tmp
+	printf '#define CLANG_VERSION_MAJOR ${CLANG_VERSION:R:R}\n'  ${.TARGET}.tmp
+	printf '#define CLANG_VERSION_MINOR ${CLANG_VERSION:R:E}\n'  ${.TARGET}.tmp
 	mv ${.TARGET}.tmp ${.TARGET}
 
 .ifndef HOST_BUILD
@@ -154,8 +144,8 @@ llvm/Config/config.h: ${LLVM_TOPLEVEL}/M
 	 ${.TARGET}.tmp
 	printf '#define LLVM_DEFAULT_TARGET_TRIPLE ${MACHINE_GNU_PLATFORM}\n'  ${.TARGET}.tmp
 	printf '#define PACKAGE_VERSION ${LLVM_VERSION} (trunk ${LLVM_REVISION})\n'  ${.TARGET}.tmp
-	printf '#define LLVM_VERSION_MAJOR ${LLVM_VERSION:C,\.[0-9]*,,}\n'  ${.TARGET}.tmp
-	printf '#define LLVM_VERSION_MINOR ${LLVM_VERSION:C,[0-9]*\.,,}\n'  ${.TARGET}.tmp
+	printf '#define LLVM_VERSION_MAJOR ${LLVM_VERSION:R:R}\n'  ${.TARGET}.tmp
+	printf '#define LLVM_VERSION_MINOR ${LLVM_VERSION:R:E}\n'  ${.TARGET}.tmp
 	printf '#endif\n'  ${.TARGET}.tmp
 	mv ${.TARGET}.tmp ${.TARGET}
 
@@ -166,8 +156,8 @@ llvm/Config/llvm-config.h: ${LLVM_TOPLEV
 	 ${LLVM_TOPLEVEL}/config/llvm/Config/llvm-config.h.in \
 	 ${.TARGET}.tmp
 	printf '#define LLVM_DEFAULT_TARGET_TRIPLE ${MACHINE_GNU_PLATFORM}\n'  ${.TARGET}.tmp
-	printf '#define LLVM_VERSION_MAJOR ${LLVM_VERSION:C,\.[0-9]*,,}\n'  ${.TARGET}.tmp
-	printf '#define LLVM_VERSION_MINOR ${LLVM_VERSION:C,[0-9]*\.,,}\n'  ${.TARGET}.tmp
+	printf '#define LLVM_VERSION_MAJOR ${LLVM_VERSION:R:R}\n'  ${.TARGET}.tmp
+	printf '#define LLVM_VERSION_MINOR ${LLVM_VERSION:R:E}\n'  ${.TARGET}.tmp
 	printf '#endif\n'  ${.TARGET}.tmp
 	mv ${.TARGET}.tmp ${.TARGET}
 



CVS commit: src

2014-11-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Nov 14 15:59:46 UTC 2014

Modified Files:
src/distrib/sets/lists/comp: ad.arm md.amd64 md.i386
src/external/bsd/llvm/include: Makefile

Log Message:
Install cpuid.h on X86 and arm_neon.h on ARM.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/distrib/sets/lists/comp/ad.arm
cvs rdiff -u -r1.227 -r1.228 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.150 -r1.151 src/distrib/sets/lists/comp/md.i386
cvs rdiff -u -r1.34 -r1.35 src/external/bsd/llvm/include/Makefile

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

Modified files:

Index: src/distrib/sets/lists/comp/ad.arm
diff -u src/distrib/sets/lists/comp/ad.arm:1.64 src/distrib/sets/lists/comp/ad.arm:1.65
--- src/distrib/sets/lists/comp/ad.arm:1.64	Sat Oct 25 15:02:12 2014
+++ src/distrib/sets/lists/comp/ad.arm	Fri Nov 14 15:59:46 2014
@@ -1,4 +1,4 @@
-# $NetBSD: ad.arm,v 1.64 2014/10/25 15:02:12 joerg Exp $
+# $NetBSD: ad.arm,v 1.65 2014/11/14 15:59:46 joerg Exp $
 ./usr/include/acorn26comp-c-include
 ./usr/include/acorn26/ansi.h			comp-obsolete		obsolete
 ./usr/include/acorn26/aout_machdep.h		comp-obsolete		obsolete
@@ -295,6 +295,7 @@
 ./usr/include/cats/vmparam.h			comp-obsolete		obsolete
 ./usr/include/cats/wchar_limits.h		comp-obsolete		obsolete
 ./usr/include/clang-3.6/arm_acle.h		comp-c-include		llvm
+./usr/include/clang-3.6/arm_neon.h		comp-c-include		llvm
 ./usr/include/epoc32comp-c-include
 ./usr/include/epoc32/ansi.h			comp-obsolete		obsolete
 ./usr/include/epoc32/aout_machdep.h		comp-obsolete		obsolete

Index: src/distrib/sets/lists/comp/md.amd64
diff -u src/distrib/sets/lists/comp/md.amd64:1.227 src/distrib/sets/lists/comp/md.amd64:1.228
--- src/distrib/sets/lists/comp/md.amd64:1.227	Sat Oct 25 15:02:12 2014
+++ src/distrib/sets/lists/comp/md.amd64	Fri Nov 14 15:59:46 2014
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.227 2014/10/25 15:02:12 joerg Exp $
+# $NetBSD: md.amd64,v 1.228 2014/11/14 15:59:46 joerg Exp $
 
 ./usr/include/amd64comp-c-include
 ./usr/include/amd64/ansi.h			comp-c-include
@@ -140,6 +140,7 @@
 ./usr/include/clang-3.6/avxintrin.h		comp-c-include		llvm
 ./usr/include/clang-3.6/bmi2intrin.h		comp-c-include		llvm
 ./usr/include/clang-3.6/bmiintrin.h		comp-c-include		llvm
+./usr/include/clang-3.6/cpuid.h			comp-c-include		llvm
 ./usr/include/clang-3.6/emmintrin.h		comp-c-include		llvm
 ./usr/include/clang-3.6/f16cintrin.h		comp-c-include		llvm
 ./usr/include/clang-3.6/fma4intrin.h		comp-c-include		llvm

Index: src/distrib/sets/lists/comp/md.i386
diff -u src/distrib/sets/lists/comp/md.i386:1.150 src/distrib/sets/lists/comp/md.i386:1.151
--- src/distrib/sets/lists/comp/md.i386:1.150	Fri Aug 22 10:51:38 2014
+++ src/distrib/sets/lists/comp/md.i386	Fri Nov 14 15:59:46 2014
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.150 2014/08/22 10:51:38 apb Exp $
+# $NetBSD: md.i386,v 1.151 2014/11/14 15:59:46 joerg Exp $
 ./usr/include/clang-3.4/__wmmintrin_aes.h	comp-obsolete		obsolete
 ./usr/include/clang-3.4/__wmmintrin_pclmul.h	comp-obsolete		obsolete
 ./usr/include/clang-3.4/ammintrin.h		comp-obsolete		obsolete
@@ -69,6 +69,7 @@
 ./usr/include/clang-3.6/avxintrin.h		comp-c-include		llvm
 ./usr/include/clang-3.6/bmi2intrin.h		comp-c-include		llvm
 ./usr/include/clang-3.6/bmiintrin.h		comp-c-include		llvm
+./usr/include/clang-3.6/cpuid.h			comp-c-include		llvm
 ./usr/include/clang-3.6/emmintrin.h		comp-c-include		llvm
 ./usr/include/clang-3.6/f16cintrin.h		comp-c-include		llvm
 ./usr/include/clang-3.6/fma4intrin.h		comp-c-include		llvm

Index: src/external/bsd/llvm/include/Makefile
diff -u src/external/bsd/llvm/include/Makefile:1.34 src/external/bsd/llvm/include/Makefile:1.35
--- src/external/bsd/llvm/include/Makefile:1.34	Fri Nov 14 15:56:12 2014
+++ src/external/bsd/llvm/include/Makefile	Fri Nov 14 15:59:46 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.34 2014/11/14 15:56:12 joerg Exp $
+#	$NetBSD: Makefile,v 1.35 2014/11/14 15:59:46 joerg Exp $
 
 .include bsd.init.mk
 
@@ -14,6 +14,7 @@ INCS=	__wmmintrin_aes.h \
 	avxintrin.h \
 	bmi2intrin.h \
 	bmiintrin.h \
+	cpuid.h \
 	emmintrin.h \
 	f16cintrin.h \
 	fmaintrin.h \
@@ -41,7 +42,8 @@ INCS=	__wmmintrin_aes.h \
 .elif ${MACHINE_ARCH} == powerpc || ${MACHINE_ARCH} == powerpc64
 INCS=	altivec.h
 .elif ${MACHINE_CPU} == arm
-INCS=	arm_acle.h
+INCS=	arm_acle.h \
+	arm_neon.h
 .endif
 INCSDIR=	/usr/include/clang-${CLANG_VERSION:R}
 
@@ -113,7 +115,7 @@ CLANG_TABLEGEN_OUTPUT.Diagnostic.td= \
 
 CLANG_TABLEGEN_OUTPUT.arm_neon.td= \
 	clang/Basic/arm_neon.inc|-gen-arm-neon-sema \
-	arm_neon.h.inc|-gen-arm-neon
+	arm_neon.h|-gen-arm-neon
 
 TABLEGEN_INCLUDES.Options.td=	-I${CLANG_SRCDIR}/include/clang/Driver
 TABLEGEN_OUTPUT.Options.td= \



CVS commit: src/tests/usr.bin/ld

2014-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Nov 14 16:20:42 UTC 2014

Modified Files:
src/tests/usr.bin/ld: t_section.sh

Log Message:
Fix thinko in previous.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/ld/t_section.sh

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

Modified files:

Index: src/tests/usr.bin/ld/t_section.sh
diff -u src/tests/usr.bin/ld/t_section.sh:1.1 src/tests/usr.bin/ld/t_section.sh:1.2
--- src/tests/usr.bin/ld/t_section.sh:1.1	Fri Nov 14 13:30:48 2014
+++ src/tests/usr.bin/ld/t_section.sh	Fri Nov 14 16:20:42 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: t_section.sh,v 1.1 2014/11/14 13:30:48 uebayasi Exp $
+#	$NetBSD: t_section.sh,v 1.2 2014/11/14 16:20:42 uebayasi Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -36,13 +36,12 @@ startstop_body() {
 #include sys/cdefs.h
 int i __section(hoge);
 extern int __start_hoge[], __stop_hoge[];
-int main = __start_hoge[0] + __stop_hoge[0];
+int main(void) { return __start_hoge[0] + __stop_hoge[0]; }
 EOF
 	atf_check -s exit:0 -o ignore -e ignore cc -o test test.c
 }
 
 atf_init_test_cases()
 {
-
 	atf_add_test_case startstop
 }



CVS commit: src

2014-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Nov 14 16:21:13 UTC 2014

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/usr.bin/ld: Makefile
Added Files:
src/tests/usr.bin/ld: t_orphan.sh

Log Message:
Test orphan ELF section placement.


To generate a diff of this commit:
cvs rdiff -u -r1.598 -r1.599 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/ld/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/ld/t_orphan.sh

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.598 src/distrib/sets/lists/tests/mi:1.599
--- src/distrib/sets/lists/tests/mi:1.598	Fri Nov 14 13:30:48 2014
+++ src/distrib/sets/lists/tests/mi	Fri Nov 14 16:21:12 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.598 2014/11/14 13:30:48 uebayasi Exp $
+# $NetBSD: mi,v 1.599 2014/11/14 16:21:12 uebayasi Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -3466,6 +3466,7 @@
 ./usr/tests/usr.bin/ldtests-usr.bin-tests
 ./usr/tests/usr.bin/ld/Atffile			tests-usr.bin-tests	atf
 ./usr/tests/usr.bin/ld/Kyuafile			tests-usr.bin-tests	atf,kyua
+./usr/tests/usr.bin/ld/t_orphan			tests-usr.bin-tests	atf
 ./usr/tests/usr.bin/ld/t_script			tests-usr.bin-tests	atf
 ./usr/tests/usr.bin/ld/t_section		tests-usr.bin-tests	atf
 ./usr/tests/usr.bin/m4tests-usr.bin-tests

Index: src/tests/usr.bin/ld/Makefile
diff -u src/tests/usr.bin/ld/Makefile:1.2 src/tests/usr.bin/ld/Makefile:1.3
--- src/tests/usr.bin/ld/Makefile:1.2	Fri Nov 14 13:30:48 2014
+++ src/tests/usr.bin/ld/Makefile	Fri Nov 14 16:21:12 2014
@@ -1,10 +1,11 @@
-# $NetBSD: Makefile,v 1.2 2014/11/14 13:30:48 uebayasi Exp $
+# $NetBSD: Makefile,v 1.3 2014/11/14 16:21:12 uebayasi Exp $
 
 .include bsd.own.mk
 
 TESTSDIR=	${TESTSBASE}/usr.bin/ld
 
-TESTS_SH=	t_script \
+TESTS_SH=	t_orphan \
+		t_script \
 		t_section
 
 .include bsd.test.mk

Added files:

Index: src/tests/usr.bin/ld/t_orphan.sh
diff -u /dev/null src/tests/usr.bin/ld/t_orphan.sh:1.1
--- /dev/null	Fri Nov 14 16:21:13 2014
+++ src/tests/usr.bin/ld/t_orphan.sh	Fri Nov 14 16:21:12 2014
@@ -0,0 +1,77 @@
+#	$NetBSD: t_orphan.sh,v 1.1 2014/11/14 16:21:12 uebayasi Exp $
+#
+# Copyright (c) 2014 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE 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.
+#
+
+atf_test_case orphan
+orphan_head() {
+	atf_set descr check orphan section placement
+	atf_set require.progs cc readelf grep
+}
+
+orphan_body() {
+	cat  test.c  EOF
+#include sys/cdefs.h
+/* read-only orphan */
+const char a[] __section(hoge) = { 'h', 'o', 'g', 'e', '\0' };
+/* read-write orphan */
+char b[] __section(fuga) = fuga;
+/* .data */
+int c = 123;
+/* .bss */
+int d = 0;
+/* .text */
+int main(void) { return 0; }
+EOF
+	atf_check -s exit:0 -o ignore -e ignore cc -o test test.c
+	readelf -S test
+	readelf -S test |
+	grep ' \.text\| hoge\| \.data\| fuga\| \.bss' test.secs
+	{
+		# Read-only orphan sections are placed after well-known
+		# read-only sections (.text, .rodata) but before .data
+		read line  match $line .text 
+		read line  match $line hoge 
+		# Read-write orphan sections are placed after well-known
+		# read-write sections (.data) but before .bss
+		read line  match $line .data 
+		read line  match $line fuga 
+		read line  match $line .bss 
+		:
+	}  test.secs
+	atf_check test $? -eq 0
+}
+
+match() {
+	case $1 in
+	*$2*) return 0;
+	esac
+	return 1
+}
+
+atf_init_test_cases()
+{
+	atf_add_test_case orphan
+}



CVS commit: [netbsd-7] src/tools/compat

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 16:24:41 UTC 2014

Modified Files:
src/tools/compat [netbsd-7]: nl_types.h

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #236):
tools/compat/nl_types.h: revision 1.3
If the internals are not explicitly requested, use #include_next to pick
up the system version. locale from libc++ requires this and is used by
src/tools/elftosb2.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.4.1 src/tools/compat/nl_types.h

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

Modified files:

Index: src/tools/compat/nl_types.h
diff -u src/tools/compat/nl_types.h:1.2 src/tools/compat/nl_types.h:1.2.4.1
--- src/tools/compat/nl_types.h:1.2	Thu Feb 27 01:07:52 2014
+++ src/tools/compat/nl_types.h	Fri Nov 14 16:24:40 2014
@@ -1,5 +1,7 @@
-/*	$NetBSD: nl_types.h,v 1.2 2014/02/27 01:07:52 matt Exp $	*/
+/*	$NetBSD: nl_types.h,v 1.2.4.1 2014/11/14 16:24:40 martin Exp $	*/
 
-#if defined(_NLS_PRIVATE) || defined(__NetBSD__)
+#if defined(_NLS_PRIVATE)
 #include ../../include/nl_types.h
+#elif defined(__GNUC__)
+#include_next nl_types.h
 #endif



CVS commit: [netbsd-7] src/doc

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 16:25:55 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Ticket #236


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.99 -r1.1.2.100 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.99 src/doc/CHANGES-7.0:1.1.2.100
--- src/doc/CHANGES-7.0:1.1.2.99	Fri Nov 14 15:52:27 2014
+++ src/doc/CHANGES-7.0	Fri Nov 14 16:25:55 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.99 2014/11/14 15:52:27 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.100 2014/11/14 16:25:55 martin Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -2626,3 +2626,10 @@ sys/arch/evbarm/conf/RPI			1.55
 	Enable NFS root FS support in RPI.
 	[jakllsch, ticket #235]
 
+tools/compat/nl_types.h1.3
+
+	If the internals are not explicitly requested, use #include_next
+	to pick up the system version. locale from libc++ requires this
+	and is used by src/tools/elftosb2.
+	[jmcneill, ticket #236]
+



CVS commit: src/tests/usr.bin/ld

2014-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Fri Nov 14 16:29:03 UTC 2014

Modified Files:
src/tests/usr.bin/ld: t_orphan.sh

Log Message:
Tweak previous.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/ld/t_orphan.sh

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

Modified files:

Index: src/tests/usr.bin/ld/t_orphan.sh
diff -u src/tests/usr.bin/ld/t_orphan.sh:1.1 src/tests/usr.bin/ld/t_orphan.sh:1.2
--- src/tests/usr.bin/ld/t_orphan.sh:1.1	Fri Nov 14 16:21:12 2014
+++ src/tests/usr.bin/ld/t_orphan.sh	Fri Nov 14 16:29:03 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: t_orphan.sh,v 1.1 2014/11/14 16:21:12 uebayasi Exp $
+#	$NetBSD: t_orphan.sh,v 1.2 2014/11/14 16:29:03 uebayasi Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -35,9 +35,9 @@ orphan_body() {
 	cat  test.c  EOF
 #include sys/cdefs.h
 /* read-only orphan */
-const char a[] __section(hoge) = { 'h', 'o', 'g', 'e', '\0' };
+const char a[] __section(hoge) = hoge;
 /* read-write orphan */
-char b[] __section(fuga) = fuga;
+char b[] __section(fuga) = { 'f', 'u', 'g', 'a', '\0' };
 /* .data */
 int c = 123;
 /* .bss */
@@ -46,27 +46,27 @@ int d = 0;
 int main(void) { return 0; }
 EOF
 	atf_check -s exit:0 -o ignore -e ignore cc -o test test.c
-	readelf -S test
 	readelf -S test |
 	grep ' \.text\| hoge\| \.data\| fuga\| \.bss' test.secs
 	{
 		# Read-only orphan sections are placed after well-known
-		# read-only sections (.text, .rodata) but before .data
-		read line  match $line .text 
-		read line  match $line hoge 
+		# read-only sections (.text, .rodata) but before .data.
+		match .text 
+		match hoge 
 		# Read-write orphan sections are placed after well-known
-		# read-write sections (.data) but before .bss
-		read line  match $line .data 
-		read line  match $line fuga 
-		read line  match $line .bss 
+		# read-write sections (.data) but before .bss.
+		match .data 
+		match fuga 
+		match .bss 
 		:
 	}  test.secs
 	atf_check test $? -eq 0
 }
 
 match() {
-	case $1 in
-	*$2*) return 0;
+	read line
+	case $line in
+	*$1*) return 0;
 	esac
 	return 1
 }



CVS commit: src/lib/libc/string

2014-11-14 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Nov 14 16:43:57 UTC 2014

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

Log Message:
Commit to returning 1, not any nonzero value.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/string/consttime_memequal.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/consttime_memequal.3
diff -u src/lib/libc/string/consttime_memequal.3:1.2 src/lib/libc/string/consttime_memequal.3:1.3
--- src/lib/libc/string/consttime_memequal.3:1.2	Wed Aug 28 15:24:41 2013
+++ src/lib/libc/string/consttime_memequal.3	Fri Nov 14 16:43:57 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: consttime_memequal.3,v 1.2 2013/08/28 15:24:41 riastradh Exp $
+.\	$NetBSD: consttime_memequal.3,v 1.3 2014/11/14 16:43:57 riastradh Exp $
 .\
 .\ Copyright (c) 2013 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 August 28, 2013
+.Dd November 14, 2013
 .Dt CONSTTIME_MEMEQUAL 3
 .Os
 .Sh NAME
@@ -48,8 +48,8 @@ bytes of memory at
 .Fa b1
 and
 .Fa b2
-for equality, returning zero if they are distinct and nonzero if they
-are identical.
+for equality, returning 0 if they are distinct and 1 if they are
+identical.
 .Pp
 The time taken by
 .Fn consttime_memequal



CVS commit: src/sys/netinet6

2014-11-14 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Fri Nov 14 17:34:23 UTC 2014

Modified Files:
src/sys/netinet6: dest6.c in6_ifattach.c in6_pcb.c ip6_forward.c
udp6_output.c

Log Message:
Do not uselessly include sys/malloc.h.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/netinet6/dest6.c
cvs rdiff -u -r1.93 -r1.94 src/sys/netinet6/in6_ifattach.c
cvs rdiff -u -r1.131 -r1.132 src/sys/netinet6/in6_pcb.c
cvs rdiff -u -r1.73 -r1.74 src/sys/netinet6/ip6_forward.c
cvs rdiff -u -r1.45 -r1.46 src/sys/netinet6/udp6_output.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/dest6.c
diff -u src/sys/netinet6/dest6.c:1.17 src/sys/netinet6/dest6.c:1.18
--- src/sys/netinet6/dest6.c:1.17	Tue Apr 15 03:57:04 2008
+++ src/sys/netinet6/dest6.c	Fri Nov 14 17:34:23 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dest6.c,v 1.17 2008/04/15 03:57:04 thorpej Exp $	*/
+/*	$NetBSD: dest6.c,v 1.18 2014/11/14 17:34:23 maxv Exp $	*/
 /*	$KAME: dest6.c,v 1.25 2001/02/22 01:39:16 itojun Exp $	*/
 
 /*
@@ -31,11 +31,10 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dest6.c,v 1.17 2008/04/15 03:57:04 thorpej Exp $);
+__KERNEL_RCSID(0, $NetBSD: dest6.c,v 1.18 2014/11/14 17:34:23 maxv Exp $);
 
 #include sys/param.h
 #include sys/systm.h
-#include sys/malloc.h
 #include sys/mbuf.h
 #include sys/domain.h
 #include sys/protosw.h

Index: src/sys/netinet6/in6_ifattach.c
diff -u src/sys/netinet6/in6_ifattach.c:1.93 src/sys/netinet6/in6_ifattach.c:1.94
--- src/sys/netinet6/in6_ifattach.c:1.93	Tue Sep  9 20:16:12 2014
+++ src/sys/netinet6/in6_ifattach.c	Fri Nov 14 17:34:23 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_ifattach.c,v 1.93 2014/09/09 20:16:12 rmind Exp $	*/
+/*	$NetBSD: in6_ifattach.c,v 1.94 2014/11/14 17:34:23 maxv Exp $	*/
 /*	$KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $	*/
 
 /*
@@ -31,12 +31,11 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in6_ifattach.c,v 1.93 2014/09/09 20:16:12 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: in6_ifattach.c,v 1.94 2014/11/14 17:34:23 maxv Exp $);
 
 #include sys/param.h
 #include sys/systm.h
 #include sys/kmem.h
-#include sys/malloc.h
 #include sys/socket.h
 #include sys/sockio.h
 #include sys/kernel.h

Index: src/sys/netinet6/in6_pcb.c
diff -u src/sys/netinet6/in6_pcb.c:1.131 src/sys/netinet6/in6_pcb.c:1.132
--- src/sys/netinet6/in6_pcb.c:1.131	Sat Oct 11 23:07:39 2014
+++ src/sys/netinet6/in6_pcb.c	Fri Nov 14 17:34:23 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_pcb.c,v 1.131 2014/10/11 23:07:39 christos Exp $	*/
+/*	$NetBSD: in6_pcb.c,v 1.132 2014/11/14 17:34:23 maxv Exp $	*/
 /*	$KAME: in6_pcb.c,v 1.84 2001/02/08 18:02:08 itojun Exp $	*/
 
 /*
@@ -62,14 +62,13 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in6_pcb.c,v 1.131 2014/10/11 23:07:39 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: in6_pcb.c,v 1.132 2014/11/14 17:34:23 maxv Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
 
 #include sys/param.h
 #include sys/systm.h
-#include sys/malloc.h
 #include sys/mbuf.h
 #include sys/protosw.h
 #include sys/socket.h

Index: src/sys/netinet6/ip6_forward.c
diff -u src/sys/netinet6/ip6_forward.c:1.73 src/sys/netinet6/ip6_forward.c:1.74
--- src/sys/netinet6/ip6_forward.c:1.73	Fri May 30 01:39:03 2014
+++ src/sys/netinet6/ip6_forward.c	Fri Nov 14 17:34:23 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip6_forward.c,v 1.73 2014/05/30 01:39:03 christos Exp $	*/
+/*	$NetBSD: ip6_forward.c,v 1.74 2014/11/14 17:34:23 maxv Exp $	*/
 /*	$KAME: ip6_forward.c,v 1.109 2002/09/11 08:10:17 sakane Exp $	*/
 
 /*
@@ -31,14 +31,13 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ip6_forward.c,v 1.73 2014/05/30 01:39:03 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: ip6_forward.c,v 1.74 2014/11/14 17:34:23 maxv Exp $);
 
 #include opt_gateway.h
 #include opt_ipsec.h
 
 #include sys/param.h
 #include sys/systm.h
-#include sys/malloc.h
 #include sys/mbuf.h
 #include sys/domain.h
 #include sys/protosw.h

Index: src/sys/netinet6/udp6_output.c
diff -u src/sys/netinet6/udp6_output.c:1.45 src/sys/netinet6/udp6_output.c:1.46
--- src/sys/netinet6/udp6_output.c:1.45	Sat Oct 11 20:53:16 2014
+++ src/sys/netinet6/udp6_output.c	Fri Nov 14 17:34:23 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: udp6_output.c,v 1.45 2014/10/11 20:53:16 christos Exp $	*/
+/*	$NetBSD: udp6_output.c,v 1.46 2014/11/14 17:34:23 maxv Exp $	*/
 /*	$KAME: udp6_output.c,v 1.43 2001/10/15 09:19:52 itojun Exp $	*/
 
 /*
@@ -62,12 +62,11 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: udp6_output.c,v 1.45 2014/10/11 20:53:16 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: udp6_output.c,v 1.46 2014/11/14 17:34:23 maxv Exp $);
 
 #include opt_inet.h
 
 #include sys/param.h
-#include sys/malloc.h
 #include sys/mbuf.h
 #include sys/protosw.h
 #include sys/socket.h



CVS commit: [netbsd-7] src/sys/arch/evbarm/conf

2014-11-14 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Nov 14 18:11:22 UTC 2014

Modified Files:
src/sys/arch/evbarm/conf [netbsd-7]: HUMMINGBIRD_A31

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #237):
sys/arch/evbarm/conf/HUMMINGBIRD_A31: revision 1.16, 1.19
add awinhdmi
--
enable awinhdmiaudio


To generate a diff of this commit:
cvs rdiff -u -r1.19.2.3 -r1.19.2.4 src/sys/arch/evbarm/conf/HUMMINGBIRD_A31

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/HUMMINGBIRD_A31
diff -u src/sys/arch/evbarm/conf/HUMMINGBIRD_A31:1.19.2.3 src/sys/arch/evbarm/conf/HUMMINGBIRD_A31:1.19.2.4
--- src/sys/arch/evbarm/conf/HUMMINGBIRD_A31:1.19.2.3	Fri Nov 14 13:26:46 2014
+++ src/sys/arch/evbarm/conf/HUMMINGBIRD_A31	Fri Nov 14 18:11:22 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: HUMMINGBIRD_A31,v 1.19.2.3 2014/11/14 13:26:46 martin Exp $
+#	$NetBSD: HUMMINGBIRD_A31,v 1.19.2.4 2014/11/14 18:11:22 snj Exp $
 #
 #	HUMMINGBIRD_A31 - Merrii Hummingbird A31
 #
@@ -256,6 +256,11 @@ options 	WSDISPLAY_COMPAT_USL
 options 	WSDISPLAY_COMPAT_RAWKBD
 options 	WSDISPLAY_DEFAULTSCREENS=4
 
+# HDMI
+awinhdmi0	at awinio0
+awinhdmiaudio0	at awinio0
+audio1		at awinhdmiaudio0
+
 # On-board USB
 awinusb0	at awinio0 port 0
 awinusb1	at awinio0 port 1



CVS commit: [netbsd-7] src/usr.sbin/postinstall

2014-11-14 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Nov 14 18:18:14 UTC 2014

Modified Files:
src/usr.sbin/postinstall [netbsd-7]: postinstall

Log Message:
Pull up following revision(s) (requested by martin in ticket #220):
usr.sbin/postinstall/postinstall: revision 1.181-1.183
Make check_ids take an additional argument (the corresponding source
file) and grep that on error for the missing information, so the user
gets all the info needed how to FIX MANUALLY.
--
Change the order of arguments to check_ids, placing the two file names
adjacent to each other.  Also add a comment explaining the start
argument and the SKIP special value.
--
Fix tab/space inconsistency in comment.


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

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

Modified files:

Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.175.2.2 src/usr.sbin/postinstall/postinstall:1.175.2.3
--- src/usr.sbin/postinstall/postinstall:1.175.2.2	Tue Aug 12 15:14:55 2014
+++ src/usr.sbin/postinstall/postinstall	Fri Nov 14 18:18:14 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.175.2.2 2014/08/12 15:14:55 martin Exp $
+# $NetBSD: postinstall,v 1.175.2.3 2014/11/14 18:18:14 snj Exp $
 #
 # Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -223,18 +223,24 @@ check_dir()
 	return 0
 }
 
-# check_ids op type file start id [...]
-#	Check if file of type users or groups contains the relevant IDs
+# check_ids op type file srcfile start id [...]
+#	Check if file of type users or groups contains the relevant IDs.
+#	Use srcfile as a reference for the expected contents.
+#	The specified id names should be given in numerical order,
+#	with the first name corresponding to numerical value start,
+#	and with the special name SKIP being used to mark gaps in the
+#	sequence.
 #	Returns 0 if ok, 1 otherwise.
 #	
 check_ids()
 {
-	[ $# -ge 5 ] || err 3 USAGE: checks_ids op type file start id [...]
+	[ $# -ge 6 ] || err 3 USAGE: checks_ids op type file start srcfile id [...]
 	_op=$1
 	_type=$2
 	_file=$3
-	_start=$4
-	shift 4
+	_srcfile=$4
+	_start=$5
+	shift 5
 	#_ids=$@
 
 	if [ ! -f ${_file} ]; then
@@ -276,6 +282,14 @@ check_ids()
 	' $@  ${_file})	|| return 1
 	if [ -n ${_missing} ]; then
 		msg Error ${_type}${_notfixed}: $(echo ${_missing})
+		msg Use the following as a template:
+		set -- ${_missing}
+		while [ $# -gt 0 ]
+		do
+			${GREP} -E ^${1}: ${_srcfile}
+			shift 2
+		done
+		msg and adjust if necessary.
 		return 1
 	fi
 	return 0
@@ -1018,7 +1032,8 @@ do_gid()
 {
 	[ -n $1 ] || err 3 USAGE: do_gid  fix|check
 
-	check_ids $1 groups ${DEST_DIR}/etc/group 14 \
+	check_ids $1 groups ${DEST_DIR}/etc/group \
+	${SRC_DIR}/etc/group 14 \
 	named ntpd sshd SKIP _pflogd _rwhod staff _proxy _timedc \
 	_sdpd _httpd _mdnsd _tests _tcpdump _tss _gpio _rtadvd
 }
@@ -1696,7 +1711,8 @@ do_uid()
 {
 	[ -n $1 ] || err 3 USAGE: do_uid  fix|check
 
-	check_ids $1 users ${DEST_DIR}/etc/master.passwd 12 \
+	check_ids $1 users ${DEST_DIR}/etc/master.passwd \
+	${SRC_DIR}/etc/master.passwd 12 \
 	postfix SKIP named ntpd sshd SKIP _pflogd _rwhod SKIP _proxy \
 	_timedc _sdpd _httpd _mdnsd _tests _tcpdump _tss SKIP _rtadvd
 }



CVS commit: [netbsd-7] src/doc

2014-11-14 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Nov 14 18:19:01 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
220  237


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.100 -r1.1.2.101 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.100 src/doc/CHANGES-7.0:1.1.2.101
--- src/doc/CHANGES-7.0:1.1.2.100	Fri Nov 14 16:25:55 2014
+++ src/doc/CHANGES-7.0	Fri Nov 14 18:19:01 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.100 2014/11/14 16:25:55 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.101 2014/11/14 18:19:01 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -2633,3 +2633,15 @@ tools/compat/nl_types.h1.3
 	and is used by src/tools/elftosb2.
 	[jmcneill, ticket #236]
 
+sys/arch/evbarm/conf/HUMMINGBIRD_A31		1.16, 1.19
+
+	Add awinhdmi and awinhdmiaudio to HUMMINGBIRD_A31.
+	[jmcneill, ticket #237]
+
+usr.sbin/postinstall/postinstall		1.181-1.183
+
+	Make check_ids take an additional argument (the corresponding source
+	file) and grep that on error for the missing information, so the user
+	gets all the info needed how to FIX MANUALLY.
+	[martin, ticket #220]
+



CVS commit: src/sys/arch

2014-11-14 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Nov 14 19:47:36 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner: awin_debe.c awin_fb.c awin_var.h
src/sys/arch/evbarm/awin: awin_machdep.c

Log Message:
Allow the DEBE layer and output sizes to be set independently. Now you can
pass fb.margin=n in bootargs to add a border to the framebuffer, in case
your display doesn't let you turn off overscan and you really want to see
the whole screen.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/allwinner/awin_debe.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/allwinner/awin_fb.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/allwinner/awin_var.h
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/evbarm/awin/awin_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/arm/allwinner/awin_debe.c
diff -u src/sys/arch/arm/allwinner/awin_debe.c:1.6 src/sys/arch/arm/allwinner/awin_debe.c:1.7
--- src/sys/arch/arm/allwinner/awin_debe.c:1.6	Fri Nov 14 00:31:54 2014
+++ src/sys/arch/arm/allwinner/awin_debe.c	Fri Nov 14 19:47:36 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_debe.c,v 1.6 2014/11/14 00:31:54 jmcneill Exp $ */
+/* $NetBSD: awin_debe.c,v 1.7 2014/11/14 19:47:36 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca
@@ -34,7 +34,7 @@
 #endif
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: awin_debe.c,v 1.6 2014/11/14 00:31:54 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: awin_debe.c,v 1.7 2014/11/14 19:47:36 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -63,6 +63,8 @@ struct awin_debe_softc {
 	bus_size_t sc_dmasize;
 	bus_dmamap_t sc_dmamap;
 	void *sc_dmap;
+
+	uint16_t sc_margin;
 };
 
 #define DEBE_READ(sc, reg) \
@@ -98,6 +100,7 @@ awin_debe_attach(device_t parent, device
 	struct awin_debe_softc *sc = device_private(self);
 	struct awinio_attach_args * const aio = aux;
 	const struct awin_locators * const loc = aio-aio_loc;
+	prop_dictionary_t cfg = device_properties(self);
 	int error;
 
 	sc-sc_dev = self;
@@ -112,6 +115,8 @@ awin_debe_attach(device_t parent, device
 	aprint_naive(\n);
 	aprint_normal(: Display Engine Backend (BE%d)\n, loc-loc_port);
 
+	prop_dictionary_get_uint16(cfg, margin, sc-sc_margin);
+
 	if (awin_chip_id() == AWIN_CHIP_ID_A31) {
 		awin_reg_set_clear(aio-aio_core_bst, aio-aio_ccm_bsh,
 		AWIN_A31_AHB_RESET1_REG,
@@ -202,6 +207,8 @@ awin_debe_alloc_videomem(struct awin_deb
 	if (error)
 		goto destroy;
 
+	memset(sc-sc_dmap, 0, sc-sc_dmasize);
+
 	return 0;
 
 destroy:
@@ -220,12 +227,19 @@ free:
 static void
 awin_debe_setup_fbdev(struct awin_debe_softc *sc, const struct videomode *mode)
 {
+	if (mode == NULL)
+		return;
+
+	const u_int interlace_p = !!(mode-flags  VID_INTERLACE);
+	const u_int fb_width = mode-hdisplay - (sc-sc_margin * 2);
+	const u_int fb_height = (mode-vdisplay  interlace_p) -
+(sc-sc_margin * 2);
+
 	if (mode  sc-sc_fbdev == NULL) {
-		const u_int interlace_p = !!(mode-flags  VID_INTERLACE);
 		struct awinfb_attach_args afb = {
 			.afb_fb = sc-sc_dmap,
-			.afb_width = mode-hdisplay,
-			.afb_height = (mode-vdisplay  interlace_p),
+			.afb_width = fb_width,
+			.afb_height = fb_height,
 			.afb_dmat = sc-sc_dmat,
 			.afb_dmasegs = sc-sc_dmasegs,
 			.afb_ndmasegs = 1
@@ -235,7 +249,7 @@ awin_debe_setup_fbdev(struct awin_debe_s
 	}
 #if NGENFB  0
 	else if (sc-sc_fbdev != NULL) {
-		awin_fb_set_videomode(sc-sc_fbdev, mode);
+		awin_fb_set_videomode(sc-sc_fbdev, fb_width, fb_height);
 	}
 #endif
 }
@@ -287,6 +301,8 @@ awin_debe_set_videomode(const struct vid
 		const u_int interlace_p = !!(mode-flags  VID_INTERLACE);
 		const u_int width = mode-hdisplay;
 		const u_int height = (mode-vdisplay  interlace_p);
+		const u_int fb_width = width - (sc-sc_margin * 2);
+		const u_int fb_height = height - (sc-sc_margin * 2);
 		uint32_t vmem = width * height * 4;
 
 		if (vmem  sc-sc_dmasize) {
@@ -310,8 +326,10 @@ awin_debe_set_videomode(const struct vid
 		DEBE_WRITE(sc, AWIN_DEBE_DISSIZE_REG,
 		((height - 1)  16) | (width - 1));
 		DEBE_WRITE(sc, AWIN_DEBE_LAYSIZE_REG,
-		((height - 1)  16) | (width - 1));
-		DEBE_WRITE(sc, AWIN_DEBE_LAYLINEWIDTH_REG, (width  5));
+		((fb_height - 1)  16) | (fb_width - 1));
+		DEBE_WRITE(sc, AWIN_DEBE_LAYCOOR_REG,
+		(sc-sc_margin  16) | sc-sc_margin);
+		DEBE_WRITE(sc, AWIN_DEBE_LAYLINEWIDTH_REG, (fb_width  5));
 		DEBE_WRITE(sc, AWIN_DEBE_LAYFB_L32ADD_REG, pa  3);
 		DEBE_WRITE(sc, AWIN_DEBE_LAYFB_H4ADD_REG, pa  29);
 

Index: src/sys/arch/arm/allwinner/awin_fb.c
diff -u src/sys/arch/arm/allwinner/awin_fb.c:1.4 src/sys/arch/arm/allwinner/awin_fb.c:1.5
--- src/sys/arch/arm/allwinner/awin_fb.c:1.4	Fri Nov 14 00:31:54 2014
+++ src/sys/arch/arm/allwinner/awin_fb.c	Fri Nov 14 19:47:36 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_fb.c,v 1.4 2014/11/14 00:31:54 jmcneill Exp $ */
+/* $NetBSD: awin_fb.c,v 1.5 2014/11/14 

CVS commit: [netbsd-7] src/sys/arch

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 22:23:28 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner [netbsd-7]: awin_debe.c awin_fb.c awin_var.h
src/sys/arch/evbarm/awin [netbsd-7]: awin_machdep.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #238):
sys/arch/evbarm/awin/awin_machdep.c: revision 1.28
sys/arch/arm/allwinner/awin_debe.c: revision 1.7
sys/arch/arm/allwinner/awin_var.h: revision 1.23
sys/arch/arm/allwinner/awin_fb.c: revision 1.5
Allow the DEBE layer and output sizes to be set independently. Now you can
pass fb.margin=n in bootargs to add a border to the framebuffer, in case
your display doesn't let you turn off overscan and you really want to see
the whole screen.


To generate a diff of this commit:
cvs rdiff -u -r1.6.2.2 -r1.6.2.3 src/sys/arch/arm/allwinner/awin_debe.c
cvs rdiff -u -r1.4.2.2 -r1.4.2.3 src/sys/arch/arm/allwinner/awin_fb.c
cvs rdiff -u -r1.10.2.2 -r1.10.2.3 src/sys/arch/arm/allwinner/awin_var.h
cvs rdiff -u -r1.8.2.6 -r1.8.2.7 src/sys/arch/evbarm/awin/awin_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/arm/allwinner/awin_debe.c
diff -u src/sys/arch/arm/allwinner/awin_debe.c:1.6.2.2 src/sys/arch/arm/allwinner/awin_debe.c:1.6.2.3
--- src/sys/arch/arm/allwinner/awin_debe.c:1.6.2.2	Fri Nov 14 13:26:46 2014
+++ src/sys/arch/arm/allwinner/awin_debe.c	Fri Nov 14 22:23:28 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_debe.c,v 1.6.2.2 2014/11/14 13:26:46 martin Exp $ */
+/* $NetBSD: awin_debe.c,v 1.6.2.3 2014/11/14 22:23:28 martin Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca
@@ -34,7 +34,7 @@
 #endif
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: awin_debe.c,v 1.6.2.2 2014/11/14 13:26:46 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: awin_debe.c,v 1.6.2.3 2014/11/14 22:23:28 martin Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -63,6 +63,8 @@ struct awin_debe_softc {
 	bus_size_t sc_dmasize;
 	bus_dmamap_t sc_dmamap;
 	void *sc_dmap;
+
+	uint16_t sc_margin;
 };
 
 #define DEBE_READ(sc, reg) \
@@ -98,6 +100,7 @@ awin_debe_attach(device_t parent, device
 	struct awin_debe_softc *sc = device_private(self);
 	struct awinio_attach_args * const aio = aux;
 	const struct awin_locators * const loc = aio-aio_loc;
+	prop_dictionary_t cfg = device_properties(self);
 	int error;
 
 	sc-sc_dev = self;
@@ -112,6 +115,8 @@ awin_debe_attach(device_t parent, device
 	aprint_naive(\n);
 	aprint_normal(: Display Engine Backend (BE%d)\n, loc-loc_port);
 
+	prop_dictionary_get_uint16(cfg, margin, sc-sc_margin);
+
 	if (awin_chip_id() == AWIN_CHIP_ID_A31) {
 		awin_reg_set_clear(aio-aio_core_bst, aio-aio_ccm_bsh,
 		AWIN_A31_AHB_RESET1_REG,
@@ -202,6 +207,8 @@ awin_debe_alloc_videomem(struct awin_deb
 	if (error)
 		goto destroy;
 
+	memset(sc-sc_dmap, 0, sc-sc_dmasize);
+
 	return 0;
 
 destroy:
@@ -220,12 +227,19 @@ free:
 static void
 awin_debe_setup_fbdev(struct awin_debe_softc *sc, const struct videomode *mode)
 {
+	if (mode == NULL)
+		return;
+
+	const u_int interlace_p = !!(mode-flags  VID_INTERLACE);
+	const u_int fb_width = mode-hdisplay - (sc-sc_margin * 2);
+	const u_int fb_height = (mode-vdisplay  interlace_p) -
+(sc-sc_margin * 2);
+
 	if (mode  sc-sc_fbdev == NULL) {
-		const u_int interlace_p = !!(mode-flags  VID_INTERLACE);
 		struct awinfb_attach_args afb = {
 			.afb_fb = sc-sc_dmap,
-			.afb_width = mode-hdisplay,
-			.afb_height = (mode-vdisplay  interlace_p),
+			.afb_width = fb_width,
+			.afb_height = fb_height,
 			.afb_dmat = sc-sc_dmat,
 			.afb_dmasegs = sc-sc_dmasegs,
 			.afb_ndmasegs = 1
@@ -235,7 +249,7 @@ awin_debe_setup_fbdev(struct awin_debe_s
 	}
 #if NGENFB  0
 	else if (sc-sc_fbdev != NULL) {
-		awin_fb_set_videomode(sc-sc_fbdev, mode);
+		awin_fb_set_videomode(sc-sc_fbdev, fb_width, fb_height);
 	}
 #endif
 }
@@ -287,6 +301,8 @@ awin_debe_set_videomode(const struct vid
 		const u_int interlace_p = !!(mode-flags  VID_INTERLACE);
 		const u_int width = mode-hdisplay;
 		const u_int height = (mode-vdisplay  interlace_p);
+		const u_int fb_width = width - (sc-sc_margin * 2);
+		const u_int fb_height = height - (sc-sc_margin * 2);
 		uint32_t vmem = width * height * 4;
 
 		if (vmem  sc-sc_dmasize) {
@@ -310,8 +326,10 @@ awin_debe_set_videomode(const struct vid
 		DEBE_WRITE(sc, AWIN_DEBE_DISSIZE_REG,
 		((height - 1)  16) | (width - 1));
 		DEBE_WRITE(sc, AWIN_DEBE_LAYSIZE_REG,
-		((height - 1)  16) | (width - 1));
-		DEBE_WRITE(sc, AWIN_DEBE_LAYLINEWIDTH_REG, (width  5));
+		((fb_height - 1)  16) | (fb_width - 1));
+		DEBE_WRITE(sc, AWIN_DEBE_LAYCOOR_REG,
+		(sc-sc_margin  16) | sc-sc_margin);
+		DEBE_WRITE(sc, AWIN_DEBE_LAYLINEWIDTH_REG, (fb_width  5));
 		DEBE_WRITE(sc, AWIN_DEBE_LAYFB_L32ADD_REG, pa  3);
 		DEBE_WRITE(sc, AWIN_DEBE_LAYFB_H4ADD_REG, pa  29);
 

Index: 

CVS commit: [netbsd-7] src/doc

2014-11-14 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 14 22:27:05 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Ticket #238


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.101 -r1.1.2.102 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.101 src/doc/CHANGES-7.0:1.1.2.102
--- src/doc/CHANGES-7.0:1.1.2.101	Fri Nov 14 18:19:01 2014
+++ src/doc/CHANGES-7.0	Fri Nov 14 22:27:05 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.101 2014/11/14 18:19:01 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.102 2014/11/14 22:27:05 martin Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -2645,3 +2645,14 @@ usr.sbin/postinstall/postinstall		1.181-
 	gets all the info needed how to FIX MANUALLY.
 	[martin, ticket #220]
 
+sys/arch/arm/allwinner/awin_debe.c		1.7
+sys/arch/arm/allwinner/awin_fb.c		1.5
+sys/arch/arm/allwinner/awin_var.h		1.23
+sys/arch/evbarm/awin/awin_machdep.c		1.28
+
+	Allow the DEBE layer and output sizes to be set independently. Now you
+	can pass fb.margin=n in bootargs to add a border to the framebuffer,
+	in case your display doesn't let you turn off overscan and you really
+	want to see the whole screen.
+	[jmcneill, ticket #238]
+



CVS commit: src/lib/libc/string

2014-11-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Nov 14 22:46:34 UTC 2014

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

Log Message:
bump year


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/string/consttime_memequal.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/consttime_memequal.3
diff -u src/lib/libc/string/consttime_memequal.3:1.3 src/lib/libc/string/consttime_memequal.3:1.4
--- src/lib/libc/string/consttime_memequal.3:1.3	Fri Nov 14 16:43:57 2014
+++ src/lib/libc/string/consttime_memequal.3	Fri Nov 14 22:46:34 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: consttime_memequal.3,v 1.3 2014/11/14 16:43:57 riastradh Exp $
+.\	$NetBSD: consttime_memequal.3,v 1.4 2014/11/14 22:46:34 wiz Exp $
 .\
 .\ Copyright (c) 2013 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd November 14, 2013
+.Dd November 14, 2014
 .Dt CONSTTIME_MEMEQUAL 3
 .Os
 .Sh NAME



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

2014-11-14 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Nov 14 23:45:02 UTC 2014

Modified Files:
src/sys/arch/arm/allwinner: awin_debe.c awin_fb.c awin_var.h

Log Message:
Implement WSDISPLAYIO_SVIDEO, WSDISPLAYIO_GVIDEO for screen blanking


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/allwinner/awin_debe.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/allwinner/awin_fb.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/allwinner/awin_var.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/allwinner/awin_debe.c
diff -u src/sys/arch/arm/allwinner/awin_debe.c:1.7 src/sys/arch/arm/allwinner/awin_debe.c:1.8
--- src/sys/arch/arm/allwinner/awin_debe.c:1.7	Fri Nov 14 19:47:36 2014
+++ src/sys/arch/arm/allwinner/awin_debe.c	Fri Nov 14 23:45:02 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_debe.c,v 1.7 2014/11/14 19:47:36 jmcneill Exp $ */
+/* $NetBSD: awin_debe.c,v 1.8 2014/11/14 23:45:02 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca
@@ -34,7 +34,7 @@
 #endif
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: awin_debe.c,v 1.7 2014/11/14 19:47:36 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: awin_debe.c,v 1.8 2014/11/14 23:45:02 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -49,6 +49,7 @@ __KERNEL_RCSID(0, $NetBSD: awin_debe.c,
 #include arm/allwinner/awin_var.h
 
 #include dev/videomode/videomode.h
+#include dev/wscons/wsconsio.h
 
 struct awin_debe_softc {
 	device_t sc_dev;
@@ -360,3 +361,30 @@ awin_debe_set_videomode(const struct vid
 		awin_debe_setup_fbdev(sc, mode);
 	}
 }
+
+int
+awin_debe_ioctl(device_t self, u_long cmd, void *data)
+{
+	struct awin_debe_softc *sc = device_private(self);
+	uint32_t val;
+	int enable;
+
+	switch (cmd) {
+	case WSDISPLAYIO_SVIDEO:
+		enable = *(int *)data;
+		val = DEBE_READ(sc, AWIN_DEBE_MODCTL_REG);
+		if (enable)
+			val |= AWIN_DEBE_MODCTL_LAY0_EN;
+		else
+			val = ~AWIN_DEBE_MODCTL_LAY0_EN;
+		DEBE_WRITE(sc, AWIN_DEBE_MODCTL_REG, val);
+		return 0;
+	case WSDISPLAYIO_GVIDEO:
+		val = DEBE_READ(sc, AWIN_DEBE_MODCTL_REG);
+		*(int *)data = !!(val  AWIN_DEBE_MODCTL_LAY0_EN);
+		return 0;
+	}
+
+	return EPASSTHROUGH;
+}
+

Index: src/sys/arch/arm/allwinner/awin_fb.c
diff -u src/sys/arch/arm/allwinner/awin_fb.c:1.5 src/sys/arch/arm/allwinner/awin_fb.c:1.6
--- src/sys/arch/arm/allwinner/awin_fb.c:1.5	Fri Nov 14 19:47:36 2014
+++ src/sys/arch/arm/allwinner/awin_fb.c	Fri Nov 14 23:45:02 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_fb.c,v 1.5 2014/11/14 19:47:36 jmcneill Exp $ */
+/* $NetBSD: awin_fb.c,v 1.6 2014/11/14 23:45:02 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill jmcne...@invisible.ca
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: awin_fb.c,v 1.5 2014/11/14 19:47:36 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: awin_fb.c,v 1.6 2014/11/14 23:45:02 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -46,6 +46,7 @@ __KERNEL_RCSID(0, $NetBSD: awin_fb.c,v 
 
 struct awin_fb_softc {
 	struct genfb_softc sc_gen;
+	device_t sc_debedev;
 
 	bus_dma_tag_t sc_dmat;
 	bus_dma_segment_t *sc_dmasegs;
@@ -82,6 +83,7 @@ awin_fb_attach(device_t parent, device_t
 		awin_fb_consoledev = self;
 
 	sc-sc_gen.sc_dev = self;
+	sc-sc_debedev = parent;
 	sc-sc_dmat = afb-afb_dmat;
 	sc-sc_dmasegs = afb-afb_dmasegs;
 	sc-sc_ndmasegs = afb-afb_ndmasegs;
@@ -144,6 +146,9 @@ awin_fb_ioctl(void *v, void *vs, u_long 
 		if (error == 0)
 			fbi-fbi_flags |= WSFB_VRAM_IS_RAM;
 		return error;
+	case WSDISPLAYIO_SVIDEO:
+	case WSDISPLAYIO_GVIDEO:
+		return awin_debe_ioctl(sc-sc_debedev, cmd, data);
 	default:
 		return EPASSTHROUGH;
 	}

Index: src/sys/arch/arm/allwinner/awin_var.h
diff -u src/sys/arch/arm/allwinner/awin_var.h:1.23 src/sys/arch/arm/allwinner/awin_var.h:1.24
--- src/sys/arch/arm/allwinner/awin_var.h:1.23	Fri Nov 14 19:47:36 2014
+++ src/sys/arch/arm/allwinner/awin_var.h	Fri Nov 14 23:45:02 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_var.h,v 1.23 2014/11/14 19:47:36 jmcneill Exp $ */
+/* $NetBSD: awin_var.h,v 1.24 2014/11/14 23:45:02 jmcneill Exp $ */
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -131,6 +131,7 @@ void	awin_tcon_set_videomode(const struc
 void	awin_tcon_enable(bool);
 void	awin_debe_set_videomode(const struct videomode *);
 void	awin_debe_enable(bool);
+int	awin_debe_ioctl(device_t, u_long, void *);
 void	awin_fb_set_videomode(device_t, u_int, u_int);
 void	awin_fb_ddb_trap_callback(int);
 



CVS commit: src/external/bsd/iscsi/dist/src/lib

2014-11-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Nov 15 01:15:45 UTC 2014

Modified Files:
src/external/bsd/iscsi/dist/src/lib: parameters.c target.c

Log Message:
Drop pointer checks that are always true.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/iscsi/dist/src/lib/parameters.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/iscsi/dist/src/lib/target.c

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

Modified files:

Index: src/external/bsd/iscsi/dist/src/lib/parameters.c
diff -u src/external/bsd/iscsi/dist/src/lib/parameters.c:1.3 src/external/bsd/iscsi/dist/src/lib/parameters.c:1.4
--- src/external/bsd/iscsi/dist/src/lib/parameters.c:1.3	Thu Mar 15 04:06:54 2012
+++ src/external/bsd/iscsi/dist/src/lib/parameters.c	Sat Nov 15 01:15:45 2014
@@ -919,12 +919,7 @@ answer:
 		if (strcmp(value, ?) == 0) {
 			iscsi_trace(TRACE_ISCSI_PARAM, got inquiry for param \%s\\n, param-key);
 			if (param-value_l) {
-if (param-value_l-value) {
-	(void) strlcpy(param-answer_tx, param-value_l-value, sizeof(param-answer_tx));
-} else {
-	iscsi_err(__FILE__, __LINE__, param \%s\ has NULL value_l-value\n, param-key);
-	param-answer_tx[0] = 0x0;
-}
+(void) strlcpy(param-answer_tx, param-value_l-value, sizeof(param-answer_tx));
 			} else {
 iscsi_err(__FILE__, __LINE__, param \%s\ has NULL value_l\n, param-key);
 param-answer_tx[0] = 0x0;

Index: src/external/bsd/iscsi/dist/src/lib/target.c
diff -u src/external/bsd/iscsi/dist/src/lib/target.c:1.8 src/external/bsd/iscsi/dist/src/lib/target.c:1.9
--- src/external/bsd/iscsi/dist/src/lib/target.c:1.8	Tue Sep 30 15:24:15 2014
+++ src/external/bsd/iscsi/dist/src/lib/target.c	Sat Nov 15 01:15:45 2014
@@ -762,8 +762,7 @@ text_command_t(target_session_t * sess, 
 			return -1;
 		}
 		if (ptr-rx_offer) {
-			if (ptr-offer_rx 
-			strcmp(ptr-offer_rx, All) == 0 
+			if (strcmp(ptr-offer_rx, All) == 0 
 			!param_equiv(sess-params, SessionType,
 				Discovery)) {
 iscsi_trace(TRACE_ISCSI_DEBUG,



CVS commit: src/external/gpl2/lvm2/dist/lib/format1

2014-11-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Nov 15 01:24:53 UTC 2014

Modified Files:
src/external/gpl2/lvm2/dist/lib/format1: import-export.c

Log Message:
Remove tautologic check.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/gpl2/lvm2/dist/lib/format1/import-export.c

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

Modified files:

Index: src/external/gpl2/lvm2/dist/lib/format1/import-export.c
diff -u src/external/gpl2/lvm2/dist/lib/format1/import-export.c:1.1.1.2 src/external/gpl2/lvm2/dist/lib/format1/import-export.c:1.2
--- src/external/gpl2/lvm2/dist/lib/format1/import-export.c:1.1.1.2	Wed Dec  2 00:26:49 2009
+++ src/external/gpl2/lvm2/dist/lib/format1/import-export.c	Sat Nov 15 01:24:53 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: import-export.c,v 1.1.1.2 2009/12/02 00:26:49 haad Exp $	*/
+/*	$NetBSD: import-export.c,v 1.2 2014/11/15 01:24:53 joerg Exp $	*/
 
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
@@ -187,7 +187,7 @@ int export_pv(struct cmd_context *cmd, s
 	}
 
 	/* Generate system_id if PV is in VG */
-	if (!pvd-system_id || !*pvd-system_id)
+	if (!pvd-system_id[0])
 		if (!_system_id(cmd, (char *)pvd-system_id, ))
 			return_0;
 



CVS commit: src/external/gpl2/lvm2/dist/lib/commands

2014-11-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Nov 15 01:24:38 UTC 2014

Modified Files:
src/external/gpl2/lvm2/dist/lib/commands: toolcontext.c

Log Message:
Comment out impossible code.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/external/gpl2/lvm2/dist/lib/commands/toolcontext.c

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

Modified files:

Index: src/external/gpl2/lvm2/dist/lib/commands/toolcontext.c
diff -u src/external/gpl2/lvm2/dist/lib/commands/toolcontext.c:1.7 src/external/gpl2/lvm2/dist/lib/commands/toolcontext.c:1.8
--- src/external/gpl2/lvm2/dist/lib/commands/toolcontext.c:1.7	Sat Dec  5 01:52:44 2009
+++ src/external/gpl2/lvm2/dist/lib/commands/toolcontext.c	Sat Nov 15 01:24:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: toolcontext.c,v 1.7 2009/12/05 01:52:44 haad Exp $	*/
+/*	$NetBSD: toolcontext.c,v 1.8 2014/11/15 01:24:38 joerg Exp $	*/
 
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
@@ -992,12 +992,14 @@ static int _init_backup(struct cmd_conte
 	char default_dir[PATH_MAX];
 	const char *dir;
 
+#if 0
 	if (!cmd-system_dir) {
 		log_warn(WARNING: Metadata changes will NOT be backed up);
 		backup_init(cmd, , 0);
 		archive_init(cmd, , 0, 0, 0);
 		return 1;
 	}
+#endif
 
 	/* set up archiving */
 	cmd-default_settings.archive =



CVS commit: src/sbin/bioctl

2014-11-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Nov 15 01:52:02 UTC 2014

Modified Files:
src/sbin/bioctl: bioctl.c

Log Message:
Skip vendor if the string is empty.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sbin/bioctl/bioctl.c

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

Modified files:

Index: src/sbin/bioctl/bioctl.c
diff -u src/sbin/bioctl/bioctl.c:1.15 src/sbin/bioctl/bioctl.c:1.16
--- src/sbin/bioctl/bioctl.c:1.15	Mon Aug 29 14:34:58 2011
+++ src/sbin/bioctl/bioctl.c	Sat Nov 15 01:52:01 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: bioctl.c,v 1.15 2011/08/29 14:34:58 joerg Exp $ */
+/* $NetBSD: bioctl.c,v 1.16 2014/11/15 01:52:01 joerg Exp $ */
 /* $OpenBSD: bioctl.c,v 1.52 2007/03/20 15:26:06 jmc Exp $ */
 
 /*
@@ -31,7 +31,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: bioctl.c,v 1.15 2011/08/29 14:34:58 joerg Exp $);
+__RCSID($NetBSD: bioctl.c,v 1.16 2014/11/15 01:52:01 joerg Exp $);
 #endif
 
 #include sys/types.h
@@ -292,7 +292,7 @@ bio_show_volumes(struct biotmp *bt)
 	}
 
 	snprintf(bt-volname, sizeof(bt-volname), %u, bv.bv_volid);
-	if (bv.bv_vendor)
+	if (bv.bv_vendor[0])
 		snprintf(tmp, sizeof(tmp), %s %s, bv.bv_dev, bv.bv_vendor);
 	else
 		snprintf(tmp, sizeof(tmp), %s, bv.bv_dev);



CVS commit: src/bin/ps

2014-11-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Nov 15 01:58:34 UTC 2014

Modified Files:
src/bin/ps: print.c

Log Message:
Use l_wmesg if the string is not empty. Don't bother checking l_name for
nullness.


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/bin/ps/print.c

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

Modified files:

Index: src/bin/ps/print.c
diff -u src/bin/ps/print.c:1.122 src/bin/ps/print.c:1.123
--- src/bin/ps/print.c:1.122	Sun Apr 20 22:48:59 2014
+++ src/bin/ps/print.c	Sat Nov 15 01:58:34 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: print.c,v 1.122 2014/04/20 22:48:59 dholland Exp $	*/
+/*	$NetBSD: print.c,v 1.123 2014/11/15 01:58:34 joerg Exp $	*/
 
 /*
  * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
 #if 0
 static char sccsid[] = @(#)print.c	8.6 (Berkeley) 4/16/94;
 #else
-__RCSID($NetBSD: print.c,v 1.122 2014/04/20 22:48:59 dholland Exp $);
+__RCSID($NetBSD: print.c,v 1.123 2014/11/15 01:58:34 joerg Exp $);
 #endif
 #endif /* not lint */
 
@@ -947,7 +947,7 @@ wchan(void *arg, VARENT *ve, enum mode m
 	l = arg;
 	v = ve-var;
 	if (l-l_wchan) {
-		if (l-l_wmesg) {
+		if (l-l_wmesg[0]) {
 			strprintorsetwidth(v, l-l_wmesg, mode);
 			v-width = min(v-width, KI_WMESGLEN);
 		} else {
@@ -1464,7 +1464,7 @@ lname(void *arg, VARENT *ve, enum mode m
 
 	l = arg;
 	v = ve-var;
-	if (l-l_name  l-l_name[0] != '\0') {
+	if (l-l_name[0] != '\0') {
 		strprintorsetwidth(v, l-l_name, mode);
 		v-width = min(v-width, KI_LNAMELEN);
 	} else {



CVS commit: src/gnu/dist/texinfo/makeinfo

2014-11-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Nov 15 02:01:28 UTC 2014

Modified Files:
src/gnu/dist/texinfo/makeinfo: xml.c

Log Message:
Array can't be null.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5 -r1.2 src/gnu/dist/texinfo/makeinfo/xml.c

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

Modified files:

Index: src/gnu/dist/texinfo/makeinfo/xml.c
diff -u src/gnu/dist/texinfo/makeinfo/xml.c:1.1.1.5 src/gnu/dist/texinfo/makeinfo/xml.c:1.2
--- src/gnu/dist/texinfo/makeinfo/xml.c:1.1.1.5	Tue Sep  2 07:50:51 2008
+++ src/gnu/dist/texinfo/makeinfo/xml.c	Sat Nov 15 02:01:27 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: xml.c,v 1.1.1.5 2008/09/02 07:50:51 christos Exp $	*/
+/*	$NetBSD: xml.c,v 1.2 2014/11/15 02:01:27 joerg Exp $	*/
 
 /* xml.c -- xml output.
Id: xml.c,v 1.52 2004/12/19 17:02:23 karl Exp
@@ -870,7 +870,7 @@ xml_insert_element_with_attribute (elt, 
   return;
 }
 
-  if (!xml_element_list[elt].name || !strlen (xml_element_list[elt].name))
+  if (!strlen (xml_element_list[elt].name))
 {
   /*printf (Warning: Inserting empty element %d\n, elt);*/
   return;



CVS commit: src/usr.sbin/isdn/isdnd

2014-11-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Nov 15 02:09:18 UTC 2014

Modified Files:
src/usr.sbin/isdn/isdnd: msghdl.c

Log Message:
Show display if it is not empty.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/isdn/isdnd/msghdl.c

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

Modified files:

Index: src/usr.sbin/isdn/isdnd/msghdl.c
diff -u src/usr.sbin/isdn/isdnd/msghdl.c:1.11 src/usr.sbin/isdn/isdnd/msghdl.c:1.12
--- src/usr.sbin/isdn/isdnd/msghdl.c:1.11	Thu Apr 16 05:56:32 2009
+++ src/usr.sbin/isdn/isdnd/msghdl.c	Sat Nov 15 02:09:18 2014
@@ -27,7 +27,7 @@
  *	i4b daemon - message from kernel handling routines
  *	--
  *
- *	$Id: msghdl.c,v 1.11 2009/04/16 05:56:32 lukem Exp $ 
+ *	$Id: msghdl.c,v 1.12 2014/11/15 02:09:18 joerg Exp $ 
  *
  * $FreeBSD$
  *
@@ -149,7 +149,7 @@ msg_connect_ind(msg_connect_ind_t *mp, i
 		decr_free_channels(find_ctrl_state(mp-controller));
 		if (cep-alert)
 		{
-			if (mp-display)
+			if (mp-display[0])
 			{
 logit(LL_CHD, %05d %s alerting: incoming call from %s to %s (%s),
 	mp-header.cdid, cep-name, SRC, DST, mp-display);
@@ -163,7 +163,7 @@ msg_connect_ind(msg_connect_ind_t *mp, i
 		}
 		else
 		{
-			if (mp-display)
+			if (mp-display[0])
 			{
 logit(LL_CHD, %05d %s answering: incoming call from %s to %s (%s),
 	mp-header.cdid, cep-name, SRC, DST, mp-display);



CVS commit: src/tests/usr.bin/ld

2014-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 03:10:01 UTC 2014

Modified Files:
src/tests/usr.bin/ld: t_script.sh

Log Message:
Tweak.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/ld/t_script.sh

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

Modified files:

Index: src/tests/usr.bin/ld/t_script.sh
diff -u src/tests/usr.bin/ld/t_script.sh:1.1 src/tests/usr.bin/ld/t_script.sh:1.2
--- src/tests/usr.bin/ld/t_script.sh:1.1	Fri Nov 14 09:03:39 2014
+++ src/tests/usr.bin/ld/t_script.sh	Sat Nov 15 03:10:01 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: t_script.sh,v 1.1 2014/11/14 09:03:39 uebayasi Exp $
+#	$NetBSD: t_script.sh,v 1.2 2014/11/15 03:10:01 uebayasi Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -58,12 +58,9 @@ EOF
 	ld -r -T test.x -Map test.map -o test.ro test.o
 	extract_section_names test.ro test.secs
 	extract_symbol_names test.ro test.syms
-	atf_check -s exit:1 -o ignore -e ignore \
-	grep '\.data\.a$' test.secs
-	atf_check -s exit:1 -o ignore -e ignore \
-	grep '\.data\.b$' test.secs
-	atf_check -s exit:0 -o ignore -e ignore \
-	grep '\.data\.c$' test.secs
+	assert_nosec '\.data\.a'
+	assert_nosec '\.data\.b'
+	assert_sec '\.data\.c'
 }
 
 extract_section_names() {
@@ -76,6 +73,16 @@ extract_symbol_names() {
 	sed -e 's/^.* //'
 }
 
+assert_sec() {
+	atf_check -s exit:0 -o ignore -e ignore \
+	grep ^$1\$ test.secs
+}
+
+assert_nosec() {
+	atf_check -s exit:1 -o ignore -e ignore \
+	grep ^$1\$ test.secs
+}
+
 atf_init_test_cases()
 {
 



CVS commit: src

2014-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 03:22:29 UTC 2014

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/usr.bin/ld: t_section.sh
Removed Files:
src/tests/usr.bin/ld: t_orphan.sh

Log Message:
Merge tests.


To generate a diff of this commit:
cvs rdiff -u -r1.599 -r1.600 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.2 -r0 src/tests/usr.bin/ld/t_orphan.sh
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/ld/t_section.sh

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.599 src/distrib/sets/lists/tests/mi:1.600
--- src/distrib/sets/lists/tests/mi:1.599	Fri Nov 14 16:21:12 2014
+++ src/distrib/sets/lists/tests/mi	Sat Nov 15 03:22:29 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.599 2014/11/14 16:21:12 uebayasi Exp $
+# $NetBSD: mi,v 1.600 2014/11/15 03:22:29 uebayasi Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -3466,7 +3466,7 @@
 ./usr/tests/usr.bin/ldtests-usr.bin-tests
 ./usr/tests/usr.bin/ld/Atffile			tests-usr.bin-tests	atf
 ./usr/tests/usr.bin/ld/Kyuafile			tests-usr.bin-tests	atf,kyua
-./usr/tests/usr.bin/ld/t_orphan			tests-usr.bin-tests	atf
+./usr/tests/usr.bin/ld/t_orphan			tests-obsolete	obsolete,atf
 ./usr/tests/usr.bin/ld/t_script			tests-usr.bin-tests	atf
 ./usr/tests/usr.bin/ld/t_section		tests-usr.bin-tests	atf
 ./usr/tests/usr.bin/m4tests-usr.bin-tests

Index: src/tests/usr.bin/ld/t_section.sh
diff -u src/tests/usr.bin/ld/t_section.sh:1.2 src/tests/usr.bin/ld/t_section.sh:1.3
--- src/tests/usr.bin/ld/t_section.sh:1.2	Fri Nov 14 16:20:42 2014
+++ src/tests/usr.bin/ld/t_section.sh	Sat Nov 15 03:22:29 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: t_section.sh,v 1.2 2014/11/14 16:20:42 uebayasi Exp $
+#	$NetBSD: t_section.sh,v 1.3 2014/11/15 03:22:29 uebayasi Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -25,6 +25,8 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
+
+
 atf_test_case startstop
 startstop_head() {
 	atf_set descr check if __start_*/__stop_* symbols are generated
@@ -41,7 +43,58 @@ EOF
 	atf_check -s exit:0 -o ignore -e ignore cc -o test test.c
 }
 
+
+
+atf_test_case orphan
+orphan_head() {
+	atf_set descr check orphan section placement
+	atf_set require.progs cc readelf grep
+}
+
+orphan_body() {
+	cat  test.c  EOF
+#include sys/cdefs.h
+/* read-only orphan */
+const char a[] __section(hoge) = hoge;
+/* read-write orphan */
+char b[] __section(fuga) = { 'f', 'u', 'g', 'a', '\0' };
+/* .data */
+int c = 123;
+/* .bss */
+int d = 0;
+/* .text */
+int main(void) { return 0; }
+EOF
+	atf_check -s exit:0 -o ignore -e ignore cc -o test test.c
+	readelf -S test |
+	grep ' \.text\| hoge\| \.data\| fuga\| \.bss' test.secs
+	{
+		# Read-only orphan sections are placed after well-known
+		# read-only sections (.text, .rodata) but before .data.
+		match .text 
+		match hoge 
+		# Read-write orphan sections are placed after well-known
+		# read-write sections (.data) but before .bss.
+		match .data 
+		match fuga 
+		match .bss 
+		:
+	}  test.secs
+	atf_check test $? -eq 0
+}
+
+match() {
+	read line
+	case $line in
+	*$1*) return 0;
+	esac
+	return 1
+}
+
+
+
 atf_init_test_cases()
 {
 	atf_add_test_case startstop
+	atf_add_test_case orphan
 }



CVS commit: src/tests/usr.bin/ld

2014-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 03:23:12 UTC 2014

Modified Files:
src/tests/usr.bin/ld: Makefile

Log Message:
Merge tests.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/ld/Makefile

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

Modified files:

Index: src/tests/usr.bin/ld/Makefile
diff -u src/tests/usr.bin/ld/Makefile:1.3 src/tests/usr.bin/ld/Makefile:1.4
--- src/tests/usr.bin/ld/Makefile:1.3	Fri Nov 14 16:21:12 2014
+++ src/tests/usr.bin/ld/Makefile	Sat Nov 15 03:23:11 2014
@@ -1,11 +1,10 @@
-# $NetBSD: Makefile,v 1.3 2014/11/14 16:21:12 uebayasi Exp $
+# $NetBSD: Makefile,v 1.4 2014/11/15 03:23:11 uebayasi Exp $
 
 .include bsd.own.mk
 
 TESTSDIR=	${TESTSBASE}/usr.bin/ld
 
-TESTS_SH=	t_orphan \
-		t_script \
+TESTS_SH=	t_script \
 		t_section
 
 .include bsd.test.mk



CVS commit: src/tests/usr.bin/ld

2014-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 03:47:29 UTC 2014

Modified Files:
src/tests/usr.bin/ld: t_script.sh

Log Message:
Test object ordering.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/ld/t_script.sh

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

Modified files:

Index: src/tests/usr.bin/ld/t_script.sh
diff -u src/tests/usr.bin/ld/t_script.sh:1.2 src/tests/usr.bin/ld/t_script.sh:1.3
--- src/tests/usr.bin/ld/t_script.sh:1.2	Sat Nov 15 03:10:01 2014
+++ src/tests/usr.bin/ld/t_script.sh	Sat Nov 15 03:47:29 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: t_script.sh,v 1.2 2014/11/15 03:10:01 uebayasi Exp $
+#	$NetBSD: t_script.sh,v 1.3 2014/11/15 03:47:29 uebayasi Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -25,6 +25,40 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
+
+
+atf_test_case order
+order_head() {
+	atf_set descr check if object ordering work
+	atf_set require.progs cc ld readelf nm sed grep
+}
+
+order_body() {
+	for i in a b c; do
+		cat  $i.c  EOF
+#include sys/cdefs.h
+char $i __section(.data.$i) = '$i';
+EOF
+	done
+	cat  test.c  EOF
+int main(void) { return 0; }
+EOF
+	# c - b - a
+	atf_check -s exit:0 -o ignore -e ignore \
+	cc -o test test.c c.c b.c a.c
+	extract_symbol_names test |
+	grep '^[abc]$' test.syms
+	{
+		match c 
+		match b 
+		match a 
+		:
+	} test.syms
+	atf_check test $? -eq 0
+}
+
+
+
 atf_test_case multisec
 multisec_head() {
 	atf_set descr check if multiple SECTIONS commands work
@@ -63,6 +97,8 @@ EOF
 	assert_sec '\.data\.c'
 }
 
+
+
 extract_section_names() {
 	readelf -S $1 |
 	sed -ne '/\] \./ { s/^.*\] //; s/ .*$//; p }'
@@ -73,6 +109,14 @@ extract_symbol_names() {
 	sed -e 's/^.* //'
 }
 
+match() {
+	read line
+	case $line in
+	*$1*) return 0;
+	esac
+	return 1
+}
+
 assert_sec() {
 	atf_check -s exit:0 -o ignore -e ignore \
 	grep ^$1\$ test.secs
@@ -83,8 +127,10 @@ assert_nosec() {
 	grep ^$1\$ test.secs
 }
 
+
+
 atf_init_test_cases()
 {
-
+	atf_add_test_case order
 	atf_add_test_case multisec
 }



CVS commit: src/tests/usr.bin/ld

2014-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 04:23:49 UTC 2014

Modified Files:
src/tests/usr.bin/ld: t_script.sh

Log Message:
Test object reordering by script.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/ld/t_script.sh

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

Modified files:

Index: src/tests/usr.bin/ld/t_script.sh
diff -u src/tests/usr.bin/ld/t_script.sh:1.3 src/tests/usr.bin/ld/t_script.sh:1.4
--- src/tests/usr.bin/ld/t_script.sh:1.3	Sat Nov 15 03:47:29 2014
+++ src/tests/usr.bin/ld/t_script.sh	Sat Nov 15 04:23:48 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: t_script.sh,v 1.3 2014/11/15 03:47:29 uebayasi Exp $
+#	$NetBSD: t_script.sh,v 1.4 2014/11/15 04:23:48 uebayasi Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -27,34 +27,63 @@
 
 
 
-atf_test_case order
-order_head() {
-	atf_set descr check if object ordering work
+atf_test_case order_default
+order_default_head() {
+	atf_set descr check if default object ordering works
 	atf_set require.progs cc ld readelf nm sed grep
 }
 
-order_body() {
-	for i in a b c; do
-		cat  $i.c  EOF
-#include sys/cdefs.h
-char $i __section(.data.$i) = '$i';
+order_default_body() {
+	order_compile
+	cat  test.x  EOF
+SECTIONS {
+	/* do nothing */
+}
 EOF
-	done
-	cat  test.c  EOF
-int main(void) { return 0; }
+	order_assert_descending
+}
+
+
+
+atf_test_case order_merge
+order_merge_head() {
+	atf_set descr check if glob merge doesn't change ordering
+	atf_set require.progs cc ld readelf nm sed grep
+}
+
+order_merge_body() {
+	order_compile
+	cat  test.x  EOF
+SECTIONS {
+	.data : {
+		*(.data .data.*)
+	}
+}
 EOF
-	# c - b - a
-	atf_check -s exit:0 -o ignore -e ignore \
-	cc -o test test.c c.c b.c a.c
-	extract_symbol_names test |
-	grep '^[abc]$' test.syms
-	{
-		match c 
-		match b 
-		match a 
-		:
-	} test.syms
-	atf_check test $? -eq 0
+	order_assert_descending
+}
+
+
+
+atf_test_case reorder
+reorder_head() {
+	atf_set descr check if reordering works
+	atf_set require.progs cc ld readelf nm sed grep
+}
+
+reorder_body() {
+	order_compile
+	cat  test.x  EOF
+SECTIONS {
+	.data : {
+		*(.data)
+		*(.data.a)
+		*(.data.b)
+		*(.data.c)
+	}
+}
+EOF
+	order_assert_ascending
 }
 
 
@@ -99,6 +128,45 @@ EOF
 
 
 
+order_compile() {
+	for i in a b c; do
+		cat  $i.c  EOF
+#include sys/cdefs.h
+char $i __section(.data.$i) = '$i';
+EOF
+		atf_check -s exit:0 -o ignore -e ignore cc -c $i.c
+	done
+	cat  test.c  EOF
+int main(void) { return 0; }
+EOF
+	atf_check -s exit:0 -o ignore -e ignore cc -c test.c
+}
+
+order_link() {
+	atf_check -s exit:0 -o ignore -e ignore \
+	ld -r -T test.x -Map test.map -o x.o c.o b.o a.o
+	atf_check -s exit:0 -o ignore -e ignore \
+	cc -o test test.o x.o
+	extract_symbol_names test |
+	grep '^[abc]$' test.syms
+}
+
+order_assert_ascending() {
+	order_assert_order a b c
+}
+
+order_assert_descending() {
+	order_assert_order c b a
+}
+
+order_assert_order() {
+	order_link
+	{
+		match $1  match $2  match $3
+	} test.syms
+	atf_check test $? -eq 0
+}
+
 extract_section_names() {
 	readelf -S $1 |
 	sed -ne '/\] \./ { s/^.*\] //; s/ .*$//; p }'
@@ -131,6 +199,8 @@ assert_nosec() {
 
 atf_init_test_cases()
 {
-	atf_add_test_case order
+	atf_add_test_case order_default
+	atf_add_test_case order_merge
+	atf_add_test_case reorder
 	atf_add_test_case multisec
 }



CVS commit: src/tests/usr.bin/ld

2014-11-14 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov 15 04:47:11 UTC 2014

Modified Files:
src/tests/usr.bin/ld: t_script.sh

Log Message:
Tweaks.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/ld/t_script.sh

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

Modified files:

Index: src/tests/usr.bin/ld/t_script.sh
diff -u src/tests/usr.bin/ld/t_script.sh:1.4 src/tests/usr.bin/ld/t_script.sh:1.5
--- src/tests/usr.bin/ld/t_script.sh:1.4	Sat Nov 15 04:23:48 2014
+++ src/tests/usr.bin/ld/t_script.sh	Sat Nov 15 04:47:11 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: t_script.sh,v 1.4 2014/11/15 04:23:48 uebayasi Exp $
+#	$NetBSD: t_script.sh,v 1.5 2014/11/15 04:47:11 uebayasi Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -34,7 +34,6 @@ order_default_head() {
 }
 
 order_default_body() {
-	order_compile
 	cat  test.x  EOF
 SECTIONS {
 	/* do nothing */
@@ -47,12 +46,11 @@ EOF
 
 atf_test_case order_merge
 order_merge_head() {
-	atf_set descr check if glob merge doesn't change ordering
+	atf_set descr check if glob merge keeps object ordering
 	atf_set require.progs cc ld readelf nm sed grep
 }
 
 order_merge_body() {
-	order_compile
 	cat  test.x  EOF
 SECTIONS {
 	.data : {
@@ -67,12 +65,11 @@ EOF
 
 atf_test_case reorder
 reorder_head() {
-	atf_set descr check if reordering works
+	atf_set descr check if object reordering works
 	atf_set require.progs cc ld readelf nm sed grep
 }
 
 reorder_body() {
-	order_compile
 	cat  test.x  EOF
 SECTIONS {
 	.data : {
@@ -128,6 +125,23 @@ EOF
 
 
 
+order_assert_ascending() {
+	order_assert_order a b c
+}
+
+order_assert_descending() {
+	order_assert_order c b a
+}
+
+order_assert_order() {
+	order_compile
+	order_link
+	{
+		match $1  match $2  match $3
+	} test.syms
+	atf_check test $? -eq 0
+}
+
 order_compile() {
 	for i in a b c; do
 		cat  $i.c  EOF
@@ -143,6 +157,7 @@ EOF
 }
 
 order_link() {
+	# c - b - a
 	atf_check -s exit:0 -o ignore -e ignore \
 	ld -r -T test.x -Map test.map -o x.o c.o b.o a.o
 	atf_check -s exit:0 -o ignore -e ignore \
@@ -151,22 +166,6 @@ order_link() {
 	grep '^[abc]$' test.syms
 }
 
-order_assert_ascending() {
-	order_assert_order a b c
-}
-
-order_assert_descending() {
-	order_assert_order c b a
-}
-
-order_assert_order() {
-	order_link
-	{
-		match $1  match $2  match $3
-	} test.syms
-	atf_check test $? -eq 0
-}
-
 extract_section_names() {
 	readelf -S $1 |
 	sed -ne '/\] \./ { s/^.*\] //; s/ .*$//; p }'



CVS commit: src/sys/ufs/ufs

2014-11-14 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Sat Nov 15 05:03:55 UTC 2014

Modified Files:
src/sys/ufs/ufs: ufs_extattr.c

Log Message:
Fix UFS1 extended attribute backend autocreation deadlock

UFS1 extended attribute backend autocration goes through a vn_open()
to create the backend file, and this forces us to release the lock
on the target node, in case the target is within the parents of the
backend file. That created a window within which another thread could
acquire a lock on the target vnode and deadlock awaiting for the
mount extended attribute lock.

We fix the problem by also releasing the mount extended attribute lock
when calling vn_open(), but that lets another thread race us for backend
creation. We just detect this using O_EXCL for vn_open() and by checking
for EEXIST return code. If we are raced, we fail backend creation but
this is not a problem since another thread succeeded on it: we just have
to use the result.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/ufs/ufs/ufs_extattr.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/ufs/ufs/ufs_extattr.c
diff -u src/sys/ufs/ufs/ufs_extattr.c:1.44 src/sys/ufs/ufs/ufs_extattr.c:1.45
--- src/sys/ufs/ufs/ufs_extattr.c:1.44	Fri Nov 14 10:09:50 2014
+++ src/sys/ufs/ufs/ufs_extattr.c	Sat Nov 15 05:03:55 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_extattr.c,v 1.44 2014/11/14 10:09:50 manu Exp $	*/
+/*	$NetBSD: ufs_extattr.c,v 1.45 2014/11/15 05:03:55 manu Exp $	*/
 
 /*-
  * Copyright (c) 1999-2002 Robert N. M. Watson
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ufs_extattr.c,v 1.44 2014/11/14 10:09:50 manu Exp $);
+__KERNEL_RCSID(0, $NetBSD: ufs_extattr.c,v 1.45 2014/11/15 05:03:55 manu Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_ffs.h
@@ -210,9 +210,9 @@ ufs_extattr_valid_attrname(int attrnames
 /*
  * Autocreate an attribute storage
  */
-static struct ufs_extattr_list_entry *
+static int
 ufs_extattr_autocreate_attr(struct vnode *vp, int attrnamespace,
-const char *attrname, struct lwp *l)
+const char *attrname, struct lwp *l, struct ufs_extattr_list_entry **uelep)
 {
 	struct mount *mp = vp-v_mount;
 	struct ufsmount *ump = VFSTOUFS(mp);
@@ -246,11 +246,21 @@ ufs_extattr_autocreate_attr(struct vnode
 		break;
 	default:
 		PNBUF_PUT(path);
-		return NULL;
+		*uelep = NULL;
+		return EINVAL;
 		break;
 	}
 
 	/*
+	 * Release extended attribute mount lock, otherwise
+	 * we can deadlock with another thread that would lock 
+	 * vp after we unlock it below, and call 
+	 * ufs_extattr_uepm_lock(ump), for instance
+	 * in ufs_getextattr().
+	 */
+	ufs_extattr_uepm_unlock(ump);
+
+	/*
 	 * XXX unlock/lock should only be done when setting extattr
 	 * on backing store or one of its parent directory 
 	 * including root, but we always do it for now.
@@ -261,7 +271,12 @@ ufs_extattr_autocreate_attr(struct vnode
 	pb = pathbuf_create(path);
 	NDINIT(nd, CREATE, LOCKPARENT, pb);
 	
-	error = vn_open(nd, O_CREAT|O_RDWR, 0600);
+	/*
+	 * Since we do not hold ufs_extattr_uepm_lock anymore,
+	 * another thread may race with us for backend creation,
+	 * but only one can succeed here thanks to O_EXCL
+	 */
+	error = vn_open(nd, O_CREAT|O_EXCL|O_RDWR, 0600);
 
 	/*
 	 * Reacquire the lock on the vnode
@@ -269,10 +284,13 @@ ufs_extattr_autocreate_attr(struct vnode
 	KASSERT(VOP_ISLOCKED(vp) == 0);
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 
+	ufs_extattr_uepm_lock(ump);
+
 	if (error != 0) {
 		pathbuf_destroy(pb);
 		PNBUF_PUT(path);
-		return NULL;
+		*uelep = NULL;
+		return error;
 	}
 
 	KASSERT(nd.ni_vp != NULL);
@@ -300,7 +318,8 @@ ufs_extattr_autocreate_attr(struct vnode
 		printf(%s: write uef header failed for %s, error = %d\n, 
 		   __func__, attrname, error);
 		vn_close(backing_vp, FREAD|FWRITE, l-l_cred);
-		return NULL;
+		*uelep = NULL;
+		return error;
 	}
 
 	/*
@@ -313,7 +332,8 @@ ufs_extattr_autocreate_attr(struct vnode
 		printf(%s: enable %s failed, error %d\n, 
 		   __func__, attrname, error);
 		vn_close(backing_vp, FREAD|FWRITE, l-l_cred);
-		return NULL;
+		*uelep = NULL;
+		return error;
 	}
 
 	uele = ufs_extattr_find_attr(ump, attrnamespace, attrname);
@@ -321,13 +341,15 @@ ufs_extattr_autocreate_attr(struct vnode
 		printf(%s: atttribute %s created but not found!\n,
 		   __func__, attrname);
 		vn_close(backing_vp, FREAD|FWRITE, l-l_cred);
-		return NULL;
+		*uelep = NULL;
+		return ESRCH; /* really internal error */
 	}
 
 	printf(%s: EA backing store autocreated for %s\n,
 	   mp-mnt_stat.f_mntonname, attrname);
 
-	return uele;
+	*uelep = uele;
+	return 0;
 }
 
 /*
@@ -1405,10 +1427,17 @@ ufs_extattr_set(struct vnode *vp, int at
 
 	attribute = ufs_extattr_find_attr(ump, attrnamespace, name);
 	if (!attribute) {
-		attribute =  ufs_extattr_autocreate_attr(vp, attrnamespace, 
-			 name, l);
-		if  (!attribute)
-			return (ENODATA);
+		error 

CVS commit: src/sys/arch/atari/stand/bootxx

2014-11-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov 15 06:30:10 UTC 2014

Modified Files:
src/sys/arch/atari/stand/bootxx: bootxx.c

Log Message:
Expand heap to 64KB so that bootxx can load bootxxx from 32KB blocksize ffs.

Tested on TT030 with 32GB SSD via SATA-IDE-SCSI converters.
Should be pulled up to netbsd-7 and netbsd-6 branches..


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/atari/stand/bootxx/bootxx.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/atari/stand/bootxx/bootxx.c
diff -u src/sys/arch/atari/stand/bootxx/bootxx.c:1.15 src/sys/arch/atari/stand/bootxx/bootxx.c:1.16
--- src/sys/arch/atari/stand/bootxx/bootxx.c:1.15	Mon Aug 24 13:04:37 2009
+++ src/sys/arch/atari/stand/bootxx/bootxx.c	Sat Nov 15 06:30:10 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootxx.c,v 1.15 2009/08/24 13:04:37 tsutsui Exp $	*/
+/*	$NetBSD: bootxx.c,v 1.16 2014/11/15 06:30:10 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Waldi Ravens.
@@ -49,6 +49,11 @@ int	bootxxx(void *, void *, struct osdsc
 int	load_booter(struct osdsc *);
 int	usr_info(struct osdsc *);
 
+#define	BOOTXXX_MAXSIZE	(64 * 1024)
+#define	HEAPSIZE	(64 * 1024)	/* should be 32KB for ffs blocksize */
+#define	HEAPSTART	(LOADADDR3 + BOOTXXX_MAXSIZE)
+#define	HEAPEND		(HEAPSTART + HEAPSIZE)
+
 int
 bootxx(void *readsector, void *disklabel, int autoboot)
 {
@@ -58,10 +63,10 @@ bootxx(void *readsector, void *disklabel
 	bxxx_t		bootxxx = (bxxx_t)(LOADADDR3);
 
 	memset(edata, 0, end - edata);
-	setheap(end, (void*)(LOADADDR3 - 4));
+	setheap((void *)HEAPSTART, (void *)HEAPEND);
 
 	printf(\033v\nNetBSD/atari secondary bootloader
-		 ($Revision: 1.15 $)\n\n);
+		 ($Revision: 1.16 $)\n\n);
 
 	if (init_dskio(readsector, disklabel, -1))
 		return -1;