CVS commit: src/sys/dev/usb

2014-01-13 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Mon Jan 13 08:21:41 UTC 2014

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
Add Future Bits as vendor code
Add Atmel SAM3E based microcontroller board 4Pi by Future Bits


To generate a diff of this commit:
cvs rdiff -u -r1.661 -r1.662 src/sys/dev/usb/usbdevs

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/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.661 src/sys/dev/usb/usbdevs:1.662
--- src/sys/dev/usb/usbdevs:1.661	Wed Dec 25 13:52:37 2013
+++ src/sys/dev/usb/usbdevs	Mon Jan 13 08:21:41 2014
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.661 2013/12/25 13:52:37 nonaka Exp $
+$NetBSD: usbdevs,v 1.662 2014/01/13 08:21:41 reinoud Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -539,6 +539,7 @@ vendor OVISLINK		0x1b75	OvisLink
 vendor MPMAN		0x1cae	MPMan
 vendor 4GSYSTEMS	0x1c9e	4G Systems
 vendor PEGATRON		0x1d4d	Pegatron
+vendor FUTUREBITS	0x1d50	Future Bits
 vendor AIRTIES		0x1eda	AirTies
 vendor DLINK		0x2001	D-Link
 vendor PLANEX2		0x2019	Planex Communications
@@ -2438,6 +2439,9 @@ product PEGATRON RT3070_2	0x000e	RT3070
 product PEGATRON RT3070_3	0x0010	RT3070
 product PEGATRON RT3072		0x0011	RT3072
 
+/* Future Bits products */
+product FUTUREBITS 4PI		0x6019	4Pi reprap
+
 /* Pen Driver */
 product PEN USBDISKPRO		0x0120	USB Disk Pro
 product PEN USBREADER		0x0240	USB 6 in 1 Card Reader/Writer



CVS commit: src/sys/dev/usb

2014-01-13 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Mon Jan 13 08:22:07 UTC 2014

Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.653 -r1.654 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.654 -r1.655 src/sys/dev/usb/usbdevs_data.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/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.653 src/sys/dev/usb/usbdevs.h:1.654
--- src/sys/dev/usb/usbdevs.h:1.653	Wed Dec 25 13:53:20 2013
+++ src/sys/dev/usb/usbdevs.h	Mon Jan 13 08:22:07 2014
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.653 2013/12/25 13:53:20 nonaka Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.654 2014/01/13 08:22:07 reinoud Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.661 2013/12/25 13:52:37 nonaka Exp
+ *	NetBSD: usbdevs,v 1.662 2014/01/13 08:21:41 reinoud Exp
  */
 
 /*
@@ -546,6 +546,7 @@
 #define	USB_VENDOR_MPMAN	0x1cae		/* MPMan */
 #define	USB_VENDOR_4GSYSTEMS	0x1c9e		/* 4G Systems */
 #define	USB_VENDOR_PEGATRON	0x1d4d		/* Pegatron */
+#define	USB_VENDOR_FUTUREBITS	0x1d50		/* Future Bits */
 #define	USB_VENDOR_AIRTIES	0x1eda		/* AirTies */
 #define	USB_VENDOR_DLINK	0x2001		/* D-Link */
 #define	USB_VENDOR_PLANEX2	0x2019		/* Planex Communications */
@@ -2445,6 +2446,9 @@
 #define	USB_PRODUCT_PEGATRON_RT3070_3	0x0010		/* RT3070 */
 #define	USB_PRODUCT_PEGATRON_RT3072	0x0011		/* RT3072 */
 
+/* Future Bits products */
+#define	USB_PRODUCT_FUTUREBITS_4PI	0x6019		/* 4Pi reprap */
+
 /* Pen Driver */
 #define	USB_PRODUCT_PEN_USBDISKPRO	0x0120		/* USB Disk Pro */
 #define	USB_PRODUCT_PEN_USBREADER	0x0240		/* USB 6 in 1 Card Reader/Writer */

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.654 src/sys/dev/usb/usbdevs_data.h:1.655
--- src/sys/dev/usb/usbdevs_data.h:1.654	Wed Dec 25 13:53:20 2013
+++ src/sys/dev/usb/usbdevs_data.h	Mon Jan 13 08:22:07 2014
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.654 2013/12/25 13:53:20 nonaka Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.655 2014/01/13 08:22:07 reinoud Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.661 2013/12/25 13:52:37 nonaka Exp
+ *	NetBSD: usbdevs,v 1.662 2014/01/13 08:21:41 reinoud Exp
  */
 
 /*
@@ -1963,6 +1963,10 @@ const struct usb_vendor usb_vendors[] = 
 	Pegatron,
 	},
 	{
+	USB_VENDOR_FUTUREBITS,
+	Future Bits,
+	},
+	{
 	USB_VENDOR_AIRTIES,
 	AirTies,
 	},
@@ -2143,7 +2147,7 @@ const struct usb_vendor usb_vendors[] = 
 	GNU Radio USRP,
 	},
 };
-const int usb_nvendors = 526;
+const int usb_nvendors = 527;
 
 const struct usb_product usb_products[] = {
 	{
@@ -7495,6 +7499,10 @@ const struct usb_product usb_products[] 
 	RT3072,
 	},
 	{
+	USB_VENDOR_FUTUREBITS, USB_PRODUCT_FUTUREBITS_4PI,
+	4Pi reprap,
+	},
+	{
 	USB_VENDOR_PEN, USB_PRODUCT_PEN_USBDISKPRO,
 	USB Disk Pro,
 	},
@@ -10087,4 +10095,4 @@ const struct usb_product usb_products[] 
 	Prestige,
 	},
 };
-const int usb_nproducts = 1985;
+const int usb_nproducts = 1986;



CVS commit: src/sys/dev/usb

2014-01-13 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Mon Jan 13 08:23:58 UTC 2014

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
Add Atmel's SAM-BA programming port as found on Atmel's SAM3E (ARM CortexM3)
boards


To generate a diff of this commit:
cvs rdiff -u -r1.662 -r1.663 src/sys/dev/usb/usbdevs

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/usb/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.662 src/sys/dev/usb/usbdevs:1.663
--- src/sys/dev/usb/usbdevs:1.662	Mon Jan 13 08:21:41 2014
+++ src/sys/dev/usb/usbdevs	Mon Jan 13 08:23:58 2014
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.662 2014/01/13 08:21:41 reinoud Exp $
+$NetBSD: usbdevs,v 1.663 2014/01/13 08:23:58 reinoud Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -943,6 +943,7 @@ product ATI2 205		0xa001	USB Cable 205
 product ATMEL UHB124		0x3301	UHB124 hub
 product ATMEL WN210		0x3301	W-Buddie WN210
 product ATMEL DWL900AP		0x5601	DWL-900AP Wireless access point
+product ATMEL SAM_BA		0x6124	ARM SAM-BA programming port
 product ATMEL DWL120		0x7602	DWL-120 Wireless adapter
 product ATMEL AT76C503I1	0x7603	AT76C503 (Intersil 3861 Radio)
 product ATMEL AT76C503I2	0x7604	AT76C503 (Intersil 3863 Radio)



CVS commit: src/sys/dev/usb

2014-01-13 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Mon Jan 13 08:24:17 UTC 2014

Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.654 -r1.655 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.655 -r1.656 src/sys/dev/usb/usbdevs_data.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/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.654 src/sys/dev/usb/usbdevs.h:1.655
--- src/sys/dev/usb/usbdevs.h:1.654	Mon Jan 13 08:22:07 2014
+++ src/sys/dev/usb/usbdevs.h	Mon Jan 13 08:24:17 2014
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.654 2014/01/13 08:22:07 reinoud Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.655 2014/01/13 08:24:17 reinoud Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.662 2014/01/13 08:21:41 reinoud Exp
+ *	NetBSD: usbdevs,v 1.663 2014/01/13 08:23:58 reinoud Exp
  */
 
 /*
@@ -950,6 +950,7 @@
 #define	USB_PRODUCT_ATMEL_UHB124	0x3301		/* UHB124 hub */
 #define	USB_PRODUCT_ATMEL_WN210	0x3301		/* W-Buddie WN210 */
 #define	USB_PRODUCT_ATMEL_DWL900AP	0x5601		/* DWL-900AP Wireless access point */
+#define	USB_PRODUCT_ATMEL_SAM_BA	0x6124		/* ARM SAM-BA programming port */
 #define	USB_PRODUCT_ATMEL_DWL120	0x7602		/* DWL-120 Wireless adapter */
 #define	USB_PRODUCT_ATMEL_AT76C503I1	0x7603		/* AT76C503 (Intersil 3861 Radio) */
 #define	USB_PRODUCT_ATMEL_AT76C503I2	0x7604		/* AT76C503 (Intersil 3863 Radio) */

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.655 src/sys/dev/usb/usbdevs_data.h:1.656
--- src/sys/dev/usb/usbdevs_data.h:1.655	Mon Jan 13 08:22:07 2014
+++ src/sys/dev/usb/usbdevs_data.h	Mon Jan 13 08:24:17 2014
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.655 2014/01/13 08:22:07 reinoud Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.656 2014/01/13 08:24:17 reinoud Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.662 2014/01/13 08:21:41 reinoud Exp
+ *	NetBSD: usbdevs,v 1.663 2014/01/13 08:23:58 reinoud Exp
  */
 
 /*
@@ -3167,6 +3167,10 @@ const struct usb_product usb_products[] 
 	DWL-900AP Wireless access point,
 	},
 	{
+	USB_VENDOR_ATMEL, USB_PRODUCT_ATMEL_SAM_BA,
+	ARM SAM-BA programming port,
+	},
+	{
 	USB_VENDOR_ATMEL, USB_PRODUCT_ATMEL_DWL120,
 	DWL-120 Wireless adapter,
 	},
@@ -10095,4 +10099,4 @@ const struct usb_product usb_products[] 
 	Prestige,
 	},
 };
-const int usb_nproducts = 1986;
+const int usb_nproducts = 1987;



CVS commit: src/sys/compat/linux/arch/alpha

2014-01-13 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Mon Jan 13 10:33:23 UTC 2014

Modified Files:
src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h
linux_syscalls.c linux_sysent.c

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/compat/linux/arch/alpha/linux_syscall.h \
src/sys/compat/linux/arch/alpha/linux_sysent.c
cvs rdiff -u -r1.87 -r1.88 \
src/sys/compat/linux/arch/alpha/linux_syscallargs.h
cvs rdiff -u -r1.89 -r1.90 src/sys/compat/linux/arch/alpha/linux_syscalls.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/compat/linux/arch/alpha/linux_syscall.h
diff -u src/sys/compat/linux/arch/alpha/linux_syscall.h:1.88 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.89
--- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.88	Fri Dec 27 14:17:32 2013
+++ src/sys/compat/linux/arch/alpha/linux_syscall.h	Mon Jan 13 10:33:23 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.88 2013/12/27 14:17:32 njoly Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.89 2014/01/13 10:33:23 njoly Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.82 2013/12/27 14:17:11 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.83 2014/01/13 10:33:03 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALL_H_
@@ -492,7 +492,7 @@
 /* syscall: gettimeofday ret: int args: struct timeval50 * struct timezone * */
 #define	LINUX_SYS_gettimeofday	359
 
-/* syscall: settimeofday ret: int args: const struct timeval50 * const struct timezone * */
+/* syscall: settimeofday ret: int args: struct timeval50 * struct timezone * */
 #define	LINUX_SYS_settimeofday	360
 
 /* syscall: getitimer ret: int args: int struct itimerval50 * */
Index: src/sys/compat/linux/arch/alpha/linux_sysent.c
diff -u src/sys/compat/linux/arch/alpha/linux_sysent.c:1.88 src/sys/compat/linux/arch/alpha/linux_sysent.c:1.89
--- src/sys/compat/linux/arch/alpha/linux_sysent.c:1.88	Fri Dec 27 14:17:32 2013
+++ src/sys/compat/linux/arch/alpha/linux_sysent.c	Mon Jan 13 10:33:23 2014
@@ -1,14 +1,14 @@
-/* $NetBSD: linux_sysent.c,v 1.88 2013/12/27 14:17:32 njoly Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.89 2014/01/13 10:33:23 njoly Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.82 2013/12/27 14:17:11 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.83 2014/01/13 10:33:03 njoly Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_sysent.c,v 1.88 2013/12/27 14:17:32 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_sysent.c,v 1.89 2014/01/13 10:33:23 njoly Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_sysv.h
@@ -788,10 +788,10 @@ struct sysent linux_sysent[] = {
 	(sy_call_t *)linux_sys_rt_sigsuspend },/* 357 = rt_sigsuspend */
 	{ ns(struct linux_sys_select_args), SYCALL_ARG_PTR,
 	(sy_call_t *)linux_sys_select },	/* 358 = select */
-	{ ns(struct compat_50_sys_gettimeofday_args), SYCALL_ARG_PTR,
-	(sy_call_t *)compat_50_sys_gettimeofday },/* 359 = gettimeofday */
-	{ ns(struct compat_50_sys_settimeofday_args), SYCALL_ARG_PTR,
-	(sy_call_t *)compat_50_sys_settimeofday },/* 360 = settimeofday */
+	{ ns(struct linux_sys_gettimeofday_args), SYCALL_ARG_PTR,
+	(sy_call_t *)linux_sys_gettimeofday },/* 359 = gettimeofday */
+	{ ns(struct linux_sys_settimeofday_args), SYCALL_ARG_PTR,
+	(sy_call_t *)linux_sys_settimeofday },/* 360 = settimeofday */
 	{ ns(struct compat_50_sys_getitimer_args), SYCALL_ARG_PTR,
 	(sy_call_t *)compat_50_sys_getitimer },/* 361 = getitimer */
 	{ ns(struct compat_50_sys_setitimer_args), SYCALL_ARG_PTR,

Index: src/sys/compat/linux/arch/alpha/linux_syscallargs.h
diff -u src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.87 src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.88
--- src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.87	Fri Dec 27 14:17:32 2013
+++ src/sys/compat/linux/arch/alpha/linux_syscallargs.h	Mon Jan 13 10:33:23 2014
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.87 2013/12/27 14:17:32 njoly Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.88 2014/01/13 10:33:23 njoly Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.82 2013/12/27 14:17:11 njoly Exp
+ * created from	NetBSD: syscalls.master,v 1.83 2014/01/13 10:33:03 njoly Exp
  */
 
 #ifndef _LINUX_SYS_SYSCALLARGS_H_
@@ -776,9 +776,17 @@ struct linux_sys_select_args {
 };
 check_syscall_args(linux_sys_select)
 
-struct compat_50_sys_gettimeofday_args;
+struct linux_sys_gettimeofday_args {
+	syscallarg(struct timeval50 *) tp;
+	syscallarg(struct timezone *) tzp;
+};
+check_syscall_args(linux_sys_gettimeofday)
 
-struct compat_50_sys_settimeofday_args;
+struct 

CVS commit: src/sys/compat/linux

2014-01-13 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Mon Jan 13 10:33:03 UTC 2014

Modified Files:
src/sys/compat/linux/arch/alpha: syscalls.master
src/sys/compat/linux/common: linux_time.c

Log Message:
Cleanup, and reduce diffs between arches. Make alpha use
linux_sys_{get,set}timeofday like others.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/compat/linux/arch/alpha/syscalls.master
cvs rdiff -u -r1.36 -r1.37 src/sys/compat/linux/common/linux_time.c

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

Modified files:

Index: src/sys/compat/linux/arch/alpha/syscalls.master
diff -u src/sys/compat/linux/arch/alpha/syscalls.master:1.82 src/sys/compat/linux/arch/alpha/syscalls.master:1.83
--- src/sys/compat/linux/arch/alpha/syscalls.master:1.82	Fri Dec 27 14:17:11 2013
+++ src/sys/compat/linux/arch/alpha/syscalls.master	Mon Jan 13 10:33:03 2014
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.82 2013/12/27 14:17:11 njoly Exp $
+	$NetBSD: syscalls.master,v 1.83 2014/01/13 10:33:03 njoly Exp $
 ;
 ;	@(#)syscalls.master	8.1 (Berkeley) 7/19/93
 
@@ -580,11 +580,10 @@
 358	STD		{ int|linux_sys||select(int nfds, fd_set *readfds, \
 			fd_set *writefds, fd_set *exceptfds, \
 			struct timeval50 *timeout); }
-359	NOARGS		{ int|compat_50_sys||gettimeofday( \
-			struct timeval50 *tp, struct timezone *tzp); }
-360	NOARGS		{ int|compat_50_sys||settimeofday( \
-			const struct timeval50 *tp, \
-			const struct timezone *tzp); }
+359	STD		{ int|linux_sys||gettimeofday(struct timeval50 *tp, \
+			struct timezone *tzp); }
+360	STD		{ int|linux_sys||settimeofday(struct timeval50 *tp, \
+			struct timezone *tzp); }
 361	NOARGS		{ int|compat_50_sys||getitimer(int which, \
 			struct itimerval50 *itv); }
 362	NOARGS		{ int|compat_50_sys||setitimer(int which, \

Index: src/sys/compat/linux/common/linux_time.c
diff -u src/sys/compat/linux/common/linux_time.c:1.36 src/sys/compat/linux/common/linux_time.c:1.37
--- src/sys/compat/linux/common/linux_time.c:1.36	Tue Oct  2 01:44:28 2012
+++ src/sys/compat/linux/common/linux_time.c	Mon Jan 13 10:33:03 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_time.c,v 1.36 2012/10/02 01:44:28 christos Exp $ */
+/*	$NetBSD: linux_time.c,v 1.37 2014/01/13 10:33:03 njoly Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_time.c,v 1.36 2012/10/02 01:44:28 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_time.c,v 1.37 2014/01/13 10:33:03 njoly Exp $);
 
 #include sys/param.h
 #include sys/ucred.h
@@ -57,13 +57,6 @@ __KERNEL_RCSID(0, $NetBSD: linux_time.c
 #include compat/common/compat_util.h
 
 /*
- * This is not implemented for alpha yet
- */
-#if defined (__i386__) || defined (__m68k__) || \
-defined (__powerpc__) || defined (__mips__) || \
-defined(__arm__) || defined(__amd64__)
-
-/*
  * Linux keeps track of a system timezone in the kernel. It is readen
  * by gettimeofday and set by settimeofday. This emulates this behavior
  * See linux/kernel/time.c
@@ -122,8 +115,6 @@ linux_sys_settimeofday(struct lwp *l, co
 	return (0);
 }
 
-#endif /* __i386__ || __m68k__ || __powerpc__ || __mips__ || __arm__ */
-
 void
 native_to_linux_timespec(struct linux_timespec *ltp, struct timespec *ntp)
 {



CVS commit: src/tests/lib/libc/net

2014-01-13 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Jan 13 10:49:47 UTC 2014

Modified Files:
src/tests/lib/libc/net: t_hostent.sh

Log Message:
Add missing resolv.conf override to the gethostbyaddr6 test case.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libc/net/t_hostent.sh

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

Modified files:

Index: src/tests/lib/libc/net/t_hostent.sh
diff -u src/tests/lib/libc/net/t_hostent.sh:1.8 src/tests/lib/libc/net/t_hostent.sh:1.9
--- src/tests/lib/libc/net/t_hostent.sh:1.8	Fri Jan 10 20:38:11 2014
+++ src/tests/lib/libc/net/t_hostent.sh	Mon Jan 13 10:49:47 2014
@@ -1,4 +1,4 @@
-# $NetBSD: t_hostent.sh,v 1.8 2014/01/10 20:38:11 gson Exp $
+# $NetBSD: t_hostent.sh,v 1.9 2014/01/13 10:49:47 gson Exp $
 #
 # Copyright (c) 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -114,7 +114,7 @@ gethostbyaddr6_head()
 gethostbyaddr6_body()
 {
 	start_dns_server 4
-	atf_check -o inline:$ans6 -x $HIJACK_DNS ${dir}/h_hostent -t auto -a $a6
+	atf_check -o inline:$ans6 -x $HIJACK_DNS ${dir}/h_hostent ${res} -t auto -a $a6
 }
 gethostbyaddr6_cleanup()
 {



CVS commit: src/tests/lib/libc/net

2014-01-13 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Mon Jan 13 11:08:14 UTC 2014

Modified Files:
src/tests/lib/libc/net: t_hostent.sh

Log Message:
When using braces around shell variable names, do so consistently


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libc/net/t_hostent.sh

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

Modified files:

Index: src/tests/lib/libc/net/t_hostent.sh
diff -u src/tests/lib/libc/net/t_hostent.sh:1.9 src/tests/lib/libc/net/t_hostent.sh:1.10
--- src/tests/lib/libc/net/t_hostent.sh:1.9	Mon Jan 13 10:49:47 2014
+++ src/tests/lib/libc/net/t_hostent.sh	Mon Jan 13 11:08:14 2014
@@ -1,4 +1,4 @@
-# $NetBSD: t_hostent.sh,v 1.9 2014/01/13 10:49:47 gson Exp $
+# $NetBSD: t_hostent.sh,v 1.10 2014/01/13 11:08:14 gson Exp $
 #
 # Copyright (c) 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -69,7 +69,7 @@ gethostbyname4_head()
 gethostbyname4_body()
 {
 	start_dns_server 4
-	atf_check -o inline:$ans4 -x $HIJACK_DNS ${dir}/h_hostent $res -t auto -4 $n4
+	atf_check -o inline:$ans4 -x $HIJACK_DNS ${dir}/h_hostent ${res} -t auto -4 $n4
 }
 gethostbyname4_cleanup()
 {



CVS commit: src/sys/kern

2014-01-13 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon Jan 13 12:07:55 UTC 2014

Modified Files:
src/sys/kern: vnode_if.sh

Log Message:
Support for vnode operation versioning.  Allow a new keyword VERSION
in the description so VERSION 2 will change the name of the argument
from vop_XXX_args to vop_XXX_v2_args.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/kern/vnode_if.sh

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

Modified files:

Index: src/sys/kern/vnode_if.sh
diff -u src/sys/kern/vnode_if.sh:1.59 src/sys/kern/vnode_if.sh:1.60
--- src/sys/kern/vnode_if.sh:1.59	Wed Jul 17 21:20:53 2013
+++ src/sys/kern/vnode_if.sh	Mon Jan 13 12:07:55 2014
@@ -29,7 +29,7 @@ copyright=\
  * SUCH DAMAGE.
  */
 
-SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.59 2013/07/17 21:20:53 pooka Exp $'
+SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.60 2014/01/13 12:07:55 hannken Exp $'
 
 # Script to produce VFS front-end sugar.
 #
@@ -97,6 +97,7 @@ awk_parser='
 # First line of description
 /^vop_/	{
 	name=$1;
+	args_name=$1;
 	argc=0;
 	willmake=-1;
 	next;
@@ -108,6 +109,11 @@ awk_parser='
 }
 # Middle lines of description
 {
+	if ($1 == VERSION) {
+		args_name=args_name _v $2;
+		next;
+	}
+
 	argdir[argc] = $1; i=2;
 
 	if ($2 == LOCKED=YES) {
@@ -222,7 +228,7 @@ function doit() {
 	if (!rump) {
 		printf(\n#define %s_DESCOFFSET %d\n,
 		toupper(name), vop_offset++);
-		printf(struct %s_args {\n, name);
+		printf(struct %s_args {\n, args_name);
 		printf(\tconst struct vnodeop_desc * a_desc;\n);
 		for (i=0; iargc; i++) {
 			printf(\t%s a_%s;\n, argtype[i], argname[i]);
@@ -322,7 +328,7 @@ function do_offset(typematch) {
 	for (i=0; iargc; i++) {
 		if (argtype[i] == typematch) {
 			printf(\tVOPARG_OFFSETOF(struct %s_args, a_%s),\n,
-name, argname[i]);
+args_name, argname[i]);
 			return i;
 		};
 	};
@@ -336,7 +342,7 @@ function offsets() {
 	for (i=0; iargc; i++) {
 		if (argtype[i] == struct vnode *) {
 			printf (\tVOPARG_OFFSETOF(struct %s_args,a_%s),\n,
-name, argname[i]);
+args_name, argname[i]);
 		}
 	}
 	print \tVDESC_NO_OFFSET;
@@ -389,7 +395,8 @@ function bodyrump() {
 }
 
 function bodynorm() {
-	printf({\n\tint error;\n\tbool mpsafe;\n\tstruct %s_args a;\n, name);
+	printf({\n\tint error;\n\tbool mpsafe;\n\tstruct %s_args a;\n,
+		args_name);
 	if (lockdebug) {
 		printf(#ifdef VNODE_LOCKDEBUG\n);
 		for (i=0; iargc; i++) {



CVS commit: src/sys/arch/alpha/pci

2014-01-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Jan 13 15:48:09 UTC 2014

Modified Files:
src/sys/arch/alpha/pci: pci_bwx_bus_mem_chipdep.c

Log Message:
bus_space_mmap(9) function should return alpha_btop(PA), not alpha_btop(VA).

Pointed out in PR port-alpha/48431 from nullnilaki.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c

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

Modified files:

Index: src/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
diff -u src/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c:1.25 src/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c:1.26
--- src/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c:1.25	Mon Feb  6 02:14:15 2012
+++ src/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c	Mon Jan 13 15:48:09 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_bwx_bus_mem_chipdep.c,v 1.25 2012/02/06 02:14:15 matt Exp $ */
+/* $NetBSD: pci_bwx_bus_mem_chipdep.c,v 1.26 2014/01/13 15:48:09 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(1, $NetBSD: pci_bwx_bus_mem_chipdep.c,v 1.25 2012/02/06 02:14:15 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: pci_bwx_bus_mem_chipdep.c,v 1.26 2014/01/13 15:48:09 tsutsui Exp $);
 
 #include sys/extent.h
 
@@ -499,8 +499,10 @@ __C(CHIP,_mem_mmap)(
 	int prot,
 	int flags)
 {
+	bus_addr_t memaddr;
 
-	return (alpha_btop(CHIP_MEM_SYS_START(v) + addr + off));
+	memaddr = CHIP_MEM_SYS_START(v) + addr + off;
+	return (alpha_btop(ALPHA_K0SEG_TO_PHYS(memaddr)));
 }
 
 static inline void



CVS commit: src/sys/netinet6

2014-01-13 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Jan 13 18:23:37 UTC 2014

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

Log Message:
When handling NS/NA we need to check our prefix list instead of our
address list to work out if it came from a valid neighbor.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/netinet6/nd6_nbr.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/nd6_nbr.c
diff -u src/sys/netinet6/nd6_nbr.c:1.98 src/sys/netinet6/nd6_nbr.c:1.99
--- src/sys/netinet6/nd6_nbr.c:1.98	Tue May 21 09:54:12 2013
+++ src/sys/netinet6/nd6_nbr.c	Mon Jan 13 18:23:36 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_nbr.c,v 1.98 2013/05/21 09:54:12 roy Exp $	*/
+/*	$NetBSD: nd6_nbr.c,v 1.99 2014/01/13 18:23:36 roy Exp $	*/
 /*	$KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nd6_nbr.c,v 1.98 2013/05/21 09:54:12 roy Exp $);
+__KERNEL_RCSID(0, $NetBSD: nd6_nbr.c,v 1.99 2014/01/13 18:23:36 roy Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -143,10 +143,13 @@ nd6_ns_input(struct mbuf *m, int off, in
 			goto bad;
 		}
 	} else {
+		struct sockaddr_in6 ssin6;
+
 		/*
 		 * Make sure the source address is from a neighbor's address.
 		 */
-		if (in6ifa_ifplocaladdr(ifp, saddr6) == NULL) {
+		sockaddr_in6_init(ssin6, saddr6, 0, 0, 0);
+		if (nd6_is_addr_neighbor(ssin6, ifp) == 0) {
 			nd6log((LOG_INFO, nd6_ns_input: 
 			NS packet from non-neighbor\n));
 			goto bad;
@@ -563,6 +566,7 @@ nd6_na_input(struct mbuf *m, int off, in
 	struct rtentry *rt;
 	struct sockaddr_dl *sdl;
 	union nd_opts ndopts;
+	struct sockaddr_in6 ssin6;
 
 	if (ip6-ip6_hlim != 255) {
 		nd6log((LOG_ERR,
@@ -637,11 +641,13 @@ nd6_na_input(struct mbuf *m, int off, in
 		ip6_sprintf(taddr6));
 		goto freeit;
 	}
+
 	/*
 	 * Make sure the source address is from a neighbor's address.
 	 */
-	if (in6ifa_ifplocaladdr(ifp, saddr6) == NULL) {
-		nd6log((LOG_INFO, nd6_ns_input: 
+	sockaddr_in6_init(ssin6, saddr6, 0, 0, 0);
+	if (nd6_is_addr_neighbor(ssin6, ifp) == 0) {
+		nd6log((LOG_INFO, nd6_na_input: 
 		ND packet from non-neighbor\n));
 		goto bad;
 	}



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

2014-01-13 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Jan 13 18:26:34 UTC 2014

Modified Files:
src/sys/arch/evbarm/adi_brh: brh_start.S

Log Message:
Get rid on some useless pc addition.  Use adr or ldr with pc relative
addressing.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/adi_brh/brh_start.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/evbarm/adi_brh/brh_start.S
diff -u src/sys/arch/evbarm/adi_brh/brh_start.S:1.2 src/sys/arch/evbarm/adi_brh/brh_start.S:1.3
--- src/sys/arch/evbarm/adi_brh/brh_start.S:1.2	Mon Jan 31 06:28:02 2011
+++ src/sys/arch/evbarm/adi_brh/brh_start.S	Mon Jan 13 18:26:34 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: brh_start.S,v 1.2 2011/01/31 06:28:02 matt Exp $	*/
+/*	$NetBSD: brh_start.S,v 1.3 2014/01/13 18:26:34 matt Exp $	*/
 
 /*
  * Copyright (c) 2002 Wasabi Systems, Inc.
@@ -44,7 +44,7 @@
 
 #include evbarm/adi_brh/brhreg.h
 
-RCSID($NetBSD: brh_start.S,v 1.2 2011/01/31 06:28:02 matt Exp $)
+RCSID($NetBSD: brh_start.S,v 1.3 2014/01/13 18:26:34 matt Exp $)
 
 	.section .start,ax,%progbits
 
@@ -62,7 +62,7 @@ _C_LABEL(brh_start):
 	 * Note that we may not currently be running VA==PA, which means
 	 * we'll need to leap to the next insn after disabing the MMU.
 	 */
-	add	r8, pc, #(.Lunmapped - . - 8)
+	adr	r8, .Lunmapped
 	bic	r8, r8, #0xff00	/* clear upper 8 bits */
 	orr	r8, r8, #0xc000	/* OR in physical base address */
 
@@ -96,8 +96,7 @@ _C_LABEL(brh_start):
 	/*
 	 * Step 1: Map the entire address space VA==PA.
 	 */
-	add	r0, pc, #(.Ltable - . - 8)
-	ldr	r0, [r0]			/* r0 = l1table */
+	ldr	r0, .Ltable			/* r0 = l1table */
 
 	mov	r3, #(L1_S_AP_KRW)
 	orr	r3, r3, #(L1_TYPE_S)
@@ -114,8 +113,7 @@ _C_LABEL(brh_start):
 	 * Step 2: Map the PCI configuration space (this is needed
 	 * to access some of the core logic registers).
 	 */
-	add	r0, pc, #(.Ltable - . - 8)	/* r0 = l1table */
-	ldr	r0, [r0]
+	ldr	r0, .Ltable			/* r0 = l1table */
 
 	mov	r3, #(L1_S_AP_KRW)
 	orr	r3, r3, #(L1_TYPE_S)
@@ -132,39 +130,33 @@ _C_LABEL(brh_start):
 	/*
 	 * Step 3: Map the BECC, UARTs, and LED display.
 	 */
-	add	r0, pc, #(.Ltable - . - 8)	/* r0 = l1table */
-	ldr	r0, [r0]
+	ldr	r0, .Ltable			/* r0 = l1table */
 
 	mov	r3, #(L1_S_AP_KRW)
 	orr	r3, r3, #(L1_TYPE_S)
 
 	orr	r3, r3, #(BECC_REG_BASE)
-	add	r2, pc, #(.Lbrh_becc_vbase - . - 8)
-	ldr	r2, [r2]
+	ldr	r2, .Lbrh_becc_vbase
 	str	r3, [r0, r2]
 	bic	r3, r3, #(BECC_REG_BASE)
 
 	orr	r3, r3, #(BRH_UART1_BASE)
-	add	r2, pc, #(.Lbrh_uart1_vbase - . - 8)
-	ldr	r2, [r2]
+	ldr	r2, .Lbrh_uart1_vbase 
 	str	r3, [r0, r2]
 	bic	r3, r3, #(BRH_UART1_BASE)
 
 	orr	r3, r3, #(BRH_UART2_BASE)
-	add	r2, pc, #(.Lbrh_uart2_vbase - . - 8)
-	ldr	r2, [r2]
+	ldr	r2, .Lbrh_uart2_vbase 
 	str	r3, [r0, r2]
 	bic	r3, r3, #(BRH_UART2_BASE)
 
 	orr	r3, r3, #(BRH_LED_BASE)
-	add	r2, pc, #(.Lbrh_led_vbase - . - 8)
-	ldr	r2, [r2]
+	ldr	r2, .Lbrh_led_vbase 
 	str	r3, [r0, r2]
 	bic	r3, r3, #(BRH_LED_BASE)
 
 	/* OK!  Page table is set up.  Give it to the CPU. */
-	add	r0, pc, #(.Ltable - . - 8)
-	ldr	r0, [r0]
+	ldr	r0, .Ltable
 	mcr	p15, 0, r0, c2, c0, 0
 
 	/* Flush the old TLBs, just in case. */
@@ -175,8 +167,7 @@ _C_LABEL(brh_start):
 	mcr	p15, 0, r0, c3, c0, 0
 
 	/* Get ready to jump to the real kernel entry point... */
-	add	r0, pc, #(.Lstart - . - 8)
-	ldr	r0, [r0]
+	ldr	r0, .Lstart
 
 	/* OK, let's enable the MMU. */
 	mrc	p15, 0, r2, c1, c0, 0



CVS commit: src/sys/netinet6

2014-01-13 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Mon Jan 13 18:57:49 UTC 2014

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

Log Message:
Remove the now un-used function in6ifa_ifplocaladdr.


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/sys/netinet6/in6.c
cvs rdiff -u -r1.67 -r1.68 src/sys/netinet6/in6_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/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.167 src/sys/netinet6/in6.c:1.168
--- src/sys/netinet6/in6.c:1.167	Wed Sep 11 23:15:47 2013
+++ src/sys/netinet6/in6.c	Mon Jan 13 18:57:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.167 2013/09/11 23:15:47 christos Exp $	*/
+/*	$NetBSD: in6.c,v 1.168 2014/01/13 18:57:48 roy Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.167 2013/09/11 23:15:47 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.168 2014/01/13 18:57:48 roy Exp $);
 
 #include opt_inet.h
 #include opt_compat_netbsd.h
@@ -1870,32 +1870,6 @@ bestia(struct in6_ifaddr *best_ia, struc
 }
 
 /*
- * find the internet address on a given interface corresponding to a neighbor's
- * address.
- */
-struct in6_ifaddr *
-in6ifa_ifplocaladdr(const struct ifnet *ifp, const struct in6_addr *addr)
-{
-	struct ifaddr *ifa;
-	struct in6_ifaddr *best_ia = NULL, *ia;
-
-	IFADDR_FOREACH(ifa, ifp) {
-		if (ifa-ifa_addr == NULL)
-			continue;	/* just for safety */
-		if (ifa-ifa_addr-sa_family != AF_INET6)
-			continue;
-		ia = (struct in6_ifaddr *)ifa;
-		if (!IN6_ARE_MASKED_ADDR_EQUAL(addr,
-ia-ia_addr.sin6_addr,
-ia-ia_prefixmask.sin6_addr))
-			continue;
-		best_ia = bestia(best_ia, ia);
-	}
-
-	return best_ia;
-}
-
-/*
  * Convert IP6 address to printable (loggable) representation.
  */
 static int ip6round = 0;

Index: src/sys/netinet6/in6_var.h
diff -u src/sys/netinet6/in6_var.h:1.67 src/sys/netinet6/in6_var.h:1.68
--- src/sys/netinet6/in6_var.h:1.67	Thu Jan  2 18:29:01 2014
+++ src/sys/netinet6/in6_var.h	Mon Jan 13 18:57:49 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_var.h,v 1.67 2014/01/02 18:29:01 pooka Exp $	*/
+/*	$NetBSD: in6_var.h,v 1.68 2014/01/13 18:57:49 roy Exp $	*/
 /*	$KAME: in6_var.h,v 1.81 2002/06/08 11:16:51 itojun Exp $	*/
 
 /*
@@ -694,8 +694,6 @@ void	in6_ifaddloop(struct ifaddr *);
 void	in6_createmkludge(struct ifnet *);
 void	in6_purgemkludge(struct ifnet *);
 struct in6_ifaddr *in6ifa_ifpforlinklocal(const struct ifnet *, int);
-struct in6_ifaddr *in6ifa_ifplocaladdr(const struct ifnet *,
-const struct in6_addr *);
 struct in6_ifaddr *in6ifa_ifpwithaddr(const struct ifnet *,
 const struct in6_addr *);
 char	*ip6_sprintf(const struct in6_addr *);



CVS commit: src/sys/dev/wscons

2014-01-13 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Mon Jan 13 19:30:33 UTC 2014

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

Log Message:
try not to crash when calling glyphcache_wipe() on an uninitialized cache
first step to fix PR 48492


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/wscons/wsdisplay_glyphcache.c

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

Modified files:

Index: src/sys/dev/wscons/wsdisplay_glyphcache.c
diff -u src/sys/dev/wscons/wsdisplay_glyphcache.c:1.5 src/sys/dev/wscons/wsdisplay_glyphcache.c:1.6
--- src/sys/dev/wscons/wsdisplay_glyphcache.c:1.5	Tue Nov 13 20:29:03 2012
+++ src/sys/dev/wscons/wsdisplay_glyphcache.c	Mon Jan 13 19:30:33 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: wsdisplay_glyphcache.c,v 1.5 2012/11/13 20:29:03 macallan Exp $	*/
+/*	$NetBSD: wsdisplay_glyphcache.c,v 1.6 2014/01/13 19:30:33 macallan Exp $	*/
 
 /*
  * Copyright (c) 2012 Michael Lorenz
@@ -67,6 +67,8 @@ glyphcache_init(glyphcache *gc, int firs
 	gc-gc_cellheight = cellheight;
 	gc-gc_firstline = first;
 	gc-gc_cellsperline = width / cellwidth;
+	gc-gc_buckets = NULL;
+	gc-gc_numbuckets = 0;
 	if (lines  0) lines = 0;
 	cache_lines = lines / cellheight;
 	gc-gc_numcells = cache_lines * gc-gc_cellsperline;
@@ -124,6 +126,9 @@ glyphcache_wipe(glyphcache *gc)
 	gc_bucket *b;
 	int i, j, idx;
 
+	if ((gc-gc_buckets == NULL) || (gc-gc_numbuckets  1))
+		return;
+
 	idx = gc-gc_buckets[0].gb_index;
 
 	/* empty all the buckets */



CVS commit: src

2014-01-13 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Mon Jan 13 20:00:20 UTC 2014

Modified Files:
src: build.sh

Log Message:
In the sanitycheck function, treat undefined MKUNPRIVED like no.

Other uses of MKUNPRIVED should not need this treatment, because
bsd.own.mk sets it to no by default, and build.sh uses getmakevar to
pick up that default (but that happens too late for the sanitycheck
function to take advantage of it).


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

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

Modified files:

Index: src/build.sh
diff -u src/build.sh:1.273 src/build.sh:1.274
--- src/build.sh:1.273	Fri Aug 30 10:29:06 2013
+++ src/build.sh	Mon Jan 13 20:00:20 2014
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.273 2013/08/30 10:29:06 pooka Exp $
+#	$NetBSD: build.sh,v 1.274 2014/01/13 20:00:20 apb Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1286,7 +1286,7 @@ sanitycheck()
 	#
 	if ! ${do_expertmode}  \
 	[ $id_u -ne 0 ]  \
-	[ ${MKUNPRIVED} = no ] ; then
+	[ ${MKUNPRIVED:-no} = no ] ; then
 		bomb -U or -E must be set for build as an unprivileged user.
 	fi
 
@@ -1745,7 +1745,7 @@ createmakewrapper()
 	eval cat EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy make building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.273 2013/08/30 10:29:06 pooka Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.274 2014/01/13 20:00:20 apb Exp $
 # with these arguments: ${_args}
 #
 



CVS commit: src/sys/opencrypto

2014-01-13 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jan 13 21:15:36 UTC 2014

Modified Files:
src/sys/opencrypto: crypto.c

Log Message:
When using modular opencrypto, make sure the sysctl variables get
created.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/opencrypto/crypto.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/opencrypto/crypto.c
diff -u src/sys/opencrypto/crypto.c:1.42 src/sys/opencrypto/crypto.c:1.43
--- src/sys/opencrypto/crypto.c:1.42	Wed Jan  1 16:06:01 2014
+++ src/sys/opencrypto/crypto.c	Mon Jan 13 21:15:36 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: crypto.c,v 1.42 2014/01/01 16:06:01 pgoyette Exp $ */
+/*	$NetBSD: crypto.c,v 1.43 2014/01/13 21:15:36 pgoyette Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/crypto.c,v 1.4.2.5 2003/02/26 00:14:05 sam Exp $	*/
 /*	$OpenBSD: crypto.c,v 1.41 2002/07/17 23:52:38 art Exp $	*/
 
@@ -53,7 +53,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: crypto.c,v 1.42 2014/01/01 16:06:01 pgoyette Exp $);
+__KERNEL_RCSID(0, $NetBSD: crypto.c,v 1.43 2014/01/13 21:15:36 pgoyette Exp $);
 
 #include sys/param.h
 #include sys/reboot.h
@@ -1342,11 +1342,20 @@ MODULE(MODULE_CLASS_MISC, opencrypto, NU
 static int
 opencrypto_modcmd(modcmd_t cmd, void *opaque)
 {
+#ifdef _MODULE
+	static struct sysctllog *sysctl_opencrypto_clog;
+#endif
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
+#ifdef _MODULE
+		sysctl_opencrypto_setup(sysctl_opencrypto_clog);
+#endif
 		return 0;
 	case MODULE_CMD_FINI:
+#ifdef _MODULE
+		sysctl_teardown(sysctl_opencrypto_clog);
+#endif
 		return 0;
 	default:
 		return ENOTTY;



CVS commit: [netbsd-5-1] src/distrib/notes/common

2014-01-13 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Jan 13 21:52:12 UTC 2014

Modified Files:
src/distrib/notes/common [netbsd-5-1]: main

Log Message:
Sync release notes with changes since 5.1.3


To generate a diff of this commit:
cvs rdiff -u -r1.425.2.14.2.3 -r1.425.2.14.2.4 src/distrib/notes/common/main

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.425.2.14.2.3 src/distrib/notes/common/main:1.425.2.14.2.4
--- src/distrib/notes/common/main:1.425.2.14.2.3	Sun Sep 22 22:12:05 2013
+++ src/distrib/notes/common/main	Mon Jan 13 21:52:12 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.425.2.14.2.3 2013/09/22 22:12:05 riz Exp $
+.\	$NetBSD: main,v 1.425.2.14.2.4 2014/01/13 21:52:12 bouyer Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -454,107 +454,41 @@ wouldn't exist.
 .if \n[FOR_RELEASE] \{\
 .Pp
 The complete list of changes can be found in the
-CHANGES-5.1.3:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/NetBSD-5.1.3/CHANGES-5.1.3
-file in the top level directory of the NetBSD 5.1.3 release tree. An abbreviated list is as follows:
+CHANGES-5.1.4:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/NetBSD-5.1.4/CHANGES-5.1.4
+file in the top level directory of the NetBSD 5.1.4 release tree. An abbreviated list is as follows:
 .Ss2 Security Advisory Fixes
 .(bullet
-NetBSD-SA2012-001:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2012-001.txt.asc
-OpenSSL buffer overflow in DER read function
-.It
-NetBSD-SA2012-002:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2012-002.txt.asc
-OpenSSL Invalid TLS/DTLS record attack
-.It
-NetBSD-SA2012-003:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2012-003.txt.asc
-Intel processors sysret to non-canonical address behaviour
-.It
-NetBSD-SA2012-004:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2012-004.txt.asc
-BIND resolver DoS when using DNSSEC Validation
-.It
-NetBSD-SA2013-004:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-004.txt.asc
-Vulnerabilities in grep
-.It
-NetBSD-SA2013-005:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-005.txt.asc
-bind Denial of Service (CVE-2013-4854)
-.It
-NetBSD-SA2013-006:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-006.txt.asc
-Arbitrary Kernel Read with netstat -P
-.It
-NetBSD-SA2013-007:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-007.txt.asc
-Protocol handling issues in X Window System client libraries
-.It
-NetBSD-SA2013-009:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-009.txt.asc
-user settable small BPF buffer can cause a panic
+NetBSD-SA2013-010:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-010.txt.asc
+Use after free in Xserver handling of ImageText requests (CVE-2013-4396)
+.It
+NetBSD-SA2013-011:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-011.txt.asc
+embryonic TCP sockets local DoS
+.It
+NetBSD-SA2013-012:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-012.txt.asc
+Router Advertisement sysctl local Denial of Service
+.It
+NetBSD-SA2014-001:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2014-001.txt.asc
+Stack buffer overflow in libXfont (CVE-2013-6462)
+.It
+NetBSD-SA2014-002:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2014-002.txt.asc
+ntpd used as DDoS amplifier
 .bullet)
 .
 .Pp
-Advisories prior to NetBSD-SA2012-001 do not affect
+Advisories prior to NetBSD-SA2013-010 do not affect
 NetBSD 5.1.3:
 .Lk http://www.NetBSD.org/support/security/patches-5.1.3.html .
-.Ss2 Other Security Fixes
-.(bullet
-OpenSSL: Fix CVE-2012-2110, CVE-2012-2333.
-.bullet)
 .
 .Ss2 Kernel
 .(bullet
-Fixed a panic triggered when killing a process waiting to start.
-(PR#44935):
-.Lk http://gnats.NetBSD.org/44935
-.It
-Fixed a LOCKDEBUG panic in sysctl path.
-(PR#45827):
-.Lk http://gnats.netbsd.org/45827
-.It
-Fixed diagnostic panic when killing a traced process.
-(PR#42309):
-.Lk http://gnats.netbsd.org/42309
-.bullet)
-.
-.Ss2 Networking
-.(bullet
-Fixed a regression in netsmb introduced in NetBSD 5.1.2.
-(PR#44092):
-.Lk http://gnats.netbsd.org/44092
-.It
-Disallow passing of kqueue descriptors via SCM_RIGHT anxiliary socket messages.
-(PR#46463):
-.Lk http://gnats.netbsd.org/46463
-.It
-Include BRDADDR and NETMASK in the IPv4 ioctls we ban for IPv6.
-.bullet)
-.
-.Ss2 File Systems
-.(bullet
-.Xr fss 4 :
-Don't crash when running multiple dump -X.
-(PR#47514):
-.Lk http://gnats.netbsd.org/47514
-.It
-.bullet)
-.
-.Ss2 Miscellaneous
-.(bullet
-Update tzdata to 2013e.
-.It
-sparc64: Fixed the root cause of the hack disable optimizations for uvm_bio.c on 32 bit kernels.
-.It
-x68k: Fix the clock when 

CVS commit: [netbsd-5-2] src/distrib/notes/common

2014-01-13 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Jan 13 21:51:56 UTC 2014

Modified Files:
src/distrib/notes/common [netbsd-5-2]: main

Log Message:
Sync release notes with changes since 5.2.1


To generate a diff of this commit:
cvs rdiff -u -r1.425.2.16.2.1 -r1.425.2.16.2.2 src/distrib/notes/common/main

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.425.2.16.2.1 src/distrib/notes/common/main:1.425.2.16.2.2
--- src/distrib/notes/common/main:1.425.2.16.2.1	Sun Sep 22 22:43:10 2013
+++ src/distrib/notes/common/main	Mon Jan 13 21:51:56 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.425.2.16.2.1 2013/09/22 22:43:10 riz Exp $
+.\	$NetBSD: main,v 1.425.2.16.2.2 2014/01/13 21:51:56 bouyer Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -454,74 +454,40 @@ wouldn't exist.
 .if \n[FOR_RELEASE] \{\
 .Pp
 The complete list of changes can be found in the
-CHANGES-5.2.1:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/NetBSD-5.2.1/CHANGES-5.2.1
-file in the top level directory of the NetBSD 5.2.1 release tree. An abbreviated list is as follows:
+CHANGES-5.2.2:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/NetBSD-5.2.2/CHANGES-5.2.2
+file in the top level directory of the NetBSD 5.2.2 release tree. An abbreviated list is as follows:
 .Ss2 Security Advisory Fixes
 .(bullet
-NetBSD-SA2013-004:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-004.txt.asc
-Vulnerabilities in grep
-.It
-NetBSD-SA2013-005:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-005.txt.asc
-bind Denial of Service (CVE-2013-4854)
-.It
-NetBSD-SA2013-006:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-006.txt.asc
-Arbitrary Kernel Read with netstat -P
-.It
-NetBSD-SA2013-007:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-007.txt.asc
-Protocol handling issues in X Window System client libraries
-.It
-NetBSD-SA2013-009:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-009.txt.asc
-user settable small BPF buffer can cause a panic
+NetBSD-SA2013-010:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-010.txt.asc
+Use after free in Xserver handling of ImageText requests (CVE-2013-4396)
+.It
+NetBSD-SA2013-011:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-011.txt.asc
+embryonic TCP sockets local DoS
+.It
+NetBSD-SA2013-012:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2013-012.txt.asc
+Router Advertisement sysctl local Denial of Service
+.It
+NetBSD-SA2014-001:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2014-001.txt.asc
+Stack buffer overflow in libXfont (CVE-2013-6462)
+.It
+NetBSD-SA2014-002:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2014-002.txt.asc
+ntpd used as DDoS amplifier
 .bullet)
 .
 .Pp
-Advisories prior to NetBSD-SA2013-004 do not affect
+Advisories prior to NetBSD-SA2013-010 do not affect
 NetBSD 5.2.1:
 .Lk http://www.NetBSD.org/support/security/patches-5.2.1.html .
 .Ss2 Kernel
 .(bullet
-Fixed a panic triggered when killing a process waiting to start.
-(PR#44935):
-.Lk http://gnats.NetBSD.org/44935
-.It
-Fixed a LOCKDEBUG panic in sysctl path.
-(PR#45827):
-.Lk http://gnats.netbsd.org/45827
-.It
-Fixed diagnostic panic when killing a traced process.
-(PR#42309):
-.Lk http://gnats.netbsd.org/42309
-.bullet)
-.
-.Ss2 Networking
-.(bullet
-Include BRDADDR and NETMASK in the IPv4 ioctls we ban for IPv6.
-.bullet)
-.
-.Ss2 File Systems
-.(bullet
-.Xr fss 4 :
-Don't crash when running multiple dump -X.
-(PR#47514):
-.Lk http://gnats.netbsd.org/47514
-.It
-.bullet)
-.
-.Ss2 Miscellaneous
-.(bullet
-Update tzdata to 2013e.
-.It
-Update IPv6 DNS servers in sysinst.
-.It
-MAKEDEV: the console major number is not always 0.
-.It
-Update some TNF ssh keys in /etc/ssh/ssh_known_hosts.
+Xen: remove a bogus diagostic message spamming the console.  (PR#46313):
+.Lk http://gnats.netbsd.org/46313 
 .bullet)
 .
 .\} \ \n[FOR_RELEASE]
@@ -606,6 +572,8 @@ Changes between the 5.0 and 5.1 releases
 Changes between the 5.1 and 5.2 releases.
 .It Li CHANGES-5.2.1
 Changes between the 5.2 and 5.2.1 releases.
+.It Li CHANGES-5.2.2
+Changes between the 5.2.1 and 5.2.2 releases.
 .It Li CHANGES.prev
 Changes in previous
 .Nx



CVS commit: src/sys/dev/pci

2014-01-13 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue Jan 14 01:35:13 UTC 2014

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

Log Message:
- move cursor area to the end of each display's chunk of fb RAM
- use memory between display and cursor as glyph cache instead of blindly
  trying to use 8MB
should fix PR 48492


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/pci/radeonfb.c

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

Modified files:

Index: src/sys/dev/pci/radeonfb.c
diff -u src/sys/dev/pci/radeonfb.c:1.79 src/sys/dev/pci/radeonfb.c:1.80
--- src/sys/dev/pci/radeonfb.c:1.79	Wed Oct  9 17:18:23 2013
+++ src/sys/dev/pci/radeonfb.c	Tue Jan 14 01:35:13 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: radeonfb.c,v 1.79 2013/10/09 17:18:23 macallan Exp $ */
+/*	$NetBSD: radeonfb.c,v 1.80 2014/01/14 01:35:13 macallan Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: radeonfb.c,v 1.79 2013/10/09 17:18:23 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: radeonfb.c,v 1.80 2014/01/14 01:35:13 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -816,7 +816,8 @@ radeonfb_attach(device_t parent, device_
 		aprint_normal(%s: display %d: 
 		initial virtual resolution %dx%d at %d bpp\n,
 		XNAME(sc), i, dp-rd_virtx, dp-rd_virty, dp-rd_bpp);
-
+		aprint_normal_dev(sc-sc_dev, using %d MB per display\n,
+		sc-sc_fboffset  20);
 		/* now select the *video mode* that we will use */
 		for (j = 0; j  dp-rd_ncrtcs; j++) {
 			const struct videomode *vmp;
@@ -848,7 +849,7 @@ radeonfb_attach(device_t parent, device_
 		dp-rd_offset = sc-sc_fboffset * i;
 		dp-rd_fbptr = (vaddr_t)bus_space_vaddr(sc-sc_memt,
 		sc-sc_memh) + dp-rd_offset;
-		dp-rd_curoff = sc-sc_fbsize;
+		dp-rd_curoff = sc-sc_fboffset - 4096;	/* 4KB cursor space */
 		dp-rd_curptr = dp-rd_fbptr + dp-rd_curoff;
 
 		DPRINTF((fpbtr = %p\n, (void *)dp-rd_fbptr));
@@ -924,8 +925,13 @@ radeonfb_attach(device_t parent, device_
 		dp-rd_gc.gc_rectfill = radeonfb_rectfill_a;
 		dp-rd_gc.gc_rop = RADEON_ROP3_S;
 		dp-rd_gc.gc_blitcookie = dp;
+		/*
+		 * use memory between framebuffer and cursor area as glyph
+		 * cache, cap at 4096 lines
+		 */
 		glyphcache_init(dp-rd_gc, dp-rd_virty + 4,
-		(0x80 / dp-rd_stride) - (dp-rd_virty + 4),
+		min(4096, 
+		(dp-rd_curoff / dp-rd_stride) - (dp-rd_virty + 4)),
 		dp-rd_virtx,
 		ri-ri_font-fontwidth,
 		ri-ri_font-fontheight,