CVS commit: src/sys/arch/sparc/stand/ofwboot

2013-12-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Dec 18 10:09:56 UTC 2013

Modified Files:
src/sys/arch/sparc/stand/ofwboot: Locore.c

Log Message:
The close call returns no arguments


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sparc/stand/ofwboot/Locore.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/sparc/stand/ofwboot/Locore.c
diff -u src/sys/arch/sparc/stand/ofwboot/Locore.c:1.12 src/sys/arch/sparc/stand/ofwboot/Locore.c:1.13
--- src/sys/arch/sparc/stand/ofwboot/Locore.c:1.12	Sat May 21 15:50:42 2011
+++ src/sys/arch/sparc/stand/ofwboot/Locore.c	Wed Dec 18 10:09:56 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: Locore.c,v 1.12 2011/05/21 15:50:42 tsutsui Exp $	*/
+/*	$NetBSD: Locore.c,v 1.13 2013/12/18 10:09:56 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -231,7 +231,7 @@ OF_close(int handle)
 	
 	args.name = ADR2CELL(close);
 	args.nargs = 1;
-	args.nreturns = 1;
+	args.nreturns = 0;
 	args.handle = HDL2CELL(handle);
 	openfirmware(args);
 }



CVS commit: src/sys/dev/pci

2013-12-18 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Dec 18 11:53:17 UTC 2013

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

Log Message:
get rid of /dev/fb support which has never been used for anything other than
some highly experimental code in xf86/Xsun


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/dev/pci/machfb.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/machfb.c
diff -u src/sys/dev/pci/machfb.c:1.90 src/sys/dev/pci/machfb.c:1.91
--- src/sys/dev/pci/machfb.c:1.90	Wed Nov  6 14:52:25 2013
+++ src/sys/dev/pci/machfb.c	Wed Dec 18 11:53:17 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: machfb.c,v 1.90 2013/11/06 14:52:25 macallan Exp $	*/
+/*	$NetBSD: machfb.c,v 1.91 2013/12/18 11:53:17 macallan Exp $	*/
 
 /*
  * Copyright (c) 2002 Bang Jun-Young
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 __KERNEL_RCSID(0, 
-	$NetBSD: machfb.c,v 1.90 2013/11/06 14:52:25 macallan Exp $);
+	$NetBSD: machfb.c,v 1.91 2013/12/18 11:53:17 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -54,13 +54,7 @@ __KERNEL_RCSID(0, 
 #include dev/pci/pciio.h
 #include dev/pci/machfbreg.h
 
-#ifdef __sparc__
-#include dev/sun/fbio.h
-#include dev/sun/fbvar.h
-#include sys/conf.h
-#else
 #include dev/wscons/wsdisplayvar.h
-#endif
 
 #include dev/wscons/wsconsio.h
 #include dev/wsfont/wsfont.h
@@ -87,9 +81,6 @@ struct vga_bar {
 
 struct mach64_softc {
 	device_t sc_dev;
-#ifdef __sparc__
-	struct fbdevice sc_fb;
-#endif
 	pci_chipset_tag_t sc_pc;
 	pcitag_t sc_pcitag;
 
@@ -382,27 +373,6 @@ static int	mach64_load_font(void *, void
 
 static struct vcons_screen mach64_console_screen;
 
-/* framebuffer device, SPARC-only so far */
-#ifdef __sparc__
-
-static void	machfb_unblank(device_t);
-static void	machfb_fbattach(struct mach64_softc *);
-
-extern struct cfdriver machfb_cd;
-
-dev_type_open(machfb_fbopen);
-dev_type_close(machfb_fbclose);
-dev_type_ioctl(machfb_fbioctl);
-dev_type_mmap(machfb_fbmmap);
-
-/* frame buffer generic driver */
-static struct fbdriver machfb_fbdriver = {
-	machfb_unblank, machfb_fbopen, machfb_fbclose, machfb_fbioctl, nopoll, 
-	machfb_fbmmap, nokqfilter
-};
-
-#endif /* __sparc__ */
-
 /*
  * Inline functions for getting access to register aperture.
  */
@@ -754,10 +724,6 @@ mach64_attach(device_t parent, device_t 
 	sc-sc_my_mode-hdisplay, sc-sc_my_mode-vdisplay,
 	sc-bits_per_pixel);
 
-#ifdef __sparc__
-	machfb_fbattach(sc);
-#endif
-
 	wsfont_init();
 	
 	vcons_init(sc-vd, sc, mach64_defaultscreen, sc-sc_accessops);
@@ -2020,176 +1986,3 @@ machfb_blank(struct mach64_softc *sc, in
 		break;
 	}
 }
-
-/* framebuffer device support */
-#ifdef __sparc__
-
-static void	
-machfb_unblank(device_t dev)
-{
-	struct mach64_softc *sc = device_private(dev);
-	
-	machfb_blank(sc, 0);
-}
-
-static void
-machfb_fbattach(struct mach64_softc *sc)
-{
-	struct fbdevice *fb = sc-sc_fb;
-	
-	fb-fb_device = sc-sc_dev;
-	fb-fb_driver = machfb_fbdriver;
-
-	fb-fb_type.fb_cmsize = 256;
-	fb-fb_type.fb_size = sc-memsize;
-	
-	fb-fb_type.fb_type = FBTYPE_GENERIC_PCI;
-	fb-fb_flags = device_cfdata(sc-sc_dev)-cf_flags  FB_USERMASK;
-	fb-fb_type.fb_depth = sc-bits_per_pixel;
-	fb-fb_type.fb_width = sc-virt_x;
-	fb-fb_type.fb_height = sc-virt_y;
-	
-	fb_attach(fb, sc-sc_console);
-}
-
-int
-machfb_fbopen(dev_t dev, int flags, int mode, struct lwp *l)
-{
-	struct mach64_softc *sc;
-	
-	sc = device_lookup_private(machfb_cd, minor(dev));
-	if (sc == NULL)
-		return ENXIO;
-	sc-sc_locked = 1;
-	
-#ifdef MACHFB_DEBUG
-	printf(machfb_fbopen(%d)\n, minor(dev));
-#endif
-	return 0;
-}
-
-int
-machfb_fbclose(dev_t dev, int flags, int mode, struct lwp *l)
-{
-	struct mach64_softc *sc = device_lookup_private(machfb_cd, minor(dev));
-
-#ifdef MACHFB_DEBUG
-	printf(machfb_fbclose()\n);
-#endif
-	mach64_init_engine(sc);
-	mach64_init_lut(sc);
-	sc-sc_locked = 0;
-	return 0;
-}
-
-int
-machfb_fbioctl(dev_t dev, u_long cmd, void *data, int flags, struct lwp *l)
-{
-	struct mach64_softc *sc = device_lookup_private(machfb_cd, minor(dev));
-
-#ifdef MACHFB_DEBUG
-	printf(machfb_fbioctl(%d, %lx)\n, minor(dev), cmd);
-#endif
-	switch (cmd) {
-	case FBIOGTYPE:
-		*(struct fbtype *)data = sc-sc_fb.fb_type;
-		break;
-
-	case FBIOGATTR:
-#define fba ((struct fbgattr *)data)
-		fba-real_type = sc-sc_fb.fb_type.fb_type;
-		fba-owner = 0;		/* XXX ??? */
-		fba-fbtype = sc-sc_fb.fb_type;
-		fba-sattr.flags = 0;
-		fba-sattr.emu_type = sc-sc_fb.fb_type.fb_type;
-		fba-sattr.dev_specific[0] = sc-sc_nbus;
-		fba-sattr.dev_specific[1] = sc-sc_ndev;
-		fba-sattr.dev_specific[2] = sc-sc_nfunc;
-		fba-sattr.dev_specific[3] = -1;			
-		fba-emu_types[0] = sc-sc_fb.fb_type.fb_type;
-		fba-emu_types[1] = -1;
-#undef fba
-		break;
-	
-#if 0
-	case FBIOGETCMAP:
-#define	p ((struct fbcmap *)data)
-		return bt_getcmap(p, sc-sc_cmap, 256, 1);
-
-	case FBIOPUTCMAP:
-		/* copy to software map */
-		error = 

CVS commit: src/sys/arch/alpha

2013-12-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec 18 12:43:59 UTC 2013

Modified Files:
src/sys/arch/alpha/conf: GENERIC
src/sys/arch/alpha/pci: pci_1000.c pci_1000a.c

Log Message:
Silence gcc 4.8


To generate a diff of this commit:
cvs rdiff -u -r1.354 -r1.355 src/sys/arch/alpha/conf/GENERIC
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/alpha/pci/pci_1000.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/alpha/pci/pci_1000a.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/conf/GENERIC
diff -u src/sys/arch/alpha/conf/GENERIC:1.354 src/sys/arch/alpha/conf/GENERIC:1.355
--- src/sys/arch/alpha/conf/GENERIC:1.354	Tue Oct 15 19:27:48 2013
+++ src/sys/arch/alpha/conf/GENERIC	Wed Dec 18 12:43:59 2013
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.354 2013/10/15 19:27:48 jdc Exp $
+# $NetBSD: GENERIC,v 1.355 2013/12/18 12:43:59 skrll Exp $
 #
 # This machine description file is used to generate the default NetBSD
 # kernel.
@@ -19,7 +19,7 @@ include 	arch/alpha/conf/std.alpha
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-ident		GENERIC-$Revision: 1.354 $
+ident		GENERIC-$Revision: 1.355 $
 
 maxusers 32
 
@@ -59,7 +59,7 @@ options 	NTP			# kernel PLL for NTP
 #options 	KMEMSTATS		# Collect kmem usage statistics
 options 	DDB			# kernel debugger
 options 	DDB_HISTORY_SIZE=512	# enable history editing in DDB
-#makeoptions	DEBUG=-g
+makeoptions	DEBUG=-g
 #makeoptions	DEBUGLIST=pattern1 pattern2 ...
 
 #options 	KGDB			# Remote kernel GDB support

Index: src/sys/arch/alpha/pci/pci_1000.c
diff -u src/sys/arch/alpha/pci/pci_1000.c:1.24 src/sys/arch/alpha/pci/pci_1000.c:1.25
--- src/sys/arch/alpha/pci/pci_1000.c:1.24	Mon Feb  6 02:14:14 2012
+++ src/sys/arch/alpha/pci/pci_1000.c	Wed Dec 18 12:43:59 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_1000.c,v 1.24 2012/02/06 02:14:14 matt Exp $ */
+/* $NetBSD: pci_1000.c,v 1.25 2013/12/18 12:43:59 skrll Exp $ */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: pci_1000.c,v 1.24 2012/02/06 02:14:14 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci_1000.c,v 1.25 2013/12/18 12:43:59 skrll Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -149,7 +149,7 @@ dec_1000_intr_map(const struct pci_attac
 	pcitag_t bustag = pa-pa_intrtag;
 	int buspin = pa-pa_intrpin;
 	pci_chipset_tag_t pc = pa-pa_pc;
-	int	device;
+	int	device = 0;	/* XXX gcc */
 
 	if (buspin == 0)	/* No IRQ used. */
 		return 1;

Index: src/sys/arch/alpha/pci/pci_1000a.c
diff -u src/sys/arch/alpha/pci/pci_1000a.c:1.26 src/sys/arch/alpha/pci/pci_1000a.c:1.27
--- src/sys/arch/alpha/pci/pci_1000a.c:1.26	Mon Feb  6 02:14:15 2012
+++ src/sys/arch/alpha/pci/pci_1000a.c	Wed Dec 18 12:43:59 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_1000a.c,v 1.26 2012/02/06 02:14:15 matt Exp $ */
+/* $NetBSD: pci_1000a.c,v 1.27 2013/12/18 12:43:59 skrll Exp $ */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: pci_1000a.c,v 1.26 2012/02/06 02:14:15 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pci_1000a.c,v 1.27 2013/12/18 12:43:59 skrll Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -153,7 +153,7 @@ dec_1000a_intr_map(const struct pci_atta
 	pcitag_t bustag = pa-pa_intrtag;
 	int buspin = pa-pa_intrpin;
 	pci_chipset_tag_t pc = pa-pa_pc;
-	int imrbit, device;
+	int imrbit, device = 0;	/* XXX gcc */
 	/*
 	 * Get bit number in mystery ICU imr
 	 */



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

2013-12-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec 18 12:53:26 UTC 2013

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

Log Message:
Remove unused variable.


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

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

Modified files:

Index: src/sys/arch/arm/omap/if_cpsw.c
diff -u src/sys/arch/arm/omap/if_cpsw.c:1.3 src/sys/arch/arm/omap/if_cpsw.c:1.4
--- src/sys/arch/arm/omap/if_cpsw.c:1.3	Wed Apr 17 14:36:34 2013
+++ src/sys/arch/arm/omap/if_cpsw.c	Wed Dec 18 12:53:26 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_cpsw.c,v 1.3 2013/04/17 14:36:34 bouyer Exp $	*/
+/*	$NetBSD: if_cpsw.c,v 1.4 2013/12/18 12:53:26 skrll Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -53,7 +53,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(1, $NetBSD: if_cpsw.c,v 1.3 2013/04/17 14:36:34 bouyer Exp $);
+__KERNEL_RCSID(1, $NetBSD: if_cpsw.c,v 1.4 2013/12/18 12:53:26 skrll Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -494,7 +494,6 @@ cpsw_start(struct ifnet *ifp)
 	uint32_t * const dw = bd.word;
 	struct mbuf *m;
 	bus_dmamap_t dm;
-	u_int sopi;	/* Start of Packet Index */
 	u_int eopi = ~0;
 	u_int seg;
 	u_int txfree;
@@ -556,7 +555,7 @@ cpsw_start(struct ifnet *ifp)
 
 		if (txstart == -1)
 			txstart = sc-sc_txnext;
-		sopi = eopi = sc-sc_txnext;
+		eopi = sc-sc_txnext;
 		for (seg = 0; seg  dm-dm_nsegs; seg++) {
 			dw[0] = cpsw_txdesc_paddr(sc,
 			TXDESC_NEXT(sc-sc_txnext));



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

2013-12-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec 18 12:52:48 UTC 2013

Modified Files:
src/sys/arch/arm/arm: cpufunc.c

Log Message:
Remove unused variables.


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/sys/arch/arm/arm/cpufunc.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/arm/cpufunc.c
diff -u src/sys/arch/arm/arm/cpufunc.c:1.130 src/sys/arch/arm/arm/cpufunc.c:1.131
--- src/sys/arch/arm/arm/cpufunc.c:1.130	Tue Nov 12 17:31:55 2013
+++ src/sys/arch/arm/arm/cpufunc.c	Wed Dec 18 12:52:47 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.c,v 1.130 2013/11/12 17:31:55 matt Exp $	*/
+/*	$NetBSD: cpufunc.c,v 1.131 2013/12/18 12:52:47 skrll Exp $	*/
 
 /*
  * arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -49,7 +49,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.130 2013/11/12 17:31:55 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.131 2013/12/18 12:52:47 skrll Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_cpuoptions.h
@@ -3039,15 +3039,17 @@ struct cpu_option armv7_options[] = {
 void
 armv7_setup(char *args)
 {
-	int cpuctrl, cpuctrlmask;
+	int cpuctrl;
 
 	cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_IC_ENABLE
 	| CPU_CONTROL_DC_ENABLE | CPU_CONTROL_BPRD_ENABLE ;
-	cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_SYST_ENABLE
+#if 0
+	int cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_SYST_ENABLE
 	| CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE
 	| CPU_CONTROL_ROM_ENABLE | CPU_CONTROL_BPRD_ENABLE
 	| CPU_CONTROL_BEND_ENABLE | CPU_CONTROL_AFLT_ENABLE
 	| CPU_CONTROL_ROUNDROBIN | CPU_CONTROL_CPCLK;
+#endif
 
 #ifdef ARM32_DISABLE_ALIGNMENT_FAULTS
 	cpuctrl |= CPU_CONTROL_UNAL_ENABLE;
@@ -3427,7 +3429,7 @@ void
 xscale_setup(char *args)
 {
 	uint32_t auxctl;
-	int cpuctrl, cpuctrlmask;
+	int cpuctrl;
 
 	/*
 	 * The XScale Write Buffer is always enabled.  Our option
@@ -3440,13 +3442,15 @@ xscale_setup(char *args)
 		 | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE
 		 | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_LABT_ENABLE
 		 | CPU_CONTROL_BPRD_ENABLE;
-	cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE
+#if 0
+	int cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE
 		 | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE
 		 | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE
 		 | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_ROM_ENABLE
 		 | CPU_CONTROL_BEND_ENABLE | CPU_CONTROL_AFLT_ENABLE
 		 | CPU_CONTROL_LABT_ENABLE | CPU_CONTROL_BPRD_ENABLE
 		 | CPU_CONTROL_CPCLK | CPU_CONTROL_VECRELOC;
+#endif
 
 #ifndef ARM32_DISABLE_ALIGNMENT_FAULTS
 	cpuctrl |= CPU_CONTROL_AFLT_ENABLE;



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

2013-12-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec 18 12:54:01 UTC 2013

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

Log Message:
Deal with unused variables.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/omap/omapfb.c

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

Modified files:

Index: src/sys/arch/arm/omap/omapfb.c
diff -u src/sys/arch/arm/omap/omapfb.c:1.24 src/sys/arch/arm/omap/omapfb.c:1.25
--- src/sys/arch/arm/omap/omapfb.c:1.24	Sun Jun  9 05:52:04 2013
+++ src/sys/arch/arm/omap/omapfb.c	Wed Dec 18 12:54:01 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: omapfb.c,v 1.24 2013/06/09 05:52:04 kiyohara Exp $	*/
+/*	$NetBSD: omapfb.c,v 1.25 2013/12/18 12:54:01 skrll Exp $	*/
 
 /*
  * Copyright (c) 2010 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: omapfb.c,v 1.24 2013/06/09 05:52:04 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: omapfb.c,v 1.25 2013/12/18 12:54:01 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -189,7 +189,7 @@ omapfb_attach(device_t parent, device_t 
 	unsigned long		defattr;
 	bool			is_console = false;
 	uint32_t		sz, reg;
-	int			segs, i, j, adr;
+	int			segs, i, j;
 
 	sc-sc_iot = obio-obio_iot;
 	sc-sc_dev = self;
@@ -378,9 +378,9 @@ omapfb_attach(device_t parent, device_t 
 	OMAP_DSSCTRL_DAC_DEMEN);
 #endif
 
-	/* VENC to NTSC mode */
-	adr = OMAPFB_VENC_F_CONTROL;
 #if 0
+	/* VENC to NTSC mode */
+	int adr = OMAPFB_VENC_F_CONTROL;
 	for (i = 0; i  __arraycount(venc_mode_ntsc); i++) {
 		bus_space_write_4(sc-sc_iot, sc-sc_regh, adr,
 		venc_mode_ntsc[i]);
@@ -981,10 +981,8 @@ omapfb_cursor(void *cookie, int on, int 
 	struct rasops_info *ri = cookie;
 	struct vcons_screen *scr = ri-ri_hw;
 	struct omapfb_softc *sc = scr-scr_cookie;
-	int wi, he, pos;
+	int pos;
 
-	wi = ri-ri_font-fontwidth;
-	he = ri-ri_font-fontheight;
 	pos = col + row * ri-ri_cols;
 #ifdef WSDISPLAY_SCROLLSUPPORT
 	pos += scr-scr_offset_to_zero;



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

2013-12-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec 18 12:54:35 UTC 2013

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

Log Message:
Initialise len in ti_iic_do_{read,write}.

Is this worth a pullups?


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/omap/ti_iic.c

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

Modified files:

Index: src/sys/arch/arm/omap/ti_iic.c
diff -u src/sys/arch/arm/omap/ti_iic.c:1.4 src/sys/arch/arm/omap/ti_iic.c:1.5
--- src/sys/arch/arm/omap/ti_iic.c:1.4	Thu Apr 25 13:04:27 2013
+++ src/sys/arch/arm/omap/ti_iic.c	Wed Dec 18 12:54:35 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: ti_iic.c,v 1.4 2013/04/25 13:04:27 rkujawa Exp $ */
+/* $NetBSD: ti_iic.c,v 1.5 2013/12/18 12:54:35 skrll Exp $ */
 
 /*
  * Copyright (c) 2013 Manuel Bouyer.  All rights reserved.
@@ -50,7 +50,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ti_iic.c,v 1.4 2013/04/25 13:04:27 rkujawa Exp $);
+__KERNEL_RCSID(0, $NetBSD: ti_iic.c,v 1.5 2013/12/18 12:54:35 skrll Exp $);
 
 #include opt_omap.h
 #include locators.h
@@ -559,7 +559,7 @@ ti_iic_handle_intr(struct ti_iic_softc *
 void
 ti_iic_do_read(struct ti_iic_softc *sc, uint32_t stat)
 {
-	int len;
+	int len = 0;
 
 	KASSERT(mutex_owned(sc-sc_mtx));
 	DPRINTF((ti_iic_do_read stat %#x\n, stat));
@@ -586,7 +586,7 @@ ti_iic_do_read(struct ti_iic_softc *sc, 
 void
 ti_iic_do_write(struct ti_iic_softc *sc, uint32_t stat)
 {
-	int len;
+	int len = 0;
 
 	DPRINTF((ti_iic_do_write stat %#x\n, stat));
 	KASSERT(mutex_owned(sc-sc_mtx));



CVS commit: src/sys/arch/arm

2013-12-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec 18 13:03:59 UTC 2013

Modified Files:
src/sys/arch/arm/ep93xx: ep93xx_intr.c
src/sys/arch/arm/ixp12x0: ixp12x0_intr.c

Log Message:
Remove unused variable


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/ep93xx/ep93xx_intr.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/ixp12x0/ixp12x0_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/arm/ep93xx/ep93xx_intr.c
diff -u src/sys/arch/arm/ep93xx/ep93xx_intr.c:1.19 src/sys/arch/arm/ep93xx/ep93xx_intr.c:1.20
--- src/sys/arch/arm/ep93xx/ep93xx_intr.c:1.19	Sun Aug 18 15:58:19 2013
+++ src/sys/arch/arm/ep93xx/ep93xx_intr.c	Wed Dec 18 13:03:59 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: ep93xx_intr.c,v 1.19 2013/08/18 15:58:19 matt Exp $ */
+/* $NetBSD: ep93xx_intr.c,v 1.20 2013/12/18 13:03:59 skrll Exp $ */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ep93xx_intr.c,v 1.19 2013/08/18 15:58:19 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ep93xx_intr.c,v 1.20 2013/12/18 13:03:59 skrll Exp $);
 
 /*
  * Interrupt support for the Cirrus Logic EP93XX
@@ -200,11 +200,9 @@ ep93xx_intr_calculate_masks(void)
 inline void
 splx(int new)
 {
-	int	old;
 	u_int	oldirqstate;
 
 	oldirqstate = disable_interrupts(I32_bit);
-	old = curcpl();
 	set_curcpl(new);
 	if (new != hardware_spl_level) {
 		hardware_spl_level = new;

Index: src/sys/arch/arm/ixp12x0/ixp12x0_intr.c
diff -u src/sys/arch/arm/ixp12x0/ixp12x0_intr.c:1.25 src/sys/arch/arm/ixp12x0/ixp12x0_intr.c:1.26
--- src/sys/arch/arm/ixp12x0/ixp12x0_intr.c:1.25	Sun Aug 18 15:58:19 2013
+++ src/sys/arch/arm/ixp12x0/ixp12x0_intr.c	Wed Dec 18 13:03:59 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: ixp12x0_intr.c,v 1.25 2013/08/18 15:58:19 matt Exp $ */
+/* $NetBSD: ixp12x0_intr.c,v 1.26 2013/12/18 13:03:59 skrll Exp $ */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ixp12x0_intr.c,v 1.25 2013/08/18 15:58:19 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: ixp12x0_intr.c,v 1.26 2013/12/18 13:03:59 skrll Exp $);
 
 /*
  * Interrupt support for the Intel ixp12x0
@@ -258,11 +258,9 @@ ixp12x0_intr_calculate_masks(void)
 inline void
 splx(int new)
 {
-	int	old;
 	u_int	oldirqstate;
 
 	oldirqstate = disable_interrupts(I32_bit);
-	old = curcpl();
 	set_curcpl(new);
 	if (new != hardware_spl_level) {
 		hardware_spl_level = new;



CVS commit: [matt-nb5-mips64] src/gnu/dist/binutils

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Dec 18 14:07:30 UTC 2013

Modified Files:
src/gnu/dist/binutils/gas/config [matt-nb5-mips64]: tc-arm.c
src/gnu/dist/binutils/include/opcode [matt-nb5-mips64]: arm.h

Log Message:
Add some armv7 instructions.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.32.1 src/gnu/dist/binutils/gas/config/tc-arm.c
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.32.1 \
src/gnu/dist/binutils/include/opcode/arm.h

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

Modified files:

Index: src/gnu/dist/binutils/gas/config/tc-arm.c
diff -u src/gnu/dist/binutils/gas/config/tc-arm.c:1.5 src/gnu/dist/binutils/gas/config/tc-arm.c:1.5.32.1
--- src/gnu/dist/binutils/gas/config/tc-arm.c:1.5	Thu Feb  2 22:03:54 2006
+++ src/gnu/dist/binutils/gas/config/tc-arm.c	Wed Dec 18 14:07:30 2013
@@ -6651,25 +6651,35 @@ do_ldmstm (char * str)
 
   skip_whitespace (str);
 
-  if ((base_reg = reg_required_here (str, 16)) == FAIL)
-return;
-
-  if (base_reg == REG_PC)
+  base_reg = (inst.instruction  16)  0xf;
+  if (base_reg == 0)
 {
-  inst.error = _(r15 not allowed as base register);
-  return;
-}
+  if ((base_reg = reg_required_here (str, 16)) == FAIL)
+	return;
 
-  skip_whitespace (str);
+  if (base_reg == REG_PC)
+	{
+	  inst.error = _(r15 not allowed as base register);
+	  return;
+	}
 
-  if (*str == '!')
-{
-  inst.instruction |= WRITE_BACK;
-  str++;
+  skip_whitespace (str);
+
+  if (*str == '!')
+	{
+	  inst.instruction |= WRITE_BACK;
+	  str++;
+	}
+
+  if (skip_past_comma (str) == FAIL)
+	{
+	  if (! inst.error)
+	inst.error = BAD_ARGS;
+	  return;
+	}
 }
 
-  if (skip_past_comma (str) == FAIL
-  || (range = reg_list (str)) == FAIL)
+  if ((range = reg_list (str)) == FAIL)
 {
   if (! inst.error)
 	inst.error = BAD_ARGS;
@@ -6746,6 +6756,231 @@ do_swi (char * str)
 }
 
 static void
+do_dsb (char * str)
+{
+  skip_whitespace (str);
+  /* Allow optional leading '#'.  */
+  if (is_immediate_prefix (*str))
+str++;
+
+  end_of_line (str);
+}
+
+static void
+do_movwt (char * str)
+{
+  expressionS expr;
+  int reg;
+
+  skip_whitespace (str);
+
+  if ((reg = reg_required_here (str, 12)) == FAIL
+  || skip_past_comma (str) == FAIL)
+return;
+
+  if (reg == REG_PC)
+{
+  inst.error = BAD_PC;
+  return;
+}
+
+  if (is_immediate_prefix (*str))
+str++;
+  else
+{
+  inst.error = _(immediate expression expected);
+  return;
+}
+
+  if (my_get_expression (expr, str))
+return;
+
+  if (expr.X_op != O_constant)
+{
+  inst.error = _(constant expression expected);
+  return;
+}
+
+  if ((expr.X_add_number  0x) != 0)
+{
+  inst.error = _(invalid unsigned 16-bit value);
+  return;
+}
+
+  inst.instruction |= (expr.X_add_number  0xf000)  4;
+  inst.instruction |= (expr.X_add_number  0x0fff);
+}
+
+static void
+do_bfci (char * str)
+{
+  expressionS expr;
+  unsigned long lsb;
+  unsigned long width;
+  int reg;
+
+  skip_whitespace (str);
+
+  if ((reg = reg_required_here (str, 12)) == FAIL
+  || skip_past_comma (str) == FAIL)
+return;
+
+  if (reg == REG_PC)
+{
+  inst.error = BAD_PC;
+  return;
+}
+
+  if ((inst.instruction  0xf) == 0)
+{
+  if ((reg == reg_required_here (str, 0)) == FAIL
+	  || skip_past_comma (str) == FAIL)
+	return;
+
+  if (reg == REG_PC)
+	{
+	  inst.error = BAD_PC;
+	  return;
+	}
+}
+
+  if (is_immediate_prefix (*str))
+str++;
+  else
+{
+  inst.error = _(immediate expression expected);
+  return;
+}
+
+  if (my_get_expression (expr, str))
+return;
+
+  if (expr.X_op != O_constant)
+{
+  inst.error = _(constant expression expected);
+  return;
+}
+
+  lsb = expr.X_add_number;
+  if (lsb  31)
+{
+  inst.error = _(invalid lsb);
+  return;
+}
+
+  if (skip_past_comma (str) == FAIL)
+return;
+
+  if (is_immediate_prefix (*str))
+str++;
+  else
+{
+  inst.error = _(immediate expression expected);
+  return;
+}
+
+  if (my_get_expression (expr, str))
+return;
+
+  if (expr.X_op != O_constant)
+{
+  inst.error = _(constant expression expected);
+  return;
+}
+
+  width = expr.X_add_number;
+  if (lsb + width  32 || width  32 || width == 0)
+{
+  if (!inst.error)
+inst.error = _(invalid width);
+  return;
+}
+
+  inst.instruction |= (lsb  7);
+  inst.instruction |= (lsb + width - 1)  16;
+
+  end_of_line (str);
+}
+
+static void
+do_bfx (char * str)
+{
+  expressionS expr;
+  unsigned long lsb;
+  unsigned long width;
+  int rd, rn;
+
+  skip_whitespace (str);
+
+  if ((rd = reg_required_here (str, 12)) == FAIL
+  || skip_past_comma (str) == FAIL
+  || (rn = reg_required_here (str, 0)) == FAIL
+  || skip_past_comma (str) == FAIL)
+{
+  inst.error = 

CVS commit: [matt-nb5-mips64] src/gnu/dist/gcc4/gcc

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Dec 18 14:49:47 UTC 2013

Modified Files:
src/gnu/dist/gcc4/gcc [matt-nb5-mips64]: config.gcc
src/gnu/dist/gcc4/gcc/config/arm [matt-nb5-mips64]: arm-cores.def arm.c
arm.h netbsd-elf.h

Log Message:
Make gcc4.1 aware of cortex-a[89]/armv7a and be8 linking.  cortex is
treated as arm11.


To generate a diff of this commit:
cvs rdiff -u -r1.19.8.2 -r1.19.8.3 src/gnu/dist/gcc4/gcc/config.gcc
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.32.1 \
src/gnu/dist/gcc4/gcc/config/arm/arm-cores.def \
src/gnu/dist/gcc4/gcc/config/arm/arm.h \
src/gnu/dist/gcc4/gcc/config/arm/netbsd-elf.h
cvs rdiff -u -r1.1.1.4 -r1.1.1.4.16.1 src/gnu/dist/gcc4/gcc/config/arm/arm.c

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

Modified files:

Index: src/gnu/dist/gcc4/gcc/config.gcc
diff -u src/gnu/dist/gcc4/gcc/config.gcc:1.19.8.2 src/gnu/dist/gcc4/gcc/config.gcc:1.19.8.3
--- src/gnu/dist/gcc4/gcc/config.gcc:1.19.8.2	Thu May  6 06:19:02 2010
+++ src/gnu/dist/gcc4/gcc/config.gcc	Wed Dec 18 14:49:46 2013
@@ -668,7 +668,13 @@ arm*-*-netbsdelf*)
 	tm_file=dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h arm/netbsd-elf.h
 	tmake_file=${tmake_file} arm/t-arm arm/t-netbsd
 	case ${target} in
-	armeb*) tm_defines=${tm_defines} TARGET_ENDIAN_DEFAULT=MASK_BIG_END ;;
+	arm*eb-*) tm_defines=${tm_defines} TARGET_ENDIAN_DEFAULT=MASK_BIG_END ;;
+	esac
+	case ${target} in
+	armv4*) with_cpu=${with_cpu:-strongarm};;
+	armv5*) with_cpu=${with_cpu:-arm9e};;
+	armv6*) with_cpu=${with_cpu:-arm1176jzf-s};;
+	armv7*) with_cpu=${with_cpu:-cortex-a8};;
 	esac
 	;;
 arm*-*-netbsd*)
@@ -2569,7 +2575,7 @@ case ${target} in
 		case $with_arch in
 		 \
 		| armv[23456] | armv2a | armv3m | armv4t | armv5t \
-		| armv5te | armv6j |armv6k | armv6z | armv6zk \
+		| armv5te | armv6j |armv6k | armv6z | armv6zk | armv7a \
 		| iwmmxt | ep9312)
 			# OK
 			;;

Index: src/gnu/dist/gcc4/gcc/config/arm/arm-cores.def
diff -u src/gnu/dist/gcc4/gcc/config/arm/arm-cores.def:1.1.1.1 src/gnu/dist/gcc4/gcc/config/arm/arm-cores.def:1.1.1.1.32.1
--- src/gnu/dist/gcc4/gcc/config/arm/arm-cores.def:1.1.1.1	Thu Apr 20 09:50:55 2006
+++ src/gnu/dist/gcc4/gcc/config/arm/arm-cores.def	Wed Dec 18 14:49:46 2013
@@ -115,3 +115,7 @@ ARM_CORE(arm1176jz-s,	  arm1176jzs,	6Z
 ARM_CORE(arm1176jzf-s,  arm1176jzfs,	6ZK, FL_LDSCHED | FL_VFPV2, 9e)
 ARM_CORE(mpcorenovfp,	  mpcorenovfp,	6K, FL_LDSCHED, 9e)
 ARM_CORE(mpcore,	  mpcore,	6K, FL_LDSCHED | FL_VFPV2, 9e)
+
+/* V7 Architecture Processors */
+ARM_CORE(cortex-a8, cortexa8,	7A, FL_LDSCHED | FL_VFPV2, 9e)
+ARM_CORE(cortex-a9, cortexa9,	7A, FL_LDSCHED | FL_VFPV2, 9e)
Index: src/gnu/dist/gcc4/gcc/config/arm/arm.h
diff -u src/gnu/dist/gcc4/gcc/config/arm/arm.h:1.1.1.1 src/gnu/dist/gcc4/gcc/config/arm/arm.h:1.1.1.1.32.1
--- src/gnu/dist/gcc4/gcc/config/arm/arm.h:1.1.1.1	Thu Apr 20 09:50:52 2006
+++ src/gnu/dist/gcc4/gcc/config/arm/arm.h	Wed Dec 18 14:49:46 2013
@@ -77,7 +77,12 @@ extern char arm_arch_name[];
 	if (arm_arch_iwmmxt)\
 	  builtin_define (__IWMMXT__);		\
 	if (TARGET_AAPCS_BASED)\
-	  builtin_define (__ARM_EABI__);		\
+	  {		\
+	builtin_define (__ARM_EABI__);		\
+	builtin_define (__ARM_PCS);		\
+	if (TARGET_HARD_FLOAT  TARGET_VFP)	\
+	  builtin_define (__ARM_PCS_VFP);		\
+	  }		\
 } while (0)
 
 /* The various ARM cores.  */
Index: src/gnu/dist/gcc4/gcc/config/arm/netbsd-elf.h
diff -u src/gnu/dist/gcc4/gcc/config/arm/netbsd-elf.h:1.1.1.1 src/gnu/dist/gcc4/gcc/config/arm/netbsd-elf.h:1.1.1.1.32.1
--- src/gnu/dist/gcc4/gcc/config/arm/netbsd-elf.h:1.1.1.1	Thu Apr 20 09:51:16 2006
+++ src/gnu/dist/gcc4/gcc/config/arm/netbsd-elf.h	Wed Dec 18 14:49:46 2013
@@ -61,10 +61,19 @@
   %{mhard-float:{!mfpu=*:-mfpu=vfp}}   \
%{mfloat-abi=hard:{!mfpu=*:-mfpu=vfp}}
 
+#define TARGET_FIX_V4BX_SPEC  %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4:--fix-v4bx}
+#if TARGET_ENDIAN_DEFAULT == MASK_BIG_END
+#define BE8_LINK_SPEC  %{!mlittle-endian:%{march=armv7*|mcpu=cortex*:%{!r:--be8}}}
+#else
+#define BE8_LINK_SPEC  %{mbig-endian:%{march=armv7*|mcpu=cortex*:%{!r:--be8}}}
+#endif
+
 #undef SUBTARGET_EXTRA_SPECS
 #define SUBTARGET_EXTRA_SPECS\
   { subtarget_extra_asm_spec,	SUBTARGET_EXTRA_ASM_SPEC }, \
   { subtarget_asm_float_spec, SUBTARGET_ASM_FLOAT_SPEC }, \
+  { be8_link_spec,		BE8_LINK_SPEC }, \
+  { target_fix_v4bx_spec,	TARGET_FIX_V4BX_SPEC }, \
   { netbsd_link_spec,		NETBSD_LINK_SPEC_ELF },	\
   { netbsd_entry_point,	NETBSD_ENTRY_POINT },
 
@@ -73,6 +82,7 @@
 #undef LINK_SPEC
 #define LINK_SPEC \
   -X %{mbig-endian:-EB} %{mlittle-endian:-EL} \
+   %(be8_link_spec) %(target_fix_v4bx_spec) \
%(netbsd_link_spec)
 
 /* Make GCC agree with machine/ansi.h.  */

Index: src/gnu/dist/gcc4/gcc/config/arm/arm.c
diff -u src/gnu/dist/gcc4/gcc/config/arm/arm.c:1.1.1.4 

CVS commit: [matt-nb5-mips64] src/gnu/dist/binutils/opcodes

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Dec 18 18:31:22 UTC 2013

Modified Files:
src/gnu/dist/binutils/opcodes [matt-nb5-mips64]: arm-dis.c

Log Message:
Decode some armv7 instructions


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.32.1 src/gnu/dist/binutils/opcodes/arm-dis.c

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

Modified files:

Index: src/gnu/dist/binutils/opcodes/arm-dis.c
diff -u src/gnu/dist/binutils/opcodes/arm-dis.c:1.1.1.3 src/gnu/dist/binutils/opcodes/arm-dis.c:1.1.1.3.32.1
--- src/gnu/dist/binutils/opcodes/arm-dis.c:1.1.1.3	Thu Feb  2 21:14:00 2006
+++ src/gnu/dist/binutils/opcodes/arm-dis.c	Wed Dec 18 18:31:22 2013
@@ -80,6 +80,7 @@
%A			print address for ldc/stc/ldf/stf instruction
%m			print register mask for ldm/stm instruction
%C			print the PSR sub type.
+   %E			print the LSB and WIDTH fields of a BFI or BFC instruction.
%F			print the COUNT field of a LFM/SFM instruction.
 IWMMXT specific format options:
%bitfieldg print as an iWMMXt 64-bit register
@@ -118,6 +119,18 @@ static const struct arm_opcode arm_opcod
   {ARM_EXT_V3M, 0x00800090, 0x0fa000f0, %22?sumull%c%20's\t%12-15r, %16-19r, %0-3r, %8-11r},
   {ARM_EXT_V3M, 0x00a00090, 0x0fa000f0, %22?sumlal%c%20's\t%12-15r, %16-19r, %0-3r, %8-11r},
 
+  /* ARM V7 instructions.  */
+  {ARM_EXT_V7A, 0x07a00050, 0x0fa00070, %22?usbfx%c\t%12-15r, %0-3r, #%7-11d, #%16-20W},
+  {ARM_EXT_V7A, 0x07c0001f, 0x0fa0007f, bfc%c\t%12-15R, %E},
+  {ARM_EXT_V7A, 0x07c00010, 0x0fa00070, bfi%c\t%12-15R, %0-3r, %E},
+  {ARM_EXT_V7A, 0x0300, 0x0ff0, movw%c\t%12-15r, #%16-19,0-11d},
+  {ARM_EXT_V7A, 0xf57ff05f, 0x, dmb},
+  {ARM_EXT_V7A, 0xf57ff050, 0xfff0, dmb\t#%0-3d},
+  {ARM_EXT_V7A, 0xf57ff05f, 0x, dsb},
+  {ARM_EXT_V7A, 0xf57ff050, 0xfff0, dsb\t%#0-3d},
+  {ARM_EXT_V7A, 0xf57ff06f, 0x, isb},
+  {ARM_EXT_V7A, 0xf57ff060, 0xfff0, isb\t%#0-3d},
+
   /* ARM V6Z instructions.  */
   {ARM_EXT_V6Z, 0x01600070, 0x0ff000f0, smi%c\t%e},
 
@@ -380,7 +393,8 @@ static const struct arm_opcode arm_opcod
   {ARM_EXT_V1, 0x00e0, 0x0de0, rsc%c%20's\t%12-15r, %16-19r, %o},
   {ARM_EXT_V3, 0x0120f000, 0x0db0f000, msr%c\t%22?SCPSR%C, %o},
   {ARM_EXT_V3, 0x010f, 0x0fbf0fff, mrs%c\t%12-15r, %22?SCPSR},
-  {ARM_EXT_V1, 0x0100, 0x0de0, tst%c%p\t%16-19r, %o},
+  {ARM_EXT_V1, 0x0110, 0x0df0, tst%c%p\t%16-19r, %o},
+  {ARM_EXT_V1, 0x0310, 0x0df0, tst%c%p\t%16-19r, %o},
   {ARM_EXT_V1, 0x0120, 0x0de0, teq%c%p\t%16-19r, %o},
   {ARM_EXT_V1, 0x0140, 0x0de0, cmp%c%p\t%16-19r, %o},
   {ARM_EXT_V1, 0x0160, 0x0de0, cmn%c%p\t%16-19r, %o},
@@ -1234,6 +1248,19 @@ print_insn_arm (pc, info, given)
 			func (stream, c);
 		  break;
 
+		case 'E':
+		  {
+			long msb = (given  16)  0x1f;
+			long lsb = (given  7)  0x1f;
+			long width = msb - lsb + 1;
+
+			if (width  0)
+			  func(stream, #%lu, #%lu, lsb, width);
+			else
+			  func(stream, (invalid %lu:%lu), lsb, msb);
+		  }
+		  break;
+
 		case 'F':
 		  switch (given  0x00408000)
 			{
@@ -1307,60 +1334,59 @@ print_insn_arm (pc, info, given)
 		  {
 			int bitstart = *c++ - '0';
 			int bitend = 0;
+			long value = 0;
+
 			while (*c = '0'  *c = '9')
 			  bitstart = (bitstart * 10) + *c++ - '0';
 
 			switch (*c)
 			  {
 			  case '-':
-			c++;
+			while (*c == '-')
+			  {
+c++;
+bitend = 0;
+while (*c = '0'  *c = '9')
+  bitend = (bitend * 10) + *c++ - '0';
 
-			while (*c = '0'  *c = '9')
-			  bitend = (bitend * 10) + *c++ - '0';
+if (!bitend)
+  abort ();
+
+if (*c == ',')
+  {
+c++;
+value = (bitend - bitstart + 1);
+value |= (given  ((2  bitend) - 1))  bitstart;
+
+bitstart = 0;
+while (*c = '0'  *c = '9')
+  bitstart = (bitstart * 10) + *c++ - '0';
+  }
+			  }
 
-			if (!bitend)
-			  abort ();
+			value = (bitend - bitstart + 1);
+			value |= (given  ((2  bitend) - 1))  bitstart;
 
 			switch (*c)
 			  {
 			  case 'r':
 {
-  long reg;
-
-  reg = given  bitstart;
-  reg = (2  (bitend - bitstart)) - 1;
-
-  func (stream, %s, arm_regnames[reg]);
+  func (stream, %s, arm_regnames[value]);
 }
 break;
 			  case 'd':
 {
-  long reg;
-
-  reg = given  bitstart;
-  reg = (2  (bitend - bitstart)) - 1;
-
-  func (stream, %d, reg);
+  func (stream, %d, value);
 }
 break;
 			  case 'W':
 {
-  long reg;
-  
-  reg = given  bitstart;
-  reg = (2  (bitend - bitstart)) - 1;
-  
-  func (stream, %d, reg + 1);
+  func (stream, %d, value + 1);
 }
 break;
 			  case 'x':
 {
-  long reg;
-
-  reg = given  bitstart;
-  reg = (2  (bitend - bitstart)) - 1;
-
-  func (stream, 0x%08x, reg);
+  

CVS commit: [matt-nb5-mips64] src/gnu/dist/binutils

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Dec 18 18:33:11 UTC 2013

Modified Files:
src/gnu/dist/binutils/bfd [matt-nb5-mips64]: config.bfd
src/gnu/dist/binutils/ld [matt-nb5-mips64]: configure.tgt

Log Message:
All arm*{,eb}-*-netbsdelf* to match


To generate a diff of this commit:
cvs rdiff -u -r1.14.24.4 -r1.14.24.5 src/gnu/dist/binutils/bfd/config.bfd
cvs rdiff -u -r1.8.30.3 -r1.8.30.4 src/gnu/dist/binutils/ld/configure.tgt

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

Modified files:

Index: src/gnu/dist/binutils/bfd/config.bfd
diff -u src/gnu/dist/binutils/bfd/config.bfd:1.14.24.4 src/gnu/dist/binutils/bfd/config.bfd:1.14.24.5
--- src/gnu/dist/binutils/bfd/config.bfd:1.14.24.4	Fri Dec  2 10:08:43 2011
+++ src/gnu/dist/binutils/bfd/config.bfd	Wed Dec 18 18:33:11 2013
@@ -172,11 +172,11 @@ case ${targ} in
 targ_selvecs=bfd_elf32_bigarc_vec
 ;;
 
-  armeb-*-netbsdelf*)
+  arm*eb-*-netbsdelf*)
 targ_defvec=bfd_elf32_bigarm_vec
 targ_selvecs=bfd_elf32_littlearm_vec armnetbsd_vec armcoff_little_vec armcoff_big_vec
 ;;
-  arm-*-netbsdelf*)
+  arm*-*-netbsdelf*)
 targ_defvec=bfd_elf32_littlearm_vec
 targ_selvecs=bfd_elf32_bigarm_vec armnetbsd_vec armcoff_little_vec armcoff_big_vec
 ;;

Index: src/gnu/dist/binutils/ld/configure.tgt
diff -u src/gnu/dist/binutils/ld/configure.tgt:1.8.30.3 src/gnu/dist/binutils/ld/configure.tgt:1.8.30.4
--- src/gnu/dist/binutils/ld/configure.tgt:1.8.30.3	Fri Dec  2 10:08:44 2011
+++ src/gnu/dist/binutils/ld/configure.tgt	Wed Dec 18 18:33:11 2013
@@ -250,9 +250,9 @@ arm-*-coff)		targ_emul=armcoff ;;
 arm-*-freebsd* | arm-*-kfreebsd*-gnu)
 	   		targ_emul=armelf_fbsd
 			targ_extra_emuls=armelf ;;
-armeb-*-netbsdelf*)	targ_emul=armelfb_nbsd;
+arm*eb-*-netbsdelf*)	targ_emul=armelfb_nbsd;
 			targ_extra_emuls=armelf_nbsd armelf armnbsd ;;
-arm-*-netbsdelf*)	targ_emul=armelf_nbsd;
+arm*-*-netbsdelf*)	targ_emul=armelf_nbsd;
 			targ_extra_emuls=armelfb_nbsd armelf armnbsd ;;
 arm-*-netbsd*)		targ_emul=armnbsd;
 			targ_extra_emuls=armelf armelf_nbsd armelfb_nbsd  ;;



CVS commit: [matt-nb5-mips64] src/share/mk

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Dec 18 18:38:21 UTC 2013

Modified Files:
src/share/mk [matt-nb5-mips64]: bsd.own.mk

Log Message:
Allow armv7/armv7eb as valid MACHINE_ARCH for arm


To generate a diff of this commit:
cvs rdiff -u -r1.542.2.9.4.7 -r1.542.2.9.4.8 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.542.2.9.4.7 src/share/mk/bsd.own.mk:1.542.2.9.4.8
--- src/share/mk/bsd.own.mk:1.542.2.9.4.7	Fri May 20 16:35:10 2011
+++ src/share/mk/bsd.own.mk	Wed Dec 18 18:38:21 2013
@@ -14,7 +14,7 @@ MAKECONF?=	/etc/mk.conf
 #
 # CPU model, derived from MACHINE_ARCH
 #
-MACHINE_CPU=	${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:S/armeb/arm/}
+MACHINE_CPU=	${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:C/arm.*/arm/}
 
 #
 # Subdirectory used below ${RELEASEDIR} when building a release
@@ -557,8 +557,7 @@ MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_AR
 # an elf tag for historically a.out platforms.
 #
 .if ${OBJECT_FMT} == ELF  \
-(${MACHINE_GNU_ARCH} == arm || \
- ${MACHINE_GNU_ARCH} == armeb || \
+(${MACHINE_CPU} == arm || \
  ${MACHINE_ARCH} == i386 || \
  ${MACHINE_CPU} == m68k || \
  ${MACHINE_GNU_ARCH} == sh || \



CVS commit: [matt-nb5-mips64] src/share/mk

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Dec 18 18:39:25 UTC 2013

Modified Files:
src/share/mk [matt-nb5-mips64]: bsd.sys.mk

Log Message:
Bring OBJCOPYLIBFLAGS from HEAD so we can preserve $a/$d/$t on BE ARM


To generate a diff of this commit:
cvs rdiff -u -r1.179.8.5 -r1.179.8.6 src/share/mk/bsd.sys.mk

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

Modified files:

Index: src/share/mk/bsd.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.179.8.5 src/share/mk/bsd.sys.mk:1.179.8.6
--- src/share/mk/bsd.sys.mk:1.179.8.5	Wed Aug 26 03:34:21 2009
+++ src/share/mk/bsd.sys.mk	Wed Dec 18 18:39:25 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.179.8.5 2009/08/26 03:34:21 matt Exp $
+#	$NetBSD: bsd.sys.mk,v 1.179.8.6 2013/12/18 18:39:25 matt Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -212,4 +212,9 @@ YFLAGS+=	${YPREFIX:D-p${YPREFIX}} ${YHEA
 .y.h: ${.TARGET:.h=.c}
 .endif
 
+# Objcopy   
+# ARM big endian needs to preserve $a/$d/$t symbols for the linker.
+OBJCOPYLIBFLAGS?=${${.TARGET:M*.po} != :?-X:-x} \
+${${MACHINE_ARCH:M*arm*eb} != :?-K '\$a' -K '\$d' -K '\$t':}
+
 .endif	# !defined(_BSD_SYS_MK_)



CVS commit: [matt-nb5-mips64] src/share/mk

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Dec 18 18:39:05 UTC 2013

Modified Files:
src/share/mk [matt-nb5-mips64]: bsd.lib.mk

Log Message:
Bring OBJCOPYLIBFLAGS from HEAD so we can preserve $a/$d/$t on BE ARM


To generate a diff of this commit:
cvs rdiff -u -r1.289.2.2.2.1.2.1 -r1.289.2.2.2.1.2.2 src/share/mk/bsd.lib.mk

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

Modified files:

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.289.2.2.2.1.2.1 src/share/mk/bsd.lib.mk:1.289.2.2.2.1.2.2
--- src/share/mk/bsd.lib.mk:1.289.2.2.2.1.2.1	Mon Dec 14 06:33:16 2009
+++ src/share/mk/bsd.lib.mk	Wed Dec 18 18:39:05 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.289.2.2.2.1.2.1 2009/12/14 06:33:16 mrg Exp $
+#	$NetBSD: bsd.lib.mk,v 1.289.2.2.2.1.2.2 2013/12/18 18:39:05 matt Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include bsd.init.mk
@@ -215,14 +215,14 @@ FFLAGS+=	${FOPTS}
 	${_MKTARGET_COMPILE}
 	${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
 .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
-	${OBJCOPY} -x ${.TARGET}
+	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .c.po:
 	${_MKTARGET_COMPILE}
 	${COMPILE.c} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -pg ${.IMPSRC} -o ${.TARGET}
 .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
-	${OBJCOPY} -X ${.TARGET}
+	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .c.go:
@@ -233,21 +233,21 @@ FFLAGS+=	${FOPTS}
 	${_MKTARGET_COMPILE}
 	${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
 .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
-	${OBJCOPY} -x ${.TARGET}
+	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .cc.o .cpp.o .cxx.o .C.o:
 	${_MKTARGET_COMPILE}
 	${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
 .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
-	${OBJCOPY} -x ${.TARGET}
+	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .cc.po .cpp.po .cxx.po .C.po:
 	${_MKTARGET_COMPILE}
 	${COMPILE.cc} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -pg ${.IMPSRC} -o ${.TARGET}
 .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
-	${OBJCOPY} -X ${.TARGET}
+	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .cc.go .cpp.go .cxx.go .C.go:
@@ -258,21 +258,21 @@ FFLAGS+=	${FOPTS}
 	${_MKTARGET_COMPILE}
 	${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
 .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
-	${OBJCOPY} -x ${.TARGET}
+	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .f.o:
 	${_MKTARGET_COMPILE}
 	${COMPILE.f} ${.IMPSRC} -o ${.TARGET}
 .if !defined(FOPTS) || empty(FOPTS:M*-g*)
-	${OBJCOPY} -x ${.TARGET}
+	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .f.po:
 	${_MKTARGET_COMPILE}
 	${COMPILE.f} ${PROFFLAGS} -pg ${.IMPSRC} -o ${.TARGET}
 .if !defined(FOPTS) || empty(FOPTS:M*-g*)
-	${OBJCOPY} -X ${.TARGET}
+	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .f.go:
@@ -283,7 +283,7 @@ FFLAGS+=	${FOPTS}
 	${_MKTARGET_COMPILE}
 	${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}
 .if !defined(FOPTS) || empty(FOPTS:M*-g*)
-	${OBJCOPY} -x ${.TARGET}
+	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .f.ln:
@@ -294,49 +294,49 @@ FFLAGS+=	${FOPTS}
 	${_MKTARGET_COMPILE}
 	${COMPILE.m} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
 .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
-	${OBJCOPY} -x ${.TARGET}
+	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .m.po:
 	${_MKTARGET_COMPILE}
 	${COMPILE.m} ${PROFFLAGS} -pg ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
 .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
-	${OBJCOPY} -X ${.TARGET}
+	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .m.go:
 	${_MKTARGET_COMPILE}
 	${COMPILE.m} ${DEBUGFLAGS} -g ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
 .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
-	${OBJCOPY} -X ${.TARGET}
+	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .m.so:
 	${_MKTARGET_COMPILE}
 	${COMPILE.m} ${CSHLIBFLAGS} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
 .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
-	${OBJCOPY} -x ${.TARGET}
+	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 .endif
 
 .s.o:
 	${_MKTARGET_COMPILE}
 	${COMPILE.s} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
-	${OBJCOPY} -x ${.TARGET}
+	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 
 .S.o:
 	${_MKTARGET_COMPILE}
 	${COMPILE.S} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
-	${OBJCOPY} -x ${.TARGET}
+	${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
 
 .s.po:
 	${_MKTARGET_COMPILE}
 	${COMPILE.s} ${PROFFLAGS} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} 

CVS commit: [matt-nb5-mips64] src

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Dec 18 18:40:35 UTC 2013

Modified Files:
src [matt-nb5-mips64]: build.sh

Log Message:
Allow arch of armv7/armv7eb for evbarm.  Add evbarmv7-e[bl] alias


To generate a diff of this commit:
cvs rdiff -u -r1.198.2.3.4.3 -r1.198.2.3.4.4 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.198.2.3.4.3 src/build.sh:1.198.2.3.4.4
--- src/build.sh:1.198.2.3.4.3	Sun Feb 28 04:05:41 2010
+++ src/build.sh	Wed Dec 18 18:40:35 2013
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.198.2.3.4.3 2010/02/28 04:05:41 matt Exp $
+#	$NetBSD: build.sh,v 1.198.2.3.4.4 2013/12/18 18:40:35 matt Exp $
 #
 # Copyright (c) 2001-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -290,7 +290,15 @@ getarch()
 		# MACHINE_ARCH is arm or armeb, not armel
 		MACHINE_ARCH=arm${MACHINE##*-}
 		MACHINE_ARCH=${MACHINE_ARCH%el}
-		MACHINE=${MACHINE%-e[bl]}
+		MACHINE=evbarm
+		;;
+
+	evbarmv7-e[bl])
+		makewrappermachine=${MACHINE}
+		# MACHINE_ARCH is armv7 or armv7eb, not armv7el
+		MACHINE_ARCH=armv7${MACHINE##*-}
+		MACHINE_ARCH=${MACHINE_ARCH%el}
+		MACHINE=evbarm
 		;;
 
 	evbmips-e[bl]|sbmips-e[bl])
@@ -402,7 +410,7 @@ validatearch()
 	#
 	case ${MACHINE_ARCH} in
 
-	alpha|arm|armeb|hppa|i386|m68000|m68k|mipse[bl]|mips64e[bl]|powerpc|powerpc64|sh3e[bl]|sparc|sparc64|vax|x86_64|ia64)
+	alpha|arm|armeb|armv7|armv7eb|hppa|i386|m68000|m68k|mipse[bl]|mips64e[bl]|powerpc|powerpc64|sh3e[bl]|sparc|sparc64|vax|x86_64|ia64)
 		;;
 
 	)
@@ -420,7 +428,7 @@ validatearch()
 	case ${MACHINE} in
 
 	evbarm)
-		arches=arm armeb
+		arches=arm armeb armv7 armv7eb
 		;;
 
 	algor|arc|cobalt|pmax)
@@ -1225,7 +1233,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.198.2.3.4.3 2010/02/28 04:05:41 matt Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.198.2.3.4.4 2013/12/18 18:40:35 matt Exp $
 # with these arguments: ${_args}
 #
 



CVS commit: [matt-nb5-mips64] src/gnu/lib

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Dec 18 18:41:40 UTC 2013

Modified Files:
src/gnu/lib/crtstuff4 [matt-nb5-mips64]: Makefile
src/gnu/lib/libbfd [matt-nb5-mips64]: Makefile
src/gnu/lib/libgcc4 [matt-nb5-mips64]: Makefile.inc
src/gnu/lib/libiberty [matt-nb5-mips64]: Makefile
src/gnu/lib/libobjc4 [matt-nb5-mips64]: Makefile
src/gnu/lib/libopcodes [matt-nb5-mips64]: Makefile
src/gnu/lib/libstdc++-v3_4 [matt-nb5-mips64]: Makefile
src/gnu/lib/libstdc++-v3_4/include [matt-nb5-mips64]: Makefile
src/gnu/lib/libstdc++-v3_4/include/backward [matt-nb5-mips64]: Makefile
src/gnu/lib/libstdc++-v3_4/include/bits [matt-nb5-mips64]: Makefile
src/gnu/lib/libstdc++-v3_4/include/debug [matt-nb5-mips64]: Makefile
src/gnu/lib/libstdc++-v3_4/include/ext [matt-nb5-mips64]: Makefile
src/gnu/lib/libstdc++-v3_4/include/tr1 [matt-nb5-mips64]: Makefile
src/gnu/lib/libsupc++4 [matt-nb5-mips64]: Makefile
Added Files:
src/gnu/lib [matt-nb5-mips64]: Makefile.inc

Log Message:
Treat MACHINE_ARCH of armv7/armv7eb as arm/armeb


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/gnu/lib/Makefile.inc
cvs rdiff -u -r1.3.10.1 -r1.3.10.2 src/gnu/lib/crtstuff4/Makefile
cvs rdiff -u -r1.45 -r1.45.6.1 src/gnu/lib/libbfd/Makefile
cvs rdiff -u -r1.13.10.1 -r1.13.10.2 src/gnu/lib/libgcc4/Makefile.inc
cvs rdiff -u -r1.10 -r1.10.30.1 src/gnu/lib/libiberty/Makefile
cvs rdiff -u -r1.11 -r1.11.6.1 src/gnu/lib/libobjc4/Makefile
cvs rdiff -u -r1.5 -r1.5.6.1 src/gnu/lib/libopcodes/Makefile
cvs rdiff -u -r1.3 -r1.3.28.1 src/gnu/lib/libstdc++-v3_4/Makefile
cvs rdiff -u -r1.1 -r1.1.32.1 src/gnu/lib/libstdc++-v3_4/include/Makefile
cvs rdiff -u -r1.1 -r1.1.32.1 \
src/gnu/lib/libstdc++-v3_4/include/backward/Makefile
cvs rdiff -u -r1.1 -r1.1.32.1 \
src/gnu/lib/libstdc++-v3_4/include/bits/Makefile
cvs rdiff -u -r1.1 -r1.1.32.1 \
src/gnu/lib/libstdc++-v3_4/include/debug/Makefile
cvs rdiff -u -r1.1 -r1.1.32.1 src/gnu/lib/libstdc++-v3_4/include/ext/Makefile
cvs rdiff -u -r1.1 -r1.1.32.1 src/gnu/lib/libstdc++-v3_4/include/tr1/Makefile
cvs rdiff -u -r1.2 -r1.2.28.1 src/gnu/lib/libsupc++4/Makefile

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

Modified files:

Index: src/gnu/lib/crtstuff4/Makefile
diff -u src/gnu/lib/crtstuff4/Makefile:1.3.10.1 src/gnu/lib/crtstuff4/Makefile:1.3.10.2
--- src/gnu/lib/crtstuff4/Makefile:1.3.10.1	Tue Dec 22 04:51:26 2009
+++ src/gnu/lib/crtstuff4/Makefile	Wed Dec 18 18:41:39 2013
@@ -1,17 +1,19 @@
-#	$NetBSD: Makefile,v 1.3.10.1 2009/12/22 04:51:26 mrg Exp $
+#	$NetBSD: Makefile,v 1.3.10.2 2013/12/18 18:41:39 matt Exp $
 
 REQUIRETOOLS=	yes
 NOLINT=		# defined
 
 .include bsd.own.mk
 
+CRT_MACHINE_ARCH?=${MACHINE_ARCH:S/armv7/arm/}
+
 # If using an external toolchain, we expect crtbegin/crtend to be
 # supplied by that toolchain's run-time support.
 .if !defined(EXTERNAL_TOOLCHAIN)  ${MKGCC} != no  ${OBJECT_FMT} == ELF
 
 DIST=		${NETBSDSRCDIR}/gnu/dist/gcc4
 GNUHOSTDIST=	${DIST}
-GCCARCH=	${NETBSDSRCDIR}/gnu/usr.bin/gcc4/arch/${MACHINE_ARCH}
+GCCARCH=	${NETBSDSRCDIR}/gnu/usr.bin/gcc4/arch/${CRT_MACHINE_ARCH}
 
 GALLCFLAGS=	${G_CRTSTUFF_CFLAGS} ${G_CRTSTUFF_T_CFLAGS}
 
@@ -20,10 +22,10 @@ CPPFLAGS+=	-I.
 
 GCFLAGS=	${GALLCFLAGS:N-D*:N-I*:N-i*:N./*}
 
-DPSRCS+=	${.CURDIR}/arch/${MACHINE_ARCH}.mk tconfig.h
+DPSRCS+=	${.CURDIR}/arch/${CRT_MACHINE_ARCH}.mk tconfig.h
 CLEANFILES+=	cs-tconfig.h tconfig.h
 
-.include ${.CURDIR}/arch/${MACHINE_ARCH}.mk
+.include ${.CURDIR}/arch/${CRT_MACHINE_ARCH}.mk
 
 SRCS+=		crtbegin.c crtend.c
 OBJS+=		crtbegin.o crtend.o
@@ -66,7 +68,7 @@ ${OBJS}: ${DPSRCS}
 	${CC} ${CPPFLAGS} ${GCFLAGS} ${CPUFLAGS} -c ${.IMPSRC} -o ${.TARGET}.o
 	mv ${.TARGET}.o ${.TARGET}
 
-.if (${MACHINE_ARCH} == mips64eb) || (${MACHINE_ARCH} == mips64el)
+.if (${CRT_MACHINE_ARCH} == mips64eb) || (${CRT_MACHINE_ARCH} == mips64el)
 # Turn off as(1) warnings on MIPS, since warnings are fatal with WARNS0
 # and GCC configury passes -finhibit-size-directive which causes mips-gas
 # to barf.  Don't know what the real fix for this is...

Index: src/gnu/lib/libbfd/Makefile
diff -u src/gnu/lib/libbfd/Makefile:1.45 src/gnu/lib/libbfd/Makefile:1.45.6.1
--- src/gnu/lib/libbfd/Makefile:1.45	Sat Oct 25 23:56:02 2008
+++ src/gnu/lib/libbfd/Makefile	Wed Dec 18 18:41:39 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.45 2008/10/25 23:56:02 mrg Exp $
+#	$NetBSD: Makefile,v 1.45.6.1 2013/12/18 18:41:39 matt Exp $
 
 NOLINKLIB=	# defined
 NOLINT=		# defined
@@ -17,7 +17,7 @@ libinstall:	# do nothing
 
 LIB=		bfd
 
-BFD_MACHINE_ARCH?=	${MACHINE_ARCH}
+BFD_MACHINE_ARCH?=	${MACHINE_ARCH:S/armv7/arm/}
 
 .if exists(${.CURDIR}/arch/${BFD_MACHINE_ARCH}/defs.mk)
 .include ${.CURDIR}/arch/${BFD_MACHINE_ARCH}/defs.mk

Index: src/gnu/lib/libgcc4/Makefile.inc
diff -u src/gnu/lib/libgcc4/Makefile.inc:1.13.10.1 

CVS commit: [matt-nb5-mips64] src/gnu

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Dec 18 18:43:30 UTC 2013

Modified Files:
src/gnu/usr.bin/binutils [matt-nb5-mips64]: Makefile Makefile.inc
src/gnu/usr.bin/binutils/common [matt-nb5-mips64]: Makefile
Makefile.inc Makefile.prog
src/gnu/usr.bin/binutils/gas [matt-nb5-mips64]: Makefile
src/gnu/usr.bin/binutils/gprof [matt-nb5-mips64]: Makefile
src/gnu/usr.bin/binutils/ld [matt-nb5-mips64]: Makefile
src/gnu/usr.bin/gdb6 [matt-nb5-mips64]: Makefile.inc
src/gnu/usr.bin/gdb6/bfd [matt-nb5-mips64]: Makefile
src/gnu/usr.bin/gdb6/gdb [matt-nb5-mips64]: Makefile
src/gnu/usr.bin/gdb6/gdbtui [matt-nb5-mips64]: Makefile
src/gnu/usr.bin/gdb6/libgdb [matt-nb5-mips64]: Makefile
src/gnu/usr.bin/gdb6/libiberty [matt-nb5-mips64]: Makefile
src/gnu/usr.bin/gdb6/opcodes [matt-nb5-mips64]: Makefile
src/gnu/usr.bin/gdb6/readline [matt-nb5-mips64]: Makefile
src/gnu/usr.bin/gdb6/sim [matt-nb5-mips64]: Makefile
src/gnu/usr.sbin/dbsym [matt-nb5-mips64]: Makefile
src/gnu/usr.sbin/mdsetimage [matt-nb5-mips64]: Makefile

Log Message:
Treat MACHINE_ARCH of armv7/armv7eb as arm/armeb


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.22.44.1 src/gnu/usr.bin/binutils/Makefile
cvs rdiff -u -r1.14 -r1.14.38.1 src/gnu/usr.bin/binutils/Makefile.inc
cvs rdiff -u -r1.16.44.1 -r1.16.44.2 src/gnu/usr.bin/binutils/common/Makefile
cvs rdiff -u -r1.2 -r1.2.44.1 src/gnu/usr.bin/binutils/common/Makefile.inc
cvs rdiff -u -r1.8 -r1.8.30.1 src/gnu/usr.bin/binutils/common/Makefile.prog
cvs rdiff -u -r1.8 -r1.8.30.1 src/gnu/usr.bin/binutils/gas/Makefile
cvs rdiff -u -r1.5 -r1.5.44.1 src/gnu/usr.bin/binutils/gprof/Makefile
cvs rdiff -u -r1.27.2.3.4.1 -r1.27.2.3.4.2 \
src/gnu/usr.bin/binutils/ld/Makefile
cvs rdiff -u -r1.1 -r1.1.32.1 src/gnu/usr.bin/gdb6/Makefile.inc
cvs rdiff -u -r1.4 -r1.4.8.1 src/gnu/usr.bin/gdb6/bfd/Makefile
cvs rdiff -u -r1.7 -r1.7.24.1 src/gnu/usr.bin/gdb6/gdb/Makefile
cvs rdiff -u -r1.3 -r1.3.24.1 src/gnu/usr.bin/gdb6/gdbtui/Makefile
cvs rdiff -u -r1.8 -r1.8.12.1 src/gnu/usr.bin/gdb6/libgdb/Makefile
cvs rdiff -u -r1.5 -r1.5.12.1 src/gnu/usr.bin/gdb6/libiberty/Makefile
cvs rdiff -u -r1.3 -r1.3.12.1 src/gnu/usr.bin/gdb6/opcodes/Makefile
cvs rdiff -u -r1.3 -r1.3.12.1 src/gnu/usr.bin/gdb6/readline/Makefile
cvs rdiff -u -r1.3 -r1.3.30.1 src/gnu/usr.bin/gdb6/sim/Makefile
cvs rdiff -u -r1.13 -r1.13.44.1 src/gnu/usr.sbin/dbsym/Makefile
cvs rdiff -u -r1.19 -r1.19.16.1 src/gnu/usr.sbin/mdsetimage/Makefile

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

Modified files:

Index: src/gnu/usr.bin/binutils/Makefile
diff -u src/gnu/usr.bin/binutils/Makefile:1.22 src/gnu/usr.bin/binutils/Makefile:1.22.44.1
--- src/gnu/usr.bin/binutils/Makefile:1.22	Thu Dec  4 09:29:33 2003
+++ src/gnu/usr.bin/binutils/Makefile	Wed Dec 18 18:43:29 2013
@@ -1,9 +1,10 @@
-#	$NetBSD: Makefile,v 1.22 2003/12/04 09:29:33 mrg Exp $
+#	$NetBSD: Makefile,v 1.22.44.1 2013/12/18 18:43:29 matt Exp $
 
 .include bsd.own.mk
+.include Makefile.inc
 
-.if ${MKBFD} != no  exists(${.CURDIR}/common/arch/${MACHINE_ARCH}/defs.mk)
-.include ${.CURDIR}/common/arch/${MACHINE_ARCH}/defs.mk
+.if ${MKBFD} != no  exists(${.CURDIR}/common/arch/${BFD_MACHINE_ARCH}/defs.mk)
+.include ${.CURDIR}/common/arch/${BFD_MACHINE_ARCH}/defs.mk
 
 #SUBDIR=		libopcodes libbfd libiberty .WAIT
 

Index: src/gnu/usr.bin/binutils/Makefile.inc
diff -u src/gnu/usr.bin/binutils/Makefile.inc:1.14 src/gnu/usr.bin/binutils/Makefile.inc:1.14.38.1
--- src/gnu/usr.bin/binutils/Makefile.inc:1.14	Sun Dec 12 12:43:05 2004
+++ src/gnu/usr.bin/binutils/Makefile.inc	Wed Dec 18 18:43:29 2013
@@ -1,14 +1,16 @@
-#	$NetBSD: Makefile.inc,v 1.14 2004/12/12 12:43:05 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.14.38.1 2013/12/18 18:43:29 matt Exp $
 
 .if !defined(__MAKEFILE_INC_INCLUDED__)
 __MAKEFILE_INC_INCLUDED__=1
 
 .include bsd.own.mk
 
+BFD_MACHINE_ARCH?=${MACHINE_ARCH:S/armv7/arm/}
+
 GNUHOSTDIST=	${DIST}
 GNUCPPFLAGS=	${G_DEFS} ${G_INCLUDES}
 CPPFLAGS+=	${GNUCPPFLAGS:M-D*:N-DLOCALEDIR*} ${GNUCPPFLAGS:M-I*:N-I.*} \
-		-I${TOP}/${BFDSUBDIR}/libbfd/arch/${MACHINE_ARCH} \
+		-I${TOP}/${BFDSUBDIR}/libbfd/arch/${BFD_MACHINE_ARCH} \
 		-I${DIST}/include -I${DIST}/bfd -I${DIST}/binutils \
 		-DLOCALEDIR=\${LOCALEDIR}\
 

Index: src/gnu/usr.bin/binutils/common/Makefile
diff -u src/gnu/usr.bin/binutils/common/Makefile:1.16.44.1 src/gnu/usr.bin/binutils/common/Makefile:1.16.44.2
--- src/gnu/usr.bin/binutils/common/Makefile:1.16.44.1	Wed Apr 21 05:25:48 2010
+++ src/gnu/usr.bin/binutils/common/Makefile	Wed Dec 18 18:43:29 2013
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.16.44.1 2010/04/21 05:25:48 matt Exp $
+#	$NetBSD: Makefile,v 1.16.44.2 2013/12/18 18:43:29 matt Exp $
 
 .include bsd.own.mk
 
 TOP=		${NETBSDSRCDIR}/gnu
 
-.include ${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk
 .include 

CVS commit: src/sys/rump/include/rump

2013-12-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 18 20:10:58 UTC 2013

Modified Files:
src/sys/rump/include/rump: makerumpdefs.sh

Log Message:
generate errno - str routine (for portable programs)


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/rump/include/rump/makerumpdefs.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/rump/include/rump/makerumpdefs.sh
diff -u src/sys/rump/include/rump/makerumpdefs.sh:1.24 src/sys/rump/include/rump/makerumpdefs.sh:1.25
--- src/sys/rump/include/rump/makerumpdefs.sh:1.24	Wed Dec 11 23:13:48 2013
+++ src/sys/rump/include/rump/makerumpdefs.sh	Wed Dec 18 20:10:58 2013
@@ -6,9 +6,9 @@
 
 echo Generating rumpdefs.h
 rm -f rumpdefs.h
-exec  rumpdefs.h
+exec 31  rumpdefs.h
 
-printf '/*	$NetBSD: makerumpdefs.sh,v 1.24 2013/12/11 23:13:48 pooka Exp $	*/\n\n'
+printf '/*	$NetBSD: makerumpdefs.sh,v 1.25 2013/12/18 20:10:58 pooka Exp $	*/\n\n'
 printf '/*\n *\tAUTOMATICALLY GENERATED.  DO NOT EDIT.\n */\n\n'
 printf '#ifndef _RUMP_RUMPDEFS_H_\n'
 printf '#define _RUMP_RUMPDEFS_H_\n\n'
@@ -123,3 +123,48 @@ fromvers ../../../sys/dirent.h
 getstruct ../../../sys/dirent.h dirent
 
 printf '\n#endif /* _RUMP_RUMPDEFS_H_ */\n'
+
+exec 13
+echo Generating rumperr.h
+rm -f rumperr.h
+exec  rumperr.h
+
+printf '/*	$NetBSD: makerumpdefs.sh,v 1.25 2013/12/18 20:10:58 pooka Exp $	*/\n\n'
+printf '/*\n *\tAUTOMATICALLY GENERATED.  DO NOT EDIT.\n */\n'
+
+fromvers ../../../sys/errno.h
+
+printf \nstatic inline const char *\nrump_strerror(int error)\n{\n\n
+printf \tswitch (error) {\n\tcase 0:\n
+printf \t\t return \No error: zero, zip, zilch, none!\;\n
+awk '/^#define[ 	]*E.*[0-9]/{
+	ename = $2
+	evalue = $3
+	error = 1
+	if (ename == ELAST) {
+		printf \tdefault:\n
+		printf \t\treturn \Invalid error!\;\n\t}\n}\n
+		error = 0
+		exit 0
+	}
+	if (preverror + 1 != evalue)
+		exit 1
+	preverror = evalue
+	printf \tcase %d: /* (%s) */\n\t\treturn \, evalue, ename
+	sp = 
+	for (i = 5; i  NF; i++) {
+		printf %s%s, sp, $i
+		sp =  
+	}
+	printf \;\n
+}
+END {
+	exit error
+}'  ../../../sys/errno.h
+if [ $? -ne 0 ]; then
+	echo 'Parsing errno.h failed!' 13
+	rm -f rumpdefs.h rumperr.h
+	exit 1
+fi
+
+exit 0



CVS commit: src/sys/rump/include/rump

2013-12-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 18 20:12:08 UTC 2013

Modified Files:
src/sys/rump/include/rump: rumpdefs.h
Added Files:
src/sys/rump/include/rump: rumperr.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/rump/include/rump/rumpdefs.h
cvs rdiff -u -r0 -r1.1 src/sys/rump/include/rump/rumperr.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/rump/include/rump/rumpdefs.h
diff -u src/sys/rump/include/rump/rumpdefs.h:1.29 src/sys/rump/include/rump/rumpdefs.h:1.30
--- src/sys/rump/include/rump/rumpdefs.h:1.29	Wed Dec 11 23:14:03 2013
+++ src/sys/rump/include/rump/rumpdefs.h	Wed Dec 18 20:12:08 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpdefs.h,v 1.29 2013/12/11 23:14:03 pooka Exp $	*/
+/*	$NetBSD: rumpdefs.h,v 1.30 2013/12/18 20:12:08 pooka Exp $	*/
 
 /*
  *	AUTOMATICALLY GENERATED.  DO NOT EDIT.

Added files:

Index: src/sys/rump/include/rump/rumperr.h
diff -u /dev/null src/sys/rump/include/rump/rumperr.h:1.1
--- /dev/null	Wed Dec 18 20:12:08 2013
+++ src/sys/rump/include/rump/rumperr.h	Wed Dec 18 20:12:08 2013
@@ -0,0 +1,211 @@
+/*	$NetBSD: rumperr.h,v 1.1 2013/12/18 20:12:08 pooka Exp $	*/
+
+/*
+ *	AUTOMATICALLY GENERATED.  DO NOT EDIT.
+ */
+
+/*	NetBSD: errno.h,v 1.40 2013/01/02 18:51:53 dsl Exp 	*/
+
+static inline const char *
+rump_strerror(int error)
+{
+
+	switch (error) {
+	case 0:
+		 return No error: zero, zip, zilch, none!;
+	case 1: /* (EPERM) */
+		return Operation not permitted;
+	case 2: /* (ENOENT) */
+		return No such file or directory;
+	case 3: /* (ESRCH) */
+		return No such process;
+	case 4: /* (EINTR) */
+		return Interrupted system call;
+	case 5: /* (EIO) */
+		return Input/output error;
+	case 6: /* (ENXIO) */
+		return Device not configured;
+	case 7: /* (E2BIG) */
+		return Argument list too long;
+	case 8: /* (ENOEXEC) */
+		return Exec format error;
+	case 9: /* (EBADF) */
+		return Bad file descriptor;
+	case 10: /* (ECHILD) */
+		return No child processes;
+	case 11: /* (EDEADLK) */
+		return Resource deadlock avoided;
+	case 12: /* (ENOMEM) */
+		return Cannot allocate memory;
+	case 13: /* (EACCES) */
+		return Permission denied;
+	case 14: /* (EFAULT) */
+		return Bad address;
+	case 15: /* (ENOTBLK) */
+		return Block device required;
+	case 16: /* (EBUSY) */
+		return Device busy;
+	case 17: /* (EEXIST) */
+		return File exists;
+	case 18: /* (EXDEV) */
+		return Cross-device link;
+	case 19: /* (ENODEV) */
+		return Operation not supported by device;
+	case 20: /* (ENOTDIR) */
+		return Not a directory;
+	case 21: /* (EISDIR) */
+		return Is a directory;
+	case 22: /* (EINVAL) */
+		return Invalid argument;
+	case 23: /* (ENFILE) */
+		return Too many open files in system;
+	case 24: /* (EMFILE) */
+		return Too many open files;
+	case 25: /* (ENOTTY) */
+		return Inappropriate ioctl for device;
+	case 26: /* (ETXTBSY) */
+		return Text file busy;
+	case 27: /* (EFBIG) */
+		return File too large;
+	case 28: /* (ENOSPC) */
+		return No space left on device;
+	case 29: /* (ESPIPE) */
+		return Illegal seek;
+	case 30: /* (EROFS) */
+		return Read-only file system;
+	case 31: /* (EMLINK) */
+		return Too many links;
+	case 32: /* (EPIPE) */
+		return Broken pipe;
+	case 33: /* (EDOM) */
+		return Numerical argument out of domain;
+	case 34: /* (ERANGE) */
+		return Result too large or too small;
+	case 35: /* (EAGAIN) */
+		return Resource temporarily unavailable;
+	case 36: /* (EINPROGRESS) */
+		return Operation now in progress;
+	case 37: /* (EALREADY) */
+		return Operation already in progress;
+	case 38: /* (ENOTSOCK) */
+		return Socket operation on non-socket;
+	case 39: /* (EDESTADDRREQ) */
+		return Destination address required;
+	case 40: /* (EMSGSIZE) */
+		return Message too long;
+	case 41: /* (EPROTOTYPE) */
+		return Protocol wrong type for socket;
+	case 42: /* (ENOPROTOOPT) */
+		return Protocol option not available;
+	case 43: /* (EPROTONOSUPPORT) */
+		return Protocol not supported;
+	case 44: /* (ESOCKTNOSUPPORT) */
+		return Socket type not supported;
+	case 45: /* (EOPNOTSUPP) */
+		return Operation not supported;
+	case 46: /* (EPFNOSUPPORT) */
+		return Protocol family not supported;
+	case 47: /* (EAFNOSUPPORT) */
+		return Address family not supported by protocol family;
+	case 48: /* (EADDRINUSE) */
+		return Address already in use;
+	case 49: /* (EADDRNOTAVAIL) */
+		return Can't assign requested address;
+	case 50: /* (ENETDOWN) */
+		return Network is down;
+	case 51: /* (ENETUNREACH) */
+		return Network is unreachable;
+	case 52: /* (ENETRESET) */
+		return Network dropped connection on reset;
+	case 53: /* (ECONNABORTED) */
+		return Software caused connection abort;
+	case 54: /* (ECONNRESET) */
+		return Connection reset by peer;
+	case 55: /* (ENOBUFS) */
+		return No buffer space available;
+	case 56: /* (EISCONN) */
+		return Socket is already 

CVS commit: src

2013-12-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 18 20:14:02 UTC 2013

Modified Files:
src/distrib/sets/lists/comp: mi
src/sys/rump/include/rump: Makefile

Log Message:
install rumperr.h


To generate a diff of this commit:
cvs rdiff -u -r1.1870 -r1.1871 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.5 -r1.6 src/sys/rump/include/rump/Makefile

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1870 src/distrib/sets/lists/comp/mi:1.1871
--- src/distrib/sets/lists/comp/mi:1.1870	Wed Dec 11 01:24:08 2013
+++ src/distrib/sets/lists/comp/mi	Wed Dec 18 20:14:02 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1870 2013/12/11 01:24:08 joerg Exp $
+#	$NetBSD: mi,v 1.1871 2013/12/18 20:14:02 pooka Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -3049,6 +3049,7 @@
 ./usr/include/rump/rump_syscalls.h		comp-c-include	rump
 ./usr/include/rump/rump_syscalls_compat.h	comp-c-include	rump
 ./usr/include/rump/rumpclient.h			comp-c-include	rump
+./usr/include/rump/rumperr.h			comp-c-include	rump
 ./usr/include/rump/rumpdefs.h			comp-c-include	rump
 ./usr/include/rump/rumpkern_if_pub.h		comp-c-include	rump
 ./usr/include/rump/rumpnet_if_pub.h		comp-c-include	rump

Index: src/sys/rump/include/rump/Makefile
diff -u src/sys/rump/include/rump/Makefile:1.5 src/sys/rump/include/rump/Makefile:1.6
--- src/sys/rump/include/rump/Makefile:1.5	Wed Aug  8 13:58:56 2012
+++ src/sys/rump/include/rump/Makefile	Wed Dec 18 20:14:02 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2012/08/08 13:58:56 christos Exp $
+#	$NetBSD: Makefile,v 1.6 2013/12/18 20:14:02 pooka Exp $
 
 .include bsd.own.mk
 
@@ -6,7 +6,7 @@ INCSDIR=	/usr/include/rump
 
 .if (${MKRUMP} != no)
 INCS=		rump.h rump_namei.h rump_syscalls.h rump_syscalls_compat.h
-INCS+=		rumpdefs.h rumpuser.h rumpvnode_if.h
+INCS+=		rumpdefs.h rumperr.h rumpuser.h rumpvnode_if.h
 
 INCS+=		rumpkern_if_pub.h rumpvfs_if_pub.h rumpnet_if_pub.h
 



CVS commit: [netbsd-5] src/lib/libc/net

2013-12-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Dec 18 20:23:36 UTC 2013

Modified Files:
src/lib/libc/net [netbsd-5]: gethnamaddr.c getnameinfo.3 getnameinfo.c
sethostent.c
Added Files:
src/lib/libc/net [netbsd-5]: hostent.h

Log Message:
Apply patch, requested by bad in ticket #1887:
lib/libc/net/gethnamaddr.c  1.79-1.82 via patch
lib/libc/net/getnameinfo.3  1.37-1.40 via patch
lib/libc/net/getnameinfo.c  1.4 via patch
lib/libc/net/hostent.h  1.1, 1.2 via patch
lib/libc/net/sethostent.c   1.17-1.19 via patch

Make getnameinfo(3) re-entrant (ahem __ypdomain).
Add not advertised reentrant functions: {get,set,end}hostent_r,
gethostbyname{,2}_r, gethostbyaddr_r. Make getnameinfo(3) use
gethostbyaddr_r(3).
Implement no-check-names.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.73.18.1 src/lib/libc/net/gethnamaddr.c
cvs rdiff -u -r1.36 -r1.36.26.1 src/lib/libc/net/getnameinfo.3
cvs rdiff -u -r1.45 -r1.45.24.1 src/lib/libc/net/getnameinfo.c
cvs rdiff -u -r0 -r1.2.2.2 src/lib/libc/net/hostent.h
cvs rdiff -u -r1.16 -r1.16.18.1 src/lib/libc/net/sethostent.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/net/gethnamaddr.c
diff -u src/lib/libc/net/gethnamaddr.c:1.73 src/lib/libc/net/gethnamaddr.c:1.73.18.1
--- src/lib/libc/net/gethnamaddr.c:1.73	Sat Jan 27 22:27:35 2007
+++ src/lib/libc/net/gethnamaddr.c	Wed Dec 18 20:23:35 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: gethnamaddr.c,v 1.73 2007/01/27 22:27:35 christos Exp $	*/
+/*	$NetBSD: gethnamaddr.c,v 1.73.18.1 2013/12/18 20:23:35 bouyer Exp $	*/
 
 /*
  * ++Copyright++ 1985, 1988, 1993
@@ -57,7 +57,7 @@
 static char sccsid[] = @(#)gethostnamadr.c	8.1 (Berkeley) 6/4/93;
 static char rcsid[] = Id: gethnamaddr.c,v 8.21 1997/06/01 20:34:37 vixie Exp ;
 #else
-__RCSID($NetBSD: gethnamaddr.c,v 1.73 2007/01/27 22:27:35 christos Exp $);
+__RCSID($NetBSD: gethnamaddr.c,v 1.73.18.1 2013/12/18 20:23:35 bouyer Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -95,41 +95,38 @@ __RCSID($NetBSD: gethnamaddr.c,v 1.73 2
 #include rpcsvc/ypclnt.h
 #endif
 
+#include hostent.h
+
 #if defined(_LIBC)  defined(__weak_alias)
 __weak_alias(gethostbyaddr,_gethostbyaddr)
 __weak_alias(gethostbyname,_gethostbyname)
 __weak_alias(gethostent,_gethostent)
 #endif
 
-#define	MAXALIASES	35
-#define	MAXADDRS	35
+#define maybe_ok(res, nm, ok) (((res)-options  RES_NOCHECKNAME) != 0U || \
+   (ok)(nm) != 0)
+#define maybe_hnok(res, hn) maybe_ok((res), (hn), res_hnok)
+#define maybe_dnok(res, dn) maybe_ok((res), (dn), res_dnok)
+
 
 static const char AskedForGot[] =
-			  gethostby*.getanswer: asked for \%s\, got \%s\;
+gethostby*.getanswer: asked for \%s\, got \%s\;
 
-static char *h_addr_ptrs[MAXADDRS + 1];
 
 #ifdef YP
 static char *__ypdomain;
 #endif
 
-static struct hostent host;
-static char *host_aliases[MAXALIASES];
-static char hostbuf[8*1024];
-static u_int32_t host_addr[16 / sizeof(u_int32_t)];	/* IPv4 or IPv6 */
-static FILE *hostf = NULL;
-static int stayopen = 0;
-
 #define	MAXPACKET	(64*1024)
 
 typedef union {
-HEADER hdr;
-u_char buf[MAXPACKET];
+	HEADER hdr;
+	u_char buf[MAXPACKET];
 } querybuf;
 
 typedef union {
-int32_t al;
-char ac;
+	int32_t al;
+	char ac;
 } align;
 
 #ifdef DEBUG
@@ -137,33 +134,21 @@ static void dprintf(const char *, res_st
 	__attribute__((__format__(__printf__, 1, 3)));
 #endif
 static struct hostent *getanswer(const querybuf *, int, const char *, int,
-res_state);
+res_state, struct hostent *, char *, size_t, int *);
 static void map_v4v6_address(const char *, char *);
 static void map_v4v6_hostent(struct hostent *, char **, char *);
 static void addrsort(char **, int, res_state);
 
-void _sethtent(int);
-void _endhtent(void);
-struct hostent *_gethtent(void);
-void ht_sethostent(int);
-void ht_endhostent(void);
-struct hostent *ht_gethostbyname(char *);
-struct hostent *ht_gethostbyaddr(const char *, int, int);
 void dns_service(void);
 #undef dn_skipname
 int dn_skipname(const u_char *, const u_char *);
-int _gethtbyaddr(void *, void *, va_list);
-int _gethtbyname(void *, void *, va_list);
-struct hostent *_gethtbyname2(const char *, int);
-int _dns_gethtbyaddr(void *, void *, va_list);
-int _dns_gethtbyname(void *, void *, va_list);
+
 #ifdef YP
-struct hostent *_yphostent(char *, int);
-int _yp_gethtbyaddr(void *, void *, va_list);
-int _yp_gethtbyname(void *, void *, va_list);
+static struct hostent *_yp_hostent(char *, int, struct getnamaddr *);
 #endif
 
-static struct hostent *gethostbyname_internal(const char *, int, res_state);
+static struct hostent *gethostbyname_internal(const char *, int, res_state,
+struct hostent *, char *, size_t, int *);
 
 static const ns_src 

CVS commit: [netbsd-5] src/doc

2013-12-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Dec 18 20:25:16 UTC 2013

Modified Files:
src/doc [netbsd-5]: CHANGES-5.3

Log Message:
Ticket 1887


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.42 -r1.1.2.43 src/doc/CHANGES-5.3

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-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.42 src/doc/CHANGES-5.3:1.1.2.43
--- src/doc/CHANGES-5.3:1.1.2.42	Wed Dec 18 04:07:37 2013
+++ src/doc/CHANGES-5.3	Wed Dec 18 20:25:16 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.42 2013/12/18 04:07:37 riz Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.43 2013/12/18 20:25:16 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -664,3 +664,16 @@ usr.sbin/ndp/ndp.c1.42
 	obey all local alignement requirements.
 	[martin, ticket #1892]
 
+lib/libc/net/gethnamaddr.c1.79-1.82 via patch
+lib/libc/net/getnameinfo.31.37-1.40 via patch
+lib/libc/net/getnameinfo.c1.4 via patch
+lib/libc/net/hostent.h	1.1, 1.2 via patch
+lib/libc/net/sethostent.c1.17-1.19 via patch
+
+	Make getnameinfo(3) re-entrant (ahem __ypdomain).
+	Add not advertised reentrant functions: {get,set,end}hostent_r,
+	gethostbyname{,2}_r, gethostbyaddr_r. Make getnameinfo(3) use
+	gethostbyaddr_r(3).
+	Implement no-check-names.
+	[bad, ticket #1887]
+



CVS commit: src/lib/librumpuser

2013-12-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 18 20:24:04 UTC 2013

Modified Files:
src/lib/librumpuser: rumpuser_port.h

Log Message:
remove outdated comment (since quite a few months ago)


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/lib/librumpuser/rumpuser_port.h

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

Modified files:

Index: src/lib/librumpuser/rumpuser_port.h
diff -u src/lib/librumpuser/rumpuser_port.h:1.22 src/lib/librumpuser/rumpuser_port.h:1.23
--- src/lib/librumpuser/rumpuser_port.h:1.22	Sun Oct 27 16:39:46 2013
+++ src/lib/librumpuser/rumpuser_port.h	Wed Dec 18 20:24:04 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser_port.h,v 1.22 2013/10/27 16:39:46 rmind Exp $	*/
+/*	$NetBSD: rumpuser_port.h,v 1.23 2013/12/18 20:24:04 pooka Exp $	*/
 
 /*
  * Portability header for non-NetBSD platforms.
@@ -6,12 +6,6 @@
  * Maybe should try to use the infrastructure in tools/compat instead?
  */
 
-/*
- * XXX:
- * There is currently no errno translation for the error values reported
- * by the hypercall layer.
- */
-
 #ifndef _LIB_LIBRUMPUSER_RUMPUSER_PORT_H_
 #define _LIB_LIBRUMPUSER_RUMPUSER_PORT_H_
 



CVS commit: src/usr.bin/rump_allserver

2013-12-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 18 20:48:31 UTC 2013

Modified Files:
src/usr.bin/rump_allserver: rump_allserver.c

Log Message:
Use rumperr to print correct error strings on !NetBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/rump_allserver/rump_allserver.c

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

Modified files:

Index: src/usr.bin/rump_allserver/rump_allserver.c
diff -u src/usr.bin/rump_allserver/rump_allserver.c:1.29 src/usr.bin/rump_allserver/rump_allserver.c:1.30
--- src/usr.bin/rump_allserver/rump_allserver.c:1.29	Mon Dec 16 23:27:33 2013
+++ src/usr.bin/rump_allserver/rump_allserver.c	Wed Dec 18 20:48:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_allserver.c,v 1.29 2013/12/16 23:27:33 bad Exp $	*/
+/*	$NetBSD: rump_allserver.c,v 1.30 2013/12/18 20:48:31 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #include rump/rumpuser_port.h
 
 #ifndef lint
-__RCSID($NetBSD: rump_allserver.c,v 1.29 2013/12/16 23:27:33 bad Exp $);
+__RCSID($NetBSD: rump_allserver.c,v 1.30 2013/12/18 20:48:31 pooka Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -48,6 +48,7 @@ __RCSID($NetBSD: rump_allserver.c,v 1.2
 #include rump/rump.h
 #include rump/rump_syscalls.h
 #include rump/rumpdefs.h
+#include rump/rumperr.h
 
 __dead static void
 usage(void)
@@ -62,19 +63,34 @@ usage(void)
 }
 
 __dead static void
-die(int sflag, int error, const char *reason)
+diedie(int sflag, const char *reason, int error, const char *errstr)
 {
 
 	if (reason != NULL)
 		fputs(reason, stderr);
-	if (error  0)
-		fprintf(stderr, : %s, strerror(error));
+	if (errstr) {
+		fprintf(stderr, : %s, errstr);
+	}
 	fputc('\n', stderr);
 	if (!sflag)
 		rump_daemonize_done(error);
 	exit(1);
 }
 
+__dead static void
+die(int sflag, int error, const char *reason)
+{
+
+	diedie(sflag, reason, error, error == 0 ? NULL : strerror(error));
+}
+
+__dead static void
+die_rumperr(int sflag, int error, const char *reason)
+{
+
+	diedie(sflag, reason, error, error == 0 ? NULL : rump_strerror(error));
+}
+
 static sem_t sigsem;
 static void
 sigreboot(int sig)
@@ -293,6 +309,7 @@ main(int argc, char *argv[])
 			break;
 		}
 		case 'l':
+			setenv(LD_DYNAMIC_WEAK, 1, 1);
 			if (dlopen(optarg, RTLD_LAZY|RTLD_GLOBAL) == NULL) {
 char pb[MAXPATHLEN];
 /* try to mimic linker -l syntax */
@@ -341,12 +358,12 @@ main(int argc, char *argv[])
 	if (!sflag) {
 		error = rump_daemonize_begin();
 		if (error)
-			die(1, error, rump daemonize);
+			die_rumperr(1, error, rump daemonize);
 	}
 
 	error = rump_init();
 	if (error)
-		die(sflag, error, rump init failed);
+		die_rumperr(sflag, error, rump init failed);
 
 	/* load modules */
 	for (i = 0; i  curmod; i++) {
@@ -355,9 +372,14 @@ main(int argc, char *argv[])
 #define ETFSKEY /module.mod
 		if ((error = rump_pub_etfs_register(ETFSKEY,
 		modarray[0], RUMP_ETFS_REG)) != 0)
-			die(sflag, error, module etfs register failed);
+			die_rumperr(sflag,
+			error, module etfs register failed);
 		memset(ml, 0, sizeof(ml));
 		ml.ml_filename = ETFSKEY;
+		/*
+		 * XXX: since this is a syscall, error namespace depends
+		 * on loaded emulations.  revisit and fix.
+		 */
 		if (rump_sys_modctl(RUMP_MODCTL_LOAD, ml) == -1)
 			die(sflag, errno, module load failed);
 		rump_pub_etfs_remove(ETFSKEY);
@@ -400,12 +422,12 @@ main(int argc, char *argv[])
 
 		if ((error = rump_pub_etfs_register_withsize(etfs[i].key,
 		etfs[i].hostpath, etfs[i].type, foffset, flen)) != 0)
-			die(sflag, error, etfs register);
+			die_rumperr(sflag, error, etfs register);
 	}
 
 	error = rump_init_server(serverurl);
 	if (error)
-		die(sflag, error, rump server init failed);
+		die_rumperr(sflag, error, rump server init failed);
 
 	if (!sflag)
 		rump_daemonize_done(RUMP_DAEMONIZE_SUCCESS);



CVS commit: src/usr.bin/rump_allserver

2013-12-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 18 20:50:31 UTC 2013

Modified Files:
src/usr.bin/rump_allserver: rump_allserver.c

Log Message:
Set LD_DYNAMIC_WEAK, required by glibc ld.so for -l params.

(this accidentally slipped in the previous commit already, but
I'm recommitting it to get cvs annotate right)


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/rump_allserver/rump_allserver.c

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

Modified files:

Index: src/usr.bin/rump_allserver/rump_allserver.c
diff -u src/usr.bin/rump_allserver/rump_allserver.c:1.30 src/usr.bin/rump_allserver/rump_allserver.c:1.31
--- src/usr.bin/rump_allserver/rump_allserver.c:1.30	Wed Dec 18 20:48:31 2013
+++ src/usr.bin/rump_allserver/rump_allserver.c	Wed Dec 18 20:50:30 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_allserver.c,v 1.30 2013/12/18 20:48:31 pooka Exp $	*/
+/*	$NetBSD: rump_allserver.c,v 1.31 2013/12/18 20:50:30 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #include rump/rumpuser_port.h
 
 #ifndef lint
-__RCSID($NetBSD: rump_allserver.c,v 1.30 2013/12/18 20:48:31 pooka Exp $);
+__RCSID($NetBSD: rump_allserver.c,v 1.31 2013/12/18 20:50:30 pooka Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -309,7 +309,7 @@ main(int argc, char *argv[])
 			break;
 		}
 		case 'l':
-			setenv(LD_DYNAMIC_WEAK, 1, 1);
+			setenv(LD_DYNAMIC_WEAK, 1, 2);
 			if (dlopen(optarg, RTLD_LAZY|RTLD_GLOBAL) == NULL) {
 char pb[MAXPATHLEN];
 /* try to mimic linker -l syntax */



CVS commit: src/usr.bin/rump_allserver

2013-12-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Dec 18 20:56:32 UTC 2013

Modified Files:
src/usr.bin/rump_allserver: rump_allserver.c

Log Message:
Actually, nevermind with the whole LD_DYNAMIC_WEAK business, forgot
to unset it from the shell before testing.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/rump_allserver/rump_allserver.c

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

Modified files:

Index: src/usr.bin/rump_allserver/rump_allserver.c
diff -u src/usr.bin/rump_allserver/rump_allserver.c:1.31 src/usr.bin/rump_allserver/rump_allserver.c:1.32
--- src/usr.bin/rump_allserver/rump_allserver.c:1.31	Wed Dec 18 20:50:30 2013
+++ src/usr.bin/rump_allserver/rump_allserver.c	Wed Dec 18 20:56:32 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_allserver.c,v 1.31 2013/12/18 20:50:30 pooka Exp $	*/
+/*	$NetBSD: rump_allserver.c,v 1.32 2013/12/18 20:56:32 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #include rump/rumpuser_port.h
 
 #ifndef lint
-__RCSID($NetBSD: rump_allserver.c,v 1.31 2013/12/18 20:50:30 pooka Exp $);
+__RCSID($NetBSD: rump_allserver.c,v 1.32 2013/12/18 20:56:32 pooka Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -309,7 +309,6 @@ main(int argc, char *argv[])
 			break;
 		}
 		case 'l':
-			setenv(LD_DYNAMIC_WEAK, 1, 2);
 			if (dlopen(optarg, RTLD_LAZY|RTLD_GLOBAL) == NULL) {
 char pb[MAXPATHLEN];
 /* try to mimic linker -l syntax */



CVS commit: src/tests/net/bpfilter

2013-12-18 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Wed Dec 18 22:39:16 UTC 2013

Modified Files:
src/tests/net/bpfilter: t_bpfilter.c

Log Message:
Add bpfilterbadmem, bpfilternoinitA and bpfilternoinitX tests.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/net/bpfilter/t_bpfilter.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/bpfilter/t_bpfilter.c
diff -u src/tests/net/bpfilter/t_bpfilter.c:1.6 src/tests/net/bpfilter/t_bpfilter.c:1.7
--- src/tests/net/bpfilter/t_bpfilter.c:1.6	Mon Sep  3 21:27:14 2012
+++ src/tests/net/bpfilter/t_bpfilter.c	Wed Dec 18 22:39:16 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_bpfilter.c,v 1.6 2012/09/03 21:27:14 alnsn Exp $	*/
+/*	$NetBSD: t_bpfilter.c,v 1.7 2013/12/18 22:39:16 alnsn Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: t_bpfilter.c,v 1.6 2012/09/03 21:27:14 alnsn Exp $);
+__RCSID($NetBSD: t_bpfilter.c,v 1.7 2013/12/18 22:39:16 alnsn Exp $);
 
 #include sys/param.h
 #include sys/ioctl.h
@@ -101,6 +101,20 @@ static struct bpf_insn magic_echo_reply_
 	BPF_STMT(BPF_RET+BPF_K, SNAPLEN)
 };
 
+static struct bpf_insn badmem_prog[] = {
+	BPF_STMT(BPF_LD+BPF_MEM, 5),
+	BPF_STMT(BPF_RET+BPF_A, 0),
+};
+
+static struct bpf_insn noinitA_prog[] = {
+	BPF_STMT(BPF_RET+BPF_A, 0),
+};
+
+static struct bpf_insn noinitX_prog[] = {
+	BPF_STMT(BPF_MISC+BPF_TXA, 0),
+	BPF_STMT(BPF_RET+BPF_A, 0),
+};
+
 static uint16_t
 in_cksum(void *data, size_t len)
 {
@@ -266,6 +280,27 @@ magic_ping_test(const char *name, unsign
 	kill(child, SIGKILL);
 }
 
+static int
+send_bpf_prog(const char *ifname, struct bpf_program *prog)
+{
+	struct ifreq ifr;
+	int bpfd, e, rv;
+
+	RZ(rump_init());
+	netcfg_rump_makeshmif(ifname, ifr.ifr_name);
+	netcfg_rump_if(ifr.ifr_name, 10.1.1.20, 255.0.0.0);
+
+	RL(bpfd = rump_sys_open(/dev/bpf, O_RDONLY));
+
+	rv = rump_sys_ioctl(bpfd, BIOCSETF, prog);
+	e = errno;
+
+	rump_sys_close(bpfd);
+	errno = e;
+
+	return rv;
+}
+
 ATF_TC(bpfiltercontig);
 ATF_TC_HEAD(bpfiltercontig, tc)
 {
@@ -298,11 +333,68 @@ ATF_TC_BODY(bpfiltermchain, tc)
 }
 
 
+ATF_TC(bpfilterbadmem);
+ATF_TC_HEAD(bpfilterbadmem, tc)
+{
+
+	atf_tc_set_md_var(tc, descr, Checks that bpf program that 
+	doesn't initialize memomy store is rejected by the kernel);
+	atf_tc_set_md_var(tc, timeout, 30);
+}
+
+ATF_TC_BODY(bpfilterbadmem, tc)
+{
+	struct bpf_program prog;
+
+	prog.bf_len = __arraycount(badmem_prog);
+	prog.bf_insns = badmem_prog;
+	ATF_CHECK_ERRNO(EINVAL, send_bpf_prog(bpfilterbadmem, prog) == -1);
+}
+
+ATF_TC(bpfilternoinitA);
+ATF_TC_HEAD(bpfilternoinitA, tc)
+{
+
+	atf_tc_set_md_var(tc, descr, Checks that bpf program that 
+	doesn't initialize the A register is accepted by the kernel);
+	atf_tc_set_md_var(tc, timeout, 30);
+}
+
+ATF_TC_BODY(bpfilternoinitA, tc)
+{
+	struct bpf_program prog;
+
+	prog.bf_len = __arraycount(noinitA_prog);
+	prog.bf_insns = noinitA_prog;
+	RL(send_bpf_prog(bpfilternoinitA, prog));
+}
+
+ATF_TC(bpfilternoinitX);
+ATF_TC_HEAD(bpfilternoinitX, tc)
+{
+
+	atf_tc_set_md_var(tc, descr, Checks that bpf program that 
+	doesn't initialize the X register is accepted by the kernel);
+	atf_tc_set_md_var(tc, timeout, 30);
+}
+
+ATF_TC_BODY(bpfilternoinitX, tc)
+{
+	struct bpf_program prog;
+
+	prog.bf_len = __arraycount(noinitX_prog);
+	prog.bf_insns = noinitX_prog;
+	RL(send_bpf_prog(bpfilternoinitX, prog));
+}
+
 ATF_TP_ADD_TCS(tp)
 {
 
 	ATF_TP_ADD_TC(tp, bpfiltercontig);
 	ATF_TP_ADD_TC(tp, bpfiltermchain);
+	ATF_TP_ADD_TC(tp, bpfilterbadmem);
+	ATF_TP_ADD_TC(tp, bpfilternoinitA);
+	ATF_TP_ADD_TC(tp, bpfilternoinitX);
 
 	return atf_no_error();
 }



CVS commit: [netbsd-6] src/doc

2013-12-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Dec 18 22:41:45 UTC 2013

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

Log Message:
ticket 975


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.69 -r1.1.2.70 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.69 src/doc/CHANGES-6.2:1.1.2.70
--- src/doc/CHANGES-6.2:1.1.2.69	Wed Dec 18 02:22:19 2013
+++ src/doc/CHANGES-6.2	Wed Dec 18 22:41:45 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.69 2013/12/18 02:22:19 riz Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.70 2013/12/18 22:41:45 bouyer Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -1138,3 +1138,16 @@ sys/arch/xen/xen/evtchn.c			1.70
 but related to spin mutexes. Fixes port-xen/46313.
 	[bouyer, ticket #995]
 
+lib/libc/net/gethnamaddr.c1.79-1.81, 1.84
+lib/libc/net/getnameinfo.31.37-1.40
+lib/libc/net/getnameinfo.c1.51, 1.52, 1.54
+lib/libc/net/hostent.h	1.1, 1.2
+lib/libc/net/sethostent.c1.17-1.19
+
+	Make getnameinfo(3) re-entrant (ahem __ypdomain).
+	Add not advertised reentrant functions: {get,set,end}hostent_r,
+	gethostbyname{,2}_r, gethostbyaddr_r. Make getnameinfo(3) use
+	gethostbyaddr_r(3).
+	Implement no-check-names.
+	[bad, ticket #975]
+



CVS commit: src/external/lgpl3/gmp/lib/libgmp

2013-12-18 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Thu Dec 19 01:07:03 UTC 2013

Modified Files:
src/external/lgpl3/gmp/lib/libgmp: Makefile

Log Message:
When copying an .OBJDIR file, rm -f first.

Arguably there should be some general mechanism, but there isn't yet,
and I hit a build failure at

cp ${.CURDIR}/arch/${GMP_MACHINE_ARCH}/config.m4 ${.OBJDIR}/config.m4

because my source tree is mode 444, and hence my previously-copied
config.m4 was too.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/external/lgpl3/gmp/lib/libgmp/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/lgpl3/gmp/lib/libgmp/Makefile
diff -u src/external/lgpl3/gmp/lib/libgmp/Makefile:1.23 src/external/lgpl3/gmp/lib/libgmp/Makefile:1.24
--- src/external/lgpl3/gmp/lib/libgmp/Makefile:1.23	Wed Dec  4 00:57:21 2013
+++ src/external/lgpl3/gmp/lib/libgmp/Makefile	Thu Dec 19 01:07:03 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.23 2013/12/04 00:57:21 mrg Exp $
+#	$NetBSD: Makefile,v 1.24 2013/12/19 01:07:03 gdt Exp $
 
 .include bsd.init.mk
 
@@ -212,7 +212,7 @@ CLEANFILES+=	${DPSRCS} gen-fac gen-fib g
 dummy:
 	mkdir dummy
 ${.OBJDIR}/config.m4: ${.CURDIR}/arch/${GMP_MACHINE_ARCH}/config.m4
-	cp ${.CURDIR}/arch/${GMP_MACHINE_ARCH}/config.m4 ${.OBJDIR}/config.m4
+	rm -f ${.OBJDIR}/config.m4  cp ${.CURDIR}/arch/${GMP_MACHINE_ARCH}/config.m4 ${.OBJDIR}/config.m4
 
 CLEANFILES+=	config.m4
 clean: cleandummy



CVS commit: src/external/lgpl3/mpfr/lib/libmpfr

2013-12-18 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Thu Dec 19 01:10:19 UTC 2013

Modified Files:
src/external/lgpl3/mpfr/lib/libmpfr: Makefile

Log Message:
rm -f an .objdir file before copying to it.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/external/lgpl3/mpfr/lib/libmpfr/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/lgpl3/mpfr/lib/libmpfr/Makefile
diff -u src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.15 src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.16
--- src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.15	Thu Nov 28 12:36:55 2013
+++ src/external/lgpl3/mpfr/lib/libmpfr/Makefile	Thu Dec 19 01:10:19 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2013/11/28 12:36:55 mrg Exp $
+#	$NetBSD: Makefile,v 1.16 2013/12/19 01:10:19 gdt Exp $
 
 .include bsd.init.mk
 
@@ -511,7 +511,7 @@ WITHOUT_MAN=	yes
 .include bsd.lib.mk
 
 mparam.h: mparam_h.in
-	cp ${.ALLSRC} ${.TARGET}
+	rm -f ${.TARGET}  cp ${.ALLSRC} ${.TARGET}
 
 ${SRCS}: mparam.h
 CLEANFILES+= mparam.h



CVS commit: [matt-nb5-mips64] src/distrib/evbarm

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Dec 19 01:13:27 UTC 2013

Modified Files:
src/distrib/evbarm [matt-nb5-mips64]: Makefile
src/distrib/evbarm/instkernel/instkernel [matt-nb5-mips64]: Makefile

Log Message:
adapt for evbarmv7


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.26.1 src/distrib/evbarm/Makefile
cvs rdiff -u -r1.13.26.1 -r1.13.26.1.4.1 \
src/distrib/evbarm/instkernel/instkernel/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/evbarm/Makefile
diff -u src/distrib/evbarm/Makefile:1.8 src/distrib/evbarm/Makefile:1.8.26.1
--- src/distrib/evbarm/Makefile:1.8	Tue Mar  6 21:56:58 2007
+++ src/distrib/evbarm/Makefile	Thu Dec 19 01:13:27 2013
@@ -1,11 +1,16 @@
-#	$NetBSD: Makefile,v 1.8 2007/03/06 21:56:58 bouyer Exp $
+#	$NetBSD: Makefile,v 1.8.26.1 2013/12/19 01:13:27 matt Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
 
-SUBDIR=		gzboot instkernel cdroms
+SUBDIR=
+.if ${MACHINE_ARCH:Marmv7*} == 
+SUBDIR+=	gzboot
+.endif
+SUBDIR+=	instkernel cdroms
 TARGETS+=	release
 
+
 iso_image:
 	${MAKEDIRTARGET} cdroms iso_image
 

Index: src/distrib/evbarm/instkernel/instkernel/Makefile
diff -u src/distrib/evbarm/instkernel/instkernel/Makefile:1.13.26.1 src/distrib/evbarm/instkernel/instkernel/Makefile:1.13.26.1.4.1
--- src/distrib/evbarm/instkernel/instkernel/Makefile:1.13.26.1	Sat Nov  1 19:44:25 2008
+++ src/distrib/evbarm/instkernel/instkernel/Makefile	Thu Dec 19 01:13:27 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13.26.1 2008/11/01 19:44:25 snj Exp $
+#	$NetBSD: Makefile,v 1.13.26.1.4.1 2013/12/19 01:13:27 matt Exp $
 
 .include bsd.own.mk
 .include ${NETBSDSRCDIR}/distrib/common/Makefile.distrib
@@ -17,6 +17,9 @@ MDSETTARGETS=		ADI_BRH_INSTALL		${RAMDIS
 			IQ80321_INSTALL		${RAMDISK}	-	\
 			TS7200_INSTALL		${RAMDISK}	- 	\
 			TEAMASA_NPWR_INSTALL	${RAMDISK}	-
+.elif ${MACHINE_ARCH:Marmv7*} != 
+MDSETTARGETS=		BCM5301X_INSTALL	${RAMDISK}	- 	\
+			BCM56340_INSTALL	${RAMDISK}	-
 .else
 # Big endian platforms.
 MDSETTARGETS=		ADI_BRH_INSTALL		${RAMDISK}	-



CVS commit: [matt-nb5-mips64] src/common/lib/libc/arch/arm/atomic

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Dec 19 01:12:39 UTC 2013

Modified Files:
src/common/lib/libc/arch/arm/atomic [matt-nb5-mips64]: Makefile.inc
atomic_cas_32.S

Log Message:
Enable ldrex/strex based atomic ops on armv6/armv7


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.8.1 src/common/lib/libc/arch/arm/atomic/Makefile.inc
cvs rdiff -u -r1.2 -r1.2.12.1 \
src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S

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/arm/atomic/Makefile.inc
diff -u src/common/lib/libc/arch/arm/atomic/Makefile.inc:1.7 src/common/lib/libc/arch/arm/atomic/Makefile.inc:1.7.8.1
--- src/common/lib/libc/arch/arm/atomic/Makefile.inc:1.7	Mon Sep 29 08:43:00 2008
+++ src/common/lib/libc/arch/arm/atomic/Makefile.inc	Thu Dec 19 01:12:39 2013
@@ -1,18 +1,37 @@
-#	$NetBSD: Makefile.inc,v 1.7 2008/09/29 08:43:00 ad Exp $
+#	$NetBSD: Makefile.inc,v 1.7.8.1 2013/12/19 01:12:39 matt Exp $
+
+ARMV6= ${CPUFLAGS:M-march=armv7*} ${CPUFLAGS:M-mcpu=cortex*}
+ARMV6+= ${CPUFLAGS:M-march=armv6*} ${CPUFLAGS:M-mcpu=arm11*}
+ARMV6+= ${CFLAGS:M-march=armv7*:} ${CFLAGS:M-mcpu=cortex*}
+ARMV6+= ${CFLAGS:M-march=armv6*:} ${CFLAGS:M-mcpu=arm11*}
+ARMV6+= ${CPPFLAGS:M-march=armv7*:} ${CPPFLAGS:M-mcpu=cortex*}
+ARMV6+= ${CPPFLAGS:M-march=armv6*:} ${CPPFLAGS:M-mcpu=arm11*}
+
 
 .if defined(LIB)  (${LIB} == kern || ${LIB} == c || ${LIB} == pthread)
+.if ${MACHINE_ARCH:Marmv7*} ==   empty(ARMV6)
 
 SRCS+=	atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \
 	atomic_and_32_nv_cas.c atomic_dec_32_cas.c atomic_dec_32_nv_cas.c \
 	atomic_inc_32_cas.c atomic_inc_32_nv_cas.c atomic_or_32_cas.c \
 	atomic_or_32_nv_cas.c atomic_swap_32_cas.c membar_ops_nop.c
 
+.else
+SRCS+=	atomic_add_32.S atomic_and_32.S atomic_cas_32.S
+SRCS+=	atomic_dec_32.S atomic_inc_32.S atomic_or_32.S
+SRCS+=	atomic_swap.S membar_ops.S
+.endif
 .endif
 
 .if defined(LIB)  (${LIB} == c || ${LIB} == pthread)
 
+.if ${MACHINE_ARCH:Marmv7*} ==   empty(ARMV6)
 SRCS+=	atomic_init_testset.c
 SRCS+=	atomic_cas_up.S
 CPPFLAGS+= -D__HAVE_ASM_ATOMIC_CAS_UP
+.else
+SRCS+=	atomic_init_cas.c
+
+.endif
 
 .endif

Index: src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S
diff -u src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S:1.2 src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S:1.2.12.1
--- src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S:1.2	Sat Aug 16 07:12:39 2008
+++ src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S	Thu Dec 19 01:12:39 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_cas_32.S,v 1.2 2008/08/16 07:12:39 matt Exp $	*/
+/*	$NetBSD: atomic_cas_32.S,v 1.2.12.1 2013/12/19 01:12:39 matt Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -48,11 +48,20 @@ ENTRY_NP(_atomic_cas_32)
 	END(_atomic_cas_32)
 
 ATOMIC_OP_ALIAS(atomic_cas_32,_atomic_cas_32)
+ATOMIC_OP_ALIAS(atomic_cas_32_ni,_atomic_cas_32)
 ATOMIC_OP_ALIAS(atomic_cas_uint,_atomic_cas_32)
+ATOMIC_OP_ALIAS(atomic_cas_uint_ni,_atomic_cas_32)
 ATOMIC_OP_ALIAS(atomic_cas_ulong,_atomic_cas_32)
+ATOMIC_OP_ALIAS(atomic_cas_ulong_ni,_atomic_cas_32)
 ATOMIC_OP_ALIAS(atomic_cas_ptr,_atomic_cas_32)
+ATOMIC_OP_ALIAS(atomic_cas_ptr_ni,_atomic_cas_32)
+STRONG_ALIAS(__sync_val_compare_and_swap_4,_atomic_cas_32)
+STRONG_ALIAS(_atomic_cas_32_ni,_atomic_cas_32)
 STRONG_ALIAS(_atomic_cas_uint,_atomic_cas_32)
+STRONG_ALIAS(_atomic_cas_uint_ni,_atomic_cas_32)
 STRONG_ALIAS(_atomic_cas_ulong,_atomic_cas_32)
+STRONG_ALIAS(_atomic_cas_ulong_ni,_atomic_cas_32)
 STRONG_ALIAS(_atomic_cas_ptr,_atomic_cas_32)
+STRONG_ALIAS(_atomic_cas_ptr_ni,_atomic_cas_32)
 
 #endif /* _ARCH_ARM_6 */



CVS commit: [matt-nb5-mips64] src/distrib/sets/lists

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Dec 19 01:14:12 UTC 2013

Added Files:
src/distrib/sets/lists/base [matt-nb5-mips64]: ad.armv7eb
md.evbarm.armv7eb rescue.ad.armv7eb
src/distrib/sets/lists/comp [matt-nb5-mips64]: ad.armv7eb

Log Message:
set changes for armv7eb (similar to armeb)


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/distrib/sets/lists/base/ad.armv7eb \
src/distrib/sets/lists/base/md.evbarm.armv7eb \
src/distrib/sets/lists/base/rescue.ad.armv7eb
cvs rdiff -u -r0 -r1.1.2.1 src/distrib/sets/lists/comp/ad.armv7eb

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

Added files:

Index: src/distrib/sets/lists/base/ad.armv7eb
diff -u /dev/null src/distrib/sets/lists/base/ad.armv7eb:1.1.2.1
--- /dev/null	Thu Dec 19 01:14:12 2013
+++ src/distrib/sets/lists/base/ad.armv7eb	Thu Dec 19 01:14:11 2013
@@ -0,0 +1,11 @@
+# $NetBSD: ad.armv7eb,v 1.1.2.1 2013/12/19 01:14:11 matt Exp $
+#
+# The armeb MACHINE_ARCH never existed in NetBSD as a.out, so we
+#	skip the old a.out compatibility tools.
+#
+./usr/lib/libarm.sobase-sys-shlib
+./usr/lib/libarm.so.0base-sys-shlib
+./usr/lib/libarm.so.0.0base-sys-shlib
+./usr/lib/libpmc.sobase-sys-shlib
+./usr/lib/libpmc.so.0base-sys-shlib
+./usr/lib/libpmc.so.0.0base-sys-shlib
Index: src/distrib/sets/lists/base/md.evbarm.armv7eb
diff -u /dev/null src/distrib/sets/lists/base/md.evbarm.armv7eb:1.1.2.1
--- /dev/null	Thu Dec 19 01:14:12 2013
+++ src/distrib/sets/lists/base/md.evbarm.armv7eb	Thu Dec 19 01:14:11 2013
@@ -0,0 +1,2 @@
+# $NetBSD: md.evbarm.armv7eb,v 1.1.2.1 2013/12/19 01:14:11 matt Exp $
+./usr/mdec/gzboot_ADI_BRH_0x0014.bin	base-sysutil-bin
Index: src/distrib/sets/lists/base/rescue.ad.armv7eb
diff -u /dev/null src/distrib/sets/lists/base/rescue.ad.armv7eb:1.1.2.1
--- /dev/null	Thu Dec 19 01:14:12 2013
+++ src/distrib/sets/lists/base/rescue.ad.armv7eb	Thu Dec 19 01:14:11 2013
@@ -0,0 +1,3 @@
+# $NetBSD: rescue.ad.armv7eb,v 1.1.2.1 2013/12/19 01:14:11 matt Exp $
+# No armeb rescue files.  DO NOT DELETE THIS EMPTY FILE!  If you
+# do, then armeb will incorrectly use the generic arm rescue files.

Index: src/distrib/sets/lists/comp/ad.armv7eb
diff -u /dev/null src/distrib/sets/lists/comp/ad.armv7eb:1.1.2.1
--- /dev/null	Thu Dec 19 01:14:12 2013
+++ src/distrib/sets/lists/comp/ad.armv7eb	Thu Dec 19 01:14:12 2013
@@ -0,0 +1,93 @@
+# $NetBSD: ad.armv7eb,v 1.1.2.1 2013/12/19 01:14:12 matt Exp $
+./usr/include/armcomp-c-include
+./usr/include/arm/ansi.h			comp-c-include
+./usr/include/arm/aout_machdep.h		comp-c-include
+./usr/include/arm/arm26comp-c-include
+./usr/include/arm/arm26/types.h			comp-c-include
+./usr/include/arm/arm32comp-c-include
+./usr/include/arm/arm32/bus.h			comp-obsolete		obsolete
+./usr/include/arm/arm32/frame.h			comp-c-include
+./usr/include/arm/arm32/katelib.h		comp-c-include
+./usr/include/arm/arm32/param.h			comp-c-include
+./usr/include/arm/arm32/pmap.h			comp-c-include
+./usr/include/arm/arm32/psl.h			comp-c-include
+./usr/include/arm/arm32/pte.h			comp-c-include
+./usr/include/arm/arm32/rtc.h			comp-c-include
+./usr/include/arm/arm32/sysarch.h		comp-obsolete		obsolete
+./usr/include/arm/arm32/types.h			comp-c-include
+./usr/include/arm/arm32/vmparam.h		comp-c-include
+./usr/include/arm/armreg.h			comp-c-include
+./usr/include/arm/asm.hcomp-c-include
+./usr/include/arm/atomic.h			comp-c-include
+./usr/include/arm/bswap.h			comp-c-include
+./usr/include/arm/bus.hcomp-c-include
+./usr/include/arm/byte_swap.h			comp-c-include
+./usr/include/arm/cdefs.h			comp-c-include
+./usr/include/arm/cpu.hcomp-c-include
+./usr/include/arm/db_machdep.h			comp-obsolete		obsolete
+./usr/include/arm/disklabel.h			comp-c-include
+./usr/include/arm/disklabel_acorn.h		comp-obsolete		obsolete
+./usr/include/arm/elf_machdep.h			comp-c-include
+./usr/include/arm/endian.h			comp-c-include
+./usr/include/arm/endian_machdep.h		comp-c-include
+./usr/include/arm/float.h			comp-c-include
+./usr/include/arm/footbridge			comp-c-include
+./usr/include/arm/footbridge/footbridge_intr.h	comp-c-include
+./usr/include/arm/fp.hcomp-c-include
+./usr/include/arm/frame.h			comp-c-include
+./usr/include/arm/ieee.h			comp-c-include
+./usr/include/arm/ieeefp.h			comp-c-include
+./usr/include/arm/int_const.h			comp-c-include
+./usr/include/arm/int_fmtio.h			comp-c-include
+./usr/include/arm/int_limits.h			comp-c-include
+./usr/include/arm/int_mwgwtypes.h		comp-c-include
+./usr/include/arm/int_types.h			comp-c-include
+./usr/include/arm/iomdcomp-obsolete		obsolete
+./usr/include/arm/iomd/vidc.h			comp-obsolete		obsolete
+./usr/include/arm/ipkdb.h			comp-obsolete		obsolete
+./usr/include/arm/kcore.h			comp-c-include
+./usr/include/arm/limits.h			comp-c-include
+./usr/include/arm/lock.h			comp-c-include
+./usr/include/arm/math.h			comp-c-include
+./usr/include/arm/mcontext.h			comp-c-include

CVS commit: [matt-nb5-mips64] src/etc

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Dec 19 01:15:09 UTC 2013

Modified Files:
src/etc [matt-nb5-mips64]: MAKEDEV.awk Makefile
src/etc/mtree [matt-nb5-mips64]: Makefile NetBSD.dist
Added Files:
src/etc/mtree [matt-nb5-mips64]: NetBSD.dist.mips64eb
NetBSD.dist.mips64el

Log Message:
Deal with MACHINE_ARCH of armv7/armv7eb.
Split out mips64 compat dirs.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.20.10.1 src/etc/MAKEDEV.awk
cvs rdiff -u -r1.359.2.3.4.2 -r1.359.2.3.4.3 src/etc/Makefile
cvs rdiff -u -r1.5 -r1.5.40.1 src/etc/mtree/Makefile
cvs rdiff -u -r1.385.2.1.4.2 -r1.385.2.1.4.3 src/etc/mtree/NetBSD.dist
cvs rdiff -u -r0 -r1.7.2.2 src/etc/mtree/NetBSD.dist.mips64eb
cvs rdiff -u -r0 -r1.8.2.2 src/etc/mtree/NetBSD.dist.mips64el

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

Modified files:

Index: src/etc/MAKEDEV.awk
diff -u src/etc/MAKEDEV.awk:1.20 src/etc/MAKEDEV.awk:1.20.10.1
--- src/etc/MAKEDEV.awk:1.20	Wed Apr 30 13:10:49 2008
+++ src/etc/MAKEDEV.awk	Thu Dec 19 01:15:09 2013
@@ -1,6 +1,6 @@
 #!/usr/bin/awk -
 #
-#	$NetBSD: MAKEDEV.awk,v 1.20 2008/04/30 13:10:49 martin Exp $
+#	$NetBSD: MAKEDEV.awk,v 1.20.10.1 2013/12/19 01:15:09 matt Exp $
 #
 # Copyright (c) 2003 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -55,7 +55,7 @@ BEGIN {
 
 	# file with major definitions
 	majors[0] = conf/majors
-	if ((maarch == arm || maarch == armeb)  system(test -f ' top arch/ machine /conf/majors. machine ') != 0)
+	if ((maarch == arm || maarch == armeb || maarch == armv7 || maarch == armv7eb)  system(test -f ' top arch/ machine /conf/majors. machine ') != 0)
 		majors[1] = arch/arm/conf/majors.arm32;
 	else if (machine == sbmips)
 		majors[1] = arch/evbmips/conf/majors.evbmips;
@@ -211,7 +211,7 @@ BEGIN {
 	print # Generated from:
 
 	# MAKEDEV.awk (this script) RCS Id
-	ARCSID = $NetBSD: MAKEDEV.awk,v 1.20 2008/04/30 13:10:49 martin Exp $
+	ARCSID = $NetBSD: MAKEDEV.awk,v 1.20.10.1 2013/12/19 01:15:09 matt Exp $
 	gsub(/\$/, , ARCSID)
 	print #	 ARCSID
 	

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.359.2.3.4.2 src/etc/Makefile:1.359.2.3.4.3
--- src/etc/Makefile:1.359.2.3.4.2	Wed Apr 21 05:21:22 2010
+++ src/etc/Makefile	Thu Dec 19 01:15:09 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.359.2.3.4.2 2010/04/21 05:21:22 matt Exp $
+#	$NetBSD: Makefile,v 1.359.2.3.4.3 2013/12/19 01:15:09 matt Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -401,12 +401,21 @@ distrib-dirs: .PHONY check_DESTDIR
 # XXX: It would be nice if a single mtree invocation could both
 # append to the metalog and do real work.  Instead, we have to
 # repeat the command twice in slightly different ways.
-	${TOOL_MTREE} -def ${.CURDIR}/mtree/NetBSD.dist -N ${.CURDIR} \
-	-p ${DESTDIR}/ -U ${TOOL_MTREE.unpriv}
+	${TOOL_MTREE} -def ${.CURDIR}/mtree/NetBSD.dist \
+	-N ${.CURDIR} -p ${DESTDIR}/ -U ${TOOL_MTREE.unpriv}
+.if exists(${.CURDIR}/mtree/NetBSD.dist.${MACHINE_ARCH})
+	${TOOL_MTREE} -def ${.CURDIR}/mtree/NetBSD.dist.${MACHINE_ARCH} \
+	-N ${.CURDIR} -p ${DESTDIR}/ -U ${TOOL_MTREE.unpriv}
+.endif
 .if ${MKUNPRIVED} != no		# {
-	${TOOL_MTREE} -def ${.CURDIR}/mtree/NetBSD.dist -N ${.CURDIR} \
-	-p ${DESTDIR}/ -C -k all | \
+	${TOOL_MTREE} -def ${.CURDIR}/mtree/NetBSD.dist \
+	-N ${.CURDIR} -p ${DESTDIR}/ -C -k all | \
+	${TOOL_AWK} '/ optional/ {next} // {print}' | ${METALOG.add}
+.if exists(${.CURDIR}/mtree/NetBSD.dist.${MACHINE_ARCH})
+	${TOOL_MTREE} -def ${.CURDIR}/mtree/NetBSD.dist.${MACHINE_ARCH} \
+	-N ${.CURDIR} -p ${DESTDIR}/ -C -k all | \
 	${TOOL_AWK} '/ optional/ {next} // {print}' | ${METALOG.add}
+.endif
 .endif	# MKUNPRIVED			# }
 .endif	# DISTRIBUTION_DONE		# }
 

Index: src/etc/mtree/Makefile
diff -u src/etc/mtree/Makefile:1.5 src/etc/mtree/Makefile:1.5.40.1
--- src/etc/mtree/Makefile:1.5	Sun May 16 09:53:09 2004
+++ src/etc/mtree/Makefile	Thu Dec 19 01:15:09 2013
@@ -1,6 +1,9 @@
-#	$NetBSD: Makefile,v 1.5 2004/05/16 09:53:09 lukem Exp $
+#	$NetBSD: Makefile,v 1.5.40.1 2013/12/19 01:15:09 matt Exp $
 
 CONFIGFILES=	NetBSD.dist special
+.if exists(${.CURDIR}/NetBSD.dist.${MACHINE_ARCH})
+CONFIGFILES+=	NetBSD.dist.${MACHINE_ARCH}
+.endif
 FILESDIR=	/etc/mtree
 
 .include bsd.prog.mk

Index: src/etc/mtree/NetBSD.dist
diff -u src/etc/mtree/NetBSD.dist:1.385.2.1.4.2 src/etc/mtree/NetBSD.dist:1.385.2.1.4.3
--- src/etc/mtree/NetBSD.dist:1.385.2.1.4.2	Wed Apr 21 05:21:23 2010
+++ src/etc/mtree/NetBSD.dist	Thu Dec 19 01:15:09 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist,v 1.385.2.1.4.2 2010/04/21 05:21:23 matt Exp $
+#	$NetBSD: NetBSD.dist,v 1.385.2.1.4.3 2013/12/19 01:15:09 matt Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -511,12 +511,6 @@
 ./usr/include/ufs/ufs
 ./usr/include/uvm
 ./usr/lib
-./usr/lib/64

CVS commit: [matt-nb5-mips64] src/gnu/lib

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Dec 19 01:16:13 UTC 2013

Modified Files:
src/gnu/lib/libgcc4/libgcov [matt-nb5-mips64]: Makefile
src/gnu/lib/libiberty [matt-nb5-mips64]: Makefile
src/gnu/lib/libsupc++4 [matt-nb5-mips64]: Makefile.common

Log Message:
support for armv7/armv7eb MACHINE_ARCH


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.8.1 src/gnu/lib/libgcc4/libgcov/Makefile
cvs rdiff -u -r1.10.30.1 -r1.10.30.2 src/gnu/lib/libiberty/Makefile
cvs rdiff -u -r1.1 -r1.1.32.1 src/gnu/lib/libsupc++4/Makefile.common

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

Modified files:

Index: src/gnu/lib/libgcc4/libgcov/Makefile
diff -u src/gnu/lib/libgcc4/libgcov/Makefile:1.3 src/gnu/lib/libgcc4/libgcov/Makefile:1.3.8.1
--- src/gnu/lib/libgcc4/libgcov/Makefile:1.3	Mon Oct  6 14:20:12 2008
+++ src/gnu/lib/libgcc4/libgcov/Makefile	Thu Dec 19 01:16:13 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2008/10/06 14:20:12 tron Exp $
+#	$NetBSD: Makefile,v 1.3.8.1 2013/12/19 01:16:13 matt Exp $
 
 REQUIRETOOLS=	yes
 NOPIC=		# defined
@@ -8,17 +8,18 @@ NOLINT=		# defined
 LIB=		gcov
 
 .include bsd.own.mk
+.include ../../Makefile.inc
 
-.if exists(${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk)  ${MKGCC} != no
+.if exists(${.CURDIR}/arch/${GCC_MACHINE_ARCH}/defs.mk)  ${MKGCC} != no
 
-.include ${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk
+.include ${.CURDIR}/arch/${GCC_MACHINE_ARCH}/defs.mk
 
 LIBGCOVSRCS=	${G_LIBGCOV:=.c}
 
-CPPFLAGS+=	-I${.CURDIR}/arch/${MACHINE_ARCH}
+CPPFLAGS+=	-I${.CURDIR}/arch/${GCC_MACHINE_ARCH}
 CPPFLAGS+=	-Wno-stack-protector
 
-DPSRCS+=	${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk
+DPSRCS+=	${.CURDIR}/arch/${GCC_MACHINE_ARCH}/defs.mk
 SRCS+=		${LIBGCOVSRCS}
 
 CLEANFILES+=	${LIBGCOVSRCS}

Index: src/gnu/lib/libiberty/Makefile
diff -u src/gnu/lib/libiberty/Makefile:1.10.30.1 src/gnu/lib/libiberty/Makefile:1.10.30.2
--- src/gnu/lib/libiberty/Makefile:1.10.30.1	Wed Dec 18 18:41:39 2013
+++ src/gnu/lib/libiberty/Makefile	Thu Dec 19 01:16:13 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10.30.1 2013/12/18 18:41:39 matt Exp $
+#	$NetBSD: Makefile,v 1.10.30.2 2013/12/19 01:16:13 matt Exp $
 
 NOLINT=		# defined
 NOPROFILE=	# defined
@@ -6,10 +6,11 @@ NOPIC=		# defined
 NOLINKLIB=	# defined
 
 .include bsd.own.mk
+.include ../Makefile.inc
 
 LIB=		iberty
 
-.include ${.CURDIR}/arch/${MACHINE_ARCH:S/armv7/arm/}/defs.mk
+.include ${.CURDIR}/arch/${GCC_MACHINE_ARCH}/defs.mk
 
 COPTS.argv.c = -Wno-stack-protector
 COPTS.cp-demangle.c = -Wno-stack-protector
@@ -21,7 +22,7 @@ DIST=		${NETBSDSRCDIR}/gnu/dist/binutils
 SRCS=		${G_REQUIRED_OFILES:.o=.c} ${G_EXTRA_OFILES:.o=.c} \
 		${G_LIBOBJS:.o=.c} ${G_ALLOCA:.o=.c}
 
-CPPFLAGS+=	-DHAVE_CONFIG_H -I${.CURDIR}/arch/${MACHINE_ARCH} \
+CPPFLAGS+=	-DHAVE_CONFIG_H -I${.CURDIR}/arch/${GCC_MACHINE_ARCH} \
 		-I${DIST}/include
 
 .PATH: ${DIST}/libiberty

Index: src/gnu/lib/libsupc++4/Makefile.common
diff -u src/gnu/lib/libsupc++4/Makefile.common:1.1 src/gnu/lib/libsupc++4/Makefile.common:1.1.32.1
--- src/gnu/lib/libsupc++4/Makefile.common:1.1	Wed May 10 22:53:51 2006
+++ src/gnu/lib/libsupc++4/Makefile.common	Thu Dec 19 01:16:13 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.common,v 1.1 2006/05/10 22:53:51 mrg Exp $
+#	$NetBSD: Makefile.common,v 1.1.32.1 2013/12/19 01:16:13 matt Exp $
 
 DIST=		${NETBSDSRCDIR}/gnu/dist/gcc4
 GNUHOSTDIST=	${DIST}
@@ -10,7 +10,7 @@ LIBSUPCXXSRCS=	${G_LIBSUPCXX_SOURCES} ${
 CPPFLAGS+=	-I${DIST}/gcc
 CPPFLAGS+=	-I${DIST}/include
 CPPFLAGS+=	-I${DIST}/libstdc++-v3/libsupc++
-CPPFLAGS+=	-I${.CURDIR}/../libstdc++-v3_4/arch/${MACHINE_ARCH} -I.
+CPPFLAGS+=	-I${.CURDIR}/../libstdc++-v3_4/arch/${GCC_MACHINE_ARCH} -I.
 CPPFLAGS+=	-DHAVE_STDLIB_H -DHAVE_STRING_H
 
 CPPFLAGS.cp-demangle.c=-DIN_GLIBCPP_V3



CVS commit: [matt-nb5-mips64] src/sys/arch/arm/include

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Dec 19 01:17:06 UTC 2013

Modified Files:
src/sys/arch/arm/include [matt-nb5-mips64]: cdefs.h

Log Message:
Pull from HEAD (for post armv6 defines).


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.38.1 src/sys/arch/arm/include/cdefs.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/include/cdefs.h
diff -u src/sys/arch/arm/include/cdefs.h:1.3 src/sys/arch/arm/include/cdefs.h:1.3.38.1
--- src/sys/arch/arm/include/cdefs.h:1.3	Wed Oct 17 19:53:41 2007
+++ src/sys/arch/arm/include/cdefs.h	Thu Dec 19 01:17:06 2013
@@ -1,15 +1,31 @@
-/*	$NetBSD: cdefs.h,v 1.3 2007/10/17 19:53:41 garbled Exp $	*/
+/*	$NetBSD: cdefs.h,v 1.3.38.1 2013/12/19 01:17:06 matt Exp $	*/
 
-#ifndef	_MACHINE_CDEFS_H_
-#define	_MACHINE_CDEFS_H_
+#ifndef	_ARM_CDEFS_H_
+#define	_ARM_CDEFS_H_
 
-#if defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6J__)
+#if defined (__ARM_ARCH_7__) || defined (__ARM_ARCH_7A__) || \
+defined (__ARM_ARCH_7R__) || defined (__ARM_ARCH_7M__) || \
+defined (__ARM_ARCH_7EM__) /* 7R, 7M, 7EM are for non MMU arms */
+#define _ARM_ARCH_7
+#endif
+
+#if defined (_ARM_ARCH_7) || defined (__ARM_ARCH_6T2__)
+#define _ARM_ARCH_T2		/* Thumb2 */
+#endif
+
+#if defined (_ARM_ARCH_T2) || defined (__ARM_ARCH_6__) || \
+defined (__ARM_ARCH_6J__) || defined (__ARM_ARCH_6K__) || \
+defined (__ARM_ARCH_6Z__) || defined (__ARM_ARCH_6ZK__) || \
+defined (__ARM_ARCH_6ZM__)
 #define _ARM_ARCH_6
 #endif
 
-#if defined (_ARM_ARCH_6) || defined (__ARM_ARCH_5__) || \
-defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5TE__) || \
-defined (__ARM_ARCH_5TEJ__)
+#if defined (_ARM_ARCH_6) || defined (__ARM_ARCH_5T__) || \
+defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5TEJ__)
+#define _ARM_ARCH_5T
+#endif
+
+#if defined (_ARM_ARCH_6) || defined (_ARM_ARCH_5T) || defined (__ARM_ARCH_5__)
 #define _ARM_ARCH_5
 #endif
 
@@ -17,4 +33,17 @@
 #define _ARM_ARCH_4T
 #endif
 
-#endif /* !_MACHINE_CDEFS_H_ */
+#if defined (_ARM_ARCH_T2) || \
+(!defined (__thumb__)  \
+ (defined (_ARM_ARCH_6) || defined (__ARM_ARCH_5TE__) || \
+  defined (__ARM_ARCH_5TEJ__)))
+#define	_ARM_ARCH_DWORD_OK
+#endif
+
+#ifdef __ARM_EABI__
+#define __ALIGNBYTES		(8 - 1)
+#else
+#define __ALIGNBYTES		(sizeof(int) - 1)
+#endif
+
+#endif /* !_ARM_CDEFS_H_ */



CVS commit: [matt-nb5-mips64] src/sys/arch/evbarm/include

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Dec 19 01:18:01 UTC 2013

Modified Files:
src/sys/arch/evbarm/include [matt-nb5-mips64]: vmparam.h

Log Message:
compat in libc needs some uvm stuff which needs VM_NFREELIST defined.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.25.18.1 src/sys/arch/evbarm/include/vmparam.h

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

Modified files:

Index: src/sys/arch/evbarm/include/vmparam.h
diff -u src/sys/arch/evbarm/include/vmparam.h:1.25 src/sys/arch/evbarm/include/vmparam.h:1.25.18.1
--- src/sys/arch/evbarm/include/vmparam.h:1.25	Sun Apr 27 18:58:46 2008
+++ src/sys/arch/evbarm/include/vmparam.h	Thu Dec 19 01:18:01 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.25 2008/04/27 18:58:46 matt Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.25.18.1 2013/12/19 01:18:01 matt Exp $	*/
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -32,7 +32,7 @@
 #ifndef	_ARM32_VMPARAM_H_
 #define	_ARM32_VMPARAM_H_
 
-#ifdef _KERNEL
+#if defined(_KERNEL) || 1
 
 #include arm/arm32/vmparam.h
 



CVS commit: [matt-nb5-mips64] src/sys/arch/evbarm/stand/gzboot

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Dec 19 01:18:44 UTC 2013

Modified Files:
src/sys/arch/evbarm/stand/gzboot [matt-nb5-mips64]: Makefile

Log Message:
Make endian check more generic


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.10.1 src/sys/arch/evbarm/stand/gzboot/Makefile

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

Modified files:

Index: src/sys/arch/evbarm/stand/gzboot/Makefile
diff -u src/sys/arch/evbarm/stand/gzboot/Makefile:1.9 src/sys/arch/evbarm/stand/gzboot/Makefile:1.9.10.1
--- src/sys/arch/evbarm/stand/gzboot/Makefile:1.9	Thu Oct 30 15:33:42 2008
+++ src/sys/arch/evbarm/stand/gzboot/Makefile	Thu Dec 19 01:18:44 2013
@@ -1,6 +1,6 @@
-#	$NetBSD: Makefile,v 1.9 2008/10/30 15:33:42 cliff Exp $
+#	$NetBSD: Makefile,v 1.9.10.1 2013/12/19 01:18:44 matt Exp $
 
-.if ${MACHINE_ARCH} == arm
+.if ${MACHINE_ARCH:Marm*eb} == 
 # Little endian platforms
 SUBDIR=  ADI_BRH_flash_0x0014
 SUBDIR+=  GEMINI_dram_0x0160



CVS commit: [matt-nb5-mips64] src/sys/lkm/arch/arm

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Dec 19 01:19:26 UTC 2013

Modified Files:
src/sys/lkm/arch/arm [matt-nb5-mips64]: lkmtramp.awk lkmwrap.awk

Log Message:
Update to use -Wl and change \. to just .


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.90.1 src/sys/lkm/arch/arm/lkmtramp.awk \
src/sys/lkm/arch/arm/lkmwrap.awk

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

Modified files:

Index: src/sys/lkm/arch/arm/lkmtramp.awk
diff -u src/sys/lkm/arch/arm/lkmtramp.awk:1.2 src/sys/lkm/arch/arm/lkmtramp.awk:1.2.90.1
--- src/sys/lkm/arch/arm/lkmtramp.awk:1.2	Sun Dec 11 12:24:46 2005
+++ src/sys/lkm/arch/arm/lkmtramp.awk	Thu Dec 19 01:19:26 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: lkmtramp.awk,v 1.2 2005/12/11 12:24:46 christos Exp $
+#	$NetBSD: lkmtramp.awk,v 1.2.90.1 2013/12/19 01:19:26 matt Exp $
 #
 BEGIN {
 	print #include machine/asm.h
@@ -7,7 +7,7 @@ BEGIN {
 $2 == R_ARM_PC24 {
 	if (x[$3] != )
 		next;
-	if ($3 == \.text)
+	if ($3 == .text)
 		next;
 	print ENTRY(__wrap_$3)
 	print \tldr\tpc,1f
Index: src/sys/lkm/arch/arm/lkmwrap.awk
diff -u src/sys/lkm/arch/arm/lkmwrap.awk:1.2 src/sys/lkm/arch/arm/lkmwrap.awk:1.2.90.1
--- src/sys/lkm/arch/arm/lkmwrap.awk:1.2	Sun Dec 11 12:24:46 2005
+++ src/sys/lkm/arch/arm/lkmwrap.awk	Thu Dec 19 01:19:26 2013
@@ -1,10 +1,10 @@
-#	$NetBSD: lkmwrap.awk,v 1.2 2005/12/11 12:24:46 christos Exp $
+#	$NetBSD: lkmwrap.awk,v 1.2.90.1 2013/12/19 01:19:26 matt Exp $
 
 $2 == R_ARM_PC24 {
 	if (x[$3] != )
 		next;
-	if ($3 == \.text)
+	if ($3 == .text)
 		next
-	printf  --wrap $3;
+	printf  -Wl,--wrap,$3;
 	x[$3]=.;
 }



CVS commit: [matt-nb5-mips64] src/sys

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Dec 19 01:20:41 UTC 2013

Modified Files:
src/sys/rump/librump/rumpkern [matt-nb5-mips64]: vm.c
src/sys/ufs/lfs [matt-nb5-mips64]: lfs_bio.c

Log Message:
Adapt to new uvm_estimatepageable arguments


To generate a diff of this commit:
cvs rdiff -u -r1.41.8.2 -r1.41.8.3 src/sys/rump/librump/rumpkern/vm.c
cvs rdiff -u -r1.114 -r1.114.18.1 src/sys/ufs/lfs/lfs_bio.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/rump/librump/rumpkern/vm.c
diff -u src/sys/rump/librump/rumpkern/vm.c:1.41.8.2 src/sys/rump/librump/rumpkern/vm.c:1.41.8.3
--- src/sys/rump/librump/rumpkern/vm.c:1.41.8.2	Fri Feb 10 06:00:55 2012
+++ src/sys/rump/librump/rumpkern/vm.c	Thu Dec 19 01:20:41 2013
@@ -519,7 +519,8 @@ uvm_page_unbusy(struct vm_page **pgs, in
 }
 
 void
-uvm_estimatepageable(u_int *active, u_int *inactive)
+uvm_estimatepageable(const struct uvm_pggroup *pg,
+u_int *active, u_int *inactive)
 {
 
 	/* XXX: guessing game */

Index: src/sys/ufs/lfs/lfs_bio.c
diff -u src/sys/ufs/lfs/lfs_bio.c:1.114 src/sys/ufs/lfs/lfs_bio.c:1.114.18.1
--- src/sys/ufs/lfs/lfs_bio.c:1.114	Tue May  6 18:43:45 2008
+++ src/sys/ufs/lfs/lfs_bio.c	Thu Dec 19 01:20:41 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_bio.c,v 1.114 2008/05/06 18:43:45 ad Exp $	*/
+/*	$NetBSD: lfs_bio.c,v 1.114.18.1 2013/12/19 01:20:41 matt Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2008 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: lfs_bio.c,v 1.114 2008/05/06 18:43:45 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: lfs_bio.c,v 1.114.18.1 2013/12/19 01:20:41 matt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -842,7 +842,7 @@ lfs_wait_pages(void)
 {
 	int active, inactive;
 
-	uvm_estimatepageable(active, inactive);
+	uvm_estimatepageable(NULL, active, inactive);
 	return LFS_WAIT_RESOURCE(active + inactive + uvmexp.free, 1);
 }
 
@@ -851,6 +851,6 @@ lfs_max_pages(void)
 {
 	int active, inactive;
 
-	uvm_estimatepageable(active, inactive);
+	uvm_estimatepageable(NULL, active, inactive);
 	return LFS_MAX_RESOURCE(active + inactive + uvmexp.free, 1);
 }



CVS commit: [matt-nb5-mips64] src/sys/uvm

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Dec 19 01:22:02 UTC 2013

Modified Files:
src/sys/uvm [matt-nb5-mips64]: uvm_pglist.h

Log Message:
error out if VM_NFREELIST isn't defined


To generate a diff of this commit:
cvs rdiff -u -r1.7.16.5 -r1.7.16.6 src/sys/uvm/uvm_pglist.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/uvm/uvm_pglist.h
diff -u src/sys/uvm/uvm_pglist.h:1.7.16.5 src/sys/uvm/uvm_pglist.h:1.7.16.6
--- src/sys/uvm/uvm_pglist.h:1.7.16.5	Thu Feb 16 04:20:46 2012
+++ src/sys/uvm/uvm_pglist.h	Thu Dec 19 01:22:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_pglist.h,v 1.7.16.5 2012/02/16 04:20:46 matt Exp $	*/
+/*	$NetBSD: uvm_pglist.h,v 1.7.16.6 2013/12/19 01:22:02 matt Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -34,6 +34,9 @@
 
 #ifndef VM_NFREELIST
 #include machine/vmparam.h
+#ifndef VM_NFREELIST
+#error machine/vmparam.h did not define VM_NFREELIST
+#endif
 #endif
 
 /*



CVS commit: [matt-nb5-mips64] src/usr.bin/ldd

2013-12-18 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Dec 19 01:26:38 UTC 2013

Modified Files:
src/usr.bin/ldd [matt-nb5-mips64]: Makefile.common

Log Message:
Match any arm


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2.4.1 -r1.1.2.2.4.2 src/usr.bin/ldd/Makefile.common

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

Modified files:

Index: src/usr.bin/ldd/Makefile.common
diff -u src/usr.bin/ldd/Makefile.common:1.1.2.2.4.1 src/usr.bin/ldd/Makefile.common:1.1.2.2.4.2
--- src/usr.bin/ldd/Makefile.common:1.1.2.2.4.1	Fri Feb 17 07:43:45 2012
+++ src/usr.bin/ldd/Makefile.common	Thu Dec 19 01:26:37 2013
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.common,v 1.1.2.2.4.1 2012/02/17 07:43:45 matt Exp $
+#	$NetBSD: Makefile.common,v 1.1.2.2.4.2 2013/12/19 01:26:37 matt Exp $
 
 LDELFSO=${NETBSDSRCDIR}/libexec/ld.elf_so
 CPPFLAGS+= -I${LDELFSO} -DLIBDIR=\${LIBDIR}\
@@ -7,7 +7,7 @@ CPPFLAGS+= -D_RTLD_SOURCE
 .PATH: ${LDELFSO}
 
 .if (${MACHINE_ARCH} == sparc) || (${MACHINE_ARCH} == sparc64) || \
-(${MACHINE_ARCH} == arm) || (${MACHINE_ARCH} == m68k) || \
+(${MACHINE_ARCH:M*arm*} != ) || (${MACHINE_ARCH} == m68k) || \
 (${MACHINE_ARCH} == powerpc) || (${MACHINE_ARCH:Mmips*} != )
 CPPFLAGS+= -DVARPSZ
 .endif



CVS commit: src/sbin/gpt

2013-12-18 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Thu Dec 19 06:46:51 UTC 2013

Modified Files:
src/sbin/gpt: Makefile gpt.8 gpt.c gpt.h
Added Files:
src/sbin/gpt: backup.c

Log Message:
Add the backup subcommand.  It dumps the contents of the partition
tables as a plist, which is readable by the restore subcommand.

XXX restore subcommand forthcoming


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sbin/gpt/Makefile
cvs rdiff -u -r0 -r1.1 src/sbin/gpt/backup.c
cvs rdiff -u -r1.26 -r1.27 src/sbin/gpt/gpt.8 src/sbin/gpt/gpt.c
cvs rdiff -u -r1.9 -r1.10 src/sbin/gpt/gpt.h

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

Modified files:

Index: src/sbin/gpt/Makefile
diff -u src/sbin/gpt/Makefile:1.6 src/sbin/gpt/Makefile:1.7
--- src/sbin/gpt/Makefile:1.6	Mon Dec  9 08:03:17 2013
+++ src/sbin/gpt/Makefile	Thu Dec 19 06:46:51 2013
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.6 2013/12/09 08:03:17 jnemeth Exp $
+# $NetBSD: Makefile,v 1.7 2013/12/19 06:46:51 jnemeth Exp $
 # $FreeBSD: src/sbin/gpt/Makefile,v 1.7 2005/09/01 02:49:20 marcel Exp $
 
 PROG=	gpt
-SRCS=	add.c biosboot.c create.c destroy.c gpt.c label.c map.c migrate.c \
-	recover.c remove.c resize.c set.c show.c unset.c
+SRCS=	add.c backup.c biosboot.c create.c destroy.c gpt.c label.c map.c \
+	migrate.c recover.c remove.c resize.c set.c show.c unset.c
 MAN=	gpt.8
 
 LDADD+=	-lprop -lutil

Index: src/sbin/gpt/gpt.8
diff -u src/sbin/gpt/gpt.8:1.26 src/sbin/gpt/gpt.8:1.27
--- src/sbin/gpt/gpt.8:1.26	Mon Dec  9 09:22:44 2013
+++ src/sbin/gpt/gpt.8	Thu Dec 19 06:46:51 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: gpt.8,v 1.26 2013/12/09 09:22:44 wiz Exp $
+.\ $NetBSD: gpt.8,v 1.27 2013/12/19 06:46:51 jnemeth Exp $
 .\
 .\ Copyright (c) 2002 Marcel Moolenaar
 .\ All rights reserved.
@@ -151,6 +151,16 @@ accepts
 and
 .Cm windows
 as aliases for the most commonly used partition types.
+.\  backup 
+.It Nm Ic backup Ar device ...
+The
+.Ic backup
+command dumps the MBR or (PMBR) and GPT partition tables to standard
+output in a format to be used by the
+.Ic restore
+command.
+The format is a plist.
+It should not be modified.
 .\  biosboot 
 .It Nm Ic biosboot Oo Fl c Ar bootcode Oc Oo Fl i Ar index Oc Ar device ...
 The
Index: src/sbin/gpt/gpt.c
diff -u src/sbin/gpt/gpt.c:1.26 src/sbin/gpt/gpt.c:1.27
--- src/sbin/gpt/gpt.c:1.26	Mon Dec  9 08:03:17 2013
+++ src/sbin/gpt/gpt.c	Thu Dec 19 06:46:51 2013
@@ -31,7 +31,7 @@
 __FBSDID($FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $);
 #endif
 #ifdef __RCSID
-__RCSID($NetBSD: gpt.c,v 1.26 2013/12/09 08:03:17 jnemeth Exp $);
+__RCSID($NetBSD: gpt.c,v 1.27 2013/12/19 06:46:51 jnemeth Exp $);
 #endif
 
 #include sys/param.h
@@ -717,6 +717,7 @@ static struct {
 	const char *name;
 } cmdsw[] = {
 	{ cmd_add, add },
+	{ cmd_backup, backup },
 	{ cmd_biosboot, biosboot },
 	{ cmd_create, create },
 	{ cmd_destroy, destroy },
@@ -737,9 +738,9 @@ static struct {
 __dead static void
 usage(void)
 {
-	extern const char addmsg1[], addmsg2[], biosbootmsg[], createmsg[];
-	extern const char destroymsg[], labelmsg1[], labelmsg2[], labelmsg3[];
-	extern const char migratemsg[], recovermsg[], removemsg1[];
+	extern const char addmsg1[], addmsg2[], backupmsg[], biosbootmsg[];
+	extern const char createmsg[], destroymsg[], labelmsg1[], labelmsg2[];
+	extern const char labelmsg3[], migratemsg[], recovermsg[], removemsg1[];
 	extern const char removemsg2[], resizemsg[], setmsg[], showmsg[];
 	extern const char unsetmsg[];
 
@@ -751,6 +752,7 @@ usage(void)
 	   %s %s\n
 	   %s %s\n
 	   %s %s\n
+	   %s %s\n
 	   %*s %s\n
 	   %s %s\n
 	   %s %s\n
@@ -762,6 +764,7 @@ usage(void)
 	   %s %s\n,
 	getprogname(), addmsg1,
 	getprogname(), addmsg2,
+	getprogname(), backupmsg,
 	getprogname(), biosbootmsg,
 	getprogname(), createmsg,
 	getprogname(), destroymsg,

Index: src/sbin/gpt/gpt.h
diff -u src/sbin/gpt/gpt.h:1.9 src/sbin/gpt/gpt.h:1.10
--- src/sbin/gpt/gpt.h:1.9	Mon Dec  9 08:03:17 2013
+++ src/sbin/gpt/gpt.h	Thu Dec 19 06:46:51 2013
@@ -80,6 +80,7 @@ uint8_t *utf16_to_utf8(uint16_t *);
 void	utf8_to_utf16(const uint8_t *, uint16_t *, size_t);
 
 int	cmd_add(int, char *[]);
+int	cmd_backup(int, char *[]);
 int	cmd_biosboot(int, char *[]);
 int	cmd_create(int, char *[]);
 int	cmd_destroy(int, char *[]);

Added files:

Index: src/sbin/gpt/backup.c
diff -u /dev/null src/sbin/gpt/backup.c:1.1
--- /dev/null	Thu Dec 19 06:46:51 2013
+++ src/sbin/gpt/backup.c	Thu Dec 19 06:46:51 2013
@@ -0,0 +1,308 @@
+/*-
+ * Copyright (c) 2002 Marcel Moolenaar
+ * 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 

CVS commit: src/sbin/gpt

2013-12-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Dec 19 07:49:50 UTC 2013

Modified Files:
src/sbin/gpt: gpt.8

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sbin/gpt/gpt.8

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

Modified files:

Index: src/sbin/gpt/gpt.8
diff -u src/sbin/gpt/gpt.8:1.27 src/sbin/gpt/gpt.8:1.28
--- src/sbin/gpt/gpt.8:1.27	Thu Dec 19 06:46:51 2013
+++ src/sbin/gpt/gpt.8	Thu Dec 19 07:49:50 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: gpt.8,v 1.27 2013/12/19 06:46:51 jnemeth Exp $
+.\ $NetBSD: gpt.8,v 1.28 2013/12/19 07:49:50 wiz Exp $
 .\
 .\ Copyright (c) 2002 Marcel Moolenaar
 .\ All rights reserved.
@@ -26,7 +26,7 @@
 .\
 .\ $FreeBSD: src/sbin/gpt/gpt.8,v 1.17 2006/06/22 22:22:32 marcel Exp $
 .\
-.Dd December 9, 2013
+.Dd December 19, 2013
 .Dt GPT 8
 .Os
 .Sh NAME