CVS commit: src

2016-07-09 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jul 10 04:44:47 UTC 2016

Modified Files:
src/share/man/man4: piixpm.4
src/sys/dev/pci: piixpm.c

Log Message:
The piixpm(4) driver also supports AMD's HUDSON chipset's SMBus function.

>From OpenBSD, verified.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/piixpm.4
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/piixpm.c

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

Modified files:

Index: src/share/man/man4/piixpm.4
diff -u src/share/man/man4/piixpm.4:1.6 src/share/man/man4/piixpm.4:1.7
--- src/share/man/man4/piixpm.4:1.6	Tue Mar 18 18:20:39 2014
+++ src/share/man/man4/piixpm.4	Sun Jul 10 04:44:47 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: piixpm.4,v 1.6 2014/03/18 18:20:39 riastradh Exp $
+.\" $NetBSD: piixpm.4,v 1.7 2016/07/10 04:44:47 pgoyette Exp $
 .\"	$OpenBSD: piixpm.4,v 1.9 2006/01/18 03:06:33 brad Exp $
 .\"
 .\" Copyright (c) 2004, 2005 Alexander Yurchenko 
@@ -15,7 +15,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd March 26, 2008
+.Dd July 10, 2016
 .Dt PIIXPM 4
 .Os
 .Sh NAME
@@ -42,6 +42,8 @@ ATI SB200, SB300, SB400, SB600, SB700, S
 Intel 82371AB (PIIX4), 82440MX
 .It
 Serverworks OSB4, OSB5, OSB6, HT1000SB
+.It
+AMD HUDSON
 .El
 .Sh SEE ALSO
 .Xr iic 4 ,

Index: src/sys/dev/pci/piixpm.c
diff -u src/sys/dev/pci/piixpm.c:1.47 src/sys/dev/pci/piixpm.c:1.48
--- src/sys/dev/pci/piixpm.c:1.47	Thu Dec 10 05:29:41 2015
+++ src/sys/dev/pci/piixpm.c	Sun Jul 10 04:44:47 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: piixpm.c,v 1.47 2015/12/10 05:29:41 pgoyette Exp $ */
+/* $NetBSD: piixpm.c,v 1.48 2016/07/10 04:44:47 pgoyette Exp $ */
 /*	$OpenBSD: piixpm.c,v 1.20 2006/02/27 08:25:02 grange Exp $	*/
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: piixpm.c,v 1.47 2015/12/10 05:29:41 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: piixpm.c,v 1.48 2016/07/10 04:44:47 pgoyette Exp $");
 
 #include 
 #include 
@@ -144,6 +144,11 @@ piixpm_match(device_t parent, cfdata_t m
 		case PCI_PRODUCT_SERVERWORKS_HT1000SB:
 			return 1;
 		}
+	case PCI_VENDOR_AMD:
+		switch (PCI_PRODUCT(pa->pa_id)) {
+		case PCI_PRODUCT_AMD_HUDSON_SMB:
+			return 1;
+		}
 	}
 
 	return 0;
@@ -205,7 +210,15 @@ piixpm_attach(device_t parent, device_t 
 
 nopowermanagement:
 
-	/* SB800 rev 0x40+ needs special initialization */
+	/* SB800 rev 0x40+ and AMD HUDSON need special initialization */
+	if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_AMD &&
+	PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_AMD_HUDSON_SMB) {
+		if (piixpm_sb800_init(sc) == 0) {
+			goto attach_i2c;
+		}
+		aprint_normal_dev(self, "SMBus initialization failed\n");
+		return;
+	}
 	if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_ATI &&
 	PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ATI_SB600_SMB &&
 	PCI_REVISION(pa->pa_class) >= 0x40) {
@@ -213,7 +226,7 @@ nopowermanagement:
 			sc->sc_numbusses = 4;
 			goto attach_i2c;
 		}
-		aprint_normal_dev(self, "SMBus disabled\n");
+		aprint_normal_dev(self, "SMBus initialization failed\n");
 		return;
 	}
 



CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon

2016-07-09 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jul 10 01:35:27 UTC 2016

Modified Files:
src/sys/external/bsd/drm2/dist/drm/radeon: radeon_ttm.c

Log Message:
Don't assign value to rdev unless we're going to use the value.

Therefore, don't declare the variable unless we're going to assign it a
value.


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

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

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c
diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c:1.8 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c:1.9
--- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c:1.8	Sun Apr 24 04:26:12 2016
+++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c	Sun Jul 10 01:35:27 2016
@@ -609,7 +609,6 @@ static struct ttm_tt *radeon_ttm_tt_crea
 
 static int radeon_ttm_tt_populate(struct ttm_tt *ttm)
 {
-	struct radeon_device *rdev;
 	struct radeon_ttm_tt *gtt = (void *)ttm;
 #ifndef __NetBSD__
 	unsigned i;
@@ -631,8 +630,8 @@ static int radeon_ttm_tt_populate(struct
 #endif
 	}
 
-	rdev = radeon_get_rdev(ttm->bdev);
 #if __OS_HAS_AGP
+	struct radeon_device *rdev = radeon_get_rdev(ttm->bdev);
 	if (rdev->flags & RADEON_IS_AGP) {
 		return ttm_agp_tt_populate(ttm);
 	}
@@ -644,6 +643,9 @@ static int radeon_ttm_tt_populate(struct
 #else
 
 #ifdef CONFIG_SWIOTLB
+#if ! __OS_HAS_AGP
+	struct radeon_device *rdev = radeon_get_rdev(ttm->bdev);
+#endif
 	if (swiotlb_nr_tbl()) {
 		return ttm_dma_populate(>ttm, rdev->dev);
 	}
@@ -674,7 +676,6 @@ static int radeon_ttm_tt_populate(struct
 
 static void radeon_ttm_tt_unpopulate(struct ttm_tt *ttm)
 {
-	struct radeon_device *rdev;
 	struct radeon_ttm_tt *gtt = (void *)ttm;
 #ifndef __NetBSD__
 	unsigned i;
@@ -684,8 +685,8 @@ static void radeon_ttm_tt_unpopulate(str
 	if (slave)
 		return;
 
-	rdev = radeon_get_rdev(ttm->bdev);
 #if __OS_HAS_AGP
+	struct radeon_device *rdev = radeon_get_rdev(ttm->bdev);
 	if (rdev->flags & RADEON_IS_AGP) {
 		ttm_agp_tt_unpopulate(ttm);
 		return;
@@ -698,6 +699,9 @@ static void radeon_ttm_tt_unpopulate(str
 #else
 
 #ifdef CONFIG_SWIOTLB
+#if ! __OS_HAS_AGP
+	struct radeon_device *rdev = radeon_get_rdev(ttm->bdev);
+#endif
 	if (swiotlb_nr_tbl()) {
 		ttm_dma_unpopulate(>ttm, rdev->dev);
 		return;



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

2016-07-09 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jul 10 00:14:37 UTC 2016

Modified Files:
src/sys/arch/evbmips/loongson: yeeloong_machdep.c

Log Message:
The version of PMON on my 8089B (LM8089-1.4.9a) configures OHCI but doesn't
enable memory space access. Enable it before the ohci driver attaches to
allow low- and full-speed devices to work.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbmips/loongson/yeeloong_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/evbmips/loongson/yeeloong_machdep.c
diff -u src/sys/arch/evbmips/loongson/yeeloong_machdep.c:1.7 src/sys/arch/evbmips/loongson/yeeloong_machdep.c:1.8
--- src/sys/arch/evbmips/loongson/yeeloong_machdep.c:1.7	Tue Jun  9 16:29:01 2015
+++ src/sys/arch/evbmips/loongson/yeeloong_machdep.c	Sun Jul 10 00:14:36 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: yeeloong_machdep.c,v 1.7 2015/06/09 16:29:01 macallan Exp $	*/
+/*	$NetBSD: yeeloong_machdep.c,v 1.8 2016/07/10 00:14:36 jmcneill Exp $	*/
 /*	$OpenBSD: yeeloong_machdep.c,v 1.16 2011/04/15 20:40:06 deraadt Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: yeeloong_machdep.c,v 1.7 2015/06/09 16:29:01 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: yeeloong_machdep.c,v 1.8 2016/07/10 00:14:36 jmcneill Exp $");
 
 #include 
 #include 
@@ -559,6 +559,18 @@ lemote_device_register(device_t dev, voi
 	if (device_class(dev) != bootdev_class)
 		return;
 
+	/* OHCI memory space access may not be enabled by the BIOS */
+	if (device_is_a(dev, "ohci")) {
+		struct pci_attach_args *pa = aux;
+		pcireg_t csr = pci_conf_read(pa->pa_pc, pa->pa_tag,
+		PCI_COMMAND_STATUS_REG);
+		if ((csr & PCI_COMMAND_MEM_ENABLE) == 0) {
+			csr |= PCI_COMMAND_MEM_ENABLE;
+			pci_conf_write(pa->pa_pc, pa->pa_tag,
+			PCI_COMMAND_STATUS_REG, csr);
+		}
+	}
+
 	/* 
 	 * The device numbering must match. There's no way
 	 * pmon tells us more info. Depending on the usb slot



CVS commit: src/share/man/man7

2016-07-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Jul  9 23:13:47 UTC 2016

Modified Files:
src/share/man/man7: signal.7

Log Message:
bump up the copyright date since I practically rewrote the file


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/share/man/man7/signal.7

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

Modified files:

Index: src/share/man/man7/signal.7
diff -u src/share/man/man7/signal.7:1.18 src/share/man/man7/signal.7:1.19
--- src/share/man/man7/signal.7:1.18	Sat Jul  9 23:12:27 2016
+++ src/share/man/man7/signal.7	Sat Jul  9 23:13:47 2016
@@ -1,6 +1,6 @@
-.\"	$NetBSD: signal.7,v 1.18 2016/07/09 23:12:27 dholland Exp $
+.\"	$NetBSD: signal.7,v 1.19 2016/07/09 23:13:47 dholland Exp $
 .\"
-.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
+.\" Copyright (c) 1999, 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without



CVS commit: src/share/man/man7

2016-07-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Jul  9 23:12:27 UTC 2016

Modified Files:
src/share/man/man7: signal.7

Log Message:
Document all the signals properly. Please review.

Kick out the list of async-signal-safe functions (it is now in
sigaction(2)) because this is not a programmer-facing document.

XXX: if anyone knows definitively whether SIGEMT is actually used by
XXX: anything, please update the weasel words I put in.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/share/man/man7/signal.7

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

Modified files:

Index: src/share/man/man7/signal.7
diff -u src/share/man/man7/signal.7:1.17 src/share/man/man7/signal.7:1.18
--- src/share/man/man7/signal.7:1.17	Sat Jul 19 14:53:22 2014
+++ src/share/man/man7/signal.7	Sat Jul  9 23:12:27 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: signal.7,v 1.17 2014/07/19 14:53:22 roy Exp $
+.\"	$NetBSD: signal.7,v 1.18 2016/07/09 23:12:27 dholland Exp $
 .\"
 .\" Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -24,213 +24,569 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd July 18, 2014
+.Dd July 9, 2016
 .Dt SIGNAL 7
 .Os
 .Sh NAME
 .Nm signal
 .Nd signal facilities
 .Sh DESCRIPTION
-The
-.In signal.h
-header file defines the following signals:
+A
+.Nm
+is a system-level notification delivered to a process.
+Signals may be generated as the result of process activity, by certain
+user inputs, by kernel facilities or subsystems, or sent
+programmatically by other processes or by users.
+There is a small fixed set of signals, each with a symbolic name and a
+number.
+For historical reasons many of the numbers are ``well-known values'',
+which are in practice the same on all implementations and
+realistically can never be changed.
+(Nonetheless, compiled code should always use only the symbolic
+names.)
+Many/most signals also have specific semantics, both in how they can
+be generated and in their effects.
+Some are special cases in ways that have quite far-reaching
+consequences.
+.Pp
+When a signal is
+.Em posted
+.Pq Dq sent
+to a process, in general any of several things can happen.
+If the process has elected to
+.Em ignore
+the signal, it is discarded and nothing happens.
+(Some signals may not be ignored, however.)
+If the process has elected to
+.Em block
+the signal temporarily, delivery is postponed until the process
+later unblocks that signal.
+Otherwise, the signal is
+.Em delivered,
+meaning that whatever the process is doing is interrupted in order to
+react to the signal.
+(Note that processes that are waiting in the kernel must unwind what
+they are doing for signals to be delivered.
+This can sometimes be expensive.
+See
+.Xr sigaction 2
+for further information.)
+.Pp
+If the process has elected to
+.Em catch
+the signal, which means that the process has installed a handler to
+react to the signal in some process-specific way, the kernel arranges
+for the process's handler logic to be invoked.
+This is always done in a way that allows the process to resume if
+desired.
+(Note, however, that some signals may not be caught.)
+Otherwise, the default action for the signal is taken.
+For most signals the default action is a core dump.
+See the table below.
+Note that the term
+.Em delivery
+is also used for the specific process of arranging for a signal
+handler to be invoked.
+.Pp
+In general, signals are delivered as soon as they are posted.
+(Some delays may occur due to scheduling.)
+However, in some cases a process that has been sleeping in the kernel
+may need to do slow things as part of unwinding its state; this can
+sometimes lead to human-perceptible delays.
+.Pp
+Also, some sleep states within the kernel are
+.Em uninterruptible
+meaning that signals posted will have no effect until the state
+clears.
+These states are supposed to be short-term only, but sometimes kernel
+bugs make this not the case and one can end up with unkillable
+processes.
+Such processes appear in state "D" in
+.Xr ps 1 .
+In general the only way to get rid of them is to reboot.
+(However, when the "wchan" reported is "tstile", it means the process
+is waiting for some other process to release resources; sometimes if
+one can find and kill that process the situation is recoverable.)
+.Ss Signal list
+The following signals are defined in
+.Nx :
 .Pp
-.Bl -column ".Sy Value" ".Dv SIGVTALARM" "terminate process" -compact
-.It Sy "Value" Ta Sy "Name" Ta Sy "Default Action" Ta Sy "Description"
-.It 1 Ta Dv SIGHUP Ta "terminate process" Ta "terminal line hangup"
-.It 2 Ta Dv SIGINT Ta "terminate process" Ta "interrupt program"
-.It 3 Ta Dv SIGQUIT Ta "create core image" Ta "quit program"
-.It 4 Ta Dv SIGILL Ta "create core image" Ta "illegal instruction"
-.It 5 Ta Dv SIGTRAP Ta "create core image" Ta "trace trap"
-.It 6 Ta Dv 

CVS commit: src/lib/libc/sys

2016-07-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Jul  9 23:10:05 UTC 2016

Modified Files:
src/lib/libc/sys: fork.2

Log Message:
Drop in a reference to the list of async-signal-safe functions.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/lib/libc/sys/fork.2

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/sys/fork.2
diff -u src/lib/libc/sys/fork.2:1.22 src/lib/libc/sys/fork.2:1.23
--- src/lib/libc/sys/fork.2:1.22	Fri Jun 25 15:29:25 2004
+++ src/lib/libc/sys/fork.2	Sat Jul  9 23:10:05 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fork.2,v 1.22 2004/06/25 15:29:25 wiz Exp $
+.\"	$NetBSD: fork.2,v 1.23 2016/07/09 23:10:05 dholland Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	@(#)fork.2	8.1 (Berkeley) 6/4/93
 .\"
-.Dd June 10, 2004
+.Dd July 9, 2016
 .Dt FORK 2
 .Os
 .Sh NAME
@@ -90,8 +90,10 @@ is still running in the child processes.
 .Pp
 Child processes of a threaded program have additional restrictions,
 a child must only call functions that are async-signal-safe.
-Very few functions are asynchronously safe and applications should
-make sure they call
+Very few functions are asynchronously safe
+(the list may be found in
+.Xr sigaction 2 )
+and applications should make sure they call
 .Xr exec 3
 as soon as possible.
 .Sh RETURN VALUES



CVS commit: src/lib/libc/sys

2016-07-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Jul  9 23:08:32 UTC 2016

Modified Files:
src/lib/libc/sys: sigaction.2

Log Message:
Dump the list of async-signal-safe functions here. It belongs in
programmer-facing docs, not user-facing docs, so shouldn't be in
signal(7).


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/lib/libc/sys/sigaction.2

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/sys/sigaction.2
diff -u src/lib/libc/sys/sigaction.2:1.47 src/lib/libc/sys/sigaction.2:1.48
--- src/lib/libc/sys/sigaction.2:1.47	Sun Nov  1 08:52:29 2015
+++ src/lib/libc/sys/sigaction.2	Sat Jul  9 23:08:32 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sigaction.2,v 1.47 2015/11/01 08:52:29 wiz Exp $
+.\"	$NetBSD: sigaction.2,v 1.48 2016/07/09 23:08:32 dholland Exp $
 .\"
 .\" Copyright (c) 1980, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	@(#)sigaction.2	8.2 (Berkeley) 4/3/94
 .\"
-.Dd October 31, 2015
+.Dd July 9, 2016
 .Dt SIGACTION 2
 .Os
 .Sh NAME
@@ -302,11 +302,157 @@ any activity (such as calling functions 
 or static scopes) other than setting a variable of the type
 .Vt volatile sig_atomic_t
 is undefined.
+.Ss Signal-safe functions
+Only functions that are guaranteed to be async-signal-safe can safely
+be used in signal handlers.
+These are functions that are either reentrant or non-interruptible.
+(These functions are also the only functions that may be used in a
+child process after doing
+.Xr fork 2
+in a threaded program.)
 .Pp
-Only functions that are async-signal-safe can safely be used in signal
-handlers; see
-.Xr signal 7
-for a complete list.
+The following functions are async-signal-safe.
+Any function not listed
+below is unsafe to use in signal handlers.
+.Pp
+.Xr _Exit 2 ,
+.Xr _exit 2 ,
+.Xr abort 3 ,
+.Xr accept 2 ,
+.Xr access 2 ,
+.\" .Xr aio_error
+.\" .Xr aio_return
+.\" .Xr aio_suspend
+.Xr alarm 3 ,
+.Xr bind 2 ,
+.Xr cfgetispeed 3 ,
+.Xr cfgetospeed 3 ,
+.Xr cfsetispeed 3 ,
+.Xr cfsetospeed 3 ,
+.Xr chdir 2 ,
+.Xr chmod 2 ,
+.Xr chown 2 ,
+.Xr clock_gettime 2 ,
+.Xr close 2 ,
+.Xr connect 2 ,
+.Xr creat 3 ,
+.Xr dup 2 ,
+.Xr dup2 2 ,
+.Xr execle 3 ,
+.Xr execve 2 ,
+.Xr fchmod 2 ,
+.Xr fchown 2 ,
+.Xr fcntl 2 ,
+.Xr fdatasync 2 ,
+.Xr fork 2 ,
+.Xr fpathconf 2 ,
+.Xr fstat 2 ,
+.Xr fsync 2 ,
+.Xr ftruncate 2 ,
+.Xr getegid 2 ,
+.Xr geteuid 2 ,
+.Xr getgid 2 ,
+.Xr getgroups 2 ,
+.Xr getpeername 2 ,
+.Xr getpgrp 2 ,
+.Xr getpid 2 ,
+.Xr getppid 2 ,
+.Xr getsockname 2 ,
+.Xr getsockopt 2 ,
+.Xr getuid 2 ,
+.Xr kill 2 ,
+.Xr link 2 ,
+.Xr listen 2 ,
+.Xr lseek 2 ,
+.Xr lstat 2 ,
+.Xr mkdir 2 ,
+.Xr mkfifo 2 ,
+.Xr open 2 ,
+.Xr pathconf 2 ,
+.Xr pause 3 ,
+.Xr pipe 2 ,
+.Xr poll 2 ,
+.\" .Xr posix_trace_event 2
+.\" .Xr pselect 2
+.Xr pthread_mutex_unlock 3 ,
+.Xr raise 3 ,
+.Xr read 2 ,
+.Xr readlink 2 ,
+.Xr recv 2 ,
+.Xr recvfrom 2 ,
+.Xr recvmsg 2 ,
+.Xr rename 2 ,
+.Xr rmdir 2 ,
+.Xr select 2 ,
+.Xr sem_post 3 ,
+.Xr send 2 ,
+.Xr sendmsg 2 ,
+.Xr sendto 2 ,
+.Xr setgid 2 ,
+.Xr setpgid 2 ,
+.Xr setsid 2 ,
+.Xr setsockopt 2 ,
+.Xr setuid 2 ,
+.Xr shutdown 2 ,
+.Xr sigaction 2 ,
+.Xr sigaddset 3 ,
+.Xr sigdelset 3 ,
+.Xr sigemptyset 3 ,
+.Xr sigfillset 3 ,
+.Xr sigismember 3 ,
+.Xr sleep 3 ,
+.Xr signal 3 ,
+.Xr sigpause 3 ,
+.Xr sigpending 2 ,
+.Xr sigprocmask 2 ,
+.\" .Xr sigqueue
+.Xr sigset 3 ,
+.Xr sigsuspend 2 ,
+.Xr sockatmark 3 ,
+.Xr socket 2 ,
+.Xr socketpair 2 ,
+.Xr stat 2 ,
+.Xr symlink 2 ,
+.Xr sysconf 3 ,
+.Xr tcdrain 3 ,
+.Xr tcflow 3 ,
+.Xr tcflush 3 ,
+.Xr tcgetattr 3 ,
+.Xr tcgetpgrp 3 ,
+.Xr tcsendbreak 3 ,
+.Xr tcsetattr 3 ,
+.Xr tcsetpgrp 3 ,
+.Xr time 3 ,
+.Xr timer_getoverrun 2 ,
+.Xr timer_gettime 2 ,
+.Xr timer_settime 2 ,
+.Xr times 3 ,
+.Xr umask 2 ,
+.Xr uname 3 ,
+.Xr unlink 2 ,
+.Xr utime 3 ,
+.Xr wait 2 ,
+.Xr waitpid 2 ,
+.Xr write 2 .
+.Sh SEE ALSO
+.Xr kill 1 ,
+.Xr kill 2 ,
+.Xr ptrace 2 ,
+.Xr sigaction 2 ,
+.Xr sigaltstack 2 ,
+.Xr sigprocmask 2 ,
+.Xr sigstack 2 ,
+.Xr sigsuspend 2 ,
+.Xr fpgetmask 3 ,
+.Xr fpsetmask 3 ,
+.Xr setjmp 3 ,
+.Xr sigblock 3 ,
+.Xr siginterrupt 3 ,
+.Xr signal 3 ,
+.Xr sigpause 3 ,
+.Xr sigsetmask 3 ,
+.Xr sigsetops 3 ,
+.Xr tty 4
 .Sh NOTES
 The mask specified in
 .Fa act



CVS commit: xsrc/external/mit

2016-07-09 Thread Jared D. McNeill
Module Name:xsrc
Committed By:   jmcneill
Date:   Sat Jul  9 22:19:34 UTC 2016

Modified Files:
xsrc/external/mit/xf86-video-siliconmotion/dist/src: smi_driver.c
xsrc/external/mit/xorg-server.old/dist/hw/xfree86/vgahw: vgaHW.h
xsrc/external/mit/xorg-server/dist/hw/xfree86/vgahw: vgaHW.h

Log Message:
Avoid legacy VGA I/O port access on MIPS. Xorg converts the I/O port
address to a pointer and dereferences it, and then seg faults.

This fixes Xorg on my Lemote YeeLoong netbook.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/xorg-server.old/dist/hw/xfree86/vgahw/vgaHW.h
cvs rdiff -u -r1.1.1.3 -r1.2 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/vgahw/vgaHW.h

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

Modified files:

Index: xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c
diff -u xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c:1.4 xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c:1.5
--- xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c:1.4	Mon Jul 20 00:10:28 2015
+++ xsrc/external/mit/xf86-video-siliconmotion/dist/src/smi_driver.c	Sat Jul  9 22:19:34 2016
@@ -2010,6 +2010,7 @@ SMI_EnableVideo(ScrnInfoPtr pScrn)
 void
 SMI_EnableMmio(ScrnInfoPtr pScrn)
 {
+#if !defined(__mips__)
 SMIPtr pSmi = SMIPTR(pScrn);
 
 ENTER();
@@ -2038,11 +2039,13 @@ SMI_EnableMmio(ScrnInfoPtr pScrn)
 }
 
 LEAVE();
+#endif
 }
 
 void
 SMI_DisableMmio(ScrnInfoPtr pScrn)
 {
+#if !defined(__mips__)
 SMIPtr pSmi = SMIPTR(pScrn);
 
 ENTER();
@@ -2062,6 +2065,7 @@ SMI_DisableMmio(ScrnInfoPtr pScrn)
 }
 
 LEAVE();
+#endif
 }
 
 static void

Index: xsrc/external/mit/xorg-server.old/dist/hw/xfree86/vgahw/vgaHW.h
diff -u xsrc/external/mit/xorg-server.old/dist/hw/xfree86/vgahw/vgaHW.h:1.1.1.1 xsrc/external/mit/xorg-server.old/dist/hw/xfree86/vgahw/vgaHW.h:1.2
--- xsrc/external/mit/xorg-server.old/dist/hw/xfree86/vgahw/vgaHW.h:1.1.1.1	Thu Jun  9 09:07:59 2016
+++ xsrc/external/mit/xorg-server.old/dist/hw/xfree86/vgahw/vgaHW.h	Sat Jul  9 22:19:34 2016
@@ -174,7 +174,7 @@ typedef struct _vgaHWRec {
 #define BITS_PER_GUN 6
 #define COLORMAP_SIZE 256
 
-#if defined(__powerpc__) || defined(__arm__) || defined(__s390__) || defined(__nds32__)
+#if defined(__powerpc__) || defined(__arm__) || defined(__mips__) || defined(__s390__) || defined(__nds32__)
 #define DACDelay(hw) /* No legacy VGA support */
 #else
 #define DACDelay(hw)			  \

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/vgahw/vgaHW.h
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/vgahw/vgaHW.h:1.1.1.3 xsrc/external/mit/xorg-server/dist/hw/xfree86/vgahw/vgaHW.h:1.2
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/vgahw/vgaHW.h:1.1.1.3	Tue Nov 23 05:21:46 2010
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/vgahw/vgaHW.h	Sat Jul  9 22:19:34 2016
@@ -174,7 +174,7 @@ typedef struct _vgaHWRec {
 #define BITS_PER_GUN 6
 #define COLORMAP_SIZE 256
 
-#if defined(__powerpc__) || defined(__arm__) || defined(__s390__) || defined(__nds32__)
+#if defined(__powerpc__) || defined(__arm__) || defined(__mips__) || defined(__s390__) || defined(__nds32__)
 #define DACDelay(hw) /* No legacy VGA support */
 #else
 #define DACDelay(hw)			  \



CVS commit: src/lib/libc/gen

2016-07-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Jul  9 21:15:01 UTC 2016

Modified Files:
src/lib/libc/gen: siglist.c

Log Message:
Fix three of these strings (ones that are rarely seen)


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/libc/gen/siglist.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/gen/siglist.c
diff -u src/lib/libc/gen/siglist.c:1.17 src/lib/libc/gen/siglist.c:1.18
--- src/lib/libc/gen/siglist.c:1.17	Wed Jan 17 23:24:22 2007
+++ src/lib/libc/gen/siglist.c	Sat Jul  9 21:15:00 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: siglist.c,v 1.17 2007/01/17 23:24:22 hubertf Exp $	*/
+/*	$NetBSD: siglist.c,v 1.18 2016/07/09 21:15:00 dholland Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)siglist.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: siglist.c,v 1.17 2007/01/17 23:24:22 hubertf Exp $");
+__RCSID("$NetBSD: siglist.c,v 1.18 2016/07/09 21:15:00 dholland Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -65,11 +65,11 @@ static const char *const __siglist14[] =
 	"Stopped (tty input)",		/* 21 SIGTTIN */
 	"Stopped (tty output)",		/* 22 SIGTTOU */
 	"I/O possible",			/* 23 SIGIO */
-	"Cputime limit exceeded",	/* 24 SIGXCPU */
-	"Filesize limit exceeded",	/* 25 SIGXFSZ */
+	"CPU time limit exceeded",	/* 24 SIGXCPU */
+	"File size limit exceeded",	/* 25 SIGXFSZ */
 	"Virtual timer expired",	/* 26 SIGVTALRM */
 	"Profiling timer expired",	/* 27 SIGPROF */
-	"Window size changes",		/* 28 SIGWINCH */
+	"Window size changed",		/* 28 SIGWINCH */
 	"Information request",		/* 29 SIGINFO */
 	"User defined signal 1",	/* 30 SIGUSR1 */
 	"User defined signal 2",	/* 31 SIGUSR2 */



CVS commit: [nick-nhusb] src/sys

2016-07-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jul  9 20:25:25 UTC 2016

Modified Files:
src/sys/altq [nick-nhusb]: altq_cbq.c altq_cdnr.c altq_subr.c
src/sys/arch/acorn26/ioc [nick-nhusb]: if_eca.c
src/sys/arch/acorn26/stand/boot26 [nick-nhusb]: boot26.c
src/sys/arch/acorn32/podulebus [nick-nhusb]: if_ie.c
src/sys/arch/acorn32/stand/boot32 [nick-nhusb]: boot32.c
src/sys/arch/algor/dev [nick-nhusb]: bonito_mainbus.c
src/sys/arch/alpha/stand/common [nick-nhusb]: boot.c
src/sys/arch/alpha/stand/standtest [nick-nhusb]: test.c
src/sys/arch/amd64/amd64 [nick-nhusb]: locore.S machdep.c mainbus.c
src/sys/arch/amd64/conf [nick-nhusb]: GENERIC
src/sys/arch/amiga/dev [nick-nhusb]: grf_cv3d.c grf_cv3dreg.h if_es.c
if_qn.c
src/sys/arch/amiga/stand/binpatch [nick-nhusb]: binpatch.c
src/sys/arch/amiga/stand/bootblock/boot [nick-nhusb]: main.c
src/sys/arch/arm/allwinner [nick-nhusb]: awin_eth.c awin_otgreg.h
src/sys/arch/arm/arm [nick-nhusb]: cpufunc.c
src/sys/arch/arm/at91 [nick-nhusb]: at91emac.c
src/sys/arch/arm/broadcom [nick-nhusb]: bcm53xx_eth.c
src/sys/arch/arm/ep93xx [nick-nhusb]: epe.c
src/sys/arch/arm/gemini [nick-nhusb]: gemini_gmac.c if_gpn.c
src/sys/arch/arm/imx [nick-nhusb]: if_enet.c
src/sys/arch/arm/omap [nick-nhusb]: files.omap2 if_cpsw.c obio_com.c
omap2430_intr.c omap2_obiovar.h omap2_reg.h omap3_scm.c
omap3_sdhc.c omap3_sdmmcreg.h omap_edma.c omapl1x_emac.c tiotg.c
src/sys/arch/arm/rockchip [nick-nhusb]: rockchip_emac.c
src/sys/arch/arm/samsung [nick-nhusb]: exynos_dwcmmc.c
src/sys/arch/arm/xscale [nick-nhusb]: ixp425_if_npe.c
src/sys/arch/atari/stand/bootxx [nick-nhusb]: bootxx.c
src/sys/arch/bebox/stand/boot [nick-nhusb]: monitor.c
src/sys/arch/emips/ebus [nick-nhusb]: if_le_ebus.c
src/sys/arch/evbarm/beagle [nick-nhusb]: beagle_machdep.c
src/sys/arch/evbarm/conf [nick-nhusb]: BEAGLEBOARDXM BEAGLEBONE
TISDP2420
src/sys/arch/evbarm/imx7 [nick-nhusb]: imx7_machdep.c
src/sys/arch/evbppc/virtex/dev [nick-nhusb]: if_temac.c
src/sys/arch/ews4800mips/stand/common [nick-nhusb]: cmd.c
src/sys/arch/hp300/stand/common [nick-nhusb]: netio.c samachdep.h
tgets.c
src/sys/arch/hp300/stand/inst [nick-nhusb]: inst.c
src/sys/arch/hp300/stand/uboot [nick-nhusb]: uboot.c
src/sys/arch/hpc/stand/hpcboot/arm [nick-nhusb]: arm_console.cpp
src/sys/arch/hpcmips/dev [nick-nhusb]: plumpcmcia.c
src/sys/arch/hpcmips/stand/lcboot [nick-nhusb]: main.c
src/sys/arch/hpcmips/tx [nick-nhusb]: tx3912video.c
src/sys/arch/i386/conf [nick-nhusb]: GENERIC
src/sys/arch/i386/i386 [nick-nhusb]: cpu_in_cksum.S locore.S mainbus.c
multiboot.c
src/sys/arch/i386/stand/lib [nick-nhusb]: biosdisk.c bootinfo.c
bootinfo.h bootmenu.c exec.c menuutils.c
src/sys/arch/ia64/ia64 [nick-nhusb]: mainbus.c
src/sys/arch/ia64/include [nick-nhusb]: mcontext.h
src/sys/arch/ia64/stand/common [nick-nhusb]: boot.c
src/sys/arch/landisk/stand/boot [nick-nhusb]: boot2.c monitor.c
src/sys/arch/mac68k/dev [nick-nhusb]: if_mc.c
src/sys/arch/mac68k/nubus [nick-nhusb]: if_netdock_nubus.c
src/sys/arch/macppc/conf [nick-nhusb]: GENERIC_601 files.macppc
src/sys/arch/macppc/dev [nick-nhusb]: am79c950.c if_bm.c if_gm.c pmu.c
pmuvar.h valkyriefb.c
src/sys/arch/macppc/macppc [nick-nhusb]: pic_ohare.c
src/sys/arch/macppc/pci [nick-nhusb]: bandit.c
src/sys/arch/macppc/stand/ofwboot [nick-nhusb]: boot.c
src/sys/arch/mips/adm5120/dev [nick-nhusb]: if_admsw.c
src/sys/arch/mips/alchemy/dev [nick-nhusb]: if_aumac.c
src/sys/arch/mips/atheros/dev [nick-nhusb]: if_ae.c
src/sys/arch/mips/cavium/dev [nick-nhusb]: if_cnmac.c
src/sys/arch/mips/include [nick-nhusb]: Makefile.inc
src/sys/arch/mips/mips [nick-nhusb]: locore.S locore_mips1.S
mipsX_subr.S pmap.c
src/sys/arch/mips/ralink [nick-nhusb]: ralink_eth.c
src/sys/arch/mips/sibyte/dev [nick-nhusb]: sbmac.c
src/sys/arch/mvme68k/mvme68k [nick-nhusb]: machdep.c
src/sys/arch/mvme68k/stand/bootst [nick-nhusb]: boot.c
src/sys/arch/mvme68k/stand/netboot [nick-nhusb]: boot.c
src/sys/arch/mvmeppc/stand/boot [nick-nhusb]: boot.c
src/sys/arch/newsmips/apbus [nick-nhusb]: if_sn.c
src/sys/arch/next68k/dev [nick-nhusb]: if_xe.c mb8795.c
src/sys/arch/next68k/stand/boot [nick-nhusb]: boot.c
src/sys/arch/ofppc/stand/ofwboot [nick-nhusb]: boot.c
src/sys/arch/playstation2/dev [nick-nhusb]: if_smap.c
src/sys/arch/pmax/ibus [nick-nhusb]: sii.c
src/sys/arch/pmax/include 

CVS commit: src/lib/libc

2016-07-09 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Jul  9 20:15:06 UTC 2016

Modified Files:
src/lib/libc: shlib_version

Log Message:
note that on libc bump obsolete signal functions should be sent to
libcompat.


To generate a diff of this commit:
cvs rdiff -u -r1.265 -r1.266 src/lib/libc/shlib_version

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/shlib_version
diff -u src/lib/libc/shlib_version:1.265 src/lib/libc/shlib_version:1.266
--- src/lib/libc/shlib_version:1.265	Fri Jul  1 22:41:39 2016
+++ src/lib/libc/shlib_version	Sat Jul  9 20:15:06 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: shlib_version,v 1.265 2016/07/01 22:41:39 christos Exp $
+#	$NetBSD: shlib_version,v 1.266 2016/07/09 20:15:06 dholland Exp $
 #	Remember to update distrib/sets/lists/base/shl.* when changing
 #
 # things we wish to do on next major version bump:
@@ -43,5 +43,6 @@
 # - remove arc4random(3) API
 # - decide whether soft-float should support fenv.h, including thread-local contett
 # - stop all math functions from setting errno
+# - boot obsolete signal functions to libcompat
 major=12
 minor=203



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

2016-07-09 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Jul  9 15:04:06 UTC 2016

Modified Files:
src/sys/arch/arm/omap: omap2_gpio.c omap_edma.c

Log Message:
Remove white-spaces.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/omap/omap2_gpio.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/omap/omap_edma.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/omap2_gpio.c
diff -u src/sys/arch/arm/omap/omap2_gpio.c:1.16 src/sys/arch/arm/omap/omap2_gpio.c:1.17
--- src/sys/arch/arm/omap/omap2_gpio.c:1.16	Sat Jun 15 21:59:37 2013
+++ src/sys/arch/arm/omap/omap2_gpio.c	Sat Jul  9 15:04:06 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: omap2_gpio.c,v 1.16 2013/06/15 21:59:37 matt Exp $	*/
+/*	$NetBSD: omap2_gpio.c,v 1.17 2016/07/09 15:04:06 kiyohara Exp $	*/
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -28,22 +28,22 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omap2_gpio.c,v 1.16 2013/06/15 21:59:37 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap2_gpio.c,v 1.17 2016/07/09 15:04:06 kiyohara Exp $");
 
 #define _INTR_PRIVATE
 
 #include "locators.h"
 #include "gpio.h"
 #include "opt_omap.h"
- 
+
 #include 
 #include 
 #include 
- 
+
 #include 
-  
+
 #include 
- 
+
 #include 
 #include 
 #include 
@@ -175,7 +175,7 @@ gpio_pic_establish_irq(struct pic_softc 
 	GPIO_WRITE(gpio, GPIO_IRQSTATUS1, irq_mask);
 
 	/*
-	 * Convert the type to a gpio type and figure out which bits in what 
+	 * Convert the type to a gpio type and figure out which bits in what
 	 * register we have to tweak.
 	 */
 	gpio->gpio_edge_rising_mask &= ~irq_mask;
@@ -209,7 +209,7 @@ gpio_pic_establish_irq(struct pic_softc 
 	 */
 	v = GPIO_READ(gpio, GPIO_OE);
 	v |= irq_mask;
-	GPIO_WRITE(gpio, GPIO_OE, v); 
+	GPIO_WRITE(gpio, GPIO_OE, v);
 #if 0
 	for (i = 0, maybe_is = NULL; i < 32; i++) {
 		if ((is = pic->pic_sources[i]) != NULL) {
@@ -222,7 +222,7 @@ gpio_pic_establish_irq(struct pic_softc 
 		KASSERT(is != NULL);
 		is->is_ipl = maybe_is->is_ipl;
 		(*is->is_pic->pic_ops->pic_establish_irq)(is->is_pic, is);
-	} 
+	}
 #endif
 }
 
@@ -253,7 +253,7 @@ omap2gpio_pin_write(void *arg, int pin, 
 
 	old = GPIO_READ(gpio, GPIO_DATAOUT);
 	if (value)
-		new = old | mask; 
+		new = old | mask;
 	else
 		new = old & ~mask;
 
@@ -438,7 +438,7 @@ gpio_attach(device_t parent, device_t se
 		pic_add(>gpio_pic, oa->obio_intrbase);
 		aprint_normal(": interrupts %d..%d",
 		oa->obio_intrbase, oa->obio_intrbase + 31);
-		gpio->gpio_is = intr_establish(oa->obio_intr, 
+		gpio->gpio_is = intr_establish(oa->obio_intr,
 		IPL_HIGH, IST_LEVEL, pic_handle_intr, >gpio_pic);
 		KASSERT(gpio->gpio_is != NULL);
 		aprint_normal(", intr %d", oa->obio_intr);

Index: src/sys/arch/arm/omap/omap_edma.c
diff -u src/sys/arch/arm/omap/omap_edma.c:1.2 src/sys/arch/arm/omap/omap_edma.c:1.3
--- src/sys/arch/arm/omap/omap_edma.c:1.2	Mon Jul  4 15:35:55 2016
+++ src/sys/arch/arm/omap/omap_edma.c	Sat Jul  9 15:04:06 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: omap_edma.c,v 1.2 2016/07/04 15:35:55 kiyohara Exp $ */
+/* $NetBSD: omap_edma.c,v 1.3 2016/07/09 15:04:06 kiyohara Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill 
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omap_edma.c,v 1.2 2016/07/04 15:35:55 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap_edma.c,v 1.3 2016/07/09 15:04:06 kiyohara Exp $");
 
 #include "opt_omap.h"
 
@@ -504,7 +504,7 @@ edma_halt(struct edma_channel *ch)
 	bus_size_t off = (ch->ch_index < 32 ? 0 : 4);
 	uint32_t bit = __BIT(ch->ch_index < 32 ?
 			 ch->ch_index : ch->ch_index - 32);
-	
+
 	EDMA_WRITE(sc, EDMA_EECR_REG + off, bit);
 	EDMA_WRITE(sc, EDMA_ECR_REG + off, bit);
 	EDMA_WRITE(sc, EDMA_SECR_REG + off, bit);



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

2016-07-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Jul  9 09:33:21 UTC 2016

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

Log Message:
Simplify pmap_get_physpage.


To generate a diff of this commit:
cvs rdiff -u -r1.209 -r1.210 src/sys/arch/x86/x86/pmap.c

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

Modified files:

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.209 src/sys/arch/x86/x86/pmap.c:1.210
--- src/sys/arch/x86/x86/pmap.c:1.209	Sat Jul  9 09:25:44 2016
+++ src/sys/arch/x86/x86/pmap.c	Sat Jul  9 09:33:21 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.209 2016/07/09 09:25:44 maxv Exp $	*/
+/*	$NetBSD: pmap.c,v 1.210 2016/07/09 09:33:21 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2010, 2016 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.209 2016/07/09 09:25:44 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.210 2016/07/09 09:33:21 maxv Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -571,7 +571,7 @@ static bool pmap_remove_pte(struct pmap 
 static void pmap_remove_ptes(struct pmap *, struct vm_page *, vaddr_t, vaddr_t,
 vaddr_t, struct pv_entry **);
 
-static bool pmap_get_physpage(vaddr_t, int, paddr_t *);
+static paddr_t pmap_get_physpage(void);
 static void pmap_alloc_level(pd_entry_t * const *, vaddr_t, int, long *);
 
 static bool pmap_reactivate(struct pmap *);
@@ -4241,33 +4241,33 @@ out2:
 	return error;
 }
 
-static bool
-pmap_get_physpage(vaddr_t va, int level, paddr_t *paddrp)
+static paddr_t
+pmap_get_physpage(void)
 {
 	struct vm_page *ptp;
 	struct pmap *kpm = pmap_kernel();
+	paddr_t pa;
 
 	if (!uvm.page_init_done) {
-
 		/*
-		 * we're growing the kernel pmap early (from
-		 * uvm_pageboot_alloc()).  this case must be
+		 * We're growing the kernel pmap early (from
+		 * uvm_pageboot_alloc()). This case must be
 		 * handled a little differently.
 		 */
 
-		if (!uvm_page_physget(paddrp))
+		if (!uvm_page_physget())
 			panic("pmap_get_physpage: out of memory");
 #if defined(__HAVE_DIRECT_MAP)
-		pagezero(PMAP_DIRECT_MAP(*paddrp));
+		pagezero(PMAP_DIRECT_MAP(pa));
 #else
 #if defined(XEN)
 		if (XEN_VERSION_SUPPORTED(3, 4)) {
-			xen_pagezero(*paddrp);
-			return true;
+			xen_pagezero(pa);
+			return pa;
 		}
 #endif
 		kpreempt_disable();
-		pmap_pte_set(early_zero_pte, pmap_pa2pte(*paddrp) | PG_V |
+		pmap_pte_set(early_zero_pte, pmap_pa2pte(pa) | PG_V |
 		PG_RW | pmap_pg_nx | PG_k);
 		pmap_pte_flush();
 		pmap_update_pg((vaddr_t)early_zerop);
@@ -4286,10 +4286,11 @@ pmap_get_physpage(vaddr_t va, int level,
 			panic("pmap_get_physpage: out of memory");
 		ptp->flags &= ~PG_BUSY;
 		ptp->wire_count = 1;
-		*paddrp = VM_PAGE_TO_PHYS(ptp);
+		pa = VM_PAGE_TO_PHYS(ptp);
 	}
 	pmap_stats_update(kpm, 1, 0);
-	return true;
+
+	return pa;
 }
 
 /*
@@ -4327,7 +4328,7 @@ pmap_alloc_level(pd_entry_t * const *pde
 			pt_entry_t pte;
 
 			KASSERT(!pmap_valid_entry(pdep[i]));
-			pmap_get_physpage(va, level - 1, );
+			pa = pmap_get_physpage();
 			pte = pmap_pa2pte(pa) | PG_k | PG_V | PG_RW;
 #ifdef XEN
 			pmap_pte_set([i], pte);



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

2016-07-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Jul  9 09:25:44 UTC 2016

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

Log Message:
Use pmap_bootstrap_palloc.


To generate a diff of this commit:
cvs rdiff -u -r1.208 -r1.209 src/sys/arch/x86/x86/pmap.c

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

Modified files:

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.208 src/sys/arch/x86/x86/pmap.c:1.209
--- src/sys/arch/x86/x86/pmap.c:1.208	Sat Jul  9 08:05:46 2016
+++ src/sys/arch/x86/x86/pmap.c	Sat Jul  9 09:25:44 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.208 2016/07/09 08:05:46 maxv Exp $	*/
+/*	$NetBSD: pmap.c,v 1.209 2016/07/09 09:25:44 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2010, 2016 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.208 2016/07/09 08:05:46 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.209 2016/07/09 09:25:44 maxv Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -1399,8 +1399,7 @@ pmap_bootstrap(vaddr_t kva_start)
 	 * will still consider it active. So we set user PGD to this one to lift
 	 * all protection on the now inactive page tables set.
 	 */
-	xen_dummy_user_pgd = avail_start;
-	avail_start += PAGE_SIZE;
+	xen_dummy_user_pgd = pmap_bootstrap_palloc(1);
 
 	/* Zero fill it, the less checks in Xen it requires the better */
 	memset((void *) (xen_dummy_user_pgd + KERNBASE), 0, PAGE_SIZE);
@@ -1637,8 +1636,8 @@ pmap_prealloc_lowmem_ptps(void)
 	pdes = pmap_kernel()->pm_pdir;
 	level = PTP_LEVELS;
 	for (;;) {
-		newp = avail_start;
-		avail_start += PAGE_SIZE;
+		newp = pmap_bootstrap_palloc(1);
+
 #ifdef __HAVE_DIRECT_MAP
 		memset((void *)PMAP_DIRECT_MAP(newp), 0, PAGE_SIZE);
 #else



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

2016-07-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Jul  9 08:05:47 UTC 2016

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

Log Message:
When a user pmap is created, it is populated with the higher kernel
slots, which become accessible upon kernel entry (syscall, cpu switch,
or whatever). Put the NOX bit in the user recursive slot, so the whole
tree does not appear as executable in kernel mode.

This is already what is done in the kernel pmap.


To generate a diff of this commit:
cvs rdiff -u -r1.207 -r1.208 src/sys/arch/x86/x86/pmap.c

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

Modified files:

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.207 src/sys/arch/x86/x86/pmap.c:1.208
--- src/sys/arch/x86/x86/pmap.c:1.207	Sat Jul  9 07:47:25 2016
+++ src/sys/arch/x86/x86/pmap.c	Sat Jul  9 08:05:46 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.207 2016/07/09 07:47:25 maxv Exp $	*/
+/*	$NetBSD: pmap.c,v 1.208 2016/07/09 08:05:46 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2010, 2016 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.207 2016/07/09 07:47:25 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.208 2016/07/09 08:05:46 maxv Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -2164,7 +2164,8 @@ pmap_pdp_ctor(void *arg, void *v, int fl
 		(void)pmap_extract(pmap_kernel(), object, );
 
 		/* Put in recursive PDE to map the PTEs */
-		pdir[PDIR_SLOT_PTE + i] = pmap_pa2pte(pdirpa) | PG_V;
+		pdir[PDIR_SLOT_PTE + i] = pmap_pa2pte(pdirpa) | PG_V |
+		pmap_pg_nx;
 #ifndef XEN
 		pdir[PDIR_SLOT_PTE + i] |= PG_KW;
 #endif



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

2016-07-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Jul  9 07:47:25 UTC 2016

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

Log Message:
KNF this function a little


To generate a diff of this commit:
cvs rdiff -u -r1.206 -r1.207 src/sys/arch/x86/x86/pmap.c

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

Modified files:

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.206 src/sys/arch/x86/x86/pmap.c:1.207
--- src/sys/arch/x86/x86/pmap.c:1.206	Fri Jul  1 12:36:43 2016
+++ src/sys/arch/x86/x86/pmap.c	Sat Jul  9 07:47:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.206 2016/07/01 12:36:43 maxv Exp $	*/
+/*	$NetBSD: pmap.c,v 1.207 2016/07/09 07:47:25 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2010, 2016 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.206 2016/07/01 12:36:43 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.207 2016/07/09 07:47:25 maxv Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -2107,7 +2107,7 @@ pmap_get_ptp(struct pmap *pmap, vaddr_t 
 }
 
 /*
- * p m a p  l i f e c y c l e   f u n c t i o n s
+ * p m a p   l i f e c y c l e   f u n c t i o n s
  */
 
 /*
@@ -2117,7 +2117,7 @@ static int
 pmap_pdp_ctor(void *arg, void *v, int flags)
 {
 	pd_entry_t *pdir = v;
-	paddr_t pdirpa = 0;	/* XXX: GCC */
+	paddr_t pdirpa = 0;
 	vaddr_t object;
 	int i;
 
@@ -2133,60 +2133,63 @@ pmap_pdp_ctor(void *arg, void *v, int fl
 	 */
 
 #if defined(XEN) && defined(__x86_64__)
-	/* fetch the physical address of the page directory. */
-	(void) pmap_extract(pmap_kernel(), (vaddr_t) pdir, );
+	/* Fetch the physical address of the page directory */
+	(void)pmap_extract(pmap_kernel(), (vaddr_t)pdir, );
+
+	/* Zero the area */
+	memset(pdir, 0, PAGE_SIZE); /* Xen wants a clean page */
 
-	/* zero init area */
-	memset (pdir, 0, PAGE_SIZE); /* Xen wants a clean page */
 	/*
-	 * this pdir will NEVER be active in kernel mode
-	 * so mark recursive entry invalid
+	 * This pdir will NEVER be active in kernel mode, so mark
+	 * recursive entry invalid.
 	 */
 	pdir[PDIR_SLOT_PTE] = pmap_pa2pte(pdirpa) | PG_u;
+
 	/*
-	 * PDP constructed this way won't be for kernel,
-	 * hence we don't put kernel mappings on Xen.
-	 * But we need to make pmap_create() happy, so put a dummy (without
-	 * PG_V) value at the right place.
+	 * PDP constructed this way won't be for the kernel, hence we
+	 * don't put kernel mappings on Xen.
+	 *
+	 * But we need to make pmap_create() happy, so put a dummy
+	 * (without PG_V) value at the right place.
 	 */
 	pdir[PDIR_SLOT_KERN + nkptp[PTP_LEVELS - 1] - 1] =
 	 (pd_entry_t)-1 & PG_FRAME;
 #else /* XEN && __x86_64__*/
-	/* zero init area */
+	/* Zero the area */
 	memset(pdir, 0, PDIR_SLOT_PTE * sizeof(pd_entry_t));
 
 	object = (vaddr_t)v;
 	for (i = 0; i < PDP_SIZE; i++, object += PAGE_SIZE) {
-		/* fetch the physical address of the page directory. */
-		(void) pmap_extract(pmap_kernel(), object, );
-		/* put in recursive PDE to map the PTEs */
+		/* Fetch the physical address of the page directory */
+		(void)pmap_extract(pmap_kernel(), object, );
+
+		/* Put in recursive PDE to map the PTEs */
 		pdir[PDIR_SLOT_PTE + i] = pmap_pa2pte(pdirpa) | PG_V;
 #ifndef XEN
 		pdir[PDIR_SLOT_PTE + i] |= PG_KW;
 #endif
 	}
 
-	/* copy kernel's PDE */
+	/* Copy the kernel's top level PDE */
 	npde = nkptp[PTP_LEVELS - 1];
 
 	memcpy([PDIR_SLOT_KERN], _BASE[PDIR_SLOT_KERN],
 	npde * sizeof(pd_entry_t));
 
-	/* zero the rest */
+	/* Zero the rest */
 	memset([PDIR_SLOT_KERN + npde], 0, (PAGE_SIZE * PDP_SIZE) -
 	(PDIR_SLOT_KERN + npde) * sizeof(pd_entry_t));
 
 	if (VM_MIN_KERNEL_ADDRESS != KERNBASE) {
 		int idx = pl_i(KERNBASE, PTP_LEVELS);
-
 		pdir[idx] = PDP_BASE[idx];
 	}
 
 #ifdef __HAVE_DIRECT_MAP
 	pdir[PDIR_SLOT_DIRECT] = PDP_BASE[PDIR_SLOT_DIRECT];
 #endif
-
 #endif /* XEN  && __x86_64__*/
+
 #ifdef XEN
 	s = splvm();
 	object = (vaddr_t)v;



CVS commit: src/sys

2016-07-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Jul  9 07:25:00 UTC 2016

Modified Files:
src/sys/kern: subr_kobj.c subr_kobj_vfs.c
src/sys/sys: kobj_impl.h

Log Message:
When loading a module from VFS and from the bootloader, the kernel packs
up the module segments into one big RWX chunk. Split this chunk into two
different text and data+bss+rodata chunks. The latter is made non-
executable. This also provides some kind of ASLR, since the chunks are
not necessarily contiguous.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/kern/subr_kobj.c
cvs rdiff -u -r1.8 -r1.9 src/sys/kern/subr_kobj_vfs.c
cvs rdiff -u -r1.3 -r1.4 src/sys/sys/kobj_impl.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/kern/subr_kobj.c
diff -u src/sys/kern/subr_kobj.c:1.54 src/sys/kern/subr_kobj.c:1.55
--- src/sys/kern/subr_kobj.c:1.54	Fri Jul  8 08:55:48 2016
+++ src/sys/kern/subr_kobj.c	Sat Jul  9 07:25:00 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_kobj.c,v 1.54 2016/07/08 08:55:48 maxv Exp $	*/
+/*	$NetBSD: subr_kobj.c,v 1.55 2016/07/09 07:25:00 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_kobj.c,v 1.54 2016/07/08 08:55:48 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_kobj.c,v 1.55 2016/07/09 07:25:00 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_modular.h"
@@ -160,8 +160,10 @@ kobj_load(kobj_t ko)
 	Elf_Ehdr *hdr;
 	Elf_Shdr *shdr;
 	Elf_Sym *es;
-	vaddr_t mapbase;
-	size_t mapsize;
+	vaddr_t map_text_base;
+	vaddr_t map_data_base;
+	size_t map_text_size;
+	size_t map_data_size;
 	int error;
 	int symtabindex;
 	int symstrindex;
@@ -392,40 +394,54 @@ kobj_load(kobj_t ko)
 	 * Size up code/data(progbits) and bss(nobits).
 	 */
 	alignmask = 0;
-	mapsize = 0;
+	map_text_size = 0;
+	map_data_size = 0;
 	for (i = 0; i < hdr->e_shnum; i++) {
-		switch (shdr[i].sh_type) {
-		case SHT_PROGBITS:
-		case SHT_NOBITS:
-			alignmask = shdr[i].sh_addralign - 1;
-			mapsize += alignmask;
-			mapsize &= ~alignmask;
-			mapsize += shdr[i].sh_size;
-			break;
+		if (shdr[i].sh_type != SHT_PROGBITS &&
+		shdr[i].sh_type != SHT_NOBITS)
+			continue;
+		alignmask = shdr[i].sh_addralign - 1;
+		if ((shdr[i].sh_flags & SHF_EXECINSTR)) {
+			map_text_size += alignmask;
+			map_text_size &= ~alignmask;
+			map_text_size += shdr[i].sh_size;
+		} else {
+			map_data_size += alignmask;
+			map_data_size &= ~alignmask;
+			map_data_size += shdr[i].sh_size;
 		}
 	}
 
-	/*
-	 * We know how much space we need for the text/data/bss/etc.
-	 * This stuff needs to be in a single chunk so that profiling etc
-	 * can get the bounds and gdb can associate offsets with modules.
-	 */
-	if (mapsize == 0) {
-		kobj_error(ko, "no text/data/bss");
+	if (map_text_size == 0) {
+		kobj_error(ko, "no text");
+		error = ENOEXEC;
+ 		goto out;
+ 	}
+	if (map_data_size == 0) {
+		kobj_error(ko, "no data/bss");
 		error = ENOEXEC;
  		goto out;
  	}
 
-	mapbase = uvm_km_alloc(module_map, round_page(mapsize),
+	map_text_base = uvm_km_alloc(module_map, round_page(map_text_size),
 	0, UVM_KMF_WIRED | UVM_KMF_EXEC);
-	if (mapbase == 0) {
+	if (map_text_base == 0) {
 		kobj_error(ko, "out of memory");
 		error = ENOMEM;
 		goto out;
 	}
+	ko->ko_text_address = map_text_base;
+	ko->ko_text_size = map_text_size;
 
-	ko->ko_address = mapbase;
-	ko->ko_size = mapsize;
+	map_data_base = uvm_km_alloc(module_map, round_page(map_data_size),
+	0, UVM_KMF_WIRED);
+	if (map_data_base == 0) {
+		kobj_error(ko, "out of memory");
+		error = ENOMEM;
+		goto out;
+	}
+	ko->ko_data_address = map_data_base;
+	ko->ko_data_size = map_data_size;
 
 	/*
 	 * Now load code/data(progbits), zero bss(nobits), allocate space
@@ -440,10 +456,17 @@ kobj_load(kobj_t ko)
 		case SHT_PROGBITS:
 		case SHT_NOBITS:
 			alignmask = shdr[i].sh_addralign - 1;
-			mapbase += alignmask;
-			mapbase &= ~alignmask;
-			addr = (void *)mapbase;
-			mapbase += shdr[i].sh_size;
+			if ((shdr[i].sh_flags & SHF_EXECINSTR)) {
+map_text_base += alignmask;
+map_text_base &= ~alignmask;
+addr = (void *)map_text_base;
+map_text_base += shdr[i].sh_size;
+ 			} else {
+map_data_base += alignmask;
+map_data_base &= ~alignmask;
+addr = (void *)map_data_base;
+map_data_base += shdr[i].sh_size;
+ 			}
 
 			ko->ko_progtab[pb].addr = addr;
 			if (shdr[i].sh_type == SHT_PROGBITS) {
@@ -535,12 +558,19 @@ kobj_load(kobj_t ko)
 		panic("%s:%d: %s: lost rela", __func__, __LINE__,
 		   ko->ko_name);
 	}
-	if (mapbase != ko->ko_address + mapsize) {
-		panic("%s:%d: %s: "
-		"mapbase 0x%lx != address %lx + mapsize %ld (0x%lx)\n",
-		__func__, __LINE__, ko->ko_name,
-		(long)mapbase, (long)ko->ko_address, (long)mapsize,
-		(long)ko->ko_address + mapsize);
+	if (map_text_base != ko->ko_text_address + map_text_size) {
+		panic("%s:%d: %s: 

CVS commit: src/sys/arch

2016-07-09 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Jul  9 06:58:06 UTC 2016

Modified Files:
src/sys/arch/amd64/amd64: locore.S
src/sys/arch/i386/i386: locore.S

Log Message:
The CPU considers a given va as executable if none of its levels have
the NOX bit. With the top level recursive slot, however, several levels
are recursively omitted, which implies that each entry that is not the
child of NOX-ed parents actually appears somewhere in the virtual space
as executable via this slot, even if it is followed by an underlying
entry that has the NOX bit.

This recursive slot is only used to edit the page tree itself. Make it
non-executable.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/amd64/amd64/locore.S
cvs rdiff -u -r1.134 -r1.135 src/sys/arch/i386/i386/locore.S

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

Modified files:

Index: src/sys/arch/amd64/amd64/locore.S
diff -u src/sys/arch/amd64/amd64/locore.S:1.105 src/sys/arch/amd64/amd64/locore.S:1.106
--- src/sys/arch/amd64/amd64/locore.S:1.105	Fri Jul  8 09:15:38 2016
+++ src/sys/arch/amd64/amd64/locore.S	Sat Jul  9 06:58:06 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.105 2016/07/08 09:15:38 maxv Exp $	*/
+/*	$NetBSD: locore.S,v 1.106 2016/07/09 06:58:06 maxv Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -777,12 +777,12 @@ no_NOX:
 	movl	$NKL4_KIMG_ENTRIES,%ecx
 	fillkpt
 
-	/* Install recursive top level PDE */
+	/* Install recursive top level PDE (one entry) */
 	leal	(PROC0_PML4_OFF + PDIR_SLOT_PTE * PDE_SIZE)(%esi),%ebx
 	leal	(PROC0_PML4_OFF)(%esi),%eax
 	orl	$(PG_V|PG_KW),%eax
-	movl	%eax,(%ebx)
-	movl	$0,(PDE_SIZE-4)(%ebx)
+	movl	$1,%ecx
+	fillkpt_nox
 
 	/*
 	 * Startup checklist:

Index: src/sys/arch/i386/i386/locore.S
diff -u src/sys/arch/i386/i386/locore.S:1.134 src/sys/arch/i386/i386/locore.S:1.135
--- src/sys/arch/i386/i386/locore.S:1.134	Fri Jul  8 09:15:38 2016
+++ src/sys/arch/i386/i386/locore.S	Sat Jul  9 06:58:06 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.134 2016/07/08 09:15:38 maxv Exp $	*/
+/*	$NetBSD: locore.S,v 1.135 2016/07/09 06:58:06 maxv Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -128,7 +128,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.134 2016/07/08 09:15:38 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.135 2016/07/09 06:58:06 maxv Exp $");
 
 #include "opt_compat_oldboot.h"
 #include "opt_copy_symtab.h"
@@ -776,12 +776,12 @@ no_NOX:
 	movl	RELOC(nkptp)+1*4,%ecx
 	fillkpt
 
-	/* Install a PDE recursively mapping page directory as a page table! */
+	/* Install recursive top level PDE */
 	leal	(PROC0_PDIR_OFF + PDIR_SLOT_PTE * PDE_SIZE)(%esi),%ebx
 	leal	(PROC0_PDIR_OFF)(%esi),%eax
 	orl	$(PG_V|PG_KW),%eax
 	movl	$PDP_SIZE,%ecx
-	fillkpt
+	fillkpt_nox
 
 #ifdef PAE
 	/*



CVS commit: src/sys/arch/hpcmips/tx

2016-07-09 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jul  9 06:49:03 UTC 2016

Modified Files:
src/sys/arch/hpcmips/tx: tx3912video.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/hpcmips/tx/tx3912video.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/hpcmips/tx/tx3912video.c
diff -u src/sys/arch/hpcmips/tx/tx3912video.c:1.43 src/sys/arch/hpcmips/tx/tx3912video.c:1.44
--- src/sys/arch/hpcmips/tx/tx3912video.c:1.43	Sat Jun  7 18:59:16 2014
+++ src/sys/arch/hpcmips/tx/tx3912video.c	Sat Jul  9 06:49:03 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: tx3912video.c,v 1.43 2014/06/07 18:59:16 he Exp $ */
+/*	$NetBSD: tx3912video.c,v 1.44 2016/07/09 06:49:03 skrll Exp $ */
 
 /*-
  * Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tx3912video.c,v 1.43 2014/06/07 18:59:16 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tx3912video.c,v 1.44 2016/07/09 06:49:03 skrll Exp $");
 
 #define TX3912VIDEO_DEBUG
 
@@ -39,11 +39,10 @@ __KERNEL_RCSID(0, "$NetBSD: tx3912video.
 
 #include 
 #include 
+#include 
 #include 
 #include 
-
 #include 
-#include 
 
 #include