CVS commit: src/sys/dev/wscons

2015-05-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon May 18 14:27:49 UTC 2015

Modified Files:
src/sys/dev/wscons: wsconsio.h

Log Message:
add WSDISPLAY_TYPE_TEGRA


To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.113 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/dev/wscons/wsconsio.h
diff -u src/sys/dev/wscons/wsconsio.h:1.112 src/sys/dev/wscons/wsconsio.h:1.113
--- src/sys/dev/wscons/wsconsio.h:1.112	Fri Mar 20 21:42:31 2015
+++ src/sys/dev/wscons/wsconsio.h	Mon May 18 14:27:49 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: wsconsio.h,v 1.112 2015/03/20 21:42:31 jmcneill Exp $ */
+/* $NetBSD: wsconsio.h,v 1.113 2015/05/18 14:27:49 jmcneill Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -336,7 +336,8 @@ struct wsmouse_repeat {
 #define	WSDISPLAY_TYPE_CLPS711X	59	/* CL PS-711x  */
 #define	WSDISPLAY_TYPE_ALLWINNER 60	/* Allwinner ARM SoC */
 #define	WSDISPLAY_TYPE_MGX	61	/* SSB 4096V-MGX */
-#define	WSDISPLAY_TYPE_MESON	62	/* Amlogic Meson ARM Soc */
+#define	WSDISPLAY_TYPE_MESON	62	/* Amlogic Meson ARM SoC */
+#define	WSDISPLAY_TYPE_TEGRA	63	/* NVIDIA Tegra ARM SoC */
 
 /* Basic display information.  Not applicable to all display types. */
 struct wsdisplay_fbinfo {



CVS commit: src/external/cddl/osnet/dev/dtrace/amd64

2015-05-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 18 14:41:41 UTC 2015

Modified Files:
src/external/cddl/osnet/dev/dtrace/amd64: dtrace_asm.S

Log Message:
don't re-define END() now that amd64 defines it


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S

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

Modified files:

Index: src/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S
diff -u src/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S:1.4 src/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S:1.5
--- src/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S:1.4	Mon Jun 11 11:18:05 2012
+++ src/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S	Mon May 18 10:41:41 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: dtrace_asm.S,v 1.4 2012/06/11 15:18:05 chs Exp $	*/
+/*	$NetBSD: dtrace_asm.S,v 1.5 2015/05/18 14:41:41 christos Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -35,7 +35,6 @@
 #include sys/cpuvar_defs.h
 #include sys/dtrace.h
 #include machine/asm.h
-#define END(a)
 #define MEXITCOUNT
 
 #include assym.h



CVS commit: src/external/cddl/osnet/dev/dtrace/amd64

2015-05-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 18 14:41:41 UTC 2015

Modified Files:
src/external/cddl/osnet/dev/dtrace/amd64: dtrace_asm.S

Log Message:
don't re-define END() now that amd64 defines it


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S

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



CVS commit: src/sys/arch/mips/ingenic

2015-05-18 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Mon May 18 15:03:16 UTC 2015

Modified Files:
src/sys/arch/mips/ingenic: ingenic_regs.h

Log Message:
add some clock divider registers


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/mips/ingenic/ingenic_regs.h

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



CVS commit: src/sys/arch/mips/ingenic

2015-05-18 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Mon May 18 15:11:47 UTC 2015

Modified Files:
src/sys/arch/mips/ingenic: ingenic_dwctwo.c

Log Message:
explicitly un-suspend the OTG port after PHY reset


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/ingenic/ingenic_dwctwo.c

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



CVS commit: src/sys/arch/mips/ingenic

2015-05-18 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Mon May 18 15:11:47 UTC 2015

Modified Files:
src/sys/arch/mips/ingenic: ingenic_dwctwo.c

Log Message:
explicitly un-suspend the OTG port after PHY reset


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/ingenic/ingenic_dwctwo.c

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

Modified files:

Index: src/sys/arch/mips/ingenic/ingenic_dwctwo.c
diff -u src/sys/arch/mips/ingenic/ingenic_dwctwo.c:1.10 src/sys/arch/mips/ingenic/ingenic_dwctwo.c:1.11
--- src/sys/arch/mips/ingenic/ingenic_dwctwo.c:1.10	Tue Apr 28 15:07:07 2015
+++ src/sys/arch/mips/ingenic/ingenic_dwctwo.c	Mon May 18 15:11:47 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ingenic_dwctwo.c,v 1.10 2015/04/28 15:07:07 macallan Exp $ */
+/*	$NetBSD: ingenic_dwctwo.c,v 1.11 2015/05/18 15:11:47 macallan Exp $ */
 
 /*-
  * Copyright (c) 2014 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ingenic_dwctwo.c,v 1.10 2015/04/28 15:07:07 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: ingenic_dwctwo.c,v 1.11 2015/05/18 15:11:47 macallan Exp $);
 
 /*
  * adapted from bcm2835_dwctwo.c
@@ -154,6 +154,10 @@ ingenic_dwc2_attach(device_t parent, dev
 #endif
 
 	reg = readreg(JZ_USBPCR1);
+#ifdef INGENIC_DEBUG
+	printf(JZ_USBPCR1 %08x\n, reg);
+#endif
+	reg = ~0xf000;
 	reg |= PCR_SYNOPSYS;
 	reg |= PCR_REFCLK_CORE;
 	reg = ~PCR_CLK_M;
@@ -166,6 +170,7 @@ ingenic_dwc2_attach(device_t parent, dev
 	printf(JZ_USBRDT  %08x\n, readreg(JZ_USBRDT));
 #endif
 
+	writereg(JZ_USBVBFIL, 0);
 	delay(1);
 
 	reg = readreg(JZ_USBPCR);
@@ -177,6 +182,11 @@ ingenic_dwc2_attach(device_t parent, dev
 
 	delay(1);
 
+	/* wake up the USB part */
+	reg = readreg(JZ_OPCR);
+	reg |= OPCR_SPENDN0;
+	writereg(JZ_OPCR, reg);
+
 	sc-sc_ih = evbmips_intr_establish(aa-aa_irq, dwc2_intr, sc-sc_dwc2);
 
 	if (sc-sc_ih == NULL) {



CVS commit: src/sys/arch/mips/ingenic

2015-05-18 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Mon May 18 15:03:16 UTC 2015

Modified Files:
src/sys/arch/mips/ingenic: ingenic_regs.h

Log Message:
add some clock divider registers


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/mips/ingenic/ingenic_regs.h

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

Modified files:

Index: src/sys/arch/mips/ingenic/ingenic_regs.h
diff -u src/sys/arch/mips/ingenic/ingenic_regs.h:1.17 src/sys/arch/mips/ingenic/ingenic_regs.h:1.18
--- src/sys/arch/mips/ingenic/ingenic_regs.h:1.17	Mon May  4 12:16:24 2015
+++ src/sys/arch/mips/ingenic/ingenic_regs.h	Mon May 18 15:03:16 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ingenic_regs.h,v 1.17 2015/05/04 12:16:24 macallan Exp $ */
+/*	$NetBSD: ingenic_regs.h,v 1.18 2015/05/18 15:03:16 macallan Exp $ */
 
 /*-
  * Copyright (c) 2014 Michael Lorenz
@@ -269,6 +269,7 @@ MFC0(uint32_t r, uint32_t s)
 	#define PCR_TXHSXVTUNE		0x0030
 	#define PCR_TXVREFTUNE		0x000f
 #define JZ_USBRDT	0x1040	/* Reset Detect Timer Register */
+#define JZ_USBVBFIL	0x1044
 #define JZ_USBPCR1	0x1048
 	#define PCR_SYNOPSYS	0x1000	/* Mentor mode otherwise */
 	#define PCR_REFCLK_CORE	0x0c00
@@ -306,6 +307,27 @@ MFC0(uint32_t r, uint32_t s)
 #define JZ_SPCR1	0x10bc
 #define JZ_SRBC		0x10c4	/* Soft Reset  Bus Control */
 
+/* clock divider registers */
+#define JZ_MSC0CDR	0x1068
+	#define MSCCDR_SCLK_A	0x4000
+	#define MSCCDR_MPLL	0x8000
+	#define MSCCDR_CE	0x2000
+	#define MSCCDR_BUSY	0x1000
+	#define MSCCDR_STOP	0x0800
+	#define MSCCDR_PHASE	0x8000	/* 0 - 90deg phase, 1 - 180 */
+	#define MSCCDR_DIV_M	0x00ff	/* src / ((div + 1) * 2) */
+#define JZ_UHCCDR	0x106c	/* UHC Clock Divider Register */
+	#define UHCCDR_SCLK_A	0x
+	#define UHCCDR_MPLL	0x4000
+	#define UHCCDR_EPLL	0x8000
+	#define UHCCDR_OTG_PHY	0xc000
+	#define UHCCDR_CE	0x2000
+	#define UHCCDR_BUSY	0x1000
+	#define UHCCDR_STOP	0x0800
+	#define UHCCDR_DIV_M	0x00ff
+#define JZ_MSC1CDR	0x10a4
+#define JZ_MSC2CDR	0x10a8
+
 /* interrupt controller */
 #define JZ_ICSR0	0x10001000	/* raw IRQ line status */
 #define JZ_ICMR0	0x10001004	/* IRQ mask, 1 masks IRQ */



CVS commit: src/lib/libedit

2015-05-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 18 15:07:04 UTC 2015

Modified Files:
src/lib/libedit: eln.c

Log Message:
make el_gets() return the number of characters read in wide mode (not the
number of wide characters) From khorben@ by FreeBSD:
https://svnweb.freebsd.org/ports/head/devel/libedit/files/patch-src_eln.c?\
revision=382458view=markup
XXX: Pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libedit/eln.c

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



CVS commit: src/lib/libedit

2015-05-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May 18 15:07:04 UTC 2015

Modified Files:
src/lib/libedit: eln.c

Log Message:
make el_gets() return the number of characters read in wide mode (not the
number of wide characters) From khorben@ by FreeBSD:
https://svnweb.freebsd.org/ports/head/devel/libedit/files/patch-src_eln.c?\
revision=382458view=markup
XXX: Pullup-7


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libedit/eln.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/libedit/eln.c
diff -u src/lib/libedit/eln.c:1.18 src/lib/libedit/eln.c:1.19
--- src/lib/libedit/eln.c:1.18	Tue Mar 24 17:26:50 2015
+++ src/lib/libedit/eln.c	Mon May 18 11:07:04 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: eln.c,v 1.18 2015/03/24 21:26:50 christos Exp $	*/
+/*	$NetBSD: eln.c,v 1.19 2015/05/18 15:07:04 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 #include config.h
 #if !defined(lint)  !defined(SCCSID)
-__RCSID($NetBSD: eln.c,v 1.18 2015/03/24 21:26:50 christos Exp $);
+__RCSID($NetBSD: eln.c,v 1.19 2015/05/18 15:07:04 christos Exp $);
 #endif /* not lint  not SCCSID */
 
 #include histedit.h
@@ -79,6 +79,12 @@ el_gets(EditLine *el, int *nread)
 	if (!(el-el_flags  CHARSET_IS_UTF8))
 		el-el_flags |= IGNORE_EXTCHARS;
 	tmp = el_wgets(el, nread);
+	if (tmp != NULL) {
+	size_t nwread = 0;
+	for (int i = 0; i  *nread; i++)
+		nwread += ct_enc_width(tmp[i]);
+	*nread = (int)nwread;
+	}
 	if (!(el-el_flags  CHARSET_IS_UTF8))
 		el-el_flags = ~IGNORE_EXTCHARS;
 	return ct_encode_string(tmp, el-el_lgcyconv);



CVS commit: src/share/misc

2015-05-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon May 18 11:56:20 UTC 2015

Modified Files:
src/share/misc: acronyms

Log Message:
+ODTW


To generate a diff of this commit:
cvs rdiff -u -r1.236 -r1.237 src/share/misc/acronyms

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



CVS commit: src/sys/arch/mips/ingenic

2015-05-18 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Mon May 18 15:07:53 UTC 2015

Modified Files:
src/sys/arch/mips/ingenic: apbus.c ingenic_var.h

Log Message:
pass the appropriate clock register to devices so different instances of the
same driver don't have to guess
also wire the ddc2 part to iic4 for now so we can see the monitor


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/mips/ingenic/apbus.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/ingenic/ingenic_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/mips/ingenic/apbus.c
diff -u src/sys/arch/mips/ingenic/apbus.c:1.14 src/sys/arch/mips/ingenic/apbus.c:1.15
--- src/sys/arch/mips/ingenic/apbus.c:1.14	Mon May  4 12:23:15 2015
+++ src/sys/arch/mips/ingenic/apbus.c	Mon May 18 15:07:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: apbus.c,v 1.14 2015/05/04 12:23:15 macallan Exp $ */
+/*	$NetBSD: apbus.c,v 1.15 2015/05/18 15:07:52 macallan Exp $ */
 
 /*-
  * Copyright (c) 2014 Michael Lorenz
@@ -29,7 +29,7 @@
 /* catch-all for on-chip peripherals */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: apbus.c,v 1.14 2015/05/04 12:23:15 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: apbus.c,v 1.15 2015/05/18 15:07:52 macallan Exp $);
 
 #include locators.h
 #define	_MIPS_BUS_DMA_PRIVATE
@@ -68,29 +68,30 @@ typedef struct apbus_dev {
 	uint32_t irq;		/* interrupt */
 	uint32_t clk0;		/* bit(s) in CLKGR0 */
 	uint32_t clk1;		/* bit(s) in CLKGR1 */
+	uint32_t clkreg;	/* CGU register */
 } apbus_dev_t;
 
 static const apbus_dev_t apbus_devs[] = {
-	{ dwctwo,	JZ_DWC2_BASE,   21, CLK_OTG0 | CLK_UHC, CLK_OTG1},
-	{ ohci,	JZ_OHCI_BASE,5, CLK_UHC, 0},
-	{ ehci,	JZ_EHCI_BASE,   20, CLK_UHC, 0},
-	{ dme,	JZ_DME_BASE,-1, 0, 0},
-	{ jzgpio,	JZ_GPIO_A_BASE, 17, 0, 0},
-	{ jzgpio,	JZ_GPIO_B_BASE, 16, 0, 0},
-	{ jzgpio,	JZ_GPIO_C_BASE, 15, 0, 0},
-	{ jzgpio,	JZ_GPIO_D_BASE, 14, 0, 0},
-	{ jzgpio,	JZ_GPIO_E_BASE, 13, 0, 0},
-	{ jzgpio,	JZ_GPIO_F_BASE, 12, 0, 0},
-	{ jziic,	JZ_SMB0_BASE,   60, CLK_SMB0, 0},
-	{ jziic,	JZ_SMB1_BASE,   59, CLK_SMB1, 0},
-	{ jziic,	JZ_SMB2_BASE,   58, CLK_SMB2, 0},
-	{ jziic,	JZ_SMB3_BASE,   57, 0, CLK_SMB3},
-	{ jziic,	JZ_SMB4_BASE,   56, 0, CLK_SMB4},
-	{ jzmmc,	JZ_MSC0_BASE,   37, CLK_MSC0, 0},
-	{ jzmmc,	JZ_MSC1_BASE,   36, CLK_MSC1, 0},
-	{ jzmmc,	JZ_MSC2_BASE,   35, CLK_MSC2, 0},
-	{ jzfb,	JZ_LCDC0_BASE,  31, CLK_LCD, CLK_HDMI},
-	{ NULL,		-1, -1, 0, 0}
+	{ dwctwo,	JZ_DWC2_BASE,   21, CLK_OTG0 | CLK_UHC, CLK_OTG1, 0},
+	{ ohci,	JZ_OHCI_BASE,5, CLK_UHC, 0, 0},
+	{ ehci,	JZ_EHCI_BASE,   20, CLK_UHC, 0, 0},
+	{ dme,	JZ_DME_BASE,-1, 0, 0, 0},
+	{ jzgpio,	JZ_GPIO_A_BASE, 17, 0, 0, 0},
+	{ jzgpio,	JZ_GPIO_B_BASE, 16, 0, 0, 0},
+	{ jzgpio,	JZ_GPIO_C_BASE, 15, 0, 0, 0},
+	{ jzgpio,	JZ_GPIO_D_BASE, 14, 0, 0, 0},
+	{ jzgpio,	JZ_GPIO_E_BASE, 13, 0, 0, 0},
+	{ jzgpio,	JZ_GPIO_F_BASE, 12, 0, 0, 0},
+	{ jziic,	JZ_SMB0_BASE,   60, CLK_SMB0, 0, 0},
+	{ jziic,	JZ_SMB1_BASE,   59, CLK_SMB1, 0, 0},
+	{ jziic,	JZ_SMB2_BASE,   58, CLK_SMB2, 0, 0},
+	{ jziic,	JZ_SMB3_BASE,   57, 0, CLK_SMB3, 0},
+	{ jziic,	JZ_SMB4_BASE,   56, 0, CLK_SMB4, 0},
+	{ jzmmc,	JZ_MSC0_BASE,   37, CLK_MSC0, 0, JZ_MSC0CDR},
+	{ jzmmc,	JZ_MSC1_BASE,   36, CLK_MSC1, 0, JZ_MSC1CDR},
+	{ jzmmc,	JZ_MSC2_BASE,   35, CLK_MSC2, 0, JZ_MSC2CDR},
+	{ jzfb,	JZ_LCDC0_BASE,  31, CLK_LCD, CLK_HDMI, 0},
+	{ NULL,		-1, -1, 0, 0, 0}
 };
 
 void
@@ -179,10 +180,15 @@ apbus_attach(device_t parent, device_t s
 	/* these are supposed to be connected to the RTC */
 	gpio_as_dev1(4, 12);
 	gpio_as_dev1(4, 13);
-	/* these can be DDC2 or SMB4, set them to DDC2 */
+	/* these can be DDC2 or SMB4 */
+#if 1
+	/* DDC2 devices show up at SMB4 */
+	gpio_as_dev1(5, 24);
+	gpio_as_dev1(5, 25);
+#else
 	gpio_as_dev0(5, 24);
 	gpio_as_dev0(5, 25);
-
+#endif
 	/* MSC0 */
 	gpio_as_dev1(0, 4);
 	gpio_as_dev1(0, 5);
@@ -232,6 +238,7 @@ apbus_attach(device_t parent, device_t s
 		aa.aa_bst = apbus_memt;
 		aa.aa_pclk = pclk;
 		aa.aa_mclk = mclk;
+		aa.aa_clockreg = adv-clkreg;
 
 		/* enable clocks as needed */
 		if (adv-clk0 != 0) {

Index: src/sys/arch/mips/ingenic/ingenic_var.h
diff -u src/sys/arch/mips/ingenic/ingenic_var.h:1.4 src/sys/arch/mips/ingenic/ingenic_var.h:1.5
--- src/sys/arch/mips/ingenic/ingenic_var.h:1.4	Mon May  4 12:23:15 2015
+++ src/sys/arch/mips/ingenic/ingenic_var.h	Mon May 18 15:07:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ingenic_var.h,v 1.4 2015/05/04 12:23:15 macallan Exp $ */
+/*	$NetBSD: ingenic_var.h,v 1.5 2015/05/18 15:07:52 macallan Exp $ */
 
 /*-
  * Copyright (c) 2014 Michael Lorenz
@@ -39,6 +39,7 @@ struct apbus_attach_args {
 	uint32_t	aa_irq;
 	uint32_t	aa_pclk;	/* PCLK in kHz */
 	uint32_t	aa_mclk;	/* MCLK in kHz */
+	uint32_t	aa_clockreg;
 };
 
 extern bus_space_tag_t ingenic_memt;



CVS commit: src/sys/arch/mips/ingenic

2015-05-18 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Mon May 18 15:07:53 UTC 2015

Modified Files:
src/sys/arch/mips/ingenic: apbus.c ingenic_var.h

Log Message:
pass the appropriate clock register to devices so different instances of the
same driver don't have to guess
also wire the ddc2 part to iic4 for now so we can see the monitor


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/mips/ingenic/apbus.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/ingenic/ingenic_var.h

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



Re: CVS commit: src/sys/arch/x86/x86

2015-05-18 Thread Masanobu SAITOH

On 2015/05/18 22:09, SAITOH Masanobu wrote:

Module Name:src
Committed By:   msaitoh
Date:   Mon May 18 13:09:55 UTC 2015

Modified Files:
src/sys/arch/x86/x86: cpu.c

Log Message:
  PS. Revert previous.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/arch/x86/x86/cpu.c

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


 Sorry. I accidentally committed my test implementation to support
Intel rdrand instruction for rnd(4). That feasture should be attached
as a driver via cpufeature bus.

--
---
SAITOH Masanobu (msai...@execsw.org
 msai...@netbsd.org)


CVS commit: src/sys/arch/x86/x86

2015-05-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon May 18 13:04:21 UTC 2015

Modified Files:
src/sys/arch/x86/x86: cpu.c lapic.c

Log Message:
 Workaround for lapic_set_lvt: bad pin value %d panic on (broken?) BIOS
system. Don't panic when a local APIC's interrput input pin number (LINTx)  1.
Instead, print warning message and continue. The default is pin 1.
Same as Linux (and perhaps FreeBSD). Tested with Shuttle DS57U.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/x86/x86/cpu.c
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/x86/x86/lapic.c

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

Modified files:

Index: src/sys/arch/x86/x86/cpu.c
diff -u src/sys/arch/x86/x86/cpu.c:1.113 src/sys/arch/x86/x86/cpu.c:1.114
--- src/sys/arch/x86/x86/cpu.c:1.113	Mon Jan 12 16:34:39 2015
+++ src/sys/arch/x86/x86/cpu.c	Mon May 18 13:04:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.113 2015/01/12 16:34:39 christos Exp $	*/
+/*	$NetBSD: cpu.c,v 1.114 2015/05/18 13:04:21 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.113 2015/01/12 16:34:39 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.114 2015/05/18 13:04:21 msaitoh Exp $);
 
 #include opt_ddb.h
 #include opt_mpbios.h		/* for MPDEBUG */
@@ -76,18 +76,23 @@ __KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.11
 #include sys/proc.h
 #include sys/systm.h
 #include sys/device.h
+#include sys/kernel.h
 #include sys/kmem.h
 #include sys/cpu.h
 #include sys/cpufreq.h
 #include sys/idle.h
 #include sys/atomic.h
 #include sys/reboot.h
+#include sys/cprng.h
+#include sys/rndpool.h
+#include sys/rndsource.h
 
 #include uvm/uvm.h
 
 #include acpica.h		/* for NACPICA, for mp_verbose */
 
 #include machine/cpufunc.h
+#include machine/cputypes.h
 #include machine/cpuvar.h
 #include machine/pmap.h
 #include machine/vmparam.h
@@ -135,6 +140,9 @@ struct cpu_softc {
 	device_t sc_dev;		/* device tree glue */
 	struct cpu_info *sc_info;	/* pointer to CPU info */
 	bool sc_wasonline;
+	callout_t	sc_rnd_callout;
+	krndsource_t	sc_rnd_source;
+	size_t		sc_rnd_need;
 };
 
 #ifdef MULTIPROCESSOR
@@ -479,9 +487,89 @@ cpu_attach(device_t parent, device_t sel
 	(void)config_defer(self, cpu_defer);
 }
 
+void rdrand(size_t, void *);
+
+void
+rdrand(size_t bytes, void *priv)
+{
+	struct cpu_softc *sc = priv;
+#ifdef i386
+	uint32_t r, valid;
+#else
+	uint64_t r, valid;
+#endif
+	uint32_t len = sizeof(r);
+	int i;
+
+	while (bytes  0) {
+		for (i = 0; i  4; i++) {
+			__asm volatile(
+xor	%1, %1\n\t
+rdrand	%0\n\t
+rcl	$1, %1\n
+: =r (r), =r (valid) : : cc);
+
+			if (valid) {
+#if 0
+#ifdef i386
+printf(RND 0x%08x\n, r);
+#else
+printf(RND 0x%016 PRIx64 \n, r);
+#endif
+#endif
+rnd_add_data(sc-sc_rnd_source, r, len,
+len * NBBY);
+bytes -= len;
+break;
+			}
+		}
+	}
+}
+
+static void x86_rnd_get(void *);
+void x86_rnd_callback(size_t, void *);
+
+/* Callback */
+void
+x86_rnd_callback(size_t bytes, void *priv)
+{
+	struct cpu_softc *sc = priv;
+
+	sc-sc_rnd_need = bytes;
+	callout_reset(sc-sc_rnd_callout, 0, x86_rnd_get, sc);
+}
+
+/* Callout */
+static void
+x86_rnd_get(void *priv)
+{
+	struct cpu_softc *sc = priv;
+
+	rdrand(sc-sc_rnd_need, sc);
+	sc-sc_rnd_need = 16; /* By default */
+	callout_reset(sc-sc_rnd_callout, hz, x86_rnd_get, sc);
+}
+
 static void
 cpu_defer(device_t self)
 {
+	struct cpu_softc *sc = device_private(self);
+	char rnd_name[sizeof(sc-sc_rnd_source.name)];
+
+	if ((cpu_vendor == CPUVENDOR_INTEL)
+	 (cpu_feature[1]  CPUID2_RDRAND)) {
+		aprint_normal_dev(sc-sc_dev, have rdrand\n);
+		sc-sc_rnd_need = 16; /* By default */
+		rndsource_setcb(sc-sc_rnd_source, x86_rnd_callback, sc);
+		snprintf(rnd_name, sizeof(rnd_name), rdrand-%s,
+		device_xname(sc-sc_dev));
+		rnd_attach_source(sc-sc_rnd_source, rnd_name,
+  RND_TYPE_RNG,
+  RND_FLAG_COLLECT_VALUE|RND_FLAG_HASCB);
+		callout_init(sc-sc_rnd_callout, CALLOUT_MPSAFE);
+		callout_reset(sc-sc_rnd_callout, hz, x86_rnd_get, sc);
+	}
+
 	cpu_rescan(self, NULL, NULL);
 }
 

Index: src/sys/arch/x86/x86/lapic.c
diff -u src/sys/arch/x86/x86/lapic.c:1.47 src/sys/arch/x86/x86/lapic.c:1.48
--- src/sys/arch/x86/x86/lapic.c:1.47	Fri Nov 15 08:47:55 2013
+++ src/sys/arch/x86/x86/lapic.c	Mon May 18 13:04:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: lapic.c,v 1.47 2013/11/15 08:47:55 msaitoh Exp $	*/
+/*	$NetBSD: lapic.c,v 1.48 2015/05/18 13:04:21 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lapic.c,v 1.47 2013/11/15 08:47:55 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: lapic.c,v 1.48 2015/05/18 13:04:21 msaitoh Exp $);
 
 #include opt_ddb.h
 #include opt_mpbios.h		/* for MPDEBUG */
@@ -182,11 +182,10 @@ lapic_set_lvt(void)
 		mpi = mp_intrs[i];
 		if (mpi-ioapic == 

CVS commit: src/sys/arch/x86/x86

2015-05-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon May 18 13:09:55 UTC 2015

Modified Files:
src/sys/arch/x86/x86: cpu.c

Log Message:
 PS. Revert previous.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/arch/x86/x86/cpu.c

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

Modified files:

Index: src/sys/arch/x86/x86/cpu.c
diff -u src/sys/arch/x86/x86/cpu.c:1.114 src/sys/arch/x86/x86/cpu.c:1.115
--- src/sys/arch/x86/x86/cpu.c:1.114	Mon May 18 13:04:21 2015
+++ src/sys/arch/x86/x86/cpu.c	Mon May 18 13:09:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.114 2015/05/18 13:04:21 msaitoh Exp $	*/
+/*	$NetBSD: cpu.c,v 1.115 2015/05/18 13:09:55 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.114 2015/05/18 13:04:21 msaitoh Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.115 2015/05/18 13:09:55 msaitoh Exp $);
 
 #include opt_ddb.h
 #include opt_mpbios.h		/* for MPDEBUG */
@@ -76,23 +76,18 @@ __KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.11
 #include sys/proc.h
 #include sys/systm.h
 #include sys/device.h
-#include sys/kernel.h
 #include sys/kmem.h
 #include sys/cpu.h
 #include sys/cpufreq.h
 #include sys/idle.h
 #include sys/atomic.h
 #include sys/reboot.h
-#include sys/cprng.h
-#include sys/rndpool.h
-#include sys/rndsource.h
 
 #include uvm/uvm.h
 
 #include acpica.h		/* for NACPICA, for mp_verbose */
 
 #include machine/cpufunc.h
-#include machine/cputypes.h
 #include machine/cpuvar.h
 #include machine/pmap.h
 #include machine/vmparam.h
@@ -140,9 +135,6 @@ struct cpu_softc {
 	device_t sc_dev;		/* device tree glue */
 	struct cpu_info *sc_info;	/* pointer to CPU info */
 	bool sc_wasonline;
-	callout_t	sc_rnd_callout;
-	krndsource_t	sc_rnd_source;
-	size_t		sc_rnd_need;
 };
 
 #ifdef MULTIPROCESSOR
@@ -487,89 +479,9 @@ cpu_attach(device_t parent, device_t sel
 	(void)config_defer(self, cpu_defer);
 }
 
-void rdrand(size_t, void *);
-
-void
-rdrand(size_t bytes, void *priv)
-{
-	struct cpu_softc *sc = priv;
-#ifdef i386
-	uint32_t r, valid;
-#else
-	uint64_t r, valid;
-#endif
-	uint32_t len = sizeof(r);
-	int i;
-
-	while (bytes  0) {
-		for (i = 0; i  4; i++) {
-			__asm volatile(
-xor	%1, %1\n\t
-rdrand	%0\n\t
-rcl	$1, %1\n
-: =r (r), =r (valid) : : cc);
-
-			if (valid) {
-#if 0
-#ifdef i386
-printf(RND 0x%08x\n, r);
-#else
-printf(RND 0x%016 PRIx64 \n, r);
-#endif
-#endif
-rnd_add_data(sc-sc_rnd_source, r, len,
-len * NBBY);
-bytes -= len;
-break;
-			}
-		}
-	}
-}
-
-static void x86_rnd_get(void *);
-void x86_rnd_callback(size_t, void *);
-
-/* Callback */
-void
-x86_rnd_callback(size_t bytes, void *priv)
-{
-	struct cpu_softc *sc = priv;
-
-	sc-sc_rnd_need = bytes;
-	callout_reset(sc-sc_rnd_callout, 0, x86_rnd_get, sc);
-}
-
-/* Callout */
-static void
-x86_rnd_get(void *priv)
-{
-	struct cpu_softc *sc = priv;
-
-	rdrand(sc-sc_rnd_need, sc);
-	sc-sc_rnd_need = 16; /* By default */
-	callout_reset(sc-sc_rnd_callout, hz, x86_rnd_get, sc);
-}
-
 static void
 cpu_defer(device_t self)
 {
-	struct cpu_softc *sc = device_private(self);
-	char rnd_name[sizeof(sc-sc_rnd_source.name)];
-
-	if ((cpu_vendor == CPUVENDOR_INTEL)
-	 (cpu_feature[1]  CPUID2_RDRAND)) {
-		aprint_normal_dev(sc-sc_dev, have rdrand\n);
-		sc-sc_rnd_need = 16; /* By default */
-		rndsource_setcb(sc-sc_rnd_source, x86_rnd_callback, sc);
-		snprintf(rnd_name, sizeof(rnd_name), rdrand-%s,
-		device_xname(sc-sc_dev));
-		rnd_attach_source(sc-sc_rnd_source, rnd_name,
-  RND_TYPE_RNG,
-  RND_FLAG_COLLECT_VALUE|RND_FLAG_HASCB);
-		callout_init(sc-sc_rnd_callout, CALLOUT_MPSAFE);
-		callout_reset(sc-sc_rnd_callout, hz, x86_rnd_get, sc);
-	}
-
 	cpu_rescan(self, NULL, NULL);
 }
 



CVS commit: src/sys/arch/x86/x86

2015-05-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon May 18 13:09:55 UTC 2015

Modified Files:
src/sys/arch/x86/x86: cpu.c

Log Message:
 PS. Revert previous.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/arch/x86/x86/cpu.c

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



CVS commit: src/share/misc

2015-05-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon May 18 11:56:20 UTC 2015

Modified Files:
src/share/misc: acronyms

Log Message:
+ODTW


To generate a diff of this commit:
cvs rdiff -u -r1.236 -r1.237 src/share/misc/acronyms

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

Modified files:

Index: src/share/misc/acronyms
diff -u src/share/misc/acronyms:1.236 src/share/misc/acronyms:1.237
--- src/share/misc/acronyms:1.236	Sat May  9 18:18:32 2015
+++ src/share/misc/acronyms	Mon May 18 11:56:20 2015
@@ -1,4 +1,4 @@
-$NetBSD: acronyms,v 1.236 2015/05/09 18:18:32 dholland Exp $
+$NetBSD: acronyms,v 1.237 2015/05/18 11:56:20 pooka Exp $
 10Q	thank you
 10X	thanks
 1337	elite (leet)
@@ -352,6 +352,7 @@ O2W	off to work
 OAO	over and out
 OBV	obviously
 OBVS	obviously
+ODTW	others do the work (cf. otdw source)
 OFC	of course
 OH	other half
 OIC	oh, I see



CVS commit: src/sys/arch/x86/x86

2015-05-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon May 18 13:04:21 UTC 2015

Modified Files:
src/sys/arch/x86/x86: cpu.c lapic.c

Log Message:
 Workaround for lapic_set_lvt: bad pin value %d panic on (broken?) BIOS
system. Don't panic when a local APIC's interrput input pin number (LINTx)  1.
Instead, print warning message and continue. The default is pin 1.
Same as Linux (and perhaps FreeBSD). Tested with Shuttle DS57U.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/x86/x86/cpu.c
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/x86/x86/lapic.c

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



CVS commit: src/common/lib/libc/arch/riscv/atomic

2015-05-18 Thread Justin Cormack
Module Name:src
Committed By:   justin
Date:   Mon May 18 08:24:10 UTC 2015

Modified Files:
src/common/lib/libc/arch/riscv/atomic: atomic_op_asm.h

Log Message:
Do not set CRT_ALIAS for rump kernel; symbols provided by toolchain


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/common/lib/libc/arch/riscv/atomic/atomic_op_asm.h

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



CVS commit: src/sys/ufs/ffs

2015-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 08:33:29 UTC 2015

Modified Files:
src/sys/ufs/ffs: ffs_vfsops.c

Log Message:
Print all sizes as size_t


To generate a diff of this commit:
cvs rdiff -u -r1.331 -r1.332 src/sys/ufs/ffs/ffs_vfsops.c

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



CVS commit: src/sys

2015-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 06:38:59 UTC 2015

Modified Files:
src/sys/compat/netbsd32: netbsd32_ioctl.c netbsd32_ioctl.h
src/sys/net: if.c if.h

Log Message:
Implement SIOCIFGCLONERS for netbsd32, so ifconfig -C works.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/compat/netbsd32/netbsd32_ioctl.c
cvs rdiff -u -r1.44 -r1.45 src/sys/compat/netbsd32/netbsd32_ioctl.h
cvs rdiff -u -r1.314 -r1.315 src/sys/net/if.c
cvs rdiff -u -r1.189 -r1.190 src/sys/net/if.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/compat/netbsd32/netbsd32_ioctl.c
diff -u src/sys/compat/netbsd32/netbsd32_ioctl.c:1.69 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.70
--- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.69	Fri Jan 24 12:16:10 2014
+++ src/sys/compat/netbsd32/netbsd32_ioctl.c	Mon May 18 06:38:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_ioctl.c,v 1.69 2014/01/24 12:16:10 bouyer Exp $	*/
+/*	$NetBSD: netbsd32_ioctl.c,v 1.70 2015/05/18 06:38:59 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: netbsd32_ioctl.c,v 1.69 2014/01/24 12:16:10 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: netbsd32_ioctl.c,v 1.70 2015/05/18 06:38:59 martin Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -899,6 +899,17 @@ netbsd32_ioctl(struct lwp *l, const stru
 	case ATAIOCCOMMAND32:
 		IOCTL_STRUCT_CONV_TO(ATAIOCCOMMAND, atareq);
 
+	case SIOCIFGCLONERS32:
+		{
+			struct netbsd32_if_clonereq *req =
+			(struct netbsd32_if_clonereq *)data32;
+			char *buf = NETBSD32PTR64(req-ifcr_buffer);
+
+			error = if_clone_list(req-ifcr_count,
+			buf, req-ifcr_total);
+			break;
+		}
+
 /*
  * only a few ifreq syscalls need conversion and those are
  * all driver specific... XXX

Index: src/sys/compat/netbsd32/netbsd32_ioctl.h
diff -u src/sys/compat/netbsd32/netbsd32_ioctl.h:1.44 src/sys/compat/netbsd32/netbsd32_ioctl.h:1.45
--- src/sys/compat/netbsd32/netbsd32_ioctl.h:1.44	Fri Jan 24 10:41:07 2014
+++ src/sys/compat/netbsd32/netbsd32_ioctl.h	Mon May 18 06:38:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_ioctl.h,v 1.44 2014/01/24 10:41:07 manu Exp $	*/
+/*	$NetBSD: netbsd32_ioctl.h,v 1.45 2015/05/18 06:38:59 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -314,6 +314,12 @@ struct netbsd32_if_addrprefreq {
 	} ifap_addr;
 };
 
+struct netbsd32_if_clonereq {
+	int	ifcr_total;
+	int	ifcr_count;
+	netbsd32_charp ifcr_buffer;
+};
+
 /* from dev/pci/if_devar.h */
 #define	SIOCGADDRROM32		_IOW('i', 240, struct netbsd32_ifreq)	/* get 128 bytes of ROM */
 #define	SIOCGCHIPID32		_IOWR('i', 241, struct netbsd32_ifreq)	/* get chipid */
@@ -375,6 +381,8 @@ struct netbsd32_if_addrprefreq {
 #define	SIOCSIFMEDIA32	_IOWR('i', 53, struct netbsd32_ifreq)	/* set net media */
 #define	OSIOCSIFMEDIA32	_IOWR('i', 53, struct netbsd32_oifreq)	/* set net media */
 
+#define	SIOCIFGCLONERS32 _IOWR('i', 120, struct netbsd32_if_clonereq) /* get cloners */
+
 #define	SIOCSIFMTU32	 _IOW('i', 127, struct netbsd32_ifreq)	/* set ifnet mtu */
 #define	OSIOCSIFMTU32	 _IOW('i', 127, struct netbsd32_oifreq)	/* set ifnet mtu */
 

Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.314 src/sys/net/if.c:1.315
--- src/sys/net/if.c:1.314	Wed Apr 22 20:49:44 2015
+++ src/sys/net/if.c	Mon May 18 06:38:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.314 2015/04/22 20:49:44 roy Exp $	*/
+/*	$NetBSD: if.c,v 1.315 2015/05/18 06:38:59 martin Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.314 2015/04/22 20:49:44 roy Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.315 2015/05/18 06:38:59 martin Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_inet.h
@@ -177,7 +177,6 @@ int	ifqmaxlen = IFQ_MAXLEN;
 static int	if_rt_walktree(struct rtentry *, void *);
 
 static struct if_clone *if_clone_lookup(const char *, int *);
-static int	if_clone_list(struct if_clonereq *);
 
 static LIST_HEAD(, if_clone) if_cloners = LIST_HEAD_INITIALIZER(if_cloners);
 static int if_cloners_count;
@@ -1117,24 +1116,24 @@ if_clone_detach(struct if_clone *ifc)
 /*
  * Provide list of interface cloners to userspace.
  */
-static int
-if_clone_list(struct if_clonereq *ifcr)
+int
+if_clone_list(int buf_count, char *buffer, int *total)
 {
 	char outbuf[IFNAMSIZ], *dst;
 	struct if_clone *ifc;
 	int count, error = 0;
 
-	ifcr-ifcr_total = if_cloners_count;
-	if ((dst = ifcr-ifcr_buffer) == NULL) {
+	*total = if_cloners_count;
+	if ((dst = buffer) == NULL) {
 		/* Just asking how many there are. */
 		return 0;
 	}
 
-	if (ifcr-ifcr_count  0)
+	if (buf_count  0)
 		return EINVAL;
 
-	count = (if_cloners_count  ifcr-ifcr_count) ?
-	if_cloners_count : ifcr-ifcr_count;
+	count = (if_cloners_count  buf_count) ?
+	

CVS commit: src/sys

2015-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 06:38:59 UTC 2015

Modified Files:
src/sys/compat/netbsd32: netbsd32_ioctl.c netbsd32_ioctl.h
src/sys/net: if.c if.h

Log Message:
Implement SIOCIFGCLONERS for netbsd32, so ifconfig -C works.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/compat/netbsd32/netbsd32_ioctl.c
cvs rdiff -u -r1.44 -r1.45 src/sys/compat/netbsd32/netbsd32_ioctl.h
cvs rdiff -u -r1.314 -r1.315 src/sys/net/if.c
cvs rdiff -u -r1.189 -r1.190 src/sys/net/if.h

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



CVS commit: src/sys/ufs/ffs

2015-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 08:07:30 UTC 2015

Modified Files:
src/sys/ufs/ffs: ffs_vfsops.c

Log Message:
Make the recently added fs_cgsize test less strict, as it prevents existing
installs from booting.
Catch the common case and warn about it, pointing to a web page describing
the issue - but allow mounting. In all other cases, print more details about
the inconsistency and fail the mount.


To generate a diff of this commit:
cvs rdiff -u -r1.330 -r1.331 src/sys/ufs/ffs/ffs_vfsops.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/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.330 src/sys/ufs/ffs/ffs_vfsops.c:1.331
--- src/sys/ufs/ffs/ffs_vfsops.c:1.330	Sun Apr 26 06:19:36 2015
+++ src/sys/ufs/ffs/ffs_vfsops.c	Mon May 18 08:07:29 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.330 2015/04/26 06:19:36 maxv Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.331 2015/05/18 08:07:29 martin 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.330 2015/04/26 06:19:36 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: ffs_vfsops.c,v 1.331 2015/05/18 08:07:29 martin Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ffs.h
@@ -982,8 +982,21 @@ ffs_superblock_validate(struct fs *fs)
 
 	/* Check the size of cylinder groups */
 	fs_cgsize = ffs_fragroundup(fs, CGSIZE(fs));
-	if (fs-fs_cgsize != fs_cgsize)
-		return 0;
+	if (fs-fs_cgsize != fs_cgsize) {
+		if (fs-fs_cgsize+1 == CGSIZE(fs)) {
+			printf(CGSIZE(fs) miscalculated by one - this file 
+			system may have been created by\n
+			  an old (buggy) userland, see\n
+			  http://www.netbsd.org/;
+			docs/ffsv1badsuperblock.html\n);
+		} else {
+			printf(ERROR: cylinder group size mismatch: 
+			fs_cgsize = 0x%x, 
+			fs-fs_cgsize = 0x%x, CGSIZE(fs) = 0x%lx\n,
+			fs_cgsize, fs-fs_cgsize, CGSIZE(fs));
+			return 0;
+		}
+	}
 
 	return 1;
 }



CVS commit: src/sys/ufs/ffs

2015-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 08:07:30 UTC 2015

Modified Files:
src/sys/ufs/ffs: ffs_vfsops.c

Log Message:
Make the recently added fs_cgsize test less strict, as it prevents existing
installs from booting.
Catch the common case and warn about it, pointing to a web page describing
the issue - but allow mounting. In all other cases, print more details about
the inconsistency and fail the mount.


To generate a diff of this commit:
cvs rdiff -u -r1.330 -r1.331 src/sys/ufs/ffs/ffs_vfsops.c

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



CVS commit: src/common/lib/libc/arch/riscv/atomic

2015-05-18 Thread Justin Cormack
Module Name:src
Committed By:   justin
Date:   Mon May 18 08:24:10 UTC 2015

Modified Files:
src/common/lib/libc/arch/riscv/atomic: atomic_op_asm.h

Log Message:
Do not set CRT_ALIAS for rump kernel; symbols provided by toolchain


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/common/lib/libc/arch/riscv/atomic/atomic_op_asm.h

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

Modified files:

Index: src/common/lib/libc/arch/riscv/atomic/atomic_op_asm.h
diff -u src/common/lib/libc/arch/riscv/atomic/atomic_op_asm.h:1.1 src/common/lib/libc/arch/riscv/atomic/atomic_op_asm.h:1.2
--- src/common/lib/libc/arch/riscv/atomic/atomic_op_asm.h:1.1	Fri Sep 19 17:36:24 2014
+++ src/common/lib/libc/arch/riscv/atomic/atomic_op_asm.h	Mon May 18 08:24:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_op_asm.h,v 1.1 2014/09/19 17:36:24 matt Exp $	*/
+/*	$NetBSD: atomic_op_asm.h,v 1.2 2015/05/18 08:24:10 justin Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -37,9 +37,6 @@
 #if defined(_KERNEL) || defined(_STANDALONE)
 
 #define	ATOMIC_OP_ALIAS(a,s)	STRONG_ALIAS(a,s)
-#ifdef _RUMPKERNEL
-#define	CRT_ALIAS(a,s)		STRONG_ALIAS(a,s)
-#endif
 
 #else /* _KERNEL */
 



Re: CVS commit: src/sys

2015-05-18 Thread Joerg Sonnenberger
On Sun, May 10, 2015 at 07:41:16AM +, Paul Goyette wrote:
 Module Name:  src
 Committed By: pgoyette
 Date: Sun May 10 07:41:16 UTC 2015
 
 Modified Files:
   src/sys/compat/common: compat_mod.c sysv_ipc_50.c
   src/sys/kern: files.kern syscalls.master sysv_ipc.c
   src/sys/modules: Makefile
   src/sys/modules/compat: Makefile
   src/sys/sys: ipc.h
 Added Files:
   src/sys/compat/common: compat_sysv_mod.c
   src/sys/modules/compat_sysv: Makefile

This broke sysutils/libgtop:

/usr/include/sys/ipc.h:138:42: error: a parameter list without types is only 
allowed in a function 
definition
void sysvipc50_set_compat_sysctl(int (*)(SYSCTLFN_PROTO));
 ^

joerg


CVS commit: src/sys/rump/kern/lib

2015-05-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon May 18 17:49:16 UTC 2015

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

Log Message:
Rewrite rules so that makesyscalls.sh will not be executed multiple
times in a parallel make.

Hopefully fixes sporadic build failures reported by Justin


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/kern/lib/Makefile.sys

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

Modified files:

Index: src/sys/rump/kern/lib/Makefile.sys
diff -u src/sys/rump/kern/lib/Makefile.sys:1.2 src/sys/rump/kern/lib/Makefile.sys:1.3
--- src/sys/rump/kern/lib/Makefile.sys:1.2	Sat May  9 12:03:10 2015
+++ src/sys/rump/kern/lib/Makefile.sys	Mon May 18 17:49:16 2015
@@ -1,13 +1,15 @@
-# $NetBSD: Makefile.sys,v 1.2 2015/05/09 12:03:10 pooka Exp $
+# $NetBSD: Makefile.sys,v 1.3 2015/05/18 17:49:16 pooka Exp $
 
 SYS_MKSYSCALLS=${.CURDIR}/../../../../kern/makesyscalls.sh
 
 SYS_DST=  ${SYS_P}calls.c ${SYS_P}ent.c ${SYS_P}callargs.h ${SYS_P}call.h
 SYS_SRC=${SYS_MKSYSCALLS} ${.CURDIR}/syscalls.conf ${.CURDIR}/syscalls.master
 
-${SYS_DST}: ${SYS_SRC}
+${SYS_P}callargs.h: ${SYS_SRC}
 	cd ${.OBJDIR}  ${HOST_SH} ${.ALLSRC}
 
+${SYS_P}ent.c: ${SYS_P}callargs.h
+
 CPPFLAGS+= -I${.OBJDIR}
 
 DPSRCS+= ${SYS_P}callargs.h



CVS commit: src/sys/rump/kern/lib

2015-05-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon May 18 17:49:16 UTC 2015

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

Log Message:
Rewrite rules so that makesyscalls.sh will not be executed multiple
times in a parallel make.

Hopefully fixes sporadic build failures reported by Justin


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/rump/kern/lib/Makefile.sys

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



CVS commit: src/sys/arch

2015-05-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon May 18 19:32:48 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: files.tegra tegra_car.c tegra_carreg.h
tegra_io.c tegra_var.h
src/sys/arch/evbarm/conf: JETSONTK1
src/sys/arch/evbarm/tegra: tegra_machdep.c
Added Files:
src/sys/arch/arm/nvidia: tegra_dc.c tegra_dcreg.h tegra_genfb.c
tegra_hdmi.c tegra_hdmireg.h

Log Message:
Work in progress HDMI / framebuffer support for Tegra K1.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/nvidia/files.tegra
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/nvidia/tegra_car.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/nvidia/tegra_carreg.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/nvidia/tegra_dc.c \
src/sys/arch/arm/nvidia/tegra_dcreg.h \
src/sys/arch/arm/nvidia/tegra_genfb.c \
src/sys/arch/arm/nvidia/tegra_hdmi.c \
src/sys/arch/arm/nvidia/tegra_hdmireg.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/nvidia/tegra_io.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/nvidia/tegra_var.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/conf/JETSONTK1
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/tegra/tegra_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/nvidia/files.tegra
diff -u src/sys/arch/arm/nvidia/files.tegra:1.11 src/sys/arch/arm/nvidia/files.tegra:1.12
--- src/sys/arch/arm/nvidia/files.tegra:1.11	Fri May 15 11:49:10 2015
+++ src/sys/arch/arm/nvidia/files.tegra	Mon May 18 19:32:48 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: files.tegra,v 1.11 2015/05/15 11:49:10 jmcneill Exp $
+#	$NetBSD: files.tegra,v 1.12 2015/05/18 19:32:48 jmcneill Exp $
 #
 # Configuration info for NVIDIA Tegra ARM Peripherals
 #
@@ -87,6 +87,20 @@ file	arch/arm/nvidia/tegra_ahcisata.c	te
 attach	hdaudio at tegraio with tegra_hdaudio
 file	arch/arm/nvidia/tegra_hdaudio.c		tegra_hdaudio
 
+# Display controller
+device	tegradc { }
+attach	tegradc at tegraio with tegra_dc
+file	arch/arm/nvidia/tegra_dc.c		tegra_dc
+
+# Framebuffer console
+attach	genfb at tegradc with tegra_genfb
+file	arch/arm/nvidia/tegra_genfb.c		tegra_genfb
+
+# HDMI
+device	tegrahdmi: edid, ddc_read_edid, videomode
+attach	tegrahdmi at tegraio with tegra_hdmi
+file	arch/arm/nvidia/tegra_hdmi.c		tegra_hdmi
+
 # Console parameters
 defparam opt_tegra.h			CONADDR
 defparam opt_tegra.h			CONSPEED

Index: src/sys/arch/arm/nvidia/tegra_car.c
diff -u src/sys/arch/arm/nvidia/tegra_car.c:1.15 src/sys/arch/arm/nvidia/tegra_car.c:1.16
--- src/sys/arch/arm/nvidia/tegra_car.c:1.15	Sat May 16 23:07:51 2015
+++ src/sys/arch/arm/nvidia/tegra_car.c	Mon May 18 19:32:48 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_car.c,v 1.15 2015/05/16 23:07:51 jmcneill Exp $ */
+/* $NetBSD: tegra_car.c,v 1.16 2015/05/18 19:32:48 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include locators.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tegra_car.c,v 1.15 2015/05/16 23:07:51 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: tegra_car.c,v 1.16 2015/05/18 19:32:48 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -52,6 +52,8 @@ struct tegra_car_softc {
 	bus_space_handle_t	sc_bsh;
 };
 
+static void	tegra_car_init(struct tegra_car_softc *);
+
 static struct tegra_car_softc *pmc_softc = NULL;
 
 CFATTACH_DECL_NEW(tegra_car, sizeof(struct tegra_car_softc),
@@ -81,11 +83,28 @@ tegra_car_attach(device_t parent, device
 	aprint_naive(\n);
 	aprint_normal(: CAR\n);
 
+	tegra_car_init(sc);
+
 	aprint_verbose_dev(self, PLLX = %u Hz\n, tegra_car_pllx_rate());
 	aprint_verbose_dev(self, PLLC = %u Hz\n, tegra_car_pllc_rate());
 	aprint_verbose_dev(self, PLLE = %u Hz\n, tegra_car_plle_rate());
 	aprint_verbose_dev(self, PLLU = %u Hz\n, tegra_car_pllu_rate());
 	aprint_verbose_dev(self, PLLP0 = %u Hz\n, tegra_car_pllp0_rate());
+	aprint_verbose_dev(self, PLLD2 = %u Hz\n, tegra_car_plld2_rate());
+}
+
+static void
+tegra_car_init(struct tegra_car_softc *sc)
+{
+	bus_space_tag_t bst = sc-sc_bst;
+	bus_space_handle_t bsh = sc-sc_bsh;
+
+	tegra_reg_set_clear(bst, bsh, CAR_PLLD2_BASE_REG,
+	__SHIFTIN(1, CAR_PLLD2_BASE_MDIV) |
+	__SHIFTIN(99, CAR_PLLD2_BASE_NDIV) |
+	__SHIFTIN(2, CAR_PLLD2_BASE_PLDIV),
+	CAR_PLLD2_BASE_REF_SRC_SEL |
+	CAR_PLLD2_BASE_PLDIV | CAR_PLLD2_BASE_NDIV | CAR_PLLD2_BASE_MDIV);
 }
 
 static void
@@ -220,6 +239,13 @@ tegra_car_pllp0_rate(void)
 }
 
 u_int
+tegra_car_plld2_rate(void)
+{
+	return tegra_car_pll_rate(CAR_PLLD2_BASE_REG, CAR_PLLD2_BASE_MDIV,
+	CAR_PLLD2_BASE_NDIV, CAR_PLLD2_BASE_PLDIV);
+}
+
+u_int
 tegra_car_uart_rate(u_int port)
 {
 	bus_space_tag_t bst;
@@ -577,3 +603,71 @@ tegra_car_periph_i2c_enable(u_int port, 
 
 	return 0;
 }
+
+void
+tegra_car_hdmi_enable(u_int rate)
+{
+	bus_space_tag_t bst;
+	bus_space_handle_t bsh;
+
+	tegra_car_get_bs(bst, bsh);
+
+	/* Enter reset, enable clock 

CVS commit: src/sys/arch

2015-05-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon May 18 19:32:48 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: files.tegra tegra_car.c tegra_carreg.h
tegra_io.c tegra_var.h
src/sys/arch/evbarm/conf: JETSONTK1
src/sys/arch/evbarm/tegra: tegra_machdep.c
Added Files:
src/sys/arch/arm/nvidia: tegra_dc.c tegra_dcreg.h tegra_genfb.c
tegra_hdmi.c tegra_hdmireg.h

Log Message:
Work in progress HDMI / framebuffer support for Tegra K1.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/nvidia/files.tegra
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/nvidia/tegra_car.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/nvidia/tegra_carreg.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/nvidia/tegra_dc.c \
src/sys/arch/arm/nvidia/tegra_dcreg.h \
src/sys/arch/arm/nvidia/tegra_genfb.c \
src/sys/arch/arm/nvidia/tegra_hdmi.c \
src/sys/arch/arm/nvidia/tegra_hdmireg.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/nvidia/tegra_io.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/nvidia/tegra_var.h
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/conf/JETSONTK1
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/tegra/tegra_machdep.c

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



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

2015-05-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon May 18 21:32:06 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: tegra_car.c

Log Message:
make sure the display controllar partition is powered on


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/nvidia/tegra_car.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/nvidia/tegra_car.c
diff -u src/sys/arch/arm/nvidia/tegra_car.c:1.17 src/sys/arch/arm/nvidia/tegra_car.c:1.18
--- src/sys/arch/arm/nvidia/tegra_car.c:1.17	Mon May 18 20:36:42 2015
+++ src/sys/arch/arm/nvidia/tegra_car.c	Mon May 18 21:32:05 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_car.c,v 1.17 2015/05/18 20:36:42 jmcneill Exp $ */
+/* $NetBSD: tegra_car.c,v 1.18 2015/05/18 21:32:05 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include locators.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tegra_car.c,v 1.17 2015/05/18 20:36:42 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: tegra_car.c,v 1.18 2015/05/18 21:32:05 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -641,6 +641,7 @@ tegra_car_dc_enable(u_int port)
 	bus_space_handle_t bsh;
 	bus_size_t src_reg;
 	uint32_t dev_bit;
+	u_int partid;
 
 	tegra_car_get_bs(bst, bsh);
 
@@ -648,10 +649,12 @@ tegra_car_dc_enable(u_int port)
 	case 0:
 		dev_bit = CAR_DEV_L_DISP1;
 		src_reg = CAR_CLKSRC_DISP1_REG;
+		partid = PMC_PARTID_DIS;
 		break;
 	case 1:
 		dev_bit = CAR_DEV_L_DISP2;
 		src_reg = CAR_CLKSRC_DISP2_REG;
+		partid = PMC_PARTID_DISB;
 		break;
 	default:
 		return EINVAL;
@@ -661,6 +664,10 @@ tegra_car_dc_enable(u_int port)
 	bus_space_write_4(bst, bsh, CAR_RST_DEV_L_SET_REG, dev_bit);
 	bus_space_write_4(bst, bsh, CAR_CLK_ENB_L_SET_REG, dev_bit);
 
+	/* Turn on power to display partition */
+	tegra_pmc_power(partid, true);
+	tegra_pmc_remove_clamping(partid);
+
 	/* Select PLLP for clock source */
 	bus_space_write_4(bst, bsh, src_reg,
 	__SHIFTIN(CAR_CLKSRC_DISP_SRC_PLLP_OUT0,



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

2015-05-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon May 18 21:03:36 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: tegra_hdmi.c tegra_pmc.c tegra_pmcreg.h
tegra_var.h

Log Message:
Make sure HDMI I/O is not in deep power down mode


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/tegra_hdmi.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/nvidia/tegra_pmc.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/nvidia/tegra_pmcreg.h
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/nvidia/tegra_var.h

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



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

2015-05-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon May 18 21:03:36 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: tegra_hdmi.c tegra_pmc.c tegra_pmcreg.h
tegra_var.h

Log Message:
Make sure HDMI I/O is not in deep power down mode


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/tegra_hdmi.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/nvidia/tegra_pmc.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/nvidia/tegra_pmcreg.h
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/nvidia/tegra_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/nvidia/tegra_hdmi.c
diff -u src/sys/arch/arm/nvidia/tegra_hdmi.c:1.1 src/sys/arch/arm/nvidia/tegra_hdmi.c:1.2
--- src/sys/arch/arm/nvidia/tegra_hdmi.c:1.1	Mon May 18 19:32:48 2015
+++ src/sys/arch/arm/nvidia/tegra_hdmi.c	Mon May 18 21:03:36 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_hdmi.c,v 1.1 2015/05/18 19:32:48 jmcneill Exp $ */
+/* $NetBSD: tegra_hdmi.c,v 1.2 2015/05/18 21:03:36 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include locators.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tegra_hdmi.c,v 1.1 2015/05/18 19:32:48 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: tegra_hdmi.c,v 1.2 2015/05/18 21:03:36 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -244,6 +244,8 @@ tegra_hdmi_enable(struct tegra_hdmi_soft
 
 	KASSERT(sc-sc_curmode != NULL);
 
+	tegra_pmc_hdmi_enable();
+
 	tegra_car_hdmi_enable(mode-dot_clock * 1000);
 
 	for (n = 0; n  __arraycount(tegra_hdmi_tmds_config); n++) {

Index: src/sys/arch/arm/nvidia/tegra_pmc.c
diff -u src/sys/arch/arm/nvidia/tegra_pmc.c:1.4 src/sys/arch/arm/nvidia/tegra_pmc.c:1.5
--- src/sys/arch/arm/nvidia/tegra_pmc.c:1.4	Fri May 15 11:50:30 2015
+++ src/sys/arch/arm/nvidia/tegra_pmc.c	Mon May 18 21:03:36 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_pmc.c,v 1.4 2015/05/15 11:50:30 jmcneill Exp $ */
+/* $NetBSD: tegra_pmc.c,v 1.5 2015/05/18 21:03:36 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include locators.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tegra_pmc.c,v 1.4 2015/05/15 11:50:30 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: tegra_pmc.c,v 1.5 2015/05/18 21:03:36 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -143,3 +143,17 @@ tegra_pmc_remove_clamping(u_int partid)
 	bus_space_write_4(bst, bsh, PMC_REMOVE_CLAMPING_CMD_0_REG,
 	__BIT(partid));
 }
+
+void
+tegra_pmc_hdmi_enable(void)
+{
+	bus_space_tag_t bst;
+	bus_space_handle_t bsh;
+
+	tegra_pmc_get_bs(bst, bsh);
+
+	tegra_reg_set_clear(bst, bsh, PMC_IO_DPD_STATUS_REG,
+	0, PMC_IO_DPD_STATUS_HDMI);
+	tegra_reg_set_clear(bst, bsh, PMC_IO_DPD2_STATUS_REG,
+	0, PMC_IO_DPD2_STATUS_HV);
+}

Index: src/sys/arch/arm/nvidia/tegra_pmcreg.h
diff -u src/sys/arch/arm/nvidia/tegra_pmcreg.h:1.3 src/sys/arch/arm/nvidia/tegra_pmcreg.h:1.4
--- src/sys/arch/arm/nvidia/tegra_pmcreg.h:1.3	Fri May 15 11:50:30 2015
+++ src/sys/arch/arm/nvidia/tegra_pmcreg.h	Mon May 18 21:03:36 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_pmcreg.h,v 1.3 2015/05/15 11:50:30 jmcneill Exp $ */
+/* $NetBSD: tegra_pmcreg.h,v 1.4 2015/05/18 21:03:36 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -87,4 +87,10 @@
 #define PMC_PARTID_TD			1
 #define PMC_PARTID_CPU0			0
 
+#define PMC_IO_DPD_STATUS_REG		0x1bc
+#define PMC_IO_DPD_STATUS_HDMI		__BIT(28)
+
+#define PMC_IO_DPD2_STATUS_REG		0x1c4
+#define PMC_IO_DPD2_STATUS_HV		__BIT(6)
+
 #endif /* _ARM_TEGRA_PMCREG_H */

Index: src/sys/arch/arm/nvidia/tegra_var.h
diff -u src/sys/arch/arm/nvidia/tegra_var.h:1.18 src/sys/arch/arm/nvidia/tegra_var.h:1.19
--- src/sys/arch/arm/nvidia/tegra_var.h:1.18	Mon May 18 20:36:42 2015
+++ src/sys/arch/arm/nvidia/tegra_var.h	Mon May 18 21:03:36 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_var.h,v 1.18 2015/05/18 20:36:42 jmcneill Exp $ */
+/* $NetBSD: tegra_var.h,v 1.19 2015/05/18 21:03:36 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -137,6 +137,7 @@ bool	tegra_mpio_pinmux_get_rcv_sel(u_int
 void	tegra_pmc_reset(void);
 void	tegra_pmc_power(u_int, bool);
 void	tegra_pmc_remove_clamping(u_int);
+void	tegra_pmc_hdmi_enable(void);
 
 psize_t	tegra_mc_memsize(void);
 



CVS import: xsrc/external/mit/xf86-video-intel-old

2015-05-18 Thread Robert Swindells
Module Name:xsrc
Committed By:   rjs
Date:   Mon May 18 22:11:27 UTC 2015

Update of /cvsroot/xsrc/external/mit/xf86-video-intel-old
In directory ivanova.netbsd.org:/tmp/cvs-serv8711

Log Message:
Initial import of xf86-video-intel 2.9.1.
This is the final version of the driver with UMS support.

Status:

Vendor Tag: intel
Release Tags:   xf86-video-intel-2-9-1

N xsrc/external/mit/xf86-video-intel-old/dist/README
N xsrc/external/mit/xf86-video-intel-old/dist/config.sub
N xsrc/external/mit/xf86-video-intel-old/dist/Makefile.in
N xsrc/external/mit/xf86-video-intel-old/dist/NEWS
N xsrc/external/mit/xf86-video-intel-old/dist/COPYING
N xsrc/external/mit/xf86-video-intel-old/dist/Makefile.am
N xsrc/external/mit/xf86-video-intel-old/dist/aclocal.m4
N xsrc/external/mit/xf86-video-intel-old/dist/config.h.in
N xsrc/external/mit/xf86-video-intel-old/dist/install-sh
N xsrc/external/mit/xf86-video-intel-old/dist/ltmain.sh
N xsrc/external/mit/xf86-video-intel-old/dist/configure.ac
N xsrc/external/mit/xf86-video-intel-old/dist/config.guess
N xsrc/external/mit/xf86-video-intel-old/dist/depcomp
N xsrc/external/mit/xf86-video-intel-old/dist/AUTHORS
N xsrc/external/mit/xf86-video-intel-old/dist/configure
N xsrc/external/mit/xf86-video-intel-old/dist/missing
N xsrc/external/mit/xf86-video-intel-old/dist/shave.in
N xsrc/external/mit/xf86-video-intel-old/dist/shave-libtool.in
N xsrc/external/mit/xf86-video-intel-old/dist/compile
N xsrc/external/mit/xf86-video-intel-old/dist/man/Makefile.in
N xsrc/external/mit/xf86-video-intel-old/dist/man/Makefile.am
N xsrc/external/mit/xf86-video-intel-old/dist/man/intel.man
N xsrc/external/mit/xf86-video-intel-old/dist/m4/lt~obsolete.m4
N xsrc/external/mit/xf86-video-intel-old/dist/m4/ltversion.m4
N xsrc/external/mit/xf86-video-intel-old/dist/m4/ltoptions.m4
N xsrc/external/mit/xf86-video-intel-old/dist/m4/shave.m4
N xsrc/external/mit/xf86-video-intel-old/dist/m4/libtool.m4
N xsrc/external/mit/xf86-video-intel-old/dist/m4/ltsugar.m4
N xsrc/external/mit/xf86-video-intel-old/dist/m4/dolt.m4
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_batchbuffer.h
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_driver.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_reg.h
N xsrc/external/mit/xf86-video-intel-old/dist/src/i810_video.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_dvo.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i810_driver.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_memory.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i915_reg.h
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_bios.h
N xsrc/external/mit/xf86-video-intel-old/dist/src/i965_video.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i915_hwmc.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/brw_structs.h
N xsrc/external/mit/xf86-video-intel-old/dist/src/Makefile.in
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_modes.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i810_cursor.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i965_hwmc.h
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_dri.h
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_3d.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_cursor.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_quirks.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i810_reg.h
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_uxa.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_ring.h
N xsrc/external/mit/xf86-video-intel-old/dist/src/i915_render.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/Makefile.am
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_common.h
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_bios.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_dri.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_batchbuffer.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i2c_vid.h
N xsrc/external/mit/xf86-video-intel-old/dist/src/i810_common.h
N xsrc/external/mit/xf86-video-intel-old/dist/src/i915_3d.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_debug.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_display.h
N xsrc/external/mit/xf86-video-intel-old/dist/src/i810_io.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_i2c.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_video.h
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_hwmc.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i915_hwmc.h
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_lvds.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i810_dri.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i965_hwmc.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i830_render.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/i810_dga.c
N xsrc/external/mit/xf86-video-intel-old/dist/src/common.h
N xsrc/external/mit/xf86-video-intel-old/dist/src/i915_video.c
N 

Re: CVS commit: src/sys

2015-05-18 Thread Paul Goyette

On Mon, 18 May 2015, Joerg Sonnenberger wrote:


On Sun, May 10, 2015 at 07:41:16AM +, Paul Goyette wrote:

Module Name:src
Committed By:   pgoyette
Date:   Sun May 10 07:41:16 UTC 2015

Modified Files:
src/sys/compat/common: compat_mod.c sysv_ipc_50.c
src/sys/kern: files.kern syscalls.master sysv_ipc.c
src/sys/modules: Makefile
src/sys/modules/compat: Makefile
src/sys/sys: ipc.h
Added Files:
src/sys/compat/common: compat_sysv_mod.c
src/sys/modules/compat_sysv: Makefile


This broke sysutils/libgtop:

/usr/include/sys/ipc.h:138:42: error: a parameter list without types is
only allowed in a function definition
void sysvipc50_set_compat_sysctl(int (*)(SYSCTLFN_PROTO));


Really?  This line is wrapped inside '#ifdef _KERNEL' protection (see 
ipc.h:110) and should probably not be compiled for userland.


Let me see if I can figure out what's going on...



-
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:   |
| (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com|
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org  |
-


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

2015-05-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon May 18 21:32:06 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: tegra_car.c

Log Message:
make sure the display controllar partition is powered on


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/nvidia/tegra_car.c

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



CVS commit: src/sys/arch

2015-05-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon May 18 20:36:42 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: files.tegra tegra_car.c tegra_carreg.h
tegra_io.c tegra_reg.h tegra_var.h
src/sys/arch/evbarm/conf: JETSONTK1
Added Files:
src/sys/arch/arm/nvidia: tegra_host1x.c

Log Message:
Power-on Host1x subsystem


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/nvidia/files.tegra
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/nvidia/tegra_car.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/nvidia/tegra_carreg.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/nvidia/tegra_host1x.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/nvidia/tegra_io.c \
src/sys/arch/arm/nvidia/tegra_reg.h
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/nvidia/tegra_var.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/evbarm/conf/JETSONTK1

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/nvidia/files.tegra
diff -u src/sys/arch/arm/nvidia/files.tegra:1.12 src/sys/arch/arm/nvidia/files.tegra:1.13
--- src/sys/arch/arm/nvidia/files.tegra:1.12	Mon May 18 19:32:48 2015
+++ src/sys/arch/arm/nvidia/files.tegra	Mon May 18 20:36:42 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: files.tegra,v 1.12 2015/05/18 19:32:48 jmcneill Exp $
+#	$NetBSD: files.tegra,v 1.13 2015/05/18 20:36:42 jmcneill Exp $
 #
 # Configuration info for NVIDIA Tegra ARM Peripherals
 #
@@ -87,6 +87,11 @@ file	arch/arm/nvidia/tegra_ahcisata.c	te
 attach	hdaudio at tegraio with tegra_hdaudio
 file	arch/arm/nvidia/tegra_hdaudio.c		tegra_hdaudio
 
+# Host1x subsystem
+device	tegrahost1x
+attach	tegrahost1x at tegraio with tegra_host1x
+file	arch/arm/nvidia/tegra_host1x.c		tegra_host1x
+
 # Display controller
 device	tegradc { }
 attach	tegradc at tegraio with tegra_dc

Index: src/sys/arch/arm/nvidia/tegra_car.c
diff -u src/sys/arch/arm/nvidia/tegra_car.c:1.16 src/sys/arch/arm/nvidia/tegra_car.c:1.17
--- src/sys/arch/arm/nvidia/tegra_car.c:1.16	Mon May 18 19:32:48 2015
+++ src/sys/arch/arm/nvidia/tegra_car.c	Mon May 18 20:36:42 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_car.c,v 1.16 2015/05/18 19:32:48 jmcneill Exp $ */
+/* $NetBSD: tegra_car.c,v 1.17 2015/05/18 20:36:42 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include locators.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tegra_car.c,v 1.16 2015/05/18 19:32:48 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: tegra_car.c,v 1.17 2015/05/18 20:36:42 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -671,3 +671,27 @@ tegra_car_dc_enable(u_int port)
 
 	return 0;
 }
+
+void
+tegra_car_host1x_enable(void)
+{
+	bus_space_tag_t bst;
+	bus_space_handle_t bsh;
+
+	tegra_car_get_bs(bst, bsh);
+
+	/* Enter reset, enable clock */
+	bus_space_write_4(bst, bsh, CAR_RST_DEV_L_SET_REG, CAR_DEV_L_HOST1X);
+	bus_space_write_4(bst, bsh, CAR_CLK_ENB_L_SET_REG, CAR_DEV_L_HOST1X);
+
+	/* Select PLLP for clock source, 408 MHz */
+	bus_space_write_4(bst, bsh, CAR_CLKSRC_HOST1X_REG,
+	__SHIFTIN(CAR_CLKSRC_HOST1X_SRC_PLLP_OUT0,
+		  CAR_CLKSRC_HOST1X_SRC) |
+	__SHIFTIN(0, CAR_CLKSRC_HOST1X_CLK_DIVISOR));
+
+	delay(2);
+
+	/* Leave reset */
+	bus_space_write_4(bst, bsh, CAR_RST_DEV_L_CLR_REG, CAR_DEV_L_HOST1X);
+}

Index: src/sys/arch/arm/nvidia/tegra_carreg.h
diff -u src/sys/arch/arm/nvidia/tegra_carreg.h:1.15 src/sys/arch/arm/nvidia/tegra_carreg.h:1.16
--- src/sys/arch/arm/nvidia/tegra_carreg.h:1.15	Mon May 18 19:32:48 2015
+++ src/sys/arch/arm/nvidia/tegra_carreg.h	Mon May 18 20:36:42 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_carreg.h,v 1.15 2015/05/18 19:32:48 jmcneill Exp $ */
+/* $NetBSD: tegra_carreg.h,v 1.16 2015/05/18 20:36:42 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -196,6 +196,17 @@
 #define CAR_CLKSRC_DISP_SRC_PLLD2_OUT0	5
 #define CAR_CLKSRC_DISP_SRC_CLK_M	6
 
+#define CAR_CLKSRC_HOST1X_REG		0x180
+#define CAR_CLKSRC_HOST1X_SRC		__BITS(31,29)
+#define CAR_CLKSRC_HOST1X_SRC_PLLM_OUT0		0
+#define CAR_CLKSRC_HOST1X_SRC_PLLC2_OUT0	1
+#define CAR_CLKSRC_HOST1X_SRC_PLLC_OUT0		2
+#define CAR_CLKSRC_HOST1X_SRC_PLLC3_OUT0	3
+#define CAR_CLKSRC_HOST1X_SRC_PLLP_OUT0		4
+#define CAR_CLKSRC_HOST1X_SRC_PLLA_OUT0		6
+#define CAR_CLKSRC_HOST1X_IDLE_DIVISOR	__BITS(15,8)
+#define CAR_CLKSRC_HOST1X_CLK_DIVISOR	__BITS(7,0)
+
 #define CAR_RST_DEV_L_SET_REG		0x300
 #define CAR_RST_DEV_L_CLR_REG		0x304
 #define CAR_RST_DEV_H_SET_REG		0x308

Index: src/sys/arch/arm/nvidia/tegra_io.c
diff -u src/sys/arch/arm/nvidia/tegra_io.c:1.10 src/sys/arch/arm/nvidia/tegra_io.c:1.11
--- src/sys/arch/arm/nvidia/tegra_io.c:1.10	Mon May 18 19:32:48 2015
+++ src/sys/arch/arm/nvidia/tegra_io.c	Mon May 18 20:36:42 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_io.c,v 1.10 2015/05/18 19:32:48 jmcneill Exp $ */
+/* $NetBSD: tegra_io.c,v 1.11 2015/05/18 20:36:42 jmcneill Exp $ */
 
 /*-
  * Copyright 

CVS commit: src/sys/arch

2015-05-18 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon May 18 20:36:42 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: files.tegra tegra_car.c tegra_carreg.h
tegra_io.c tegra_reg.h tegra_var.h
src/sys/arch/evbarm/conf: JETSONTK1
Added Files:
src/sys/arch/arm/nvidia: tegra_host1x.c

Log Message:
Power-on Host1x subsystem


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/nvidia/files.tegra
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/nvidia/tegra_car.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/nvidia/tegra_carreg.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/nvidia/tegra_host1x.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/nvidia/tegra_io.c \
src/sys/arch/arm/nvidia/tegra_reg.h
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/nvidia/tegra_var.h
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/evbarm/conf/JETSONTK1

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



CVS commit: src/etc/etc.evbarm

2015-05-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon May 18 21:21:11 UTC 2015

Modified Files:
src/etc/etc.evbarm: MAKEDEV.conf

Log Message:
Add bpf to all_md


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/etc/etc.evbarm/MAKEDEV.conf

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

Modified files:

Index: src/etc/etc.evbarm/MAKEDEV.conf
diff -u src/etc/etc.evbarm/MAKEDEV.conf:1.13 src/etc/etc.evbarm/MAKEDEV.conf:1.14
--- src/etc/etc.evbarm/MAKEDEV.conf:1.13	Sat Apr 20 11:41:52 2013
+++ src/etc/etc.evbarm/MAKEDEV.conf	Mon May 18 21:21:11 2015
@@ -1,4 +1,4 @@
-# $NetBSD: MAKEDEV.conf,v 1.13 2013/04/20 11:41:52 rkujawa Exp $
+# $NetBSD: MAKEDEV.conf,v 1.14 2015/05/18 21:21:11 matt Exp $
 
 all_md)
 	makedev wscons fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3
@@ -18,6 +18,7 @@ all_md)
 	makedev vchiq
 	makedev audio
 	makedev spiflash0
+	makedev bpf
 	;;
 
 ramdisk|floppy)



CVS commit: src/etc/etc.evbarm

2015-05-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon May 18 21:21:11 UTC 2015

Modified Files:
src/etc/etc.evbarm: MAKEDEV.conf

Log Message:
Add bpf to all_md


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/etc/etc.evbarm/MAKEDEV.conf

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



Re: CVS commit: src/sys

2015-05-18 Thread Paul Goyette
Hmmm, I just updated my pkgsrc tree and built libgtop-2.28.4nb7 without 
any problems.  It doesn't look like anything in the package has been 
updated recently, so I don't understand why you got that error message.


My build was running on a amd64-7.99.15 host.

Can you retry?  And provide complete log of the libgtop build?


On Tue, 19 May 2015, Paul Goyette wrote:


On Mon, 18 May 2015, Joerg Sonnenberger wrote:


On Sun, May 10, 2015 at 07:41:16AM +, Paul Goyette wrote:

Module Name:src
Committed By:   pgoyette
Date:   Sun May 10 07:41:16 UTC 2015

Modified Files:
src/sys/compat/common: compat_mod.c sysv_ipc_50.c
src/sys/kern: files.kern syscalls.master sysv_ipc.c
src/sys/modules: Makefile
src/sys/modules/compat: Makefile
src/sys/sys: ipc.h
Added Files:
src/sys/compat/common: compat_sysv_mod.c
src/sys/modules/compat_sysv: Makefile


This broke sysutils/libgtop:

/usr/include/sys/ipc.h:138:42: error: a parameter list without types is
only allowed in a function definition
void sysvipc50_set_compat_sysctl(int (*)(SYSCTLFN_PROTO));


Really?  This line is wrapped inside '#ifdef _KERNEL' protection (see 
ipc.h:110) and should probably not be compiled for userland.


Let me see if I can figure out what's going on...



-
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:   |
| (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com|
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org  |
-



-
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:   |
| (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com|
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org  |
-


CVS commit: src/tests/net/mcast

2015-05-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue May 19 04:14:04 UTC 2015

Modified Files:
src/tests/net/mcast: t_mcast.c

Log Message:
Handle child's exit status precisely


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/net/mcast/t_mcast.c

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



CVS commit: src/tests/net/mcast

2015-05-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue May 19 04:14:04 UTC 2015

Modified Files:
src/tests/net/mcast: t_mcast.c

Log Message:
Handle child's exit status precisely


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/net/mcast/t_mcast.c

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

Modified files:

Index: src/tests/net/mcast/t_mcast.c
diff -u src/tests/net/mcast/t_mcast.c:1.14 src/tests/net/mcast/t_mcast.c:1.15
--- src/tests/net/mcast/t_mcast.c:1.14	Tue May 19 03:19:27 2015
+++ src/tests/net/mcast/t_mcast.c	Tue May 19 04:14:04 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_mcast.c,v 1.14 2015/05/19 03:19:27 ozaki-r Exp $	*/
+/*	$NetBSD: t_mcast.c,v 1.15 2015/05/19 04:14:04 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 #include sys/cdefs.h
 #ifdef __RCSID
-__RCSID($NetBSD: t_mcast.c,v 1.14 2015/05/19 03:19:27 ozaki-r Exp $);
+__RCSID($NetBSD: t_mcast.c,v 1.15 2015/05/19 04:14:04 ozaki-r Exp $);
 #else
 extern const char *__progname;
 #define getprogname() __progname
@@ -316,9 +316,25 @@ run(const char *host, const char *port, 
 strerror(errno));
 			goto again;
 		default:
-			if (status != 0)
-ERRX(EXIT_FAILURE, pid exited with %d,
+			if (WIFSIGNALED(status)) {
+if (WTERMSIG(status) == SIGTERM)
+	ERRX(EXIT_FAILURE,
+	receiver got terminated due to  \
+	deadline (%d usec), 100);
+else
+	ERRX(EXIT_FAILURE,
+	receiver got signaled (%s),
+	strsignal(WTERMSIG(status)));
+			} else if (WIFEXITED(status)) {
+if (WEXITSTATUS(status) != 0)
+	ERRX(EXIT_FAILURE,
+	receiver exited with status %d,
+	WEXITSTATUS(status));
+			} else {
+ERRX(EXIT_FAILURE,
+receiver exited with unexpected status %d,
 status);
+			}
 			break;
 		}
 		return;



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

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 04:56:46 UTC 2015

Modified Files:
src/sys/nfs [netbsd-7]: nfs_vnops.c

Log Message:
Pull up following revision(s) (requested by chs in ticket #769):
sys/nfs/nfs_vnops.c: revision 1.308
in nfs_writerpc(), avoid a signed/unsigned problem in computing the
number of bytes to back up in the uio when we need to resend a write RPC
(eg. after a server crash) on a 64-bit platform.  should fix PR 35448.


To generate a diff of this commit:
cvs rdiff -u -r1.306 -r1.306.2.1 src/sys/nfs/nfs_vnops.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/nfs/nfs_vnops.c
diff -u src/sys/nfs/nfs_vnops.c:1.306 src/sys/nfs/nfs_vnops.c:1.306.2.1
--- src/sys/nfs/nfs_vnops.c:1.306	Fri Jul 25 08:20:53 2014
+++ src/sys/nfs/nfs_vnops.c	Tue May 19 04:56:45 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_vnops.c,v 1.306 2014/07/25 08:20:53 dholland Exp $	*/
+/*	$NetBSD: nfs_vnops.c,v 1.306.2.1 2015/05/19 04:56:45 snj Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nfs_vnops.c,v 1.306 2014/07/25 08:20:53 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: nfs_vnops.c,v 1.306.2.1 2015/05/19 04:56:45 snj Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_nfs.h
@@ -1311,7 +1311,7 @@ retry:
 	byte_count = 0; /* count of bytes actually written */
 	while (tsiz  0) {
 		uint32_t datalen; /* data bytes need to be allocated in mbuf */
-		uint32_t backup;
+		size_t backup;
 		bool stalewriteverf = false;
 
 		nfsstats.rpccnt[NFSPROC_WRITE]++;



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

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 04:56:46 UTC 2015

Modified Files:
src/sys/nfs [netbsd-7]: nfs_vnops.c

Log Message:
Pull up following revision(s) (requested by chs in ticket #769):
sys/nfs/nfs_vnops.c: revision 1.308
in nfs_writerpc(), avoid a signed/unsigned problem in computing the
number of bytes to back up in the uio when we need to resend a write RPC
(eg. after a server crash) on a 64-bit platform.  should fix PR 35448.


To generate a diff of this commit:
cvs rdiff -u -r1.306 -r1.306.2.1 src/sys/nfs/nfs_vnops.c

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



CVS commit: [netbsd-7] src/lib/libc/db/db

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 05:11:58 UTC 2015

Modified Files:
src/lib/libc/db/db [netbsd-7]: db.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #785):
lib/libc/db/db/db.c: revision 1.17
whitelist O_CLOEXEC flag, should fix lastlogin issue.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.40.1 src/lib/libc/db/db/db.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/libc/db/db/db.c
diff -u src/lib/libc/db/db/db.c:1.16 src/lib/libc/db/db/db.c:1.16.40.1
--- src/lib/libc/db/db/db.c:1.16	Thu Sep 11 12:58:00 2008
+++ src/lib/libc/db/db/db.c	Tue May 19 05:11:58 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: db.c,v 1.16 2008/09/11 12:58:00 joerg Exp $	*/
+/*	$NetBSD: db.c,v 1.16.40.1 2015/05/19 05:11:58 snj Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: db.c,v 1.16 2008/09/11 12:58:00 joerg Exp $);
+__RCSID($NetBSD: db.c,v 1.16.40.1 2015/05/19 05:11:58 snj Exp $);
 
 #include namespace.h
 #include sys/types.h
@@ -59,7 +59,7 @@ dbopen(const char *fname, int flags, mod
 #define	DB_FLAGS	(DB_LOCK | DB_SHMEM | DB_TXN)
 #define	USE_OPEN_FLAGS			\
 	(O_CREAT | O_EXCL | O_EXLOCK | O_NONBLOCK | O_RDONLY |		\
-	 O_RDWR | O_SHLOCK | O_TRUNC)
+	 O_RDWR | O_SHLOCK | O_TRUNC | O_CLOEXEC)
 
 	if ((flags  ~(USE_OPEN_FLAGS | DB_FLAGS)) == 0)
 		switch (type) {



CVS commit: [netbsd-7] src/lib/libc/db/db

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 05:11:58 UTC 2015

Modified Files:
src/lib/libc/db/db [netbsd-7]: db.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #785):
lib/libc/db/db/db.c: revision 1.17
whitelist O_CLOEXEC flag, should fix lastlogin issue.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.40.1 src/lib/libc/db/db/db.c

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



CVS commit: [netbsd-7] src/external/mit/xorg/server/drivers/xf86-video-intel

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 05:17:47 UTC 2015

Modified Files:
src/external/mit/xorg/server/drivers/xf86-video-intel [netbsd-7]:
Makefile

Log Message:
Pull up following revision(s) (requested by mrg in ticket #786):
external/mit/xorg/server/drivers/xf86-video-intel/Makefile: revision 
1.21
switch the default method to SNA.


To generate a diff of this commit:
cvs rdiff -u -r1.15.2.2 -r1.15.2.3 \
src/external/mit/xorg/server/drivers/xf86-video-intel/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/mit/xorg/server/drivers/xf86-video-intel/Makefile
diff -u src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile:1.15.2.2 src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile:1.15.2.3
--- src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile:1.15.2.2	Wed Jan 21 11:32:07 2015
+++ src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile	Tue May 19 05:17:47 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15.2.2 2015/01/21 11:32:07 martin Exp $
+#	$NetBSD: Makefile,v 1.15.2.3 2015/05/19 05:17:47 snj Exp $
 
 .include bsd.own.mk
 
@@ -144,7 +144,7 @@ CPPFLAGS+=	-I${X11SRCDIR.${DRIVER}}/xvmc
 
 # Use the Intel-style __sync_* atomic primitives.
 
-CPPFLAGS+=	-DDEFAULT_ACCEL_METHOD=UXA
+CPPFLAGS+=	-DDEFAULT_ACCEL_METHOD=SNA
 CPPFLAGS+=	-DENABLE_XVMC=1
 CPPFLAGS+=	-DHAS_PIXMAN_GLYPHS=1
 CPPFLAGS+=	-DHAS_PIXMAN_TRIANGLES=1



CVS commit: [netbsd-7] src/external/mit/xorg/server/drivers/xf86-video-intel

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 05:17:47 UTC 2015

Modified Files:
src/external/mit/xorg/server/drivers/xf86-video-intel [netbsd-7]:
Makefile

Log Message:
Pull up following revision(s) (requested by mrg in ticket #786):
external/mit/xorg/server/drivers/xf86-video-intel/Makefile: revision 
1.21
switch the default method to SNA.


To generate a diff of this commit:
cvs rdiff -u -r1.15.2.2 -r1.15.2.3 \
src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile

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



CVS commit: [netbsd-7] xsrc/external/mit/xf86-video-intel/dist/src/sna

2015-05-18 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Tue May 19 05:35:49 UTC 2015

Modified Files:
xsrc/external/mit/xf86-video-intel/dist/src/sna [netbsd-7]: kgem.c
sna_display.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #788):
external/mit/xf86-video-intel/dist/src/sna/kgem.c: revision 1.5
external/mit/xf86-video-intel/dist/src/sna/sna_display.c: revision 1.4
Remove differences with upstream xf86-video-intel which are no longer
necessary. (Use do_ioctl and mmap rather than drmIoct and drmMap.)
http://mail-index.netbsd.org/tech-x11/2015/01/25/msg001486.html


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.2 -r1.2.2.3 \
xsrc/external/mit/xf86-video-intel/dist/src/sna/kgem.c
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_display.c

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



CVS commit: [netbsd-7] xsrc/external/mit/xf86-video-intel/dist/src/sna

2015-05-18 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Tue May 19 05:35:49 UTC 2015

Modified Files:
xsrc/external/mit/xf86-video-intel/dist/src/sna [netbsd-7]: kgem.c
sna_display.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #788):
external/mit/xf86-video-intel/dist/src/sna/kgem.c: revision 1.5
external/mit/xf86-video-intel/dist/src/sna/sna_display.c: revision 1.4
Remove differences with upstream xf86-video-intel which are no longer
necessary. (Use do_ioctl and mmap rather than drmIoct and drmMap.)
http://mail-index.netbsd.org/tech-x11/2015/01/25/msg001486.html


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.2 -r1.2.2.3 \
xsrc/external/mit/xf86-video-intel/dist/src/sna/kgem.c
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_display.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-intel/dist/src/sna/kgem.c
diff -u xsrc/external/mit/xf86-video-intel/dist/src/sna/kgem.c:1.2.2.2 xsrc/external/mit/xf86-video-intel/dist/src/sna/kgem.c:1.2.2.3
--- xsrc/external/mit/xf86-video-intel/dist/src/sna/kgem.c:1.2.2.2	Wed Jan 21 11:23:13 2015
+++ xsrc/external/mit/xf86-video-intel/dist/src/sna/kgem.c	Tue May 19 05:35:48 2015
@@ -440,12 +440,7 @@ static void *__kgem_bo_map__gtt(struct k
 	VG_CLEAR(gtt);
 retry_gtt:
 	gtt.handle = bo-handle;
-#ifdef __NetBSD__
-	if (drmIoctl(kgem-fd, DRM_IOCTL_I915_GEM_MMAP_GTT, gtt)) {
-		err = errno;
-#else
 	if ((err = do_ioctl(kgem-fd, DRM_IOCTL_I915_GEM_MMAP_GTT, gtt))) {
-#endif
 		assert(err != EINVAL);
 
 		(void)__kgem_throttle_retire(kgem, 0);
@@ -461,15 +456,10 @@ retry_gtt:
 	}
 
 retry_mmap:
-#ifdef __NetBSD__
-	err = -drmMap(kgem-fd, gtt.offset, bytes(bo), ptr);
-	if (err) {
-#else
 	ptr = mmap(0, bytes(bo), PROT_READ | PROT_WRITE, MAP_SHARED,
 		   kgem-fd, gtt.offset);
 	if (ptr == MAP_FAILED) {
 		err = errno;
-#endif
 		assert(err != EINVAL);
 
 		if (__kgem_throttle_retire(kgem, 0))

Index: xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_display.c
diff -u xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_display.c:1.1.1.1.2.1 xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_display.c:1.1.1.1.2.2
--- xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_display.c:1.1.1.1.2.1	Wed Jan 21 11:23:13 2015
+++ xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_display.c	Tue May 19 05:35:49 2015
@@ -439,22 +439,14 @@ static void *gem_mmap(int fd, int handle
 {
 	struct drm_i915_gem_mmap_gtt mmap_arg;
 	void *ptr;
-#ifdef __NetBSD__
-	int err;
-#endif
 
 	VG_CLEAR(mmap_arg);
 	mmap_arg.handle = handle;
 	if (drmIoctl(fd, DRM_IOCTL_I915_GEM_MMAP_GTT, mmap_arg))
 		return NULL;
 
-#ifdef __NetBSD__
-	err = -drmMap(fd, mmap_arg.offset, size, ptr);
-	if (err)
-#else
 	ptr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, mmap_arg.offset);
 	if (ptr == MAP_FAILED)
-#endif
 		return NULL;
 
 	return ptr;



CVS commit: [netbsd-6] src/doc

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 05:45:56 UTC 2015

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

Log Message:
1298


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.217 -r1.1.2.218 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.217 src/doc/CHANGES-6.2:1.1.2.218
--- src/doc/CHANGES-6.2:1.1.2.217	Sat May  2 16:22:10 2015
+++ src/doc/CHANGES-6.2	Tue May 19 05:45:56 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.217 2015/05/02 16:22:10 martin Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.218 2015/05/19 05:45:56 snj Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -11487,8 +11487,8 @@ sys/dev/pci/if_wmvar.h1.20 via patch
 	  check the flag in wm_detach(). It will avoid to panic in wm_detach().
 	  Fixes PR#49102.
 	- Support DH89xxCC device.
-	- Add extra delay for 82580 and newer devices except DH89XXCC SGMII device.
-	  Same as FreeBSD.
+	- Add extra delay for 82580 and newer devices except DH89XXCC SGMII
+	  device.  Same as FreeBSD.
 	[msaitoh, ticket #1296]
 
 distrib/sparc64/liveimage/emuimage/Makefile	1.4
@@ -11496,3 +11496,8 @@ distrib/sparc64/liveimage/emuimage/Makef
 	Don't forget to put /ofwboot into the image otherwise boot fails.
 	[tsutsui, ticket #1297]
 
+sys/arch/vax/vax/ka660.c			1.11
+
+	Make VAX 4000/200 boot again.  PR port-vax/49884
+	[ragge, ticket #1298]
+



CVS commit: [netbsd-6] src/doc

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 05:45:56 UTC 2015

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

Log Message:
1298


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.217 -r1.1.2.218 src/doc/CHANGES-6.2

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



CVS commit: src/sys/arch/mips/cavium

2015-05-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue May 19 05:51:16 UTC 2015

Modified Files:
src/sys/arch/mips/cavium: octeon_intr.c

Log Message:
Add per irq evcnt's


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/cavium/octeon_intr.c

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

Modified files:

Index: src/sys/arch/mips/cavium/octeon_intr.c
diff -u src/sys/arch/mips/cavium/octeon_intr.c:1.1 src/sys/arch/mips/cavium/octeon_intr.c:1.2
--- src/sys/arch/mips/cavium/octeon_intr.c:1.1	Wed Apr 29 08:32:00 2015
+++ src/sys/arch/mips/cavium/octeon_intr.c	Tue May 19 05:51:16 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: octeon_intr.c,v 1.1 2015/04/29 08:32:00 hikaru Exp $	*/
+/*	$NetBSD: octeon_intr.c,v 1.2 2015/05/19 05:51:16 matt Exp $	*/
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
  * All rights reserved.
@@ -42,7 +42,7 @@
 #define __INTR_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: octeon_intr.c,v 1.1 2015/04/29 08:32:00 hikaru Exp $);
+__KERNEL_RCSID(0, $NetBSD: octeon_intr.c,v 1.2 2015/05/19 05:51:16 matt Exp $);
 
 #include sys/param.h
 #include sys/cpu.h
@@ -78,7 +78,7 @@ static const struct ipl_sr_map octeon_ip
 
 #define	NIRQS		64
 
-const char *octeon_intrnames[NIRQS] = {
+const char * const octeon_intrnames[NIRQS] = {
 	workq 0,
 	workq 1,
 	workq 2,
@@ -156,6 +156,7 @@ struct octeon_intrhand {
 
 struct octeon_intrhead {
 	LIST_HEAD(, octeon_intrhand) intr_list;
+	struct evcnt intr_count;
 	int intr_refcnt;
 };
 
@@ -169,7 +170,7 @@ struct octeon_cpuintr {
 #define	NINTRS		5	/* MIPS INT0 - INT4 */
 
 struct octeon_cpuintr octeon_cpuintrs[NINTRS];
-const char *octeon_cpuintrnames[NINTRS] = {
+const char * const octeon_cpuintrnames[NINTRS] = {
 	int 0 (IP2),
 	int 1 (IP3),
 	int 2 ,
@@ -286,6 +287,8 @@ octeon_intr_init(void)
 	for (size_t i = 0; i  NIRQS; i++) {
 		LIST_INIT(octeon_ciu_intrtab[i].intr_list);
 		octeon_ciu_intrtab[i].intr_refcnt = 0;
+		evcnt_attach_dynamic(octeon_ciu_intrtab[i].intr_count,
+		EVCNT_TYPE_INTR, NULL, octeon, octeon_intrnames[i]);
 	}
 }
 
@@ -414,7 +417,7 @@ octeon_iointr(int ipl, vaddr_t pc, uint3
 	int level, irq;
 	uint64_t hwpend = 0;
 
-	asm (.set mips64; clz %0,%1; .set mips0 : =r(level) : r(ipending));
+	level = __builtin_clz(ipending);
 	switch (level = 21 - level) {
 	case 0: // MIPS_INT_MASK_0
 		hwpend = octeon_read_csr(CIU_INT0_SUM0)  int0_enable0;
@@ -429,6 +432,7 @@ octeon_iointr(int ipl, vaddr_t pc, uint3
 	}
 	if ((irq = ffs64(hwpend) - 1)  0)
 		return;
+	octeon_ciu_intrtab[irq].intr_count.ev_count++;
 	LIST_FOREACH(ih, octeon_ciu_intrtab[irq].intr_list, ih_q) {
 		(*ih-ih_func)(ih-ih_arg);
 	}



CVS commit: src/sys/arch/mips/cavium

2015-05-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue May 19 05:51:16 UTC 2015

Modified Files:
src/sys/arch/mips/cavium: octeon_intr.c

Log Message:
Add per irq evcnt's


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/cavium/octeon_intr.c

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



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

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 04:53:02 UTC 2015

Modified Files:
src/sys/kern [netbsd-7]: subr_disk.c

Log Message:
Pull up following revision(s) (requested by chs in ticket #766):
sys/kern/subr_disk.c: revision 1.113
in bounds_check_with_*, reject negative block numbers and avoid
a potential overflow in calculating the size of the request.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.103.4.1 src/sys/kern/subr_disk.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/subr_disk.c
diff -u src/sys/kern/subr_disk.c:1.103 src/sys/kern/subr_disk.c:1.103.4.1
--- src/sys/kern/subr_disk.c:1.103	Sat Oct 19 22:36:57 2013
+++ src/sys/kern/subr_disk.c	Tue May 19 04:53:02 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_disk.c,v 1.103 2013/10/19 22:36:57 mlelstv Exp $	*/
+/*	$NetBSD: subr_disk.c,v 1.103.4.1 2015/05/19 04:53:02 snj Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1999, 2000, 2009 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_disk.c,v 1.103 2013/10/19 22:36:57 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_disk.c,v 1.103.4.1 2015/05/19 04:53:02 snj Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -323,7 +323,18 @@ bounds_check_with_mediasize(struct buf *
 {
 	int64_t sz;
 
-	sz = howmany(bp-b_bcount, secsize);
+	if (bp-b_blkno  0) {
+		/* Reject negative offsets immediately. */
+		bp-b_error = EINVAL;
+		return 0;
+	}
+
+	sz = howmany((int64_t)bp-b_bcount, secsize);
+
+	/*
+	 * bp-b_bcount is a 32-bit value, and we rejected a negative
+	 * bp-b_blkno already, so bp-b_blkno + sz cannot overflow.
+	 */
 
 	if (bp-b_blkno + sz  mediasize) {
 		sz = mediasize - bp-b_blkno;
@@ -357,6 +368,12 @@ bounds_check_with_label(struct disk *dk,
 	uint64_t p_size, p_offset, labelsector;
 	int64_t sz;
 
+	if (bp-b_blkno  0) {
+		/* Reject negative offsets immediately. */
+		bp-b_error = EINVAL;
+		return -1;
+	}
+
 	/* Protect against division by zero. XXX: Should never happen?!?! */
 	if (lp-d_secpercyl == 0) {
 		bp-b_error = EINVAL;
@@ -372,8 +389,14 @@ bounds_check_with_label(struct disk *dk,
 #endif
 	labelsector = (labelsector + dk-dk_labelsector)  dk-dk_blkshift;
 
-	sz = howmany(bp-b_bcount, DEV_BSIZE);
-	if ((bp-b_blkno + sz)  p_size) {
+	sz = howmany((int64_t)bp-b_bcount, DEV_BSIZE);
+
+	/*
+	 * bp-b_bcount is a 32-bit value, and we rejected a negative
+	 * bp-b_blkno already, so bp-b_blkno + sz cannot overflow.
+	 */
+
+	if (bp-b_blkno + sz  p_size) {
 		sz = p_size - bp-b_blkno;
 		if (sz == 0) {
 			/* If exactly at end of disk, return EOF. */



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

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 04:53:02 UTC 2015

Modified Files:
src/sys/kern [netbsd-7]: subr_disk.c

Log Message:
Pull up following revision(s) (requested by chs in ticket #766):
sys/kern/subr_disk.c: revision 1.113
in bounds_check_with_*, reject negative block numbers and avoid
a potential overflow in calculating the size of the request.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.103.4.1 src/sys/kern/subr_disk.c

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



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

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 04:58:31 UTC 2015

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

Log Message:
Pull up following revision(s) (requested by joerg in ticket #777):
sys/arch/arm/arm32/pmap.c: revision 1.308
pmap_tlb_flushD is for !ARM_MMU_EXTENDED only now


To generate a diff of this commit:
cvs rdiff -u -r1.295.2.4 -r1.295.2.5 src/sys/arch/arm/arm32/pmap.c

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

Modified files:

Index: src/sys/arch/arm/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.295.2.4 src/sys/arch/arm/arm32/pmap.c:1.295.2.5
--- src/sys/arch/arm/arm32/pmap.c:1.295.2.4	Fri Apr 10 20:17:52 2015
+++ src/sys/arch/arm/arm32/pmap.c	Tue May 19 04:58:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.295.2.4 2015/04/10 20:17:52 snj Exp $	*/
+/*	$NetBSD: pmap.c,v 1.295.2.5 2015/05/19 04:58:31 snj Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -216,7 +216,7 @@
 #include arm/locore.h
 //#include arm/arm32/katelib.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.295.2.4 2015/04/10 20:17:52 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.295.2.5 2015/05/19 04:58:31 snj Exp $);
 
 //#define PMAP_DEBUG
 #ifdef PMAP_DEBUG
@@ -850,12 +850,10 @@ pmap_tlb_flushID(pmap_t pm)
 #endif /* ARM_MMU_EXTENDED */
 }
 
+#ifndef ARM_MMU_EXTENDED
 static inline void
 pmap_tlb_flushD(pmap_t pm)
 {
-#ifdef ARM_MMU_EXTENDED
-	pmap_tlb_asid_release_all(pm);
-#else
 	if (pm-pm_cstate.cs_tlb_d) {
 		cpu_tlb_flushD();
 #if ARM_MMU_V7 == 0
@@ -869,8 +867,8 @@ pmap_tlb_flushD(pmap_t pm)
 		pm-pm_cstate.cs_tlb_d = 0;
 #endif /* ARM_MMU_V7 */
 	}
-#endif /* ARM_MMU_EXTENDED */
 }
+#endif /* ARM_MMU_EXTENDED */
 
 #ifdef PMAP_CACHE_VIVT
 static inline void



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

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 04:58:31 UTC 2015

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

Log Message:
Pull up following revision(s) (requested by joerg in ticket #777):
sys/arch/arm/arm32/pmap.c: revision 1.308
pmap_tlb_flushD is for !ARM_MMU_EXTENDED only now


To generate a diff of this commit:
cvs rdiff -u -r1.295.2.4 -r1.295.2.5 src/sys/arch/arm/arm32/pmap.c

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



CVS commit: [netbsd-6] src/sys/arch/vax/vax

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 05:43:50 UTC 2015

Modified Files:
src/sys/arch/vax/vax [netbsd-6]: ka660.c

Log Message:
Pull up following revision(s) (requested by ragge in ticket #1298):
sys/arch/vax/vax/ka660.c: revision 1.11
PR port-vax/49884
Fixes bug introduced in earlier cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.14.1 src/sys/arch/vax/vax/ka660.c

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



CVS commit: [netbsd-6] src/sys/arch/vax/vax

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 05:43:50 UTC 2015

Modified Files:
src/sys/arch/vax/vax [netbsd-6]: ka660.c

Log Message:
Pull up following revision(s) (requested by ragge in ticket #1298):
sys/arch/vax/vax/ka660.c: revision 1.11
PR port-vax/49884
Fixes bug introduced in earlier cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.14.1 src/sys/arch/vax/vax/ka660.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/vax/vax/ka660.c
diff -u src/sys/arch/vax/vax/ka660.c:1.10 src/sys/arch/vax/vax/ka660.c:1.10.14.1
--- src/sys/arch/vax/vax/ka660.c:1.10	Tue Dec 14 23:44:49 2010
+++ src/sys/arch/vax/vax/ka660.c	Tue May 19 05:43:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ka660.c,v 1.10 2010/12/14 23:44:49 matt Exp $	*/
+/*	$NetBSD: ka660.c,v 1.10.14.1 2015/05/19 05:43:50 snj Exp $	*/
 /*
  * Copyright (c) 2000 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ka660.c,v 1.10 2010/12/14 23:44:49 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ka660.c,v 1.10.14.1 2015/05/19 05:43:50 snj Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -61,7 +61,7 @@ static void ka660_cache_enable(void);
 static void ka660_attach_cpu(device_t);
 static int ka660_mchk(void *);
 
-static const char * const ka660_devs[] = { cpu, sgec, vsbus, NULL };
+static const char * const ka660_devs[] = { cpu, sgec, shac, uba, NULL };
 
 /* 
  * Declaration of 660-specific calls.
@@ -92,7 +92,7 @@ void
 ka660_attach_cpu(device_t self)
 {
 	aprint_normal(
-	: %s, Rigel (ucode rev. %d), 2KB L1 cache, 128KB L2 cache\n,
+	: %s, SOC (ucode rev. %d), 6KB L1 cache\n,
 	KA660,
 	vax_cpudata  0377);
 }



CVS commit: src/tests/net/mcast

2015-05-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue May 19 03:19:27 UTC 2015

Modified Files:
src/tests/net/mcast: t_mcast.c

Log Message:
Use EXIT_FAILURE instead of 1


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/tests/net/mcast/t_mcast.c

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

Modified files:

Index: src/tests/net/mcast/t_mcast.c
diff -u src/tests/net/mcast/t_mcast.c:1.13 src/tests/net/mcast/t_mcast.c:1.14
--- src/tests/net/mcast/t_mcast.c:1.13	Mon May 18 00:55:09 2015
+++ src/tests/net/mcast/t_mcast.c	Tue May 19 03:19:27 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_mcast.c,v 1.13 2015/05/18 00:55:09 ozaki-r Exp $	*/
+/*	$NetBSD: t_mcast.c,v 1.14 2015/05/19 03:19:27 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 #include sys/cdefs.h
 #ifdef __RCSID
-__RCSID($NetBSD: t_mcast.c,v 1.13 2015/05/18 00:55:09 ozaki-r Exp $);
+__RCSID($NetBSD: t_mcast.c,v 1.14 2015/05/19 03:19:27 ozaki-r Exp $);
 #else
 extern const char *__progname;
 #define getprogname() __progname
@@ -228,7 +228,7 @@ out:
 	}
 	freeaddrinfo(ai0);
 	if (s == -1)
-		ERRX(1, %s (%s), cause, strerror(lasterrno));
+		ERRX(EXIT_FAILURE, %s (%s), cause, strerror(lasterrno));
 	return s;
 }
 



CVS commit: src/tests/net/mcast

2015-05-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue May 19 03:19:27 UTC 2015

Modified Files:
src/tests/net/mcast: t_mcast.c

Log Message:
Use EXIT_FAILURE instead of 1


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/tests/net/mcast/t_mcast.c

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



CVS commit: [netbsd-7] src

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 04:42:32 UTC 2015

Modified Files:
src/sbin/veriexecctl [netbsd-7]: veriexecctl.c
src/share/man/man9 [netbsd-7]: veriexec.9
src/sys/conf [netbsd-7]: files
src/sys/dev [netbsd-7]: verified_exec.c
Added Files:
src/sys/kern [netbsd-7]: kern_veriexec.c
Removed Files:
src/sys/kern [netbsd-7]: kern_verifiedexec.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #764):
sbin/veriexecctl/veriexecctl.c: revision 1.38
share/man/man9/veriexec.9: revision 1.10
sys/conf/files: revision 1.1128
sys/dev/verified_exec.c: revisions 1.70, 1.71
sys/kern/kern_veriexec.c: revisions 1.1-1.8
sys/kern/kern_verifiedexec.c: delete
Rename kern_verifiedexec.c to kern_veriexec.c. Veriexec is the name of
the subsystem, not Verifiedexec.

The revisions of kern_verifiedexec.c are now in Attic/.

No change between kern_verifiedexec.c and kern_veriexec.c.

Also, update the man page accordingly.

Okayed by christos@ and blymn@ some months ago.
--
KNF
--
Don't mix veriexec lock and file lock in veriexec_file_verify().

Now:
 - 'veriexec_op_lock' needs to be held when calling veriexec_file_verify()
 - the 'file_lock_state' argument indicates if the file is locked
 - add some KASSERTs
--
Instead of duplicating code, add veriexec_fp_status(). Also reorder a
useless goto.
--
Make veriexec_renamechk() more readable. Also add a KASSERT on vte_count.

No real functional change
--
If we already have an entry for the file being loaded, return EEXIST, don't
silently skip it.
--
Remove FreeBSD.

ok elad@
--
KASSERT x then y, not (x  y).
--
KNF
--
Not to add even more confusion in an already overcomplicated subsystem,
remove the FreeBSD code. This code is likely to be outdated, and Veriexec
is in all cases not available on FreeBSD.
--
Be a bit more verbose if the kernel rejects a file


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.37.2.1 src/sbin/veriexecctl/veriexecctl.c
cvs rdiff -u -r1.27 -r1.27.4.1 src/share/man/man9/veriexec.9
cvs rdiff -u -r1.1096.2.5 -r1.1096.2.6 src/sys/conf/files
cvs rdiff -u -r1.69 -r1.69.2.1 src/sys/dev/verified_exec.c
cvs rdiff -u -r0 -r1.8.2.2 src/sys/kern/kern_veriexec.c
cvs rdiff -u -r1.134 -r0 src/sys/kern/kern_verifiedexec.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/veriexecctl/veriexecctl.c
diff -u src/sbin/veriexecctl/veriexecctl.c:1.37 src/sbin/veriexecctl/veriexecctl.c:1.37.2.1
--- src/sbin/veriexecctl/veriexecctl.c:1.37	Sun Jul 27 04:23:44 2014
+++ src/sbin/veriexecctl/veriexecctl.c	Tue May 19 04:42:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: veriexecctl.c,v 1.37 2014/07/27 04:23:44 dholland Exp $	*/
+/*	$NetBSD: veriexecctl.c,v 1.37.2.1 2015/05/19 04:42:31 snj Exp $	*/
 
 /*-
  * Copyright 2005 Elad Efrat e...@netbsd.org
@@ -248,10 +248,11 @@ main(int argc, char **argv)
 			err(1, Cannot open `%s', file);
 
 		yyin = fdopen(lfd, r);
-
 		yyparse();
+		fclose(yyin);
 
-		(void)fclose(yyin);
+		if (error != EXIT_SUCCESS)
+			errx(1, Cannot load '%s', file);
 	} else if (argc == 2  strcasecmp(argv[0], delete) == 0) {
 		prop_dictionary_t dp;
 		struct stat sb;

Index: src/share/man/man9/veriexec.9
diff -u src/share/man/man9/veriexec.9:1.27 src/share/man/man9/veriexec.9:1.27.4.1
--- src/share/man/man9/veriexec.9:1.27	Tue Mar 18 18:20:40 2014
+++ src/share/man/man9/veriexec.9	Tue May 19 04:42:31 2015
@@ -1,4 +1,4 @@
-.\ $NetBSD: veriexec.9,v 1.27 2014/03/18 18:20:40 riastradh Exp $
+.\ $NetBSD: veriexec.9,v 1.27.4.1 2015/05/19 04:42:31 snj Exp $
 .\
 .\ Copyright 2006 Elad Efrat e...@netbsd.org
 .\ Copyright 2006 Brett Lymn bl...@netbsd.org
@@ -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 March 18, 2011
+.Dd February 13, 2015
 .Dt VERIEXEC 9
 .Os
 .Sh NAME
@@ -295,7 +295,7 @@ containing the filename.
 .It Sy Path	Purpose
 .It src/sys/dev/verified_exec.c	driver for userland communication
 .It src/sys/sys/verified_exec.h	shared (userland/kernel) header file
-.It src/sys/kern/kern_verifiedexec.c	subsystem code
+.It src/sys/kern/kern_veriexec.c	subsystem code
 .It src/sys/kern/vfs_syscalls.c	rename, remove, and unmount policies
 .It src/sys/kern/vfs_vnops.c	regular file access policy
 .El

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.1096.2.5 src/sys/conf/files:1.1096.2.6
--- src/sys/conf/files:1.1096.2.5	Fri May 15 03:44:19 2015
+++ src/sys/conf/files	Tue May 19 04:42:31 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1096.2.5 2015/05/15 03:44:19 snj Exp $
+#	$NetBSD: files,v 1.1096.2.6 2015/05/19 04:42:31 snj Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20100430
@@ -1419,7 +1419,7 @@ file	dev/kttcp.c			kttcp		needs-flag
 
 # Veriexec
 defpseudo veriexec
-file	kern/kern_verifiedexec.c	veriexec
+file	kern/kern_veriexec.c	

CVS commit: [netbsd-7] src

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 04:42:32 UTC 2015

Modified Files:
src/sbin/veriexecctl [netbsd-7]: veriexecctl.c
src/share/man/man9 [netbsd-7]: veriexec.9
src/sys/conf [netbsd-7]: files
src/sys/dev [netbsd-7]: verified_exec.c
Added Files:
src/sys/kern [netbsd-7]: kern_veriexec.c
Removed Files:
src/sys/kern [netbsd-7]: kern_verifiedexec.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #764):
sbin/veriexecctl/veriexecctl.c: revision 1.38
share/man/man9/veriexec.9: revision 1.10
sys/conf/files: revision 1.1128
sys/dev/verified_exec.c: revisions 1.70, 1.71
sys/kern/kern_veriexec.c: revisions 1.1-1.8
sys/kern/kern_verifiedexec.c: delete
Rename kern_verifiedexec.c to kern_veriexec.c. Veriexec is the name of
the subsystem, not Verifiedexec.

The revisions of kern_verifiedexec.c are now in Attic/.

No change between kern_verifiedexec.c and kern_veriexec.c.

Also, update the man page accordingly.

Okayed by christos@ and blymn@ some months ago.
--
KNF
--
Don't mix veriexec lock and file lock in veriexec_file_verify().

Now:
 - 'veriexec_op_lock' needs to be held when calling veriexec_file_verify()
 - the 'file_lock_state' argument indicates if the file is locked
 - add some KASSERTs
--
Instead of duplicating code, add veriexec_fp_status(). Also reorder a
useless goto.
--
Make veriexec_renamechk() more readable. Also add a KASSERT on vte_count.

No real functional change
--
If we already have an entry for the file being loaded, return EEXIST, don't
silently skip it.
--
Remove FreeBSD.

ok elad@
--
KASSERT x then y, not (x  y).
--
KNF
--
Not to add even more confusion in an already overcomplicated subsystem,
remove the FreeBSD code. This code is likely to be outdated, and Veriexec
is in all cases not available on FreeBSD.
--
Be a bit more verbose if the kernel rejects a file


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.37.2.1 src/sbin/veriexecctl/veriexecctl.c
cvs rdiff -u -r1.27 -r1.27.4.1 src/share/man/man9/veriexec.9
cvs rdiff -u -r1.1096.2.5 -r1.1096.2.6 src/sys/conf/files
cvs rdiff -u -r1.69 -r1.69.2.1 src/sys/dev/verified_exec.c
cvs rdiff -u -r0 -r1.8.2.2 src/sys/kern/kern_veriexec.c
cvs rdiff -u -r1.134 -r0 src/sys/kern/kern_verifiedexec.c

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



CVS commit: [netbsd-7] src/sys/dev/pci

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 05:09:02 UTC 2015

Modified Files:
src/sys/dev/pci [netbsd-7]: if_wm.c if_wmreg.h if_wmvar.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #784):
sys/dev/pci/if_wm.c: revision 1.321
sys/dev/pci/if_wmreg.h: revision 1.71
sys/dev/pci/if_wmvar.h: 1.24 via patch
Add support iNVM (integrated Non-Volatile Memory) for I21[01].
This change fixes a bug that a MAC address is wrongly set on
iNVM machines/NICs.


To generate a diff of this commit:
cvs rdiff -u -r1.289.2.6 -r1.289.2.7 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.60.2.2 -r1.60.2.3 src/sys/dev/pci/if_wmreg.h
cvs rdiff -u -r1.19.2.2 -r1.19.2.3 src/sys/dev/pci/if_wmvar.h

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.289.2.6 src/sys/dev/pci/if_wm.c:1.289.2.7
--- src/sys/dev/pci/if_wm.c:1.289.2.6	Sun Apr 19 06:50:22 2015
+++ src/sys/dev/pci/if_wm.c	Tue May 19 05:09:02 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.289.2.6 2015/04/19 06:50:22 riz Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.289.2.7 2015/05/19 05:09:02 snj Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -81,7 +81,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.289.2.6 2015/04/19 06:50:22 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.289.2.7 2015/05/19 05:09:02 snj Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -658,10 +658,14 @@ static int32_t	wm_read_ich8_data(struct 
 static int32_t	wm_read_ich8_byte(struct wm_softc *, uint32_t, uint8_t *);
 static int32_t	wm_read_ich8_word(struct wm_softc *, uint32_t, uint16_t *);
 static int	wm_nvm_read_ich8(struct wm_softc *, int, int, uint16_t *);
+/* iNVM */
+static int	wm_nvm_read_word_invm(struct wm_softc *, uint16_t, uint16_t *);
+static int	wm_nvm_read_invm(struct wm_softc *, int, int, uint16_t *);
 /* Lock, detecting NVM type, validate checksum and read */
 static int	wm_nvm_acquire(struct wm_softc *);
 static void	wm_nvm_release(struct wm_softc *);
 static int	wm_nvm_is_onboard_eeprom(struct wm_softc *);
+static int	wm_nvm_get_flash_presence_i210(struct wm_softc *);
 static int	wm_nvm_validate_checksum(struct wm_softc *);
 static int	wm_nvm_read(struct wm_softc *, int, int, uint16_t *);
 
@@ -1823,9 +1827,15 @@ wm_attach(device_t parent, device_t self
 		break;
 	case WM_T_I210:
 	case WM_T_I211:
-		wm_nvm_set_addrbits_size_eecd(sc);
-		sc-sc_flags |= WM_F_EEPROM_FLASH_HW;
-		sc-sc_flags |= WM_F_EEPROM_EERDEEWR | WM_F_LOCK_SWFW;
+		if (wm_nvm_get_flash_presence_i210(sc)) {
+			wm_nvm_set_addrbits_size_eecd(sc);
+			sc-sc_flags |= WM_F_EEPROM_FLASH_HW;
+			sc-sc_flags |= WM_F_EEPROM_EERDEEWR | WM_F_LOCK_SWFW;
+		} else {
+			sc-sc_nvm_wordsize = INVM_SIZE;
+			sc-sc_flags |= WM_F_EEPROM_INVM;
+			sc-sc_flags |= WM_F_EEPROM_EERDEEWR | WM_F_LOCK_SWFW;
+		}
 		break;
 	default:
 		break;
@@ -1885,11 +1895,13 @@ wm_attach(device_t parent, device_t self
 	else {
 		aprint_verbose_dev(sc-sc_dev, %u words ,
 		sc-sc_nvm_wordsize);
-		if (sc-sc_flags  WM_F_EEPROM_FLASH_HW) {
+		if (sc-sc_flags  WM_F_EEPROM_INVM)
+			aprint_verbose(iNVM\n);
+		else if (sc-sc_flags  WM_F_EEPROM_FLASH_HW)
 			aprint_verbose(FLASH(HW)\n);
-		} else if (sc-sc_flags  WM_F_EEPROM_FLASH) {
+		else if (sc-sc_flags  WM_F_EEPROM_FLASH)
 			aprint_verbose(FLASH\n);
-		} else {
+		else {
 			if (sc-sc_flags  WM_F_EEPROM_SPI)
 eetype = SPI;
 			else
@@ -8511,6 +8523,102 @@ wm_nvm_read_ich8(struct wm_softc *sc, in
 	return error;
 }
 
+/* iNVM */
+
+static int
+wm_nvm_read_word_invm(struct wm_softc *sc, uint16_t address, uint16_t *data)
+{
+	int32_t  rv = 0;
+	uint32_t invm_dword;
+	uint16_t i;
+	uint8_t record_type, word_address;
+
+	for (i = 0; i  INVM_SIZE; i++) {
+		invm_dword = CSR_READ(sc, E1000_INVM_DATA_REG(i));
+		/* Get record type */
+		record_type = INVM_DWORD_TO_RECORD_TYPE(invm_dword);
+		if (record_type == INVM_UNINITIALIZED_STRUCTURE)
+			break;
+		if (record_type == INVM_CSR_AUTOLOAD_STRUCTURE)
+			i += INVM_CSR_AUTOLOAD_DATA_SIZE_IN_DWORDS;
+		if (record_type == INVM_RSA_KEY_SHA256_STRUCTURE)
+			i += INVM_RSA_KEY_SHA256_DATA_SIZE_IN_DWORDS;
+		if (record_type == INVM_WORD_AUTOLOAD_STRUCTURE) {
+			word_address = INVM_DWORD_TO_WORD_ADDRESS(invm_dword);
+			if (word_address == address) {
+*data = INVM_DWORD_TO_WORD_DATA(invm_dword);
+rv = 0;
+break;
+			}
+		}
+	}
+
+	return rv;
+}
+
+static int
+wm_nvm_read_invm(struct wm_softc *sc, int offset, int words, uint16_t *data)
+{
+	int rv = 0;
+	int i;
+
+	for (i = 0; i  words; i++) {
+		switch (offset + i) {
+		case NVM_OFF_MACADDR:
+		case NVM_OFF_MACADDR1:
+		case NVM_OFF_MACADDR2:
+			rv = wm_nvm_read_word_invm(sc, offset + i, data[i]);
+			if (rv != 0) {
+data[i] = 0x;
+rv = -1;
+			}
+			break;
+		case NVM_OFF_CFG2:
+			rv = wm_nvm_read_word_invm(sc, offset, 

CVS commit: [netbsd-7] src/sys/dev/pci

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 05:09:02 UTC 2015

Modified Files:
src/sys/dev/pci [netbsd-7]: if_wm.c if_wmreg.h if_wmvar.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #784):
sys/dev/pci/if_wm.c: revision 1.321
sys/dev/pci/if_wmreg.h: revision 1.71
sys/dev/pci/if_wmvar.h: 1.24 via patch
Add support iNVM (integrated Non-Volatile Memory) for I21[01].
This change fixes a bug that a MAC address is wrongly set on
iNVM machines/NICs.


To generate a diff of this commit:
cvs rdiff -u -r1.289.2.6 -r1.289.2.7 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.60.2.2 -r1.60.2.3 src/sys/dev/pci/if_wmreg.h
cvs rdiff -u -r1.19.2.2 -r1.19.2.3 src/sys/dev/pci/if_wmvar.h

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



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

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 05:21:12 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/dist/drm/radeon [netbsd-7]: radeon_display.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #787):
sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c: revision 1.4
don't apply the don't set CLUT to RV280.  it isn't necessary for
my PCI 9250 card, and hoses the colours in X when running.
unfortunately, my RV250 does need this to avoid the console being
very very dark on black.
i'm curious what other earlier radeon card (anything matching any
of the card marked as:  CHIP_R100, CHIP_RV100, CHIP_RS100,
CHIP_RV200, CHIP_RS200, CHIP_R200, CHIP_RV250, and CHIP_RS300.)
the RV280 now works again properly, but the RV250 is still having
a problem waiting for commands to complete and it appears as if
X is hung, when infact it is asking the kernel quite frequently
if the job it asked for is complete, each time sleeping for a
short time and thus only appearing to take almost no CPU.


To generate a diff of this commit:
cvs rdiff -u -r1.2.4.1 -r1.2.4.2 \
src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.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/radeon/radeon_display.c
diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c:1.2.4.1 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c:1.2.4.2
--- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c:1.2.4.1	Thu Apr 23 07:31:17 2015
+++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c	Tue May 19 05:21:12 2015
@@ -185,7 +185,7 @@ static void legacy_crtc_load_lut(struct 
 	 * At least the RV100 [vendor 1002 product 515e (rev. 0x02)]
 	 * has an old style palette
 	 */
-	if (ASIC_IS_RV100(rdev)) {
+	if (rdev-family  CHIP_RV280) {
 #ifdef notyet
 		/*
 		 * Leave CLUT alone for now. The code below gives us a



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

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 05:21:12 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/dist/drm/radeon [netbsd-7]: radeon_display.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #787):
sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c: revision 1.4
don't apply the don't set CLUT to RV280.  it isn't necessary for
my PCI 9250 card, and hoses the colours in X when running.
unfortunately, my RV250 does need this to avoid the console being
very very dark on black.
i'm curious what other earlier radeon card (anything matching any
of the card marked as:  CHIP_R100, CHIP_RV100, CHIP_RS100,
CHIP_RV200, CHIP_RS200, CHIP_R200, CHIP_RV250, and CHIP_RS300.)
the RV280 now works again properly, but the RV250 is still having
a problem waiting for commands to complete and it appears as if
X is hung, when infact it is asking the kernel quite frequently
if the job it asked for is complete, each time sleeping for a
short time and thus only appearing to take almost no CPU.


To generate a diff of this commit:
cvs rdiff -u -r1.2.4.1 -r1.2.4.2 \
src/sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c

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



CVS commit: [netbsd-7] src/doc

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 05:37:18 UTC 2015

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

Log Message:
764, 766, 769, 777, 778, 784-788


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.302 -r1.1.2.303 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.302 src/doc/CHANGES-7.0:1.1.2.303
--- src/doc/CHANGES-7.0:1.1.2.302	Tue May 19 04:19:49 2015
+++ src/doc/CHANGES-7.0	Tue May 19 05:37:18 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.302 2015/05/19 04:19:49 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.303 2015/05/19 05:37:18 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -23274,3 +23274,71 @@ crypto/external/bsd/openssh/dist/compat.
 	Pass the correct length to match_patter_list. From Hanno Boeck.
 	[christos, ticket #783]
 
+sbin/veriexecctl/veriexecctl.c			1.38
+share/man/man9/veriexec.9			1.10
+sys/conf/files	1.1128
+sys/dev/verified_exec.c1.70, 1.71
+sys/kern/kern_veriexec.c			1.1-1.8
+sys/kern/kern_verifiedexec.c			delete
+
+	Sync Veriexec with HEAD: mostly cleanup and consistency.
+	[maxv, ticket #764]
+
+sys/kern/subr_disk.c1.113
+
+	in bounds_check_with_*, reject negative block numbers and avoid
+	a potential overflow in calculating the size of the request.
+	[chs, ticket #766]
+
+sys/nfs/nfs_vnops.c1.308
+
+	in nfs_writerpc(), avoid a signed/unsigned problem in computing
+	the number of bytes to back up in the uio when we need to
+	resend a write RPC (eg. after a server crash) on a 64-bit
+	platform.  PR 35448.
+	[chs, ticket #769]
+
+sys/arch/arm/arm32/pmap.c			1.308
+
+	pmap_tlb_flushD is for !ARM_MMU_EXTENDED only now
+	[joerg, ticket #777]
+
+lib/libm/compiler_rt/Makefile.inc		1.7-1.9
+
+	- Complex division for long double uses different function
+	  names on PPC.
+	- PPC64 uses the double-double code too
+	- Add missing muldc3.c.
+	[joerg, ticket #778]
+
+sys/dev/pci/if_wm.c1.321
+sys/dev/pci/if_wmreg.h1.71
+sys/dev/pci/if_wmvar.h1.24 via patch
+
+	Add support iNVM (integrated Non-Volatile Memory) for I21[01].
+	This change fixes a bug that a MAC address is wrongly set on
+	iNVM machines/NICs.
+	[msaitoh, ticket #784]
+
+lib/libc/db/db/db.c1.17
+
+	Whitelist O_CLOEXEC flag.
+	[christos, ticket #785]
+
+external/mit/xorg/server/drivers/xf86-video-intel/Makefile 1.21
+
+	For xf86-video-intel, switch the default method to SNA.
+	[mrg, ticket #786]
+
+sys/external/bsd/drm2/dist/drm/radeon/radeon_display.c 1.4
+
+	Don't apply the don't set CLUT to RV280.
+	[mrg, ticket #787]
+
+xsrc/external/mit/xf86-video-intel/dist/src/sna/kgem.c 1.5
+xsrc/external/mit/xf86-video-intel/dist/src/sna/sna_display.c 1.4
+
+	Remove differences with upstream xf86-video-intel which
+	are no longer necessary.
+	[mrg, ticket #788]
+



CVS commit: [netbsd-7] src/doc

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 05:37:18 UTC 2015

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

Log Message:
764, 766, 769, 777, 778, 784-788


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

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



CVS commit: [netbsd-7] src/doc

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 04:19:49 UTC 2015

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

Log Message:
amend ticket 761: missing semicolon in hpcfb.c is revision 1.60.


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

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



CVS commit: [netbsd-7] src/doc

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 04:19:49 UTC 2015

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

Log Message:
amend ticket 761: missing semicolon in hpcfb.c is revision 1.60.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.301 -r1.1.2.302 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.301 src/doc/CHANGES-7.0:1.1.2.302
--- src/doc/CHANGES-7.0:1.1.2.301	Sat May 16 18:15:33 2015
+++ src/doc/CHANGES-7.0	Tue May 19 04:19:49 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.301 2015/05/16 18:15:33 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.302 2015/05/19 04:19:49 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -23204,7 +23204,7 @@ usr.sbin/postinstall/postinstall		1.184,
 
 sys/arch/sgimips/dev/scn.c			1.8
 sys/arch/sgimips/mace/macekbc.c			1.8
-sys/dev/hpc/hpcfb.c1.59
+sys/dev/hpc/hpcfb.c1.59, 1.60
 sys/dev/i2c/i2c.c1.47
 sys/dev/ic/mfi.c1.57
 sys/dev/if_ndis/if_ndis_pci.c			1.21



CVS commit: [netbsd-7] src/lib/libm/compiler_rt

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 05:03:15 UTC 2015

Modified Files:
src/lib/libm/compiler_rt [netbsd-7]: Makefile.inc

Log Message:
Pull up following revision(s) (requested by joerg in ticket #778):
lib/libm/compiler_rt/Makefile.inc: revisions 1.7-1.9
Complex division for long double uses different function names on PPC.
--
PPC64 uses the double-double code too
--
Add missing muldc3.c.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.2.1 src/lib/libm/compiler_rt/Makefile.inc

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

Modified files:

Index: src/lib/libm/compiler_rt/Makefile.inc
diff -u src/lib/libm/compiler_rt/Makefile.inc:1.6 src/lib/libm/compiler_rt/Makefile.inc:1.6.2.1
--- src/lib/libm/compiler_rt/Makefile.inc:1.6	Fri Jun 13 01:17:45 2014
+++ src/lib/libm/compiler_rt/Makefile.inc	Tue May 19 05:03:15 2015
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile.inc,v 1.6 2014/06/13 01:17:45 mrg Exp $
+# $NetBSD: Makefile.inc,v 1.6.2.1 2015/05/19 05:03:15 snj Exp $
 
 COMPILER_RT_SRCDIR=	${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist
 
-.if ${MACHINE_ARCH} == powerpc
+.if ${MACHINE_CPU} == powerpc
 COMPILER_RT_CPU_DIR=	${COMPILER_RT_SRCDIR}/lib/builtins/ppc
 COMPILER_RT_ARCH_DIR=	${COMPILER_RT_SRCDIR}/lib/builtins/ppc
 .else
@@ -16,11 +16,18 @@ COMPILER_RT_ARCH_DIR=	${COMPILER_RT_SRCD
 
 # Needs scaling support
 GENERIC_SRCS+= \
-	mulxc3.c \
+	muldc3.c \
 	mulsc3.c \
-	divxc3.c \
+	mulxc3.c \
 	divdc3.c \
-	divsc3.c
+	divsc3.c \
+	divxc3.c
+
+.if ${MACHINE_CPU} == powerpc
+GENERIC_SRCS+= \
+	divtc3.c \
+	multc3.c
+.endif
 
 .for src in ${GENERIC_SRCS}
 .  if exists(${COMPILER_RT_CPU_DIR}/${src:R}.S) || \



CVS commit: [netbsd-7] src/lib/libm/compiler_rt

2015-05-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue May 19 05:03:15 UTC 2015

Modified Files:
src/lib/libm/compiler_rt [netbsd-7]: Makefile.inc

Log Message:
Pull up following revision(s) (requested by joerg in ticket #778):
lib/libm/compiler_rt/Makefile.inc: revisions 1.7-1.9
Complex division for long double uses different function names on PPC.
--
PPC64 uses the double-double code too
--
Add missing muldc3.c.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.2.1 src/lib/libm/compiler_rt/Makefile.inc

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



CVS commit: xsrc/external/mit/xf86-video-intel-old/dist

2015-05-18 Thread Robert Swindells
Module Name:xsrc
Committed By:   rjs
Date:   Mon May 18 23:12:53 UTC 2015

Modified Files:
xsrc/external/mit/xf86-video-intel-old/dist/src: i830_driver.c
i830_uxa.c i830_video.c
xsrc/external/mit/xf86-video-intel-old/dist/uxa: uxa-priv.h
uxa-render.c uxa.c

Log Message:
Make it work with xorg-server-1.10.6.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/xf86-video-intel-old/dist/src/i830_driver.c \
xsrc/external/mit/xf86-video-intel-old/dist/src/i830_uxa.c \
xsrc/external/mit/xf86-video-intel-old/dist/src/i830_video.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/xf86-video-intel-old/dist/uxa/uxa-priv.h \
xsrc/external/mit/xf86-video-intel-old/dist/uxa/uxa-render.c \
xsrc/external/mit/xf86-video-intel-old/dist/uxa/uxa.c

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

Modified files:

Index: xsrc/external/mit/xf86-video-intel-old/dist/src/i830_driver.c
diff -u xsrc/external/mit/xf86-video-intel-old/dist/src/i830_driver.c:1.1.1.1 xsrc/external/mit/xf86-video-intel-old/dist/src/i830_driver.c:1.2
--- xsrc/external/mit/xf86-video-intel-old/dist/src/i830_driver.c:1.1.1.1	Mon May 18 22:11:04 2015
+++ xsrc/external/mit/xf86-video-intel-old/dist/src/i830_driver.c	Mon May 18 23:12:53 2015
@@ -902,10 +902,6 @@ i830_xf86crtc_resize (ScrnInfoPtr scrn, 
    width, height, -1, -1, scrn-displayWidth * i830-cpp,
    i830-FbBase + scrn-fbOffset);
 
-	/* ick. xf86EnableDisableFBAccess smashes the screen pixmap devPrivate,
-	 * so update the value it uses
-	 */
-	scrn-pixmapPrivate.ptr = i830-FbBase + scrn-fbOffset;
 	xf86DrvMsg(scrn-scrnIndex, X_INFO, New front buffer at 0x%lx\n,
 		   i830-front_buffer-offset);
 	i830_set_new_crtc_bo(scrn);
Index: xsrc/external/mit/xf86-video-intel-old/dist/src/i830_uxa.c
diff -u xsrc/external/mit/xf86-video-intel-old/dist/src/i830_uxa.c:1.1.1.1 xsrc/external/mit/xf86-video-intel-old/dist/src/i830_uxa.c:1.2
--- xsrc/external/mit/xf86-video-intel-old/dist/src/i830_uxa.c:1.1.1.1	Mon May 18 22:11:07 2015
+++ xsrc/external/mit/xf86-video-intel-old/dist/src/i830_uxa.c	Mon May 18 23:12:53 2015
@@ -79,7 +79,7 @@ const int I830PatternROP[16] =
 ROP_1
 };
 
-static int uxa_pixmap_index;
+static DevPrivateKeyRec uxa_pixmap_index;
 
 /**
  * Returns whether a given pixmap is tiled or not.
@@ -452,7 +452,11 @@ i830_transform_is_affine (PictTransformP
 dri_bo *
 i830_get_pixmap_bo(PixmapPtr pixmap)
 {
+#if HAS_DEVPRIVATEKEYREC
+return dixGetPrivate(pixmap-devPrivates, uxa_pixmap_index);
+#else
 return dixLookupPrivate(pixmap-devPrivates, uxa_pixmap_index);
+#endif
 }
 
 void
@@ -703,7 +707,11 @@ i830_uxa_init (ScreenPtr pScreen)
 ScrnInfoPtr scrn = xf86Screens[pScreen-myNum];
 I830Ptr i830 = I830PTR(scrn);
 
+#if HAS_DIXREGISTERPRIVATEKEY
+if (!dixRegisterPrivateKey(uxa_pixmap_index, PRIVATE_PIXMAP, 0))
+#else
 if (!dixRequestPrivate(uxa_pixmap_index, 0))
+#endif
 	return FALSE;
 
 i830-uxa_driver = uxa_driver_alloc();
Index: xsrc/external/mit/xf86-video-intel-old/dist/src/i830_video.c
diff -u xsrc/external/mit/xf86-video-intel-old/dist/src/i830_video.c:1.1.1.1 xsrc/external/mit/xf86-video-intel-old/dist/src/i830_video.c:1.2
--- xsrc/external/mit/xf86-video-intel-old/dist/src/i830_video.c:1.1.1.1	Mon May 18 22:11:10 2015
+++ xsrc/external/mit/xf86-video-intel-old/dist/src/i830_video.c	Mon May 18 23:12:53 2015
@@ -2204,40 +2204,6 @@ i830_clip_video_helper (ScrnInfoPtr pScr
 return ret;
 }
 
-static void
-i830_fill_colorkey (ScreenPtr pScreen, uint32_t key, RegionPtr clipboxes)
-{
-   DrawablePtr root = WindowTable[pScreen-myNum]-drawable;
-   XID	   pval[2];
-   BoxPtr  pbox = REGION_RECTS(clipboxes);
-   int	   i, nbox = REGION_NUM_RECTS(clipboxes);
-   xRectangle  *rects;
-   GCPtr   gc;
-
-   if(!xf86Screens[pScreen-myNum]-vtSema) return;
-
-   gc = GetScratchGC(root-depth, pScreen);
-   pval[0] = key;
-   pval[1] = IncludeInferiors;
-   (void) ChangeGC(gc, GCForeground|GCSubwindowMode, pval);
-   ValidateGC(root, gc);
-
-   rects = xalloc (nbox * sizeof(xRectangle));
-
-   for(i = 0; i  nbox; i++, pbox++) 
-   {
-  rects[i].x = pbox-x1;
-  rects[i].y = pbox-y1;
-  rects[i].width = pbox-x2 - pbox-x1;
-  rects[i].height = pbox-y2 - pbox-y1;
-   }
-   
-   (*gc-ops-PolyFillRect)(root, gc, nbox, rects);
-   
-   xfree (rects);
-   FreeScratchGC (gc);
-}
-
 /*
  * The source rectangle of the video is defined by (src_x, src_y, src_w, src_h).
  * The dest rectangle of the video is defined by (drw_x, drw_y, drw_w, drw_h).
@@ -2525,7 +2491,7 @@ I830PutImage(ScrnInfoPtr pScrn,
 	/* update cliplist */
 	if (!REGION_EQUAL(pScrn-pScreen, pPriv-clip, clipBoxes)) {
 	REGION_COPY(pScrn-pScreen, pPriv-clip, clipBoxes);
-	i830_fill_colorkey (pScreen, pPriv-colorKey, clipBoxes);
+	xf86XVFillKeyHelper(pScrn-pScreen, pPriv-colorKey, clipBoxes);
 	}
 

CVS commit: xsrc/external/mit/xf86-video-intel-old/dist

2015-05-18 Thread Robert Swindells
Module Name:xsrc
Committed By:   rjs
Date:   Mon May 18 23:12:53 UTC 2015

Modified Files:
xsrc/external/mit/xf86-video-intel-old/dist/src: i830_driver.c
i830_uxa.c i830_video.c
xsrc/external/mit/xf86-video-intel-old/dist/uxa: uxa-priv.h
uxa-render.c uxa.c

Log Message:
Make it work with xorg-server-1.10.6.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/xf86-video-intel-old/dist/src/i830_driver.c \
xsrc/external/mit/xf86-video-intel-old/dist/src/i830_uxa.c \
xsrc/external/mit/xf86-video-intel-old/dist/src/i830_video.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/xf86-video-intel-old/dist/uxa/uxa-priv.h \
xsrc/external/mit/xf86-video-intel-old/dist/uxa/uxa-render.c \
xsrc/external/mit/xf86-video-intel-old/dist/uxa/uxa.c

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



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

2015-05-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue May 19 02:30:57 UTC 2015

Modified Files:
src/sys/arch/evbmips/conf: ERLITE

Log Message:
Enable MSDOSFS since the kernel lives on a MSDOS fs.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbmips/conf/ERLITE

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/evbmips/conf/ERLITE
diff -u src/sys/arch/evbmips/conf/ERLITE:1.6 src/sys/arch/evbmips/conf/ERLITE:1.7
--- src/sys/arch/evbmips/conf/ERLITE:1.6	Sun May 17 14:17:52 2015
+++ src/sys/arch/evbmips/conf/ERLITE	Tue May 19 02:30:57 2015
@@ -1,11 +1,11 @@
-#	$NetBSD: ERLITE,v 1.6 2015/05/17 14:17:52 martin Exp $
+#	$NetBSD: ERLITE,v 1.7 2015/05/19 02:30:57 matt Exp $
 
 include 	arch/mips/conf/std.octeon
 include 	arch/evbmips/conf/files.octeon
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		ERLITE-$Revision: 1.6 $
+#ident 		ERLITE-$Revision: 1.7 $
 
 maxusers	32
 
@@ -70,7 +70,7 @@ file-system	KERNFS		# kernel data-struct
 file-system	PROCFS		# /proc
 #file-system	CD9660		# ISO 9660 + Rock Ridge file system
 #file-system	UNION		# union file system
-#file-system	MSDOSFS		# MS-DOS FAT filesystem(s).
+file-system	MSDOSFS		# MS-DOS FAT filesystem(s).
 #file-system	CODA		# Coda File System; also needs vcoda (below)
 file-system	PTYFS		# /dev/pts/N support
 



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

2015-05-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue May 19 02:30:57 UTC 2015

Modified Files:
src/sys/arch/evbmips/conf: ERLITE

Log Message:
Enable MSDOSFS since the kernel lives on a MSDOS fs.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbmips/conf/ERLITE

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



CVS commit: src/sys/arch/evbmips/cavium

2015-05-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue May 19 00:09:03 UTC 2015

Modified Files:
src/sys/arch/evbmips/cavium: autoconf.c

Log Message:
no wd devices on erlite, use sd instead for the USB mass storage.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbmips/cavium/autoconf.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/evbmips/cavium/autoconf.c
diff -u src/sys/arch/evbmips/cavium/autoconf.c:1.1 src/sys/arch/evbmips/cavium/autoconf.c:1.2
--- src/sys/arch/evbmips/cavium/autoconf.c:1.1	Wed Apr 29 08:32:01 2015
+++ src/sys/arch/evbmips/cavium/autoconf.c	Tue May 19 00:09:02 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.1 2015/04/29 08:32:01 hikaru Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.2 2015/05/19 00:09:02 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.1 2015/04/29 08:32:01 hikaru Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.2 2015/05/19 00:09:02 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -94,7 +94,7 @@ findroot(void)
 		for (dv = deviter_first(di, DEVITER_F_ROOT_FIRST); dv != NULL;
 		 dv = deviter_next(di)) {
 			if (device_class(dv) == DV_DISK 
-			device_is_a(dv, wd))
+			device_is_a(dv, sd))
 booted_device = dv;
 		}
 		deviter_release(di);



CVS commit: src/sys/arch/mips/mips

2015-05-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue May 19 00:00:24 UTC 2015

Modified Files:
src/sys/arch/mips/mips: locore.S

Log Message:
u-boot on the ERLITE will call the kernel entry point on each cpu specified
in the coremask argument.  Add code to deal with that.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/arch/mips/mips/locore.S

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

Modified files:

Index: src/sys/arch/mips/mips/locore.S
diff -u src/sys/arch/mips/mips/locore.S:1.190 src/sys/arch/mips/mips/locore.S:1.191
--- src/sys/arch/mips/mips/locore.S:1.190	Fri Mar  1 18:25:47 2013
+++ src/sys/arch/mips/mips/locore.S	Tue May 19 00:00:23 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.190 2013/03/01 18:25:47 joerg Exp $	*/
+/*	$NetBSD: locore.S,v 1.191 2015/05/19 00:00:23 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -91,6 +91,28 @@ _C_LABEL(kernel_text):
 	mtc0	zero, MIPS_COP_0_STATUS		# Disable interrupts
 	COP0_SYNC
 #endif
+#ifdef MIPS64_OCTEON
+	//
+	// U-boot on the erlite starts all cpus at the kernel entry point.
+	// Use EBASE to find our CPU number and if it's not 0, call
+	// octeon_cpu_spinup if MP or loop using the wait instruction since
+	// non-primary CPUs can't do anything useful.
+	//
+	mfc0	a0, $15, 1			# EBASE
+	COP0_SYNC
+	and	a0, 0x1ff			# get CPU number
+	beqz	a0, 2f# normal startup if 0
+	nop
+#ifdef MULTIPROCESSOR
+	j	_C_LABEL(octeon_cpu_spinup)
+	nop
+#else
+1:	wait
+	b	1b
+	nop
+#endif /* MIPS64_OCTEON */
+2:
+#endif
 /*
  * Initialize stack and call machine startup.
  */



CVS commit: src/sys/arch/evbmips/cavium

2015-05-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue May 19 00:09:03 UTC 2015

Modified Files:
src/sys/arch/evbmips/cavium: autoconf.c

Log Message:
no wd devices on erlite, use sd instead for the USB mass storage.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbmips/cavium/autoconf.c

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



CVS commit: src/sys/arch/mips/mips

2015-05-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue May 19 00:00:24 UTC 2015

Modified Files:
src/sys/arch/mips/mips: locore.S

Log Message:
u-boot on the ERLITE will call the kernel entry point on each cpu specified
in the coremask argument.  Add code to deal with that.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/arch/mips/mips/locore.S

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



CVS commit: src/sys/netinet6

2015-05-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue May 19 01:14:40 UTC 2015

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

Log Message:
Use NULL instead of 0 for pointers


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sys/netinet6/in6_pcb.c

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

Modified files:

Index: src/sys/netinet6/in6_pcb.c
diff -u src/sys/netinet6/in6_pcb.c:1.140 src/sys/netinet6/in6_pcb.c:1.141
--- src/sys/netinet6/in6_pcb.c:1.140	Sat May  2 17:18:03 2015
+++ src/sys/netinet6/in6_pcb.c	Tue May 19 01:14:40 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_pcb.c,v 1.140 2015/05/02 17:18:03 rtr Exp $	*/
+/*	$NetBSD: in6_pcb.c,v 1.141 2015/05/19 01:14:40 ozaki-r Exp $	*/
 /*	$KAME: in6_pcb.c,v 1.84 2001/02/08 18:02:08 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in6_pcb.c,v 1.140 2015/05/02 17:18:03 rtr Exp $);
+__KERNEL_RCSID(0, $NetBSD: in6_pcb.c,v 1.141 2015/05/19 01:14:40 ozaki-r Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -229,7 +229,7 @@ in6_pcbbind_addr(struct in6pcb *in6p, st
 			bcopy(sin6-sin6_addr.s6_addr32[3],
 			sin.sin_addr, sizeof(sin.sin_addr));
 			if (!IN_MULTICAST(sin.sin_addr.s_addr) 
-			ifa_ifwithaddr((struct sockaddr *)sin) == 0)
+			ifa_ifwithaddr((struct sockaddr *)sin) == NULL)
 return EADDRNOTAVAIL;
 		}
 	} else if (IN6_IS_ADDR_MULTICAST(sin6-sin6_addr)) {
@@ -238,7 +238,7 @@ in6_pcbbind_addr(struct in6pcb *in6p, st
 		struct ifaddr *ia = NULL;
 
 		if ((in6p-in6p_flags  IN6P_FAITH) == 0 
-		(ia = ifa_ifwithaddr((struct sockaddr *)sin6)) == 0)
+		(ia = ifa_ifwithaddr((struct sockaddr *)sin6)) == NULL)
 			return (EADDRNOTAVAIL);
 
 		/*
@@ -504,7 +504,7 @@ in6_pcbconnect(void *v, struct sockaddr_
 			sizeof(sin.sin_addr));
 		sinp = in_selectsrc(sin, in6p-in6p_route,
 			in6p-in6p_socket-so_options, NULL, error);
-		if (sinp == 0) {
+		if (sinp == NULL) {
 			if (error == 0)
 error = EADDRNOTAVAIL;
 			return (error);
@@ -531,7 +531,7 @@ in6_pcbconnect(void *v, struct sockaddr_
 			return(error);
 		}
 
-		if (in6a == 0) {
+		if (in6a == NULL) {
 			if (error == 0)
 error = EADDRNOTAVAIL;
 			return (error);
@@ -802,7 +802,7 @@ in6_pcbnotify(struct inpcbtable *table, 
 			goto do_notify;
 		else if (!IN6_ARE_ADDR_EQUAL(in6p-in6p_faddr,
 	 sa6_dst-sin6_addr) ||
-		in6p-in6p_socket == 0 ||
+		in6p-in6p_socket == NULL ||
 		(lport  in6p-in6p_lport != lport) ||
 		(!IN6_IS_ADDR_UNSPECIFIED(sa6_src.sin6_addr) 
 		 !IN6_ARE_ADDR_EQUAL(in6p-in6p_laddr,
@@ -931,7 +931,7 @@ in6_pcblookup_port(struct inpcbtable *ta
 {
 	struct inpcbhead *head;
 	struct inpcb_hdr *inph;
-	struct in6pcb *in6p, *match = 0;
+	struct in6pcb *in6p, *match = NULL;
 	int matchwild = 3, wildcard;
 	u_int16_t lport = lport_arg;
 
@@ -1175,7 +1175,7 @@ in6_pcblookup_connect(struct inpcbtable 
 	if (vp  table-vestige) {
 		if ((*table-vestige-lookup6)(faddr6, fport_arg,
 	   laddr6, lport_arg, vp))
-			return 0;
+			return NULL;
 	}
 
 	return NULL;



CVS commit: src/sys/netinet6

2015-05-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue May 19 01:14:40 UTC 2015

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

Log Message:
Use NULL instead of 0 for pointers


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sys/netinet6/in6_pcb.c

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



CVS commit: src/sys/sys

2015-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 06:42:34 UTC 2015

Modified Files:
src/sys/sys: param.h

Log Message:
Welcome to 7.99.17 (if_clone_list() became public and changed signature)


To generate a diff of this commit:
cvs rdiff -u -r1.478 -r1.479 src/sys/sys/param.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/sys/param.h
diff -u src/sys/sys/param.h:1.478 src/sys/sys/param.h:1.479
--- src/sys/sys/param.h:1.478	Sat May  9 15:22:47 2015
+++ src/sys/sys/param.h	Mon May 18 06:42:34 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.478 2015/05/09 15:22:47 rtr Exp $	*/
+/*	$NetBSD: param.h,v 1.479 2015/05/18 06:42:34 martin Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	799001600	/* NetBSD 7.99.16 */
+#define	__NetBSD_Version__	799001700	/* NetBSD 7.99.17 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) = __NetBSD_Version__)



CVS commit: src/sys/sys

2015-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 06:42:34 UTC 2015

Modified Files:
src/sys/sys: param.h

Log Message:
Welcome to 7.99.17 (if_clone_list() became public and changed signature)


To generate a diff of this commit:
cvs rdiff -u -r1.478 -r1.479 src/sys/sys/param.h

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



CVS commit: src

2015-05-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon May 18 06:27:04 UTC 2015

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/net/route: Makefile
Added Files:
src/tests/net/route: t_flags.sh

Log Message:
Add tests for route flags


To generate a diff of this commit:
cvs rdiff -u -r1.621 -r1.622 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.1 -r1.2 src/tests/net/route/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/net/route/t_flags.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.621 src/distrib/sets/lists/tests/mi:1.622
--- src/distrib/sets/lists/tests/mi:1.621	Fri May 15 10:53:58 2015
+++ src/distrib/sets/lists/tests/mi	Mon May 18 06:27:04 2015
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.621 2015/05/15 10:53:58 ozaki-r Exp $
+# $NetBSD: mi,v 1.622 2015/05/18 06:27:04 ozaki-r Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -3179,6 +3179,7 @@
 ./usr/tests/net/route/Atffile			tests-net-tests		atf,rump
 ./usr/tests/net/route/Kyuafile			tests-net-tests		atf,rump,kyua
 ./usr/tests/net/route/t_change			tests-net-tests		atf,rump
+./usr/tests/net/route/t_flags			tests-net-tests		atf,rump
 ./usr/tests/net/systests-net-tests
 ./usr/tests/net/sys/Atffile			tests-net-tests		atf
 ./usr/tests/net/sys/Kyuafile			tests-net-tests		atf,kyua

Index: src/tests/net/route/Makefile
diff -u src/tests/net/route/Makefile:1.1 src/tests/net/route/Makefile:1.2
--- src/tests/net/route/Makefile:1.1	Tue Feb  8 10:11:29 2011
+++ src/tests/net/route/Makefile	Mon May 18 06:27:04 2015
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.1 2011/02/08 10:11:29 pooka Exp $
+#	$NetBSD: Makefile,v 1.2 2015/05/18 06:27:04 ozaki-r Exp $
 #
 
 .include bsd.own.mk
 
 TESTSDIR=	${TESTSBASE}/net/route
 
-TESTS_SH=	t_change
+TESTS_SH=	t_change t_flags
 
 .include bsd.test.mk

Added files:

Index: src/tests/net/route/t_flags.sh
diff -u /dev/null src/tests/net/route/t_flags.sh:1.1
--- /dev/null	Mon May 18 06:27:04 2015
+++ src/tests/net/route/t_flags.sh	Mon May 18 06:27:04 2015
@@ -0,0 +1,393 @@
+#	$NetBSD: t_flags.sh,v 1.1 2015/05/18 06:27:04 ozaki-r Exp $
+#
+# Copyright (c) 2015 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.
+#
+
+netserver=\
+rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpnet_shmif
+SOCK_LOCAL=unix://commsock1
+SOCK_PEER=unix://commsock2
+SOCK_GW=unix://commsock3
+BUS=bus1
+BUS2=bus2
+
+DEBUG=false
+
+setup_local()
+{
+
+	atf_check -s exit:0 ${netserver} ${SOCK_LOCAL}
+
+	export RUMP_SERVER=$SOCK_LOCAL
+	atf_check -s exit:0 -o ignore rump.ifconfig shmif0 create
+	atf_check -s exit:0 -o ignore rump.ifconfig shmif0 linkstr ${BUS}
+	atf_check -s exit:0 -o ignore rump.ifconfig shmif0 10.0.0.2/24
+	atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up
+
+	$DEBUG  rump.ifconfig
+	$DEBUG  rump.netstat -rn -f inet
+}
+
+setup_peer()
+{
+
+	atf_check -s exit:0 ${netserver} ${SOCK_PEER}
+
+	export RUMP_SERVER=$SOCK_PEER
+	atf_check -s exit:0 -o ignore rump.ifconfig shmif0 create
+	atf_check -s exit:0 -o ignore rump.ifconfig shmif0 linkstr ${BUS}
+	atf_check -s exit:0 -o ignore rump.ifconfig shmif0 10.0.0.1/24
+	atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up
+
+	$DEBUG  rump.ifconfig
+	$DEBUG  rump.netstat -rn -f inet
+}
+
+setup_gw()
+{
+
+	atf_check -s exit:0 ${netserver} ${SOCK_GW}
+
+	export RUMP_SERVER=$SOCK_GW
+	atf_check -s exit:0 -o ignore rump.ifconfig shmif0 create
+	atf_check -s exit:0 -o ignore rump.ifconfig shmif0 linkstr ${BUS}
+	atf_check -s exit:0 -o ignore rump.ifconfig shmif0 

CVS commit: src

2015-05-18 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon May 18 06:27:04 UTC 2015

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/net/route: Makefile
Added Files:
src/tests/net/route: t_flags.sh

Log Message:
Add tests for route flags


To generate a diff of this commit:
cvs rdiff -u -r1.621 -r1.622 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.1 -r1.2 src/tests/net/route/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/net/route/t_flags.sh

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



CVS commit: src/distrib

2015-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 06:25:05 UTC 2015

Modified Files:
src/distrib/amd64/cdroms: Makefile.cdrom
src/distrib/common: Makefile.bootcd
src/distrib/i386/cdroms: Makefile.cdrom
src/distrib/sparc: Makefile
src/distrib/sparc64/cdroms/installcd: Makefile
src/distrib/vax/cdroms/installcd: Makefile

Log Message:
Add a new simple method to put whole sets on CD images (instead of
listing single binaries or patterns) and use those for the existing
ISO images.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/distrib/amd64/cdroms/Makefile.cdrom
cvs rdiff -u -r1.25 -r1.26 src/distrib/common/Makefile.bootcd
cvs rdiff -u -r1.33 -r1.34 src/distrib/i386/cdroms/Makefile.cdrom
cvs rdiff -u -r1.8 -r1.9 src/distrib/sparc/Makefile
cvs rdiff -u -r1.21 -r1.22 src/distrib/sparc64/cdroms/installcd/Makefile
cvs rdiff -u -r1.11 -r1.12 src/distrib/vax/cdroms/installcd/Makefile

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

Modified files:

Index: src/distrib/amd64/cdroms/Makefile.cdrom
diff -u src/distrib/amd64/cdroms/Makefile.cdrom:1.13 src/distrib/amd64/cdroms/Makefile.cdrom:1.14
--- src/distrib/amd64/cdroms/Makefile.cdrom:1.13	Sat Apr 18 08:56:56 2015
+++ src/distrib/amd64/cdroms/Makefile.cdrom	Mon May 18 06:25:04 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.cdrom,v 1.13 2015/04/18 08:56:56 martin Exp $
+# $NetBSD: Makefile.cdrom,v 1.14 2015/05/18 06:25:04 martin Exp $
 
 .include bsd.own.mk
 
@@ -11,62 +11,8 @@ CDINSTKERNEL=	../../instkernel
 CDKERNELS=	netbsd-GENERIC.gz   netbsd
 CDRELEASE_NOISOS=	true
 
-CDRUNTIME+=	./bin
-CDRUNTIME+=	./dev/MAKEDEV
-CDRUNTIME+=	./etc
-CDRUNTIME+=	./lib
-CDRUNTIME+=	./libdata
-CDRUNTIME+=	./libexec/ld.elf_so
-CDRUNTIME+=	./libexec/lfs_cleanerd
-CDRUNTIME+=	./libexec/dhcpcd-run-hooks
-CDRUNTIME+=	./libexec/resolvconf/
-CDRUNTIME+=	./mnt
-CDRUNTIME+=	./sbin
-CDRUNTIME+=	./stand
-CDRUNTIME+=	./tmp
-CDRUNTIME+=	./usr/bin/ftp
-CDRUNTIME+=	./usr/bin/grep
-CDRUNTIME+=	./usr/bin/gzip
-CDRUNTIME+=	./usr/bin/less
-CDRUNTIME+=	./usr/bin/more
-CDRUNTIME+=	./usr/bin/netstat
-CDRUNTIME+=	./usr/bin/progress
-CDRUNTIME+=	./usr/bin/sed
-CDRUNTIME+=	./usr/bin/sort
-CDRUNTIME+=	./usr/bin/tip
-CDRUNTIME+=	./usr/bin/tput
-CDRUNTIME+=	./usr/bin/vi
-CDRUNTIME+=	./usr/bin/vmstat
-.if ${MKBSDTAR} != no
-CDRUNTIME+=	./usr/lib/libarchive.so*
-.endif
-CDRUNTIME+=	./usr/lib/libbz2.so*
-CDRUNTIME+=	./usr/lib/libc.so*
-CDRUNTIME+=	./usr/lib/libcurses.so*
-CDRUNTIME+=	./usr/lib/libedit.so*
-CDRUNTIME+=	./usr/lib/libgcc_s.so*
-CDRUNTIME+=	./usr/lib/libintl.so*
-CDRUNTIME+=	./usr/lib/libkvm.so*
-CDRUNTIME+=	./usr/lib/liblzma.so*
-CDRUNTIME+=	./usr/lib/libpthread.so*
-CDRUNTIME+=	./usr/lib/libterminfo.so*
-CDRUNTIME+=	./usr/lib/libutil.so*
-CDRUNTIME+=	./usr/lib/libz.so*
-.if (${MKCRYPTO} != no)
-CDRUNTIME+=	./usr/lib/libcrypto.so*
-CDRUNTIME+=	./usr/lib/libssl.so*
-.endif
-CDRUNTIME+=	./usr/libexec/ld.elf_so
-CDRUNTIME+=	./usr/libexec/getty
-CDRUNTIME+=	./usr/mdec
-CDRUNTIME+=	./usr/sbin/chroot
-CDRUNTIME+=	./usr/sbin/installboot
-CDRUNTIME+=	./usr/sbin/wiconfig
-CDRUNTIME+=	./usr/share/misc/terminfo.cdb
-CDRUNTIME+=	./usr/share/locale
-
 image_md_pre:
-	${MKDIR} cdrom/etc
+	${RM} -f cdrom/etc/gettytab cdrom/etc/ttys cdrom/etc/rc
 	${HOST_LN} -fs /tmp/gettytab cdrom/etc/gettytab
 	${INSTALL} ${COPY} ${.CURDIR}/../etc.ttys cdrom/etc/ttys
 	${INSTALL} ${COPY} ${.CURDIR}/../etc.rc cdrom/etc/rc

Index: src/distrib/common/Makefile.bootcd
diff -u src/distrib/common/Makefile.bootcd:1.25 src/distrib/common/Makefile.bootcd:1.26
--- src/distrib/common/Makefile.bootcd:1.25	Sat May 31 10:18:47 2014
+++ src/distrib/common/Makefile.bootcd	Mon May 18 06:25:04 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.bootcd,v 1.25 2014/05/31 10:18:47 martin Exp $
+#	$NetBSD: Makefile.bootcd,v 1.26 2015/05/18 06:25:04 martin Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -31,6 +31,9 @@
 #	CDKERNELS	couples of the form:
 #source	name_on_cd
 #	CDRUNTIME	files/directories to copy from $DESTDIR onto the CD
+#	CD_SETS		sets to be extracted onto the CD
+#			(default: base modules etc)
+#	SETS_DIR	where the CD_SETS are found (default provided)
 # source kernels are copied from ${CDINSTKERNEL} (or its obj dir)
 # note that as of yet, bootxx_cd9660 can't load kernel names of more than
 # 8 chars (though they can be in a sub-directory meaning the pathname is
@@ -56,11 +59,15 @@ CDRELEASE_EXCLUDE+=	-s ',./installation/
 CDRELEASE_EXCLUDE+=	-s ',./installation/installimage.*,,gp'
 .endif
 
+CD_SETS?=	base modules etc
+SETS_DIR?=	${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets
+
 .include bsd.own.mk 		# For PRINTOBJDIR
 .include bsd.kernobj.mk	# For KERNSRCDIR
 
 DISTRIBVER!=	${HOST_SH} ${KERNSRCDIR}/conf/osrelease.sh
 DISTRIBREV!=	${HOST_SH} ${KERNSRCDIR}/conf/osrelease.sh -s
+CUROBJDIR!=	cd ${.CURDIR}  ${PRINTOBJDIR}
 ISO_VOLID!=	echo NETBSD_${DISTRIBREV} | tr a-z A-Z
 PUBLISHER?= 

CVS commit: src/distrib

2015-05-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon May 18 06:25:05 UTC 2015

Modified Files:
src/distrib/amd64/cdroms: Makefile.cdrom
src/distrib/common: Makefile.bootcd
src/distrib/i386/cdroms: Makefile.cdrom
src/distrib/sparc: Makefile
src/distrib/sparc64/cdroms/installcd: Makefile
src/distrib/vax/cdroms/installcd: Makefile

Log Message:
Add a new simple method to put whole sets on CD images (instead of
listing single binaries or patterns) and use those for the existing
ISO images.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/distrib/amd64/cdroms/Makefile.cdrom
cvs rdiff -u -r1.25 -r1.26 src/distrib/common/Makefile.bootcd
cvs rdiff -u -r1.33 -r1.34 src/distrib/i386/cdroms/Makefile.cdrom
cvs rdiff -u -r1.8 -r1.9 src/distrib/sparc/Makefile
cvs rdiff -u -r1.21 -r1.22 src/distrib/sparc64/cdroms/installcd/Makefile
cvs rdiff -u -r1.11 -r1.12 src/distrib/vax/cdroms/installcd/Makefile

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



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

2015-05-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May 18 09:56:43 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: tegra_ehci.c tegra_ehcireg.h

Log Message:
Re-enable EHCIF_ETTF and provide a sc_vendor_port_status to get port
speed from HOSTSC1

My FS usb stick works with this change.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/nvidia/tegra_ehci.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/tegra_ehcireg.h

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



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

2015-05-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May 18 11:07:34 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: tegra_ehci.c

Log Message:
Use the right IO handle to get HOSTPC. Also, mask out LS and HS from
reported status just-in-case and misc tidyup.

HS, FS and LS now all probe correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/nvidia/tegra_ehci.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/nvidia/tegra_ehci.c
diff -u src/sys/arch/arm/nvidia/tegra_ehci.c:1.5 src/sys/arch/arm/nvidia/tegra_ehci.c:1.6
--- src/sys/arch/arm/nvidia/tegra_ehci.c:1.5	Mon May 18 09:56:43 2015
+++ src/sys/arch/arm/nvidia/tegra_ehci.c	Mon May 18 11:07:34 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_ehci.c,v 1.5 2015/05/18 09:56:43 skrll Exp $ */
+/* $NetBSD: tegra_ehci.c,v 1.6 2015/05/18 11:07:34 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill jmcne...@invisible.ca
@@ -29,7 +29,7 @@
 #include locators.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tegra_ehci.c,v 1.5 2015/05/18 09:56:43 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: tegra_ehci.c,v 1.6 2015/05/18 11:07:34 skrll Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -98,7 +98,6 @@ tegra_ehci_attach(device_t parent, devic
 	sc-sc.sc_bus.hci_private = sc-sc;
 	sc-sc.sc_bus.dmatag = tio-tio_dmat;
 	sc-sc.sc_bus.usbrev = USBREV_2_0;
-	sc-sc.sc_vendor_port_status = tegra_ehci_port_status;
 	sc-sc.sc_ncomp = 0;
 	sc-sc.sc_flags = EHCIF_ETTF;
 	sc-sc.sc_id_vendor = 0x10de;
@@ -109,6 +108,7 @@ tegra_ehci_attach(device_t parent, devic
 	loc-loc_offset + TEGRA_EHCI_REG_OFFSET,
 	loc-loc_size - TEGRA_EHCI_REG_OFFSET, sc-sc.ioh);
 	sc-sc.sc_vendor_init = tegra_ehci_init;
+	sc-sc.sc_vendor_port_status = tegra_ehci_port_status;
 
 	aprint_naive(\n);
 	aprint_normal(: USB%d\n, loc-loc_port + 1);
@@ -316,14 +316,14 @@ tegra_ehci_utmip_init(struct tegra_ehci_
 	}
 }
 
-
 static int
-tegra_ehci_port_status(struct ehci_softc *sc, uint32_t v, int i)
-{
-	bus_space_tag_t iot = sc-iot;
-	bus_space_handle_t ioh = sc-ioh;
-
-	i = ~UPS_HIGH_SPEED;
+tegra_ehci_port_status(struct ehci_softc *ehci_sc, uint32_t v, int i)
+ {
+	struct tegra_ehci_softc * const sc = device_private(ehci_sc-sc_dev);
+	bus_space_tag_t iot = sc-sc_bst;
+	bus_space_handle_t ioh = sc-sc_bsh;
+ 
+	i = ~(UPS_HIGH_SPEED|UPS_LOW_SPEED);
 
 	uint32_t val = bus_space_read_4(iot, ioh,
 	TEGRA_EHCI_HOSTPC1_DEVLC_REG);



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

2015-05-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon May 18 11:07:34 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: tegra_ehci.c

Log Message:
Use the right IO handle to get HOSTPC. Also, mask out LS and HS from
reported status just-in-case and misc tidyup.

HS, FS and LS now all probe correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/nvidia/tegra_ehci.c

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