CVS commit: src/usr.sbin/cpuctl

2014-02-19 Thread Ryosuke Moro
Module Name:src
Committed By:   szptvlfn
Date:   Wed Feb 19 09:13:21 UTC 2014

Modified Files:
src/usr.sbin/cpuctl: cpuctl.8

Log Message:
Update URL


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/cpuctl/cpuctl.8

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

Modified files:

Index: src/usr.sbin/cpuctl/cpuctl.8
diff -u src/usr.sbin/cpuctl/cpuctl.8:1.11 src/usr.sbin/cpuctl/cpuctl.8:1.12
--- src/usr.sbin/cpuctl/cpuctl.8:1.11	Mon Dec 23 12:39:55 2013
+++ src/usr.sbin/cpuctl/cpuctl.8	Wed Feb 19 09:13:21 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: cpuctl.8,v 1.11 2013/12/23 12:39:55 wiz Exp $
+.\	$NetBSD: cpuctl.8,v 1.12 2014/02/19 09:13:21 szptvlfn Exp $
 .\
 .\ Copyright (c) 2007, 2008, 2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -98,7 +98,7 @@ where
 .Dv XX
 is the CPU family starting with 15 (hex).
 Get it from
-.Lk http://www.amd64.org/support/microcode.html
+.Lk http://www.amd64.org/microcode.html
 .El
 .Sh EXAMPLES
 Run



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

2014-02-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Feb 19 11:40:31 UTC 2014

Modified Files:
src/sys/arch/atari/dev: ite.c

Log Message:
Fix kernel crash when a user tries to switch to nonexistent terminal.

Reported by Gabor Sebestyen in PR port-atari/48599.

Should be pulled up to all netbsd-6 branches.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/atari/dev/ite.c

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

Modified files:

Index: src/sys/arch/atari/dev/ite.c
diff -u src/sys/arch/atari/dev/ite.c:1.71 src/sys/arch/atari/dev/ite.c:1.72
--- src/sys/arch/atari/dev/ite.c:1.71	Sun Jun  5 16:25:12 2011
+++ src/sys/arch/atari/dev/ite.c	Wed Feb 19 11:40:31 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite.c,v 1.71 2011/06/05 16:25:12 tsutsui Exp $	*/
+/*	$NetBSD: ite.c,v 1.72 2014/02/19 11:40:31 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -44,7 +44,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ite.c,v 1.71 2011/06/05 16:25:12 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: ite.c,v 1.72 2014/02/19 11:40:31 tsutsui Exp $);
 
 #include opt_ddb.h
 
@@ -665,8 +665,8 @@ ite_switch(int unit)
 	struct ite_softc	*sc;
 	extern const struct cdevsw view_cdevsw;
 
-	sc = getitesp(unit);
-	if ((sc-flags  (ITE_ATTACHED | ITE_INITED)) == 0)
+	sc = device_lookup_private(ite_cd, unit);
+	if (sc == NULL || (sc-flags  (ITE_ATTACHED | ITE_INITED)) == 0)
 		return;
 
 	/*



CVS commit: src/distrib/utils/sysinst

2014-02-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Feb 19 12:14:41 UTC 2014

Modified Files:
src/distrib/utils/sysinst: bsddisklabel.c
src/distrib/utils/sysinst/arch/luna68k: md.c md.h msg.md.en

Log Message:
Improve luna68k md part of sysinst.

- setup a boot UFS partition and install native bootloader
- add messages how to setup NVRAM variables for firmware to load bootloader
- enable swap on = 32MB machines


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/distrib/utils/sysinst/bsddisklabel.c
cvs rdiff -u -r1.2 -r1.3 src/distrib/utils/sysinst/arch/luna68k/md.c \
src/distrib/utils/sysinst/arch/luna68k/md.h
cvs rdiff -u -r1.1 -r1.2 src/distrib/utils/sysinst/arch/luna68k/msg.md.en

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

Modified files:

Index: src/distrib/utils/sysinst/bsddisklabel.c
diff -u src/distrib/utils/sysinst/bsddisklabel.c:1.59 src/distrib/utils/sysinst/bsddisklabel.c:1.60
--- src/distrib/utils/sysinst/bsddisklabel.c:1.59	Mon Nov  4 20:07:49 2013
+++ src/distrib/utils/sysinst/bsddisklabel.c	Wed Feb 19 12:14:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bsddisklabel.c,v 1.59 2013/11/04 20:07:49 christos Exp $	*/
+/*	$NetBSD: bsddisklabel.c,v 1.60 2014/02/19 12:14:40 tsutsui Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -594,7 +594,12 @@ make_bsd_partitions(void)
 		i = (i + dlcylsize * sectorsize - 1) / (dlcylsize * sectorsize);
 		i *= dlcylsize;
 	}
+#if defined(PART_BOOT_FFS)
+	bsdlabel[PART_BOOT].pi_fstype = FS_BSDFFS;
+	bsdlabel[PART_BOOT].pi_flags = PIF_NEWFS;
+#else
 	bsdlabel[PART_BOOT].pi_fstype = FS_BOOT;
+#endif
 	bsdlabel[PART_BOOT].pi_size = i;
 #ifdef BOOT_HIGH
 	bsdlabel[PART_BOOT].pi_offset = ptend - i;

Index: src/distrib/utils/sysinst/arch/luna68k/md.c
diff -u src/distrib/utils/sysinst/arch/luna68k/md.c:1.2 src/distrib/utils/sysinst/arch/luna68k/md.c:1.3
--- src/distrib/utils/sysinst/arch/luna68k/md.c:1.2	Fri Nov  4 11:27:03 2011
+++ src/distrib/utils/sysinst/arch/luna68k/md.c	Wed Feb 19 12:14:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.2 2011/11/04 11:27:03 martin Exp $	*/
+/*	$NetBSD: md.c,v 1.3 2014/02/19 12:14:40 tsutsui Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -38,7 +38,9 @@
 #include sys/disklabel.h
 #include sys/ioctl.h
 #include sys/param.h
+#include sys/stat.h
 #include stdio.h
+#include stdlib.h
 #include curses.h
 #include unistd.h
 #include fcntl.h
@@ -49,6 +51,9 @@
 #include msg_defs.h
 #include menu_defs.h
 
+#define PART_BOOT_BSIZE	4096
+#define PART_BOOT_FSIZE	512
+
 void
 md_init(void)
 {
@@ -120,6 +125,16 @@ int
 md_check_partitions(void)
 {
 
+	/*
+	 * Make sure that a boot partition (old 4.3BSD UFS) is prepared
+	 * properly for our native bootloader.
+	 */
+	if (bsdlabel[PART_BOOT].pi_fstype != FS_BSDFFS ||
+	(bsdlabel[PART_BOOT].pi_flags  PIF_NEWFS) == 0) {
+		msg_display(MSG_nobootpartdisklabel);
+		process_menu(MENU_ok, NULL);
+		return 0;
+	}
 	return 1;
 }
 
@@ -140,29 +155,45 @@ int
 md_post_disklabel(void)
 {
 
+	if (get_ramsize() = 32)
+		set_swap(diskdev, bsdlabel);
+
+	return 0;
+}
+
+static int
+copy_bootloader(void)
+{
+	const char *mntdir = /mnt2;
+
+	msg_display(MSG_copybootloader, diskdev);
+	if (!run_program(RUN_SILENT | RUN_ERROR_OK,
+	mount /dev/%s%c %s, diskdev, 'a' + PART_BOOT, mntdir)) {
+		mnt2_mounted = 1;
+		run_program(0, /bin/cp /usr/mdec/boot %s, mntdir);
+		run_program(RUN_SILENT | RUN_ERROR_OK, umount %s, mntdir);
+		mnt2_mounted = 0;
+	} else {
+		/* XXX print proper error message */
+		return 1;
+	}
 	return 0;
 }
 
 /*
- * hook called after upgrade() or install() has finished setting
- * up the target disk but immediately before the user is given the
- * ``disks are now set up'' message.
- *
- * On the news68k, we use this opportunity to install the boot blocks.
+ * hook called after install() has finished setting up the target disk
+ * but immediately before the user is given the ``disks are now set up''
+ * message.
  */
 int
 md_post_newfs(void)
 {
-#if 0	/* no bootloader (yet) */
-	const char *bootfile = /boot;
 
-	printf(msg_string(MSG_dobootblks), diskdev);
-	cp_to_target(/usr/mdec/boot, bootfile);
-	sync();
-	run_program(RUN_DISPLAY, /usr/sbin/installboot /dev/r%sc %s %s,
-	diskdev, /usr/mdec/bootxx, bootfile);
-#endif
-	return 0;
+	if (run_program(RUN_DISPLAY | RUN_PROGRESS,
+	/sbin/newfs -V2 -O 0 -b %d -f %d /dev/r%s%c,
+	PART_BOOT_BSIZE, PART_BOOT_FSIZE, diskdev, 'a' + PART_BOOT))
+		return 1;
+	return copy_bootloader();
 }
 
 int
@@ -179,12 +210,17 @@ md_cleanup_install(void)
 #ifndef DEBUG
 	enable_rc_conf();
 #endif
+	msg_display(MSG_howtoboot);
+	process_menu(MENU_ok, NULL);
 }
 
 int
 md_pre_update(void)
 {
 
+	if (get_ramsize() = 32)
+		set_swap(diskdev, bsdlabel);
+
 	return 1;
 }
 
@@ -192,8 +228,26 @@ md_pre_update(void)
 int
 md_update(void)
 {
+	const char *mntdir = /mnt2;
+	char bootpath[MAXPATHLEN];
+	struct stat sb;

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

2014-02-19 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Feb 19 12:28:38 UTC 2014

Modified Files:
src/sys/arch/macppc/dev: valkyriefb.c

Log Message:
- don't read beyond array bounds
- break a bunch of long lines
- remove an outdated comment


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/macppc/dev/valkyriefb.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/macppc/dev/valkyriefb.c
diff -u src/sys/arch/macppc/dev/valkyriefb.c:1.2 src/sys/arch/macppc/dev/valkyriefb.c:1.3
--- src/sys/arch/macppc/dev/valkyriefb.c:1.2	Wed May 23 21:46:17 2012
+++ src/sys/arch/macppc/dev/valkyriefb.c	Wed Feb 19 12:28:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: valkyriefb.c,v 1.2 2012/05/23 21:46:17 macallan Exp $	*/
+/*	$NetBSD: valkyriefb.c,v 1.3 2014/02/19 12:28:38 macallan Exp $	*/
 
 /*
  * Copyright (c) 2012 Michael Lorenz
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: valkyriefb.c,v 1.2 2012/05/23 21:46:17 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: valkyriefb.c,v 1.3 2014/02/19 12:28:38 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -131,7 +131,8 @@ const struct wsscreen_descr *_valkyriefb
 };
 
 struct wsscreen_list valkyriefb_screenlist = {
-	sizeof(_valkyriefb_scrlist) / sizeof(struct wsscreen_descr *), _valkyriefb_scrlist
+	sizeof(_valkyriefb_scrlist) / sizeof(struct wsscreen_descr *),
+	_valkyriefb_scrlist
 };
 
 static int	valkyriefb_ioctl(void *, void *, u_long, void *, int,
@@ -204,7 +205,8 @@ valkyriefb_attach(device_t parent, devic
 	sc-sc_base = (uint8_t *)ca-ca_reg[0];
 #ifdef VALKYRIEFB_DEBUG
 	for (i = 0; i  0x40; i += 8) {
-		aprint_error_dev(sc-sc_dev, %02x: %02x\n, i, valkyriefb_read_reg(sc, i));
+		aprint_error_dev(sc-sc_dev, %02x: %02x\n, i,
+		valkyriefb_read_reg(sc, i));
 	}
 #endif
 	config_finalize_register(sc-sc_dev, valkyriefb_init);
@@ -228,7 +230,8 @@ valkyriefb_init(device_t self)
 
 	valkyriefb_set_mode(sc, mode, 8);
 
-	vcons_init(sc-vd, sc, valkyriefb_defaultscreen, valkyriefb_accessops);
+	vcons_init(sc-vd, sc, valkyriefb_defaultscreen,
+	valkyriefb_accessops);
 	sc-vd.init_screen = valkyriefb_init_screen;
 
 	dict = device_properties(sc-sc_dev);
@@ -245,7 +248,8 @@ valkyriefb_init(device_t self)
 	valkyriefb_defaultscreen.nrows = ri-ri_rows;
 	valkyriefb_defaultscreen.ncols = ri-ri_cols;
 	if (console) {
-		wsdisplay_cnattach(valkyriefb_defaultscreen, ri, 0, 0, defattr);
+		wsdisplay_cnattach(valkyriefb_defaultscreen, ri, 0, 0,
+		defattr);
 		vcons_replay_msgbuf(valkyriefb_console_screen);
 	}
 	aa.console = console;
@@ -271,23 +275,24 @@ valkyriefb_set_mode(struct valkyriefb_so
 	   (modetab[i].width != mode-hdisplay) 
 	   (modetab[i].height != mode-vdisplay))
 		i++;
-	if ((modetab[i].width == mode-hdisplay) 
-	   (modetab[i].height == mode-vdisplay)) {
-		modereg = modetab[i].mode;
-	} else {
-		aprint_error_dev(sc-sc_dev, Can't find a mode register value for %s\n, mode-name);
+	if (i = __arraycount(modetab)) {
+		aprint_error_dev(sc-sc_dev,
+		Can't find a mode register value for %s\n, mode-name);
 		return EINVAL;
-	}
+	} else
+		modereg = modetab[i].mode;
 
 	/* check if we have enough video memory */
 	if ((mode-hdisplay * mode-vdisplay * (depth  3))  0x10) {
-		aprint_error_dev(sc-sc_dev, Not enough video RAM for %s\n, mode-name);
+		aprint_error_dev(sc-sc_dev, Not enough video RAM for %s\n,
+		mode-name);
 		return EINVAL;
 	}
 
 	/* reject depths other than 8 or 16 */
 	if ((depth != 8)  (depth != 16)) {
-		aprint_error_dev(sc-sc_dev, Depth [%d] is unsupported for %s\n, depth, mode-name);
+		aprint_error_dev(sc-sc_dev,
+		Depth [%d] is unsupported for %s\n, depth, mode-name);
 		return EINVAL;
 	}
 
@@ -415,11 +420,6 @@ valkyriefb_init_screen(void *cookie, str
 	ri-ri_flg = RI_CENTER | RI_8BIT_IS_RGB | RI_ENABLE_ALPHA;
 	ri-ri_bits = sc-sc_fbaddr;
 
-	/*
-	 * We probably shouldn't set this flag together with RI_ENABLE_ALPHA
-	 * since the CPU is likely slow enough to make scrolling using
-	 * framebuffer reads faster than redrawing
-	 */
 	scr-scr_flags |= VCONS_DONT_READ;
 	
 	rasops_init(ri, 0, 0);



CVS commit: src

2014-02-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Feb 19 13:01:52 UTC 2014

Modified Files:
src/lib/libc/arch/hppa: Makefile.inc
src/lib/libc/arch/hppa/gen: swapcontext.S
src/lib/libc/arch/hppa/sys: getcontext.S
src/sys/arch/hppa/include: mcontext.h
Added Files:
src/lib/libc/arch/hppa: genassym.cf

Log Message:
Provide a genassym.cf in libc for hppa and use it.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/hppa/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/arch/hppa/genassym.cf
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/hppa/gen/swapcontext.S
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/arch/hppa/sys/getcontext.S
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hppa/include/mcontext.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/libc/arch/hppa/Makefile.inc
diff -u src/lib/libc/arch/hppa/Makefile.inc:1.9 src/lib/libc/arch/hppa/Makefile.inc:1.10
--- src/lib/libc/arch/hppa/Makefile.inc:1.9	Wed Oct 21 19:30:46 2009
+++ src/lib/libc/arch/hppa/Makefile.inc	Wed Feb 19 13:01:51 2014
@@ -1,7 +1,9 @@
-#	$NetBSD: Makefile.inc,v 1.9 2009/10/21 19:30:46 skrll Exp $
+#	$NetBSD: Makefile.inc,v 1.10 2014/02/19 13:01:51 skrll Exp $
 
 #	$OpenBSD: Makefile.inc,v 1.3 1999/12/25 06:02:10 mickey Exp $
 
 SRCS+=	__sigaction14_sigtramp.c __sigtramp2.S
 
 SRCS+= bcopy.c
+
+CPPFLAGS+= -I.

Index: src/lib/libc/arch/hppa/gen/swapcontext.S
diff -u src/lib/libc/arch/hppa/gen/swapcontext.S:1.5 src/lib/libc/arch/hppa/gen/swapcontext.S:1.6
--- src/lib/libc/arch/hppa/gen/swapcontext.S:1.5	Wed Sep 12 02:00:52 2012
+++ src/lib/libc/arch/hppa/gen/swapcontext.S	Wed Feb 19 13:01:51 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: swapcontext.S,v 1.5 2012/09/12 02:00:52 manu Exp $	*/
+/*	$NetBSD: swapcontext.S,v 1.6 2014/02/19 13:01:51 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,10 +30,12 @@
  */
 
 #include SYS.h
+#include assym.h
+
 #include machine/mcontext.h
 
 #if defined(SYSLIBC_SCCS)  !defined(lint)
-	RCSID($NetBSD: swapcontext.S,v 1.5 2012/09/12 02:00:52 manu Exp $)
+	RCSID($NetBSD: swapcontext.S,v 1.6 2014/02/19 13:01:51 skrll Exp $)
 #endif /* SYSLIBC_SCCS  !lint */
 
 LEAF_ENTRY(swapcontext)

Index: src/lib/libc/arch/hppa/sys/getcontext.S
diff -u src/lib/libc/arch/hppa/sys/getcontext.S:1.4 src/lib/libc/arch/hppa/sys/getcontext.S:1.5
--- src/lib/libc/arch/hppa/sys/getcontext.S:1.4	Mon Apr 28 20:22:56 2008
+++ src/lib/libc/arch/hppa/sys/getcontext.S	Wed Feb 19 13:01:51 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: getcontext.S,v 1.4 2008/04/28 20:22:56 martin Exp $	*/
+/*	$NetBSD: getcontext.S,v 1.5 2014/02/19 13:01:51 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -29,17 +29,13 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include sys/errno.h
-#include machine/mcontext.h
 #include SYS.h
+#include assym.h
 
 #ifdef WEAK_ALIAS
 WEAK_ALIAS(getcontext, _getcontext)
 #endif
 
-#define _OFFSETOF_UC_GREGS (10 * 4)
-#define SZREG 4
-
 ENTRY(_getcontext, 0)
 	SYSCALL(getcontext)
 	stw	%rp, (_OFFSETOF_UC_GREGS + _REG_PCOQH * SZREG)(%arg0)

Index: src/sys/arch/hppa/include/mcontext.h
diff -u src/sys/arch/hppa/include/mcontext.h:1.7 src/sys/arch/hppa/include/mcontext.h:1.8
--- src/sys/arch/hppa/include/mcontext.h:1.7	Thu Dec  8 21:00:50 2011
+++ src/sys/arch/hppa/include/mcontext.h	Wed Feb 19 13:01:51 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: mcontext.h,v 1.7 2011/12/08 21:00:50 skrll Exp $	*/
+/*	$NetBSD: mcontext.h,v 1.8 2014/02/19 13:01:51 skrll Exp $	*/
 
 #ifndef _HPPA_MCONTEXT_H_
 #define	_HPPA_MCONTEXT_H_
@@ -69,8 +69,6 @@ __lwp_getprivate_fast(void)
 
 #endif /* !__ASSEMBLER__ */
 
-#define	_OFFSETOF_UC_GREGS 40
-
 #define	_UC_SETSTACK	0x0001
 #define	_UC_CLRSTACK	0x0002
 #define	_UC_TLSBASE	0x0004

Added files:

Index: src/lib/libc/arch/hppa/genassym.cf
diff -u /dev/null src/lib/libc/arch/hppa/genassym.cf:1.1
--- /dev/null	Wed Feb 19 13:01:52 2014
+++ src/lib/libc/arch/hppa/genassym.cf	Wed Feb 19 13:01:51 2014
@@ -0,0 +1,39 @@
+#	$NetBSD: genassym.cf,v 1.1 2014/02/19 13:01:51 skrll Exp $
+
+#
+# Copyright (c) 2014 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Nick Hudson
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE 

CVS commit: src/doc

2014-02-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Feb 19 13:30:45 UTC 2014

Modified Files:
src/doc: CHANGES

Log Message:
Mention luna68k sysinst update.


To generate a diff of this commit:
cvs rdiff -u -r1.1889 -r1.1890 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1889 src/doc/CHANGES:1.1890
--- src/doc/CHANGES:1.1889	Sun Feb 16 18:21:25 2014
+++ src/doc/CHANGES	Wed Feb 19 13:30:45 2014
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1889 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1890 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -352,3 +352,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	npf: Added support for IPv6-to-IPv6 Network Prefix Translation
 		(NPTv6), as per RFC 6296. [rmind 20140213]
 	sqlite3: Import 3.8.3.1 [christos 20140216]
+	luna68k: Make sysinst to create a boot UFS partition and install
+		the native bootloader during installation. [tsutsui 20140219]



CVS commit: src/sys/kern

2014-02-19 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Feb 19 15:23:20 UTC 2014

Modified Files:
src/sys/kern: exec_elf.c kern_exec.c

Log Message:
We need VMCMDs for a binary and its interpreter, so make sure we have
at least one VMCMD. This also prevents the kernel from using an
uninitialized pointer as entry point for the execution.

From me and Christos

ok christos@


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/kern/exec_elf.c
cvs rdiff -u -r1.376 -r1.377 src/sys/kern/kern_exec.c

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

Modified files:

Index: src/sys/kern/exec_elf.c
diff -u src/sys/kern/exec_elf.c:1.58 src/sys/kern/exec_elf.c:1.59
--- src/sys/kern/exec_elf.c:1.58	Sun Feb 16 17:46:36 2014
+++ src/sys/kern/exec_elf.c	Wed Feb 19 15:23:20 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.c,v 1.58 2014/02/16 17:46:36 maxv Exp $	*/
+/*	$NetBSD: exec_elf.c,v 1.59 2014/02/19 15:23:20 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(1, $NetBSD: exec_elf.c,v 1.58 2014/02/16 17:46:36 maxv Exp $);
+__KERNEL_RCSID(1, $NetBSD: exec_elf.c,v 1.59 2014/02/19 15:23:20 maxv Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_pax.h
@@ -796,6 +796,14 @@ exec_elf_makecmds(struct lwp *l, struct 
 			break;
 		}
 	}
+
+	if (epp-ep_vmcmds.evs_cmds == NULL) {
+		/* No VMCMD; there was no PT_LOAD section, or those
+		 * sections were empty */
+		error = ENOEXEC;
+		goto bad;
+	}
+
 	if (interp || (epp-ep_flags  EXEC_FORCEAUX) != 0) {
 		ap = kmem_alloc(sizeof(*ap), KM_SLEEP);
 		ap-arg_interp = (vaddr_t)NULL;
@@ -811,7 +819,7 @@ exec_elf_makecmds(struct lwp *l, struct 
 	 * its interpreter
 	 */
 	if (interp) {
-		int j = epp-ep_vmcmds.evs_used;
+		int nused = epp-ep_vmcmds.evs_used;
 		u_long interp_offset = 0;
 
 		if ((error = elf_load_file(l, epp, interp,
@@ -819,7 +827,14 @@ exec_elf_makecmds(struct lwp *l, struct 
 			kmem_free(ap, sizeof(*ap));
 			goto bad;
 		}
-		ap-arg_interp = epp-ep_vmcmds.evs_cmds[j].ev_addr;
+		if (epp-ep_vmcmds.evs_used == nused) {
+			/* elf_load_file() has not set up any new VMCMD */
+			kmem_free(ap, sizeof(*ap));
+			error = ENOEXEC;
+			goto bad;
+		}
+
+		ap-arg_interp = epp-ep_vmcmds.evs_cmds[nused].ev_addr;
 		epp-ep_entry = ap-arg_interp + interp_offset;
 		PNBUF_PUT(interp);
 	} else

Index: src/sys/kern/kern_exec.c
diff -u src/sys/kern/kern_exec.c:1.376 src/sys/kern/kern_exec.c:1.377
--- src/sys/kern/kern_exec.c:1.376	Mon Feb 17 19:29:46 2014
+++ src/sys/kern/kern_exec.c	Wed Feb 19 15:23:20 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.376 2014/02/17 19:29:46 maxv Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.377 2014/02/19 15:23:20 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.376 2014/02/17 19:29:46 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.377 2014/02/19 15:23:20 maxv Exp $);
 
 #include opt_exec.h
 #include opt_execfmt.h
@@ -658,8 +658,7 @@ execve_loadvm(struct lwp *l, const char 
 	data-ed_pack.ep_hdrvalid = 0;
 	data-ed_pack.ep_emul_arg = NULL;
 	data-ed_pack.ep_emul_arg_free = NULL;
-	data-ed_pack.ep_vmcmds.evs_cnt = 0;
-	data-ed_pack.ep_vmcmds.evs_used = 0;
+	memset(data-ed_pack.ep_vmcmds, 0, sizeof(data-ed_pack.ep_vmcmds));
 	data-ed_pack.ep_vap = data-ed_attr;
 	data-ed_pack.ep_flags = 0;
 	MD_TOPDOWN_INIT(data-ed_pack);



CVS commit: src/external/public-domain/sqlite/lib

2014-02-19 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Wed Feb 19 19:29:33 UTC 2014

Modified Files:
src/external/public-domain/sqlite/lib: Makefile

Log Message:
Add all: and dependall: tatgets so that sqlite3.pc actually gets built.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/public-domain/sqlite/lib/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/public-domain/sqlite/lib/Makefile
diff -u src/external/public-domain/sqlite/lib/Makefile:1.4 src/external/public-domain/sqlite/lib/Makefile:1.5
--- src/external/public-domain/sqlite/lib/Makefile:1.4	Mon Feb 17 20:08:53 2014
+++ src/external/public-domain/sqlite/lib/Makefile	Wed Feb 19 19:29:33 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2014/02/17 20:08:53 christos Exp $
+# $NetBSD: Makefile,v 1.5 2014/02/19 19:29:33 dsl Exp $
 
 LIB=		sqlite3
 INCS=		sqlite3.h sqlite3ext.h
@@ -18,6 +18,9 @@ CLEANFILES+=sqlite3.pc
 
 .include bsd.lib.mk
 
+all: sqlite3.pc
+dependall: all
+
 sqlite3.pc: ${SRCDIR}/sqlite3.h sqlite3.pc.in
 	@(V=$$( (echo '#include sqlite3.h'; echo SQLITE_VERSION) | \
 	${CC} -E -I${SRCDIR} - | tail -1 | tr -d '')  \



CVS commit: src/lib/libkvm

2014-02-19 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Wed Feb 19 20:21:22 UTC 2014

Modified Files:
src/lib/libkvm: kvm.c kvm_alpha.c kvm_file.c kvm_hppa.c kvm_i386.c
kvm_i386pae.c kvm_mips.c kvm_proc.c kvm_sh3.c kvm_sparc.c
kvm_sparc64.c kvm_vax.c kvm_x86_64.c

Log Message:
Remove the #include sys/user.h from all of libkvm.
sys/user.h is a stub that just #includes sys/pcb.h.
There are no 'struct pcb' anywhere in here, so I'm extremely doubtful
any of the builds will fail.
OTOH it might be relying on a header that pcb.h includes.
In any case i386 and amd64 build.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/lib/libkvm/kvm.c
cvs rdiff -u -r1.26 -r1.27 src/lib/libkvm/kvm_alpha.c
cvs rdiff -u -r1.28 -r1.29 src/lib/libkvm/kvm_file.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libkvm/kvm_hppa.c
cvs rdiff -u -r1.29 -r1.30 src/lib/libkvm/kvm_i386.c
cvs rdiff -u -r1.1 -r1.2 src/lib/libkvm/kvm_i386pae.c
cvs rdiff -u -r1.21 -r1.22 src/lib/libkvm/kvm_mips.c
cvs rdiff -u -r1.89 -r1.90 src/lib/libkvm/kvm_proc.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libkvm/kvm_sh3.c
cvs rdiff -u -r1.32 -r1.33 src/lib/libkvm/kvm_sparc.c
cvs rdiff -u -r1.15 -r1.16 src/lib/libkvm/kvm_sparc64.c
cvs rdiff -u -r1.19 -r1.20 src/lib/libkvm/kvm_vax.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libkvm/kvm_x86_64.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/libkvm/kvm.c
diff -u src/lib/libkvm/kvm.c:1.100 src/lib/libkvm/kvm.c:1.101
--- src/lib/libkvm/kvm.c:1.100	Sun Aug 26 23:09:42 2012
+++ src/lib/libkvm/kvm.c	Wed Feb 19 20:21:22 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kvm.c,v 1.100 2012/08/26 23:09:42 martin Exp $	*/
+/*	$NetBSD: kvm.c,v 1.101 2014/02/19 20:21:22 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1992, 1993
@@ -38,12 +38,11 @@
 #if 0
 static char sccsid[] = @(#)kvm.c	8.2 (Berkeley) 2/13/94;
 #else
-__RCSID($NetBSD: kvm.c,v 1.100 2012/08/26 23:09:42 martin Exp $);
+__RCSID($NetBSD: kvm.c,v 1.101 2014/02/19 20:21:22 dsl Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
 #include sys/param.h
-#include sys/user.h
 #include sys/lwp.h
 #include sys/proc.h
 #include sys/ioctl.h

Index: src/lib/libkvm/kvm_alpha.c
diff -u src/lib/libkvm/kvm_alpha.c:1.26 src/lib/libkvm/kvm_alpha.c:1.27
--- src/lib/libkvm/kvm_alpha.c:1.26	Mon Jan 27 21:00:01 2014
+++ src/lib/libkvm/kvm_alpha.c	Wed Feb 19 20:21:22 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: kvm_alpha.c,v 1.26 2014/01/27 21:00:01 matt Exp $ */
+/* $NetBSD: kvm_alpha.c,v 1.27 2014/02/19 20:21:22 dsl Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -30,7 +30,6 @@
 #define	__KVM_ALPHA_PRIVATE		/* see machine/pte.h */
 
 #include sys/param.h
-#include sys/user.h
 #include sys/proc.h
 #include sys/stat.h
 #include sys/kcore.h
@@ -51,7 +50,7 @@
 
 #include kvm_private.h
 
-__RCSID($NetBSD: kvm_alpha.c,v 1.26 2014/01/27 21:00:01 matt Exp $);
+__RCSID($NetBSD: kvm_alpha.c,v 1.27 2014/02/19 20:21:22 dsl Exp $);
 
 /*ARGSUSED*/
 void

Index: src/lib/libkvm/kvm_file.c
diff -u src/lib/libkvm/kvm_file.c:1.28 src/lib/libkvm/kvm_file.c:1.29
--- src/lib/libkvm/kvm_file.c:1.28	Sun Sep 26 22:28:05 2010
+++ src/lib/libkvm/kvm_file.c	Wed Feb 19 20:21:22 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kvm_file.c,v 1.28 2010/09/26 22:28:05 jym Exp $	*/
+/*	$NetBSD: kvm_file.c,v 1.29 2014/02/19 20:21:22 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1992, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)kvm_file.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: kvm_file.c,v 1.28 2010/09/26 22:28:05 jym Exp $);
+__RCSID($NetBSD: kvm_file.c,v 1.29 2014/02/19 20:21:22 dsl Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -49,7 +49,6 @@ __RCSID($NetBSD: kvm_file.c,v 1.28 2010
 #include sys/types.h
 #undef _KERNEL
 #include sys/param.h
-#include sys/user.h
 #include sys/lwp.h
 #include sys/proc.h
 #include sys/exec.h

Index: src/lib/libkvm/kvm_hppa.c
diff -u src/lib/libkvm/kvm_hppa.c:1.6 src/lib/libkvm/kvm_hppa.c:1.7
--- src/lib/libkvm/kvm_hppa.c:1.6	Mon Sep 20 23:23:16 2010
+++ src/lib/libkvm/kvm_hppa.c	Wed Feb 19 20:21:22 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kvm_hppa.c,v 1.6 2010/09/20 23:23:16 jym Exp $	*/
+/*	$NetBSD: kvm_hppa.c,v 1.7 2014/02/19 20:21:22 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1992, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = @(#)kvm_hp300.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: kvm_hppa.c,v 1.6 2010/09/20 23:23:16 jym Exp $);
+__RCSID($NetBSD: kvm_hppa.c,v 1.7 2014/02/19 20:21:22 dsl Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -49,7 +49,6 @@ __RCSID($NetBSD: kvm_hppa.c,v 1.6 2010/
  */
 
 #include sys/param.h
-#include sys/user.h
 #include sys/proc.h
 #include sys/stat.h
 #include sys/kcore.h

Index: src/lib/libkvm/kvm_i386.c
diff -u src/lib/libkvm/kvm_i386.c:1.29 src/lib/libkvm/kvm_i386.c:1.30
--- src/lib/libkvm/kvm_i386.c:1.29	Tue Oct  5 23:48:16 2010
+++ src/lib/libkvm/kvm_i386.c	Wed Feb 19 20:21:22 2014
@@ -1,4 +1,4 @@

CVS commit: src/sys/sys

2014-02-19 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Wed Feb 19 20:40:40 UTC 2014

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

Log Message:
Userspace shouldn't (and doesn't seem to) need machine/pcb.h.
Unfortunately the file is included by loads of stuff, mostly in
src/external, so can't be killed outright.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/sys/user.h

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

Modified files:

Index: src/sys/sys/user.h
diff -u src/sys/sys/user.h:1.18 src/sys/sys/user.h:1.19
--- src/sys/sys/user.h:1.18	Fri Jan 14 02:06:34 2011
+++ src/sys/sys/user.h	Wed Feb 19 20:40:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: user.h,v 1.18 2011/01/14 02:06:34 rmind Exp $	*/
+/*	$NetBSD: user.h,v 1.19 2014/02/19 20:40:40 dsl Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -38,10 +38,4 @@
 #error This header has been obsoleted and will be removed.
 #endif
 
-#include machine/pcb.h
-
-struct user {
-	struct pcb u_pcb;
-};
-
 #endif /* !_SYS_USER_H_ */



CVS commit: src

2014-02-19 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Wed Feb 19 20:42:15 UTC 2014

Modified Files:
src/bin/ps: ps.c
src/usr.bin/systat: ps.c syscall.c
src/usr.bin/vmstat: vmstat.c
src/usr.bin/w: w.c

Log Message:
Remove some pointless inclusions os sys/user.h


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/bin/ps/ps.c
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/systat/ps.c
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/systat/syscall.c
cvs rdiff -u -r1.190 -r1.191 src/usr.bin/vmstat/vmstat.c
cvs rdiff -u -r1.77 -r1.78 src/usr.bin/w/w.c

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

Modified files:

Index: src/bin/ps/ps.c
diff -u src/bin/ps/ps.c:1.79 src/bin/ps/ps.c:1.80
--- src/bin/ps/ps.c:1.79	Wed Jan 15 08:09:10 2014
+++ src/bin/ps/ps.c	Wed Feb 19 20:42:14 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ps.c,v 1.79 2014/01/15 08:09:10 mlelstv Exp $	*/
+/*	$NetBSD: ps.c,v 1.80 2014/02/19 20:42:14 dsl Exp $	*/
 
 /*
  * Copyright (c) 2000-2008 The NetBSD Foundation, Inc.
@@ -68,12 +68,11 @@ __COPYRIGHT(@(#) Copyright (c) 1990, 19
 #if 0
 static char sccsid[] = @(#)ps.c	8.4 (Berkeley) 4/2/94;
 #else
-__RCSID($NetBSD: ps.c,v 1.79 2014/01/15 08:09:10 mlelstv Exp $);
+__RCSID($NetBSD: ps.c,v 1.80 2014/02/19 20:42:14 dsl Exp $);
 #endif
 #endif /* not lint */
 
 #include sys/param.h
-#include sys/user.h
 #include sys/time.h
 #include sys/resource.h
 #include sys/lwp.h

Index: src/usr.bin/systat/ps.c
diff -u src/usr.bin/systat/ps.c:1.35 src/usr.bin/systat/ps.c:1.36
--- src/usr.bin/systat/ps.c:1.35	Wed Aug 17 13:26:49 2011
+++ src/usr.bin/systat/ps.c	Wed Feb 19 20:42:14 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: ps.c,v 1.35 2011/08/17 13:26:49 christos Exp $  */
+/*  $NetBSD: ps.c,v 1.36 2014/02/19 20:42:14 dsl Exp $  */
 
 /*-
  * Copyright (c) 1999
@@ -45,13 +45,12 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: ps.c,v 1.35 2011/08/17 13:26:49 christos Exp $);
+__RCSID($NetBSD: ps.c,v 1.36 2014/02/19 20:42:14 dsl Exp $);
 #endif /* not lint */
 
 #include sys/param.h
 #include sys/sched.h
 #include sys/sysctl.h
-#include sys/user.h
 
 #include curses.h
 #include math.h

Index: src/usr.bin/systat/syscall.c
diff -u src/usr.bin/systat/syscall.c:1.8 src/usr.bin/systat/syscall.c:1.9
--- src/usr.bin/systat/syscall.c:1.8	Fri Nov 23 00:05:18 2012
+++ src/usr.bin/systat/syscall.c	Wed Feb 19 20:42:14 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: syscall.c,v 1.8 2012/11/23 00:05:18 christos Exp $	*/
+/*	$NetBSD: syscall.c,v 1.9 2014/02/19 20:42:14 dsl Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -30,12 +30,11 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: syscall.c,v 1.8 2012/11/23 00:05:18 christos Exp $);
+__RCSID($NetBSD: syscall.c,v 1.9 2014/02/19 20:42:14 dsl Exp $);
 
 /* System call stats */
 
 #include sys/param.h
-#include sys/user.h
 #include sys/namei.h
 #include sys/sysctl.h
 

Index: src/usr.bin/vmstat/vmstat.c
diff -u src/usr.bin/vmstat/vmstat.c:1.190 src/usr.bin/vmstat/vmstat.c:1.191
--- src/usr.bin/vmstat/vmstat.c:1.190	Sun Nov 24 21:58:38 2013
+++ src/usr.bin/vmstat/vmstat.c	Wed Feb 19 20:42:14 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.190 2013/11/24 21:58:38 rmind Exp $ */
+/* $NetBSD: vmstat.c,v 1.191 2014/02/19 20:42:14 dsl Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000, 2001, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = @(#)vmstat.c	8.2 (Berkeley) 3/1/95;
 #else
-__RCSID($NetBSD: vmstat.c,v 1.190 2013/11/24 21:58:38 rmind Exp $);
+__RCSID($NetBSD: vmstat.c,v 1.191 2014/02/19 20:42:14 dsl Exp $);
 #endif
 #endif /* not lint */
 
@@ -93,7 +93,6 @@ __RCSID($NetBSD: vmstat.c,v 1.190 2013/
 #include sys/socket.h
 #include sys/sysctl.h
 #include sys/time.h
-#include sys/user.h
 #include sys/queue.h
 #include sys/kernhist.h
 

Index: src/usr.bin/w/w.c
diff -u src/usr.bin/w/w.c:1.77 src/usr.bin/w/w.c:1.78
--- src/usr.bin/w/w.c:1.77	Mon Sep  9 19:20:38 2013
+++ src/usr.bin/w/w.c	Wed Feb 19 20:42:14 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: w.c,v 1.77 2013/09/09 19:20:38 christos Exp $	*/
+/*	$NetBSD: w.c,v 1.78 2014/02/19 20:42:14 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = @(#)w.c	8.6 (Berkeley) 6/30/94;
 #else
-__RCSID($NetBSD: w.c,v 1.77 2013/09/09 19:20:38 christos Exp $);
+__RCSID($NetBSD: w.c,v 1.78 2014/02/19 20:42:14 dsl Exp $);
 #endif
 #endif /* not lint */
 
@@ -55,7 +55,6 @@ __RCSID($NetBSD: w.c,v 1.77 2013/09/09 
 #include sys/stat.h
 #include sys/sysctl.h
 #include sys/proc.h
-#include sys/user.h
 #include sys/ioctl.h
 #include sys/socket.h
 



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

2014-02-19 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Wed Feb 19 20:50:56 UTC 2014

Modified Files:
src/sys/compat/linux/arch/amd64: linux_machdep.c

Log Message:
Don't rely on pcb.h including x86/include/sysarch.h


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/compat/linux/arch/amd64/linux_machdep.c

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

Modified files:

Index: src/sys/compat/linux/arch/amd64/linux_machdep.c
diff -u src/sys/compat/linux/arch/amd64/linux_machdep.c:1.47 src/sys/compat/linux/arch/amd64/linux_machdep.c:1.48
--- src/sys/compat/linux/arch/amd64/linux_machdep.c:1.47	Sat Feb 15 10:11:15 2014
+++ src/sys/compat/linux/arch/amd64/linux_machdep.c	Wed Feb 19 20:50:56 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_machdep.c,v 1.47 2014/02/15 10:11:15 dsl Exp $ */
+/*	$NetBSD: linux_machdep.c,v 1.48 2014/02/19 20:50:56 dsl Exp $ */
 
 /*-
  * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: linux_machdep.c,v 1.47 2014/02/15 10:11:15 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_machdep.c,v 1.48 2014/02/19 20:50:56 dsl Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -51,6 +51,7 @@ __KERNEL_RCSID(0, $NetBSD: linux_machde
 #include machine/specialreg.h
 #include machine/vmparam.h
 #include machine/cpufunc.h
+#include x86/include/sysarch.h
 
 /* 
  * To see whether wscons is configured (for virtual console ioctl calls).



CVS commit: src/sys

2014-02-19 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Wed Feb 19 21:23:02 UTC 2014

Modified Files:
src/sys/arch/i386/i386: compat_16_machdep.c process_machdep.c
src/sys/arch/x86/acpi: acpi_wakeup.c
src/sys/arch/x86/x86: cpu.c ipi.c
src/sys/compat/linux/arch/i386: linux_machdep.c

Log Message:
Add explicit #include x86/fpu.h instead of relying on pcb.h including it.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/i386/i386/compat_16_machdep.c
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/i386/i386/process_machdep.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/x86/acpi/acpi_wakeup.c
cvs rdiff -u -r1.108 -r1.109 src/sys/arch/x86/x86/cpu.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/x86/x86/ipi.c
cvs rdiff -u -r1.157 -r1.158 src/sys/compat/linux/arch/i386/linux_machdep.c

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

Modified files:

Index: src/sys/arch/i386/i386/compat_16_machdep.c
diff -u src/sys/arch/i386/i386/compat_16_machdep.c:1.25 src/sys/arch/i386/i386/compat_16_machdep.c:1.26
--- src/sys/arch/i386/i386/compat_16_machdep.c:1.25	Sat Feb 15 10:11:15 2014
+++ src/sys/arch/i386/i386/compat_16_machdep.c	Wed Feb 19 21:23:01 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_16_machdep.c,v 1.25 2014/02/15 10:11:15 dsl Exp $	*/
+/*	$NetBSD: compat_16_machdep.c,v 1.26 2014/02/19 21:23:01 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: compat_16_machdep.c,v 1.25 2014/02/15 10:11:15 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: compat_16_machdep.c,v 1.26 2014/02/19 21:23:01 dsl Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_vm86.h
@@ -55,6 +55,7 @@ __KERNEL_RCSID(0, $NetBSD: compat_16_ma
 
 #include machine/pmap.h
 #include machine/vmparam.h
+#include x86/fpu.h
 
 #if defined(COMPAT_16) || defined(COMPAT_IBCS2)
 

Index: src/sys/arch/i386/i386/process_machdep.c
diff -u src/sys/arch/i386/i386/process_machdep.c:1.84 src/sys/arch/i386/i386/process_machdep.c:1.85
--- src/sys/arch/i386/i386/process_machdep.c:1.84	Sat Feb 15 22:20:41 2014
+++ src/sys/arch/i386/i386/process_machdep.c	Wed Feb 19 21:23:01 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: process_machdep.c,v 1.84 2014/02/15 22:20:41 dsl Exp $	*/
+/*	$NetBSD: process_machdep.c,v 1.85 2014/02/19 21:23:01 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: process_machdep.c,v 1.84 2014/02/15 22:20:41 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: process_machdep.c,v 1.85 2014/02/19 21:23:01 dsl Exp $);
 
 #include opt_vm86.h
 #include opt_ptrace.h
@@ -71,6 +71,8 @@ __KERNEL_RCSID(0, $NetBSD: process_mach
 #include machine/reg.h
 #include machine/segments.h
 
+#include x86/fpu.h
+
 #ifdef VM86
 #include machine/vm86.h
 #endif

Index: src/sys/arch/x86/acpi/acpi_wakeup.c
diff -u src/sys/arch/x86/acpi/acpi_wakeup.c:1.36 src/sys/arch/x86/acpi/acpi_wakeup.c:1.37
--- src/sys/arch/x86/acpi/acpi_wakeup.c:1.36	Tue Feb 11 20:17:16 2014
+++ src/sys/arch/x86/acpi/acpi_wakeup.c	Wed Feb 19 21:23:01 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_wakeup.c,v 1.36 2014/02/11 20:17:16 dsl Exp $	*/
+/*	$NetBSD: acpi_wakeup.c,v 1.37 2014/02/19 21:23:01 dsl Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_wakeup.c,v 1.36 2014/02/11 20:17:16 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_wakeup.c,v 1.37 2014/02/19 21:23:01 dsl Exp $);
 
 /*-
  * Copyright (c) 2001 Takanori Watanabe takaw...@jp.freebsd.org
@@ -62,7 +62,7 @@ __KERNEL_RCSID(0, $NetBSD: acpi_wakeup.
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_wakeup.c,v 1.36 2014/02/11 20:17:16 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_wakeup.c,v 1.37 2014/02/19 21:23:01 dsl Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -101,6 +101,7 @@ __KERNEL_RCSID(0, $NetBSD: acpi_wakeup.
 
 #include x86/cpuvar.h
 #include x86/x86/tsc.h
+#include x86/fpu.h
 
 #include opt_vga.h
 

Index: src/sys/arch/x86/x86/cpu.c
diff -u src/sys/arch/x86/x86/cpu.c:1.108 src/sys/arch/x86/x86/cpu.c:1.109
--- src/sys/arch/x86/x86/cpu.c:1.108	Sun Jan 26 19:16:17 2014
+++ src/sys/arch/x86/x86/cpu.c	Wed Feb 19 21:23:02 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.108 2014/01/26 19:16:17 dsl Exp $	*/
+/*	$NetBSD: cpu.c,v 1.109 2014/02/19 21:23:02 dsl Exp $	*/
 
 /*-
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.108 2014/01/26 19:16:17 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.109 2014/02/19 21:23:02 dsl Exp $);
 
 #include opt_ddb.h
 #include opt_mpbios.h		/* for MPDEBUG */
@@ -103,6 +103,8 @@ __KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.10
 #include machine/pio.h
 #include machine/cpu_counter.h
 
+#include x86/fpu.h
+
 #ifdef i386
 #include machine/tlog.h
 #endif

CVS commit: src/sys/compat/linux32/arch/amd64

2014-02-19 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Wed Feb 19 21:45:01 UTC 2014

Modified Files:
src/sys/compat/linux32/arch/amd64: linux32_machdep.c

Log Message:
Explicitly include x86/fpu.h instead of relying in x86/frame.h including it.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 \
src/sys/compat/linux32/arch/amd64/linux32_machdep.c

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

Modified files:

Index: src/sys/compat/linux32/arch/amd64/linux32_machdep.c
diff -u src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.35 src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.36
--- src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.35	Sat Feb 15 10:11:15 2014
+++ src/sys/compat/linux32/arch/amd64/linux32_machdep.c	Wed Feb 19 21:45:01 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_machdep.c,v 1.35 2014/02/15 10:11:15 dsl Exp $ */
+/*	$NetBSD: linux32_machdep.c,v 1.36 2014/02/19 21:45:01 dsl Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -31,7 +31,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux32_machdep.c,v 1.35 2014/02/15 10:11:15 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux32_machdep.c,v 1.36 2014/02/19 21:45:01 dsl Exp $);
 
 #include sys/param.h
 #include sys/proc.h
@@ -41,6 +41,8 @@ __KERNEL_RCSID(0, $NetBSD: linux32_mach
 #include machine/cpufunc.h
 #include machine/netbsd32_machdep.h
 
+#include x86/fpu.h
+
 #include compat/netbsd32/netbsd32.h
 #include compat/netbsd32/netbsd32_syscallargs.h
 



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

2014-02-19 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb 19 22:20:03 UTC 2014

Modified Files:
src/sys/arch/arm/cortex: files.cortex

Log Message:
Add needs-flag to arml2cc


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

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/cortex/files.cortex
diff -u src/sys/arch/arm/cortex/files.cortex:1.4 src/sys/arch/arm/cortex/files.cortex:1.5
--- src/sys/arch/arm/cortex/files.cortex:1.4	Sun Jun 16 16:44:39 2013
+++ src/sys/arch/arm/cortex/files.cortex	Wed Feb 19 22:20:03 2014
@@ -1,4 +1,4 @@
-# $NetBSD: files.cortex,v 1.4 2013/06/16 16:44:39 matt Exp $
+# $NetBSD: files.cortex,v 1.5 2014/02/19 22:20:03 matt Exp $
 
 defflag opt_cpu_in_cksum.h			NEON_IN_CKSUM
 
@@ -17,7 +17,7 @@ file	arch/arm/cortex/gic.c			armgic
 # ARM PL310 L2 Cache Controller(initially on Cortex-A9)
 device	arml2cc
 attach	arml2cc at armperiph
-file	arch/arm/cortex/pl310.c			arml2cc
+file	arch/arm/cortex/pl310.c			arml2cc	needs-flag
 
 # ARMv7 Generic Timer
 device	armgtmr



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

2014-02-19 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb 19 22:20:45 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_board.c

Log Message:
Conditionalize call to arml2cc_init


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/broadcom/bcm53xx_board.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/broadcom/bcm53xx_board.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_board.c:1.17 src/sys/arch/arm/broadcom/bcm53xx_board.c:1.18
--- src/sys/arch/arm/broadcom/bcm53xx_board.c:1.17	Mon Oct 28 22:51:16 2013
+++ src/sys/arch/arm/broadcom/bcm53xx_board.c	Wed Feb 19 22:20:45 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_board.c,v 1.17 2013/10/28 22:51:16 matt Exp $	*/
+/*	$NetBSD: bcm53xx_board.c,v 1.18 2014/02/19 22:20:45 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,12 +29,13 @@
  */
 
 #include opt_broadcom.h
+#include arml2cc.h
 
 #define	_ARM32_BUS_DMA_PRIVATE
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.17 2013/10/28 22:51:16 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.18 2014/02/19 22:20:45 matt Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -554,8 +555,10 @@ bcm53xx_bootstrap(vaddr_t iobase)
 
 	curcpu()-ci_data.cpu_cc_freq = clk-clk_cpu;
 
+#if NARML2CC  0
 	arml2cc_init(bcm53xx_armcore_bst, bcm53xx_armcore_bsh,
 	ARMCORE_L2C_BASE);
+#endif
 }
 
 void



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

2014-02-19 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb 19 22:21:16 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_i2c.c bcm53xx_mdio.c bcm53xx_nand.c
bcm53xx_pax.c bcm53xx_rng.c bcm53xx_sdhc.c bcm53xx_usb.c

Log Message:
#include sys/param.h


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/broadcom/bcm53xx_i2c.c \
src/sys/arch/arm/broadcom/bcm53xx_mdio.c \
src/sys/arch/arm/broadcom/bcm53xx_nand.c \
src/sys/arch/arm/broadcom/bcm53xx_sdhc.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/broadcom/bcm53xx_pax.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/broadcom/bcm53xx_rng.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/broadcom/bcm53xx_usb.c

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

Modified files:

Index: src/sys/arch/arm/broadcom/bcm53xx_i2c.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_i2c.c:1.1 src/sys/arch/arm/broadcom/bcm53xx_i2c.c:1.2
--- src/sys/arch/arm/broadcom/bcm53xx_i2c.c:1.1	Sat Sep  1 00:04:44 2012
+++ src/sys/arch/arm/broadcom/bcm53xx_i2c.c	Wed Feb 19 22:21:16 2014
@@ -31,8 +31,9 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_i2c.c,v 1.1 2012/09/01 00:04:44 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_i2c.c,v 1.2 2014/02/19 22:21:16 matt Exp $);
 
+#include sys/param.h
 #include sys/bus.h
 #include sys/device.h
 #include sys/intr.h
Index: src/sys/arch/arm/broadcom/bcm53xx_mdio.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_mdio.c:1.1 src/sys/arch/arm/broadcom/bcm53xx_mdio.c:1.2
--- src/sys/arch/arm/broadcom/bcm53xx_mdio.c:1.1	Sat Sep  1 00:04:44 2012
+++ src/sys/arch/arm/broadcom/bcm53xx_mdio.c	Wed Feb 19 22:21:16 2014
@@ -33,8 +33,9 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_mdio.c,v 1.1 2012/09/01 00:04:44 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_mdio.c,v 1.2 2014/02/19 22:21:16 matt Exp $);
 
+#include sys/param.h
 #include sys/bus.h
 #include sys/device.h
 #include sys/intr.h
Index: src/sys/arch/arm/broadcom/bcm53xx_nand.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_nand.c:1.1 src/sys/arch/arm/broadcom/bcm53xx_nand.c:1.2
--- src/sys/arch/arm/broadcom/bcm53xx_nand.c:1.1	Mon Oct 28 22:51:16 2013
+++ src/sys/arch/arm/broadcom/bcm53xx_nand.c	Wed Feb 19 22:21:16 2014
@@ -31,8 +31,9 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_nand.c,v 1.1 2013/10/28 22:51:16 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_nand.c,v 1.2 2014/02/19 22:21:16 matt Exp $);
 
+#include sys/param.h
 #include sys/bus.h
 #include sys/device.h
 #include sys/intr.h
Index: src/sys/arch/arm/broadcom/bcm53xx_sdhc.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_sdhc.c:1.1 src/sys/arch/arm/broadcom/bcm53xx_sdhc.c:1.2
--- src/sys/arch/arm/broadcom/bcm53xx_sdhc.c:1.1	Sat Sep  1 00:04:44 2012
+++ src/sys/arch/arm/broadcom/bcm53xx_sdhc.c	Wed Feb 19 22:21:16 2014
@@ -31,8 +31,9 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_sdhc.c,v 1.1 2012/09/01 00:04:44 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_sdhc.c,v 1.2 2014/02/19 22:21:16 matt Exp $);
 
+#include sys/param.h
 #include sys/bus.h
 #include sys/device.h
 #include sys/intr.h

Index: src/sys/arch/arm/broadcom/bcm53xx_pax.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.10 src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.11
--- src/sys/arch/arm/broadcom/bcm53xx_pax.c:1.10	Sun Apr 21 19:59:39 2013
+++ src/sys/arch/arm/broadcom/bcm53xx_pax.c	Wed Feb 19 22:21:16 2014
@@ -34,8 +34,9 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_pax.c,v 1.10 2013/04/21 19:59:39 msaitoh Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_pax.c,v 1.11 2014/02/19 22:21:16 matt Exp $);
 
+#include sys/param.h
 #include sys/bus.h
 #include sys/device.h
 #include sys/extent.h

Index: src/sys/arch/arm/broadcom/bcm53xx_rng.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_rng.c:1.5 src/sys/arch/arm/broadcom/bcm53xx_rng.c:1.6
--- src/sys/arch/arm/broadcom/bcm53xx_rng.c:1.5	Tue Dec 17 13:13:26 2013
+++ src/sys/arch/arm/broadcom/bcm53xx_rng.c	Wed Feb 19 22:21:16 2014
@@ -33,8 +33,9 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_rng.c,v 1.5 2013/12/17 13:13:26 joerg Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_rng.c,v 1.6 2014/02/19 22:21:16 matt Exp $);
 
+#include sys/param.h
 #include sys/bus.h
 #include sys/callout.h
 #include sys/device.h

Index: src/sys/arch/arm/broadcom/bcm53xx_usb.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_usb.c:1.4 src/sys/arch/arm/broadcom/bcm53xx_usb.c:1.5
--- src/sys/arch/arm/broadcom/bcm53xx_usb.c:1.4	Mon Oct 28 22:51:16 2013
+++ src/sys/arch/arm/broadcom/bcm53xx_usb.c	Wed Feb 19 22:21:16 2014
@@ -32,8 +32,9 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_usb.c,v 1.4 2013/10/28 22:51:16 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_usb.c,v 1.5 2014/02/19 22:21:16 matt Exp $);
 
+#include sys/param.h
 #include sys/bus.h
 #include sys/device.h
 #include sys/intr.h



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

2014-02-19 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb 19 23:18:40 UTC 2014

Modified Files:
src/sys/arch/arm/cortex [matt-nb5-mips64]: files.cortex

Log Message:
arml2cc - needs-flag


To generate a diff of this commit:
cvs rdiff -u -r1.4.6.2 -r1.4.6.3 src/sys/arch/arm/cortex/files.cortex

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/cortex/files.cortex
diff -u src/sys/arch/arm/cortex/files.cortex:1.4.6.2 src/sys/arch/arm/cortex/files.cortex:1.4.6.3
--- src/sys/arch/arm/cortex/files.cortex:1.4.6.2	Sat Feb 15 16:18:36 2014
+++ src/sys/arch/arm/cortex/files.cortex	Wed Feb 19 23:18:40 2014
@@ -1,4 +1,4 @@
-# $NetBSD: files.cortex,v 1.4.6.2 2014/02/15 16:18:36 matt Exp $
+# $NetBSD: files.cortex,v 1.4.6.3 2014/02/19 23:18:40 matt Exp $
 
 defflag opt_cpu_in_cksum.h			NEON_IN_CKSUM
 
@@ -17,7 +17,7 @@ file	arch/arm/cortex/gic.c			armgic
 # ARM PL310 L2 Cache Controller(initially on Cortex-A9)
 device	arml2cc
 attach	arml2cc at armperiph
-file	arch/arm/cortex/pl310.c			arml2cc
+file	arch/arm/cortex/pl310.c			arml2cc	needs-flag
 
 # ARMv7 Generic Timer
 device	armgtmr



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

2014-02-19 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb 19 23:19:16 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_board.c

Log Message:
Fix coherent range for BCM563XX


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/broadcom/bcm53xx_board.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/broadcom/bcm53xx_board.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_board.c:1.18 src/sys/arch/arm/broadcom/bcm53xx_board.c:1.19
--- src/sys/arch/arm/broadcom/bcm53xx_board.c:1.18	Wed Feb 19 22:20:45 2014
+++ src/sys/arch/arm/broadcom/bcm53xx_board.c	Wed Feb 19 23:19:16 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_board.c,v 1.18 2014/02/19 22:20:45 matt Exp $	*/
+/*	$NetBSD: bcm53xx_board.c,v 1.19 2014/02/19 23:19:16 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.18 2014/02/19 22:20:45 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.19 2014/02/19 23:19:16 matt Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -78,14 +78,14 @@ struct arm32_dma_range bcm53xx_dma_range
 		.dr_sysbase = 0x9000,
 		.dr_busbase = 0x9000,
 	},
-#elif defined(BCM56340)
+#elif defined(BCM563XX)
 	[0] = {
 		.dr_sysbase = 0x6000,
 		.dr_busbase = 0x6000,
 		.dr_len = 0x2000,
 	}, [1] = {
-		.dr_sysbase = 0xa000,
-		.dr_busbase = 0xa000,
+		.dr_sysbase = 0x8000,
+		.dr_busbase = 0x8000,
 	}.
 #endif
 };
@@ -116,8 +116,8 @@ struct arm32_dma_range bcm53xx_coherent_
 		.dr_len = 0x2000,
 		.dr_flags = _BUS_DMAMAP_COHERENT,
 	}, [1] = {
-		.dr_sysbase = 0xa000,
-		.dr_busbase = 0xa000,
+		.dr_sysbase = 0x8000,
+		.dr_busbase = 0x8000,
 	},
 #endif
 };



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

2014-02-19 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb 19 23:19:57 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom [matt-nb5-mips64]: bcm53xx_board.c

Log Message:
Fix dmaranges for BCM563XX
Conditionalize call to arml2cc_init


To generate a diff of this commit:
cvs rdiff -u -r1.17.2.2 -r1.17.2.3 src/sys/arch/arm/broadcom/bcm53xx_board.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/broadcom/bcm53xx_board.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_board.c:1.17.2.2 src/sys/arch/arm/broadcom/bcm53xx_board.c:1.17.2.3
--- src/sys/arch/arm/broadcom/bcm53xx_board.c:1.17.2.2	Sat Feb 15 16:18:36 2014
+++ src/sys/arch/arm/broadcom/bcm53xx_board.c	Wed Feb 19 23:19:57 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_board.c,v 1.17.2.2 2014/02/15 16:18:36 matt Exp $	*/
+/*	$NetBSD: bcm53xx_board.c,v 1.17.2.3 2014/02/19 23:19:57 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,12 +29,13 @@
  */
 
 #include opt_broadcom.h
+#include arml2cc.h
 
 #define	_ARM32_BUS_DMA_PRIVATE
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.17.2.2 2014/02/15 16:18:36 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.17.2.3 2014/02/19 23:19:57 matt Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -83,8 +84,8 @@ struct arm32_dma_range bcm53xx_dma_range
 		.dr_busbase = 0x6000,
 		.dr_len = 0x2000,
 	}, [1] = {
-		.dr_sysbase = 0xa000,
-		.dr_busbase = 0xa000,
+		.dr_sysbase = 0x8000,
+		.dr_busbase = 0x8000,
 	},
 #endif
 };
@@ -115,8 +116,8 @@ struct arm32_dma_range bcm53xx_coherent_
 		.dr_len = 0x2000,
 		.dr_flags = _BUS_DMAMAP_COHERENT,
 	}, [1] = {
-		.dr_sysbase = 0xa000,
-		.dr_busbase = 0xa000,
+		.dr_sysbase = 0x8000,
+		.dr_busbase = 0x8000,
 	},
 #endif
 };
@@ -554,8 +555,10 @@ bcm53xx_bootstrap(vaddr_t iobase)
 
 	curcpu()-ci_data.cpu_cc_freq = clk-clk_cpu;
 
+#if NARML2CC  0
 	arml2cc_init(bcm53xx_armcore_bst, bcm53xx_armcore_bsh,
 	ARMCORE_L2C_BASE);
+#endif
 }
 
 void



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

2014-02-19 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Feb 19 23:21:02 UTC 2014

Modified Files:
src/sys/arch/arm/broadcom: bcm53xx_board.c

Log Message:
fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/broadcom/bcm53xx_board.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/broadcom/bcm53xx_board.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_board.c:1.19 src/sys/arch/arm/broadcom/bcm53xx_board.c:1.20
--- src/sys/arch/arm/broadcom/bcm53xx_board.c:1.19	Wed Feb 19 23:19:16 2014
+++ src/sys/arch/arm/broadcom/bcm53xx_board.c	Wed Feb 19 23:21:02 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_board.c,v 1.19 2014/02/19 23:19:16 matt Exp $	*/
+/*	$NetBSD: bcm53xx_board.c,v 1.20 2014/02/19 23:21:02 matt Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.19 2014/02/19 23:19:16 matt Exp $);
+__KERNEL_RCSID(1, $NetBSD: bcm53xx_board.c,v 1.20 2014/02/19 23:21:02 matt Exp $);
 
 #include sys/param.h
 #include sys/bus.h
@@ -86,7 +86,7 @@ struct arm32_dma_range bcm53xx_dma_range
 	}, [1] = {
 		.dr_sysbase = 0x8000,
 		.dr_busbase = 0x8000,
-	}.
+	},
 #endif
 };
 



CVS commit: src/sys/lib/libsa

2014-02-19 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Feb 20 00:29:03 UTC 2014

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

Log Message:
Casting to void is the canonical way of marking a variable as
potentially unused.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/lib/libsa/loadfile_aout.c

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

Modified files:

Index: src/sys/lib/libsa/loadfile_aout.c
diff -u src/sys/lib/libsa/loadfile_aout.c:1.14 src/sys/lib/libsa/loadfile_aout.c:1.15
--- src/sys/lib/libsa/loadfile_aout.c:1.14	Sun Aug 16 13:26:16 2009
+++ src/sys/lib/libsa/loadfile_aout.c	Thu Feb 20 00:29:03 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: loadfile_aout.c,v 1.14 2009/08/16 13:26:16 matt Exp $ */
+/* $NetBSD: loadfile_aout.c,v 1.15 2014/02/20 00:29:03 joerg Exp $ */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -96,8 +96,8 @@ loadfile_aout(int fd, struct exec *x, u_
 	int sub;
 	ssize_t nr;
 
-	/* some ports dont use the offset */
-	offset = offset;
+	/* some ports don't use the offset */
+	(void)offset;
 
 	/* In OMAGIC and NMAGIC, exec header isn't part of text segment */
 	if (magic == OMAGIC || magic == NMAGIC)



CVS commit: src/sys/rump

2014-02-19 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Feb 20 00:41:05 UTC 2014

Modified Files:
src/sys/rump/include/rump: rump.h
src/sys/rump/librump/rumpkern: signals.c

Log Message:
Remove the host signal model.  I'm not sure it ever made any sense.
I'm also quite sure nobody ever really wanted to use it.

Change the raise sigmodel to include the rump kernel PID in the call
to rumpuser_kill().  The purpose is to provide some hint for non-POSIX
platforms which don't sport signals and multiplex many clients in a
single address space.

While this is technically an ABI change, see above.  Also, since
rumpuser_kill() was not documented, I'll just claim I'm fixing a bug in
the implementation (and will be sure to document the interface correctly
very soon).


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/rump/include/rump/rump.h
cvs rdiff -u -r1.12 -r1.13 src/sys/rump/librump/rumpkern/signals.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/include/rump/rump.h
diff -u src/sys/rump/include/rump/rump.h:1.57 src/sys/rump/include/rump/rump.h:1.58
--- src/sys/rump/include/rump/rump.h:1.57	Tue Jul 16 20:17:06 2013
+++ src/sys/rump/include/rump/rump.h	Thu Feb 20 00:41:05 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.h,v 1.57 2013/07/16 20:17:06 pooka Exp $	*/
+/*	$NetBSD: rump.h,v 1.58 2014/02/20 00:41:05 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -71,7 +71,7 @@ enum rump_uiorw { RUMPUIO_READ, RUMPUIO_
 enum rump_sigmodel {
 	RUMP_SIGMODEL_PANIC,
 	RUMP_SIGMODEL_IGNORE,
-	RUMP_SIGMODEL_HOST,
+	RUMP_SIGMODEL__HOST_NOTANYMORE,
 	RUMP_SIGMODEL_RAISE,
 	RUMP_SIGMODEL_RECORD
 };

Index: src/sys/rump/librump/rumpkern/signals.c
diff -u src/sys/rump/librump/rumpkern/signals.c:1.12 src/sys/rump/librump/rumpkern/signals.c:1.13
--- src/sys/rump/librump/rumpkern/signals.c:1.12	Fri Nov 22 21:56:24 2013
+++ src/sys/rump/librump/rumpkern/signals.c	Thu Feb 20 00:41:05 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: signals.c,v 1.12 2013/11/22 21:56:24 christos Exp $	*/
+/*	$NetBSD: signals.c,v 1.13 2014/02/20 00:41:05 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: signals.c,v 1.12 2013/11/22 21:56:24 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: signals.c,v 1.13 2014/02/20 00:41:05 pooka Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -84,15 +84,6 @@ rumpsig_ignore(struct proc *p, int signo
 	return;
 }
 
-/* RUMP_SIGMODEL_HOST */
-
-static void
-rumpsig_host(struct proc *p, int signo)
-{
-
-	rumpuser_kill(p-p_pid, signo);
-}
-
 /* RUMP_SIGMODEL_RAISE */
 
 static void
@@ -100,7 +91,7 @@ rumpsig_raise(struct proc *p, int signo)
 {
 
 	if (RUMP_LOCALPROC_P(p)) {
-		rumpuser_kill(RUMPUSER_PID_SELF, signo);
+		rumpuser_kill(p-p_pid, signo);
 	} else {
 		rumpuser_sp_raise(p-p_vmspace-vm_map.pmap, signo);
 	}
@@ -139,15 +130,17 @@ rump_boot_setsigmodel(enum rump_sigmodel
 	case RUMP_SIGMODEL_IGNORE:
 		rumpsig = rumpsig_ignore;
 		break;
-	case RUMP_SIGMODEL_HOST:
-		rumpsig = rumpsig_host;
-		break;
 	case RUMP_SIGMODEL_RAISE:
 		rumpsig = rumpsig_raise;
 		break;
 	case RUMP_SIGMODEL_RECORD:
 		rumpsig = rumpsig_record;
 		break;
+
+	/* for compat, though I doubt anyone is using it */
+	case RUMP_SIGMODEL__HOST_NOTANYMORE:
+		rumpsig = rumpsig_raise;
+		break;
 	}
 }
 



CVS commit: src/lib

2014-02-19 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Feb 20 00:42:27 UTC 2014

Modified Files:
src/lib/librumpclient: rumpclient.c
src/lib/librumpuser: Makefile rumpuser.c
Added Files:
src/lib/librumpuser: rumpuser_sigtrans.c

Log Message:
Translate signal numbers between rump kernel and (POSIX) host.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/lib/librumpclient/rumpclient.c
cvs rdiff -u -r1.15 -r1.16 src/lib/librumpuser/Makefile
cvs rdiff -u -r1.55 -r1.56 src/lib/librumpuser/rumpuser.c
cvs rdiff -u -r0 -r1.1 src/lib/librumpuser/rumpuser_sigtrans.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/librumpclient/rumpclient.c
diff -u src/lib/librumpclient/rumpclient.c:1.55 src/lib/librumpclient/rumpclient.c:1.56
--- src/lib/librumpclient/rumpclient.c:1.55	Tue Sep 10 16:53:06 2013
+++ src/lib/librumpclient/rumpclient.c	Thu Feb 20 00:42:27 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: rumpclient.c,v 1.55 2013/09/10 16:53:06 pooka Exp $	*/
+/*  $NetBSD: rumpclient.c,v 1.56 2014/02/20 00:42:27 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -48,7 +48,7 @@
 #define USE_KQUEUE
 #endif
 
-__RCSID($NetBSD: rumpclient.c,v 1.55 2013/09/10 16:53:06 pooka Exp $);
+__RCSID($NetBSD: rumpclient.c,v 1.56 2014/02/20 00:42:27 pooka Exp $);
 
 #include sys/param.h
 #include sys/mman.h
@@ -99,6 +99,7 @@ int	(*host_kevent)(int, const struct kev
 int	(*host_execve)(const char *, char *const[], char *const[]);
 
 #include sp_common.c
+#include rumpuser_sigtrans.c
 
 static struct spclient clispc = {
 	.spc_fd = -1,
@@ -590,6 +591,7 @@ handlereq(struct spclient *spc)
 	void *mapaddr;
 	size_t maplen;
 	int reqtype = spc-spc_hdr.rsp_type;
+	int sig;
 
 	switch (reqtype) {
 	case RUMPSP_COPYIN:
@@ -623,8 +625,9 @@ handlereq(struct spclient *spc)
 		send_anonmmap_resp(spc, spc-spc_hdr.rsp_reqno, mapaddr);
 		break;
 	case RUMPSP_RAISE:
-		DPRINTF((rump_sp handlereq: raise sig %d\n, rhdr-rsp_signo));
-		raise((int)rhdr-rsp_signo);
+		sig = rumpuser__sig_rump2host(rhdr-rsp_signo);
+		DPRINTF((rump_sp handlereq: raise sig %d\n, sig));
+		raise(sig);
 		/*
 		 * We most likely have signals blocked, but the signal
 		 * will be handled soon enough when we return.

Index: src/lib/librumpuser/Makefile
diff -u src/lib/librumpuser/Makefile:1.15 src/lib/librumpuser/Makefile:1.16
--- src/lib/librumpuser/Makefile:1.15	Tue Sep 10 16:51:24 2013
+++ src/lib/librumpuser/Makefile	Thu Feb 20 00:42:27 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2013/09/10 16:51:24 pooka Exp $
+#	$NetBSD: Makefile,v 1.16 2014/02/20 00:42:27 pooka Exp $
 #
 
 .include bsd.own.mk
@@ -19,7 +19,9 @@ CPPFLAGS+=	-DLIBRUMPUSER
 
 SRCS=		rumpuser.c
 SRCS+=		rumpuser_pth.c
-SRCS+=		rumpuser_component.c rumpuser_errtrans.c rumpuser_bio.c
+SRCS+=		rumpuser_component.c rumpuser_bio.c
+
+SRCS+=		rumpuser_errtrans.c rumpuser_sigtrans.c
 
 # optional
 SRCS+=		rumpuser_dl.c rumpuser_sp.c rumpuser_daemonize.c

Index: src/lib/librumpuser/rumpuser.c
diff -u src/lib/librumpuser/rumpuser.c:1.55 src/lib/librumpuser/rumpuser.c:1.56
--- src/lib/librumpuser/rumpuser.c:1.55	Sun Oct 27 16:39:46 2013
+++ src/lib/librumpuser/rumpuser.c	Thu Feb 20 00:42:27 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser.c,v 1.55 2013/10/27 16:39:46 rmind Exp $	*/
+/*	$NetBSD: rumpuser.c,v 1.56 2014/02/20 00:42:27 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #include rumpuser_port.h
 
 #if !defined(lint)
-__RCSID($NetBSD: rumpuser.c,v 1.55 2013/10/27 16:39:46 rmind Exp $);
+__RCSID($NetBSD: rumpuser.c,v 1.56 2014/02/20 00:42:27 pooka Exp $);
 #endif /* !lint */
 
 #include sys/ioctl.h
@@ -643,13 +643,12 @@ rumpuser_dprintf(const char *format, ...
 }
 
 int
-rumpuser_kill(int64_t pid, int sig)
+rumpuser_kill(int64_t pid, int rumpsig)
 {
-	int rv;
-
-#ifdef __NetBSD__
+	int rv, sig;
 	int error;
 
+	sig = rumpuser__sig_rump2host(rumpsig);
 	if (pid == RUMPUSER_PID_SELF) {
 		error = raise(sig);
 	} else {
@@ -659,10 +658,6 @@ rumpuser_kill(int64_t pid, int sig)
 		rv = errno;
 	else
 		rv = 0;
-#else
-	/* XXXfixme: signal numbers may not match on non-NetBSD */
-	rv = EOPNOTSUPP;
-#endif
 
 	ET(rv);
 }

Added files:

Index: src/lib/librumpuser/rumpuser_sigtrans.c
diff -u /dev/null src/lib/librumpuser/rumpuser_sigtrans.c:1.1
--- /dev/null	Thu Feb 20 00:42:27 2014
+++ src/lib/librumpuser/rumpuser_sigtrans.c	Thu Feb 20 00:42:27 2014
@@ -0,0 +1,126 @@
+/*	$NetBSD: rumpuser_sigtrans.c,v 1.1 2014/02/20 00:42:27 pooka Exp $	*/
+
+/*
+ * pseudo-automatically generated.  PLEASE DO EDIT (e.g. in case there
+ * are errnos which are defined to be the same value)
+ *
+ * The body of the switch statement was generated using:
+ *
+ * awk '/^#define/  $2 ~ ^SIG[A-Z] \
+ *   {printf #ifdef %s\n\tcase %d\t: return %s;\n#endif\n, $2, $3, $2}' \
+ *   signal.h
+ */
+
+#include signal.h
+
+/*
+ * 

CVS commit: src/lib/librumpuser

2014-02-19 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Feb 20 00:43:26 UTC 2014

Modified Files:
src/lib/librumpuser: rumpuser.3

Log Message:
document rumpuser_kill()


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/librumpuser/rumpuser.3

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

Modified files:

Index: src/lib/librumpuser/rumpuser.3
diff -u src/lib/librumpuser/rumpuser.3:1.17 src/lib/librumpuser/rumpuser.3:1.18
--- src/lib/librumpuser/rumpuser.3:1.17	Fri Feb 14 00:33:51 2014
+++ src/lib/librumpuser/rumpuser.3	Thu Feb 20 00:43:26 2014
@@ -1,4 +1,4 @@
-.\ $NetBSD: rumpuser.3,v 1.17 2014/02/14 00:33:51 pooka Exp $
+.\ $NetBSD: rumpuser.3,v 1.18 2014/02/20 00:43:26 pooka Exp $
 .\
 .\ Copyright (c) 2013 Antti Kantee.  All rights reserved.
 .\
@@ -23,7 +23,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd February 13, 2013
+.Dd February 19, 2014
 .Dt RUMPUSER 3
 .Os
 .Sh NAME
@@ -428,6 +428,51 @@ on the console.
 .Fn rumpuser_dprintf const char *fmt ...
 .Pp
 Do output based on printf-like parameters.
+.Ss Signals
+.Pp
+A rump kernel should be able to send signals to client programs
+due to some standard interfaces including signal delivery in their
+specifications.
+Examples of these interfaces include
+.Xr setitimer 2
+and
+.Xr write 2 .
+The
+.Fn rumpuser_kill
+function advises the hypercall implementation to raise a signal for the
+process containing the rump kernel.
+.Pp
+.Ft int
+.Fn rumpuser_kill int64_t pid int sig
+.Pp
+.Bl -tag -width xenum_rumpclock
+.It Fa pid
+The pid of the rump kernel process that the signal is directed to.
+This value may be used as the hypervisor as a hint on how to deliver
+the signal.
+The value
+.Dv RUMPUSER_PID_SELF
+may also be specified to indicate no hint.
+This value will be removed in a future version of the hypercall interface.
+.It Fa sig
+Number of signal to raise.
+The value is in NetBSD signal number namespace.
+In case the host has a native representation for signals, the
+value should be translated before the signal is raised.
+In case there is no mapping between
+.Fa sig
+and native signals (if any), the behavior is implementation-defined.
+.El
+.Pp
+A rump kernel will ignore the return value of this hypercall.
+The only implication of not implementing
+.Fn rumpuser_kill
+is that some application programs may not experience expected behavior
+for standard interfaces.
+.Pp
+As an aside,the
+.Xr rump_sp 7
+protocol provides equivalent functionality for remote clients.
 .Ss Random pool
 .Ft int
 .Fn rumpuser_getrandom void *buf size_t buflen int flags size_t *retp



CVS commit: src/lib/librumpuser

2014-02-19 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Feb 20 00:44:20 UTC 2014

Modified Files:
src/lib/librumpuser: rumpuser.c

Log Message:
make implementation of rumpuser_kill() match the documentation


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/lib/librumpuser/rumpuser.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/librumpuser/rumpuser.c
diff -u src/lib/librumpuser/rumpuser.c:1.56 src/lib/librumpuser/rumpuser.c:1.57
--- src/lib/librumpuser/rumpuser.c:1.56	Thu Feb 20 00:42:27 2014
+++ src/lib/librumpuser/rumpuser.c	Thu Feb 20 00:44:20 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser.c,v 1.56 2014/02/20 00:42:27 pooka Exp $	*/
+/*	$NetBSD: rumpuser.c,v 1.57 2014/02/20 00:44:20 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #include rumpuser_port.h
 
 #if !defined(lint)
-__RCSID($NetBSD: rumpuser.c,v 1.56 2014/02/20 00:42:27 pooka Exp $);
+__RCSID($NetBSD: rumpuser.c,v 1.57 2014/02/20 00:44:20 pooka Exp $);
 #endif /* !lint */
 
 #include sys/ioctl.h
@@ -645,21 +645,12 @@ rumpuser_dprintf(const char *format, ...
 int
 rumpuser_kill(int64_t pid, int rumpsig)
 {
-	int rv, sig;
-	int error;
+	int sig;
 
 	sig = rumpuser__sig_rump2host(rumpsig);
-	if (pid == RUMPUSER_PID_SELF) {
-		error = raise(sig);
-	} else {
-		error = kill((pid_t)pid, sig);
-	}
-	if (error == -1)
-		rv = errno;
-	else
-		rv = 0;
-
-	ET(rv);
+	if (sig  0)
+		raise(sig);
+	return 0;
 }
 
 int



CVS commit: src/sys/rump/librump/rumpkern

2014-02-19 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Feb 20 01:01:10 UTC 2014

Modified Files:
src/sys/rump/librump/rumpkern: emul.c

Log Message:
+ resettodr


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/sys/rump/librump/rumpkern/emul.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/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.162 src/sys/rump/librump/rumpkern/emul.c:1.163
--- src/sys/rump/librump/rumpkern/emul.c:1.162	Wed Jan 29 18:42:14 2014
+++ src/sys/rump/librump/rumpkern/emul.c	Thu Feb 20 01:01:10 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.162 2014/01/29 18:42:14 pooka Exp $	*/
+/*	$NetBSD: emul.c,v 1.163 2014/02/20 01:01:10 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.162 2014/01/29 18:42:14 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: emul.c,v 1.163 2014/02/20 01:01:10 pooka Exp $);
 
 #include sys/param.h
 #include sys/null.h
@@ -280,6 +280,13 @@ cnflush(void)
 	/* done */
 }
 
+void
+resettodr(void)
+{
+
+	/* setting clocks is not in the jurisdiction of rump kernels */
+}
+
 #ifdef __HAVE_SYSCALL_INTERN
 void
 syscall_intern(struct proc *p)



CVS commit: src/lib/librumpuser

2014-02-19 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Feb 20 01:24:49 UTC 2014

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

Log Message:
remember to commit this file too


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/librumpuser/rumpuser_int.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_int.h
diff -u src/lib/librumpuser/rumpuser_int.h:1.8 src/lib/librumpuser/rumpuser_int.h:1.9
--- src/lib/librumpuser/rumpuser_int.h:1.8	Tue Apr 30 12:39:20 2013
+++ src/lib/librumpuser/rumpuser_int.h	Thu Feb 20 01:24:49 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser_int.h,v 1.8 2013/04/30 12:39:20 pooka Exp $	*/
+/*	$NetBSD: rumpuser_int.h,v 1.9 2014/02/20 01:24:49 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -94,6 +94,7 @@ do {	\
 	}\
 } while (/*CONSTCOND*/0)
 
+int  rumpuser__sig_rump2host(int);
 int  rumpuser__errtrans(int);
 #ifdef __NetBSD__
 #define ET(_v_) return (_v_);



CVS commit: src/sys/arch/sparc64/sparc64

2014-02-19 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Feb 20 01:40:42 UTC 2014

Modified Files:
src/sys/arch/sparc64/sparc64: trap.c

Log Message:
Use a format string.


To generate a diff of this commit:
cvs rdiff -u -r1.179 -r1.180 src/sys/arch/sparc64/sparc64/trap.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/sparc64/sparc64/trap.c
diff -u src/sys/arch/sparc64/sparc64/trap.c:1.179 src/sys/arch/sparc64/sparc64/trap.c:1.180
--- src/sys/arch/sparc64/sparc64/trap.c:1.179	Sun Sep 15 14:49:50 2013
+++ src/sys/arch/sparc64/sparc64/trap.c	Thu Feb 20 01:40:42 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.179 2013/09/15 14:49:50 martin Exp $ */
+/*	$NetBSD: trap.c,v 1.180 2014/02/20 01:40:42 joerg Exp $ */
 
 /*
  * Copyright (c) 1996-2002 Eduardo Horvath.  All rights reserved.
@@ -50,7 +50,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.179 2013/09/15 14:49:50 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: trap.c,v 1.180 2014/02/20 01:40:42 joerg Exp $);
 
 #include opt_ddb.h
 #include opt_multiprocessor.h
@@ -577,7 +577,7 @@ dopanic:
 printf( npc=%lx pstate=%s\n,
    (long)tf-tf_npc, sb);
 DEBUGGER(type, tf);
-panic(type  N_TRAP_TYPES ? trap_type[type] : T);
+panic(%s, type  N_TRAP_TYPES ? trap_type[type] : T);
 			}
 			/* NOTREACHED */
 		}



CVS commit: src/sys/dev/pci

2014-02-19 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Feb 20 01:41:28 UTC 2014

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

Log Message:
Mark radeonfb_unclip as unused.


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

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

Modified files:

Index: src/sys/dev/pci/radeonfb.c
diff -u src/sys/dev/pci/radeonfb.c:1.82 src/sys/dev/pci/radeonfb.c:1.83
--- src/sys/dev/pci/radeonfb.c:1.82	Wed Jan 22 07:57:33 2014
+++ src/sys/dev/pci/radeonfb.c	Thu Feb 20 01:41:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: radeonfb.c,v 1.82 2014/01/22 07:57:33 macallan Exp $ */
+/*	$NetBSD: radeonfb.c,v 1.83 2014/02/20 01:41:28 joerg Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: radeonfb.c,v 1.82 2014/01/22 07:57:33 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: radeonfb.c,v 1.83 2014/02/20 01:41:28 joerg Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -163,7 +163,7 @@ static void radeonfb_engine_idle(struct 
 static void radeonfb_engine_flush(struct radeonfb_softc *);
 static void radeonfb_engine_reset(struct radeonfb_softc *);
 static void radeonfb_engine_init(struct radeonfb_display *);
-static inline void radeonfb_unclip(struct radeonfb_softc *);
+static inline void radeonfb_unclip(struct radeonfb_softc *) __unused;
 
 static void radeonfb_eraserows(void *, int, int, long);
 static void radeonfb_erasecols(void *, int, int, int, long);



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

2014-02-19 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Feb 20 02:09:58 UTC 2014

Modified Files:
src/external/gpl2/lvm2/dist/include: xlate.h
src/external/gpl2/lvm2/dist/lib/mm: xlate.h

Log Message:
Use sys/endian.h for bswapXX.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/lvm2/dist/include/xlate.h
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/lvm2/dist/lib/mm/xlate.h

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

Modified files:

Index: src/external/gpl2/lvm2/dist/include/xlate.h
diff -u src/external/gpl2/lvm2/dist/include/xlate.h:1.1.1.1 src/external/gpl2/lvm2/dist/include/xlate.h:1.2
--- src/external/gpl2/lvm2/dist/include/xlate.h:1.1.1.1	Mon Dec 22 00:18:44 2008
+++ src/external/gpl2/lvm2/dist/include/xlate.h	Thu Feb 20 02:09:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: xlate.h,v 1.1.1.1 2008/12/22 00:18:44 haad Exp $	*/
+/*	$NetBSD: xlate.h,v 1.2 2014/02/20 02:09:58 joerg Exp $	*/
 
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.  
@@ -21,6 +21,11 @@
 #ifdef linux
 #  include endian.h
 #  include byteswap.h
+#elif defined(__NetBSD__)
+#  include sys/endian.h
+#  define bswap_16(x) bswap16(x)
+#  define bswap_32(x) bswap32(x)
+#  define bswap_64(x) bswap64(x)
 #else
 #  include machine/endian.h
 #  define bswap_16(x) (((x)  0x00ffU)  8 | \

Index: src/external/gpl2/lvm2/dist/lib/mm/xlate.h
diff -u src/external/gpl2/lvm2/dist/lib/mm/xlate.h:1.1.1.1 src/external/gpl2/lvm2/dist/lib/mm/xlate.h:1.2
--- src/external/gpl2/lvm2/dist/lib/mm/xlate.h:1.1.1.1	Mon Dec 22 00:18:13 2008
+++ src/external/gpl2/lvm2/dist/lib/mm/xlate.h	Thu Feb 20 02:09:58 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: xlate.h,v 1.1.1.1 2008/12/22 00:18:13 haad Exp $	*/
+/*	$NetBSD: xlate.h,v 1.2 2014/02/20 02:09:58 joerg Exp $	*/
 
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.  
@@ -21,6 +21,11 @@
 #ifdef linux
 #  include endian.h
 #  include byteswap.h
+#elif defined(__NetBSD__)
+#  include sys/endian.h
+#  define bswap_16(x) bswap16(x)
+#  define bswap_32(x) bswap32(x)
+#  define bswap_64(x) bswap64(x)
 #else
 #  include machine/endian.h
 #  define bswap_16(x) (((x)  0x00ffU)  8 | \



CVS commit: src/sys/dev/sun

2014-02-19 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Feb 20 02:09:28 UTC 2014

Modified Files:
src/sys/dev/sun: bwtwo.c

Log Message:
Call memset in a loop, not loop around doing nothing and calling memset
once.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/sun/bwtwo.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/sun/bwtwo.c
diff -u src/sys/dev/sun/bwtwo.c:1.31 src/sys/dev/sun/bwtwo.c:1.32
--- src/sys/dev/sun/bwtwo.c:1.31	Mon Dec  2 15:54:06 2013
+++ src/sys/dev/sun/bwtwo.c	Thu Feb 20 02:09:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bwtwo.c,v 1.31 2013/12/02 15:54:06 jdc Exp $ */
+/*	$NetBSD: bwtwo.c,v 1.32 2014/02/20 02:09:28 joerg Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bwtwo.c,v 1.31 2013/12/02 15:54:06 jdc Exp $);
+__KERNEL_RCSID(0, $NetBSD: bwtwo.c,v 1.32 2014/02/20 02:09:28 joerg Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -458,7 +458,7 @@ bwtwo_init_screen(void *cookie, struct v
 	 */
 	for (bits = (char *) ri-ri_bits;
 	bits  (char *) ri-ri_bits + ri-ri_stride * ri-ri_height;
-	bits += 4);
+	bits += 4)
 		memset(bits, (*defattr  16)  0xff, 4);
 	rasops_init(ri, 0, 0);
 	ri-ri_caps = 0;



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

2014-02-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Feb 20 03:48:06 UTC 2014

Modified Files:
src/sys/arch/amd64/conf: files.amd64

Log Message:
Since fpu.c is contained in every kernel, and it calls routines in
convert_xmm_s87.c we need to include convert_xmm_s87.c in all kernels.

Fixes building of kernels that do not have COMPAT_NETBSD32 defined.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/amd64/conf/files.amd64

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/amd64/conf/files.amd64
diff -u src/sys/arch/amd64/conf/files.amd64:1.82 src/sys/arch/amd64/conf/files.amd64:1.83
--- src/sys/arch/amd64/conf/files.amd64:1.82	Tue Feb 11 20:17:16 2014
+++ src/sys/arch/amd64/conf/files.amd64	Thu Feb 20 03:48:06 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amd64,v 1.82 2014/02/11 20:17:16 dsl Exp $
+#	$NetBSD: files.amd64,v 1.83 2014/02/20 03:48:06 pgoyette Exp $
 #
 # new style config file for amd64 architecture
 #
@@ -43,6 +43,7 @@ file	arch/amd64/amd64/machdep.c
 file	arch/amd64/amd64/process_machdep.c
 file	arch/amd64/amd64/trap.c
 file	arch/x86/x86/fpu.c
+file	arch/x86/x86/convert_xmm_s87.c
 file	arch/amd64/amd64/lock_stubs.S
 file	dev/cons.c
 
@@ -133,7 +134,6 @@ attach	fd at fdc
 # NetBSD/i386 32-bit binary compatibility (COMPAT_NETBSD32)
 include compat/netbsd32/files.netbsd32
 file	arch/amd64/amd64/netbsd32_machdep.c	compat_netbsd32
-file	arch/x86/x86/convert_xmm_s87.c		compat_netbsd32
 file	arch/amd64/amd64/netbsd32_sigcode.S	compat_netbsd32  compat_16
 file	arch/amd64/amd64/netbsd32_syscall.c	compat_netbsd32