PERFORCE change 94563 for review
Peter Wemm
peter at FreeBSD.org
Mon Apr 3 21:45:31 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=94563
Change 94563 by peter at peter_daintree on 2006/04/03 21:44:50
IFC @94562
Affected files ...
.. //depot/projects/hammer/share/man/man9/pmap_remove.9#3 integrate
.. //depot/projects/hammer/sys/alpha/alpha/pmap.c#51 integrate
.. //depot/projects/hammer/sys/amd64/amd64/pmap.c#150 integrate
.. //depot/projects/hammer/sys/amd64/include/pmap.h#61 integrate
.. //depot/projects/hammer/sys/arm/arm/pmap.c#33 integrate
.. //depot/projects/hammer/sys/i386/i386/pmap.c#83 integrate
.. //depot/projects/hammer/sys/ia64/ia64/pmap.c#53 integrate
.. //depot/projects/hammer/sys/kern/kern_exec.c#63 integrate
.. //depot/projects/hammer/sys/kern/kern_exit.c#60 integrate
.. //depot/projects/hammer/sys/powerpc/powerpc/mmu_if.m#4 integrate
.. //depot/projects/hammer/sys/powerpc/powerpc/pmap_dispatch.c#5 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/machdep.c#45 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/pmap.c#41 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/trap.c#20 integrate
.. //depot/projects/hammer/sys/vm/pmap.h#25 integrate
.. //depot/projects/hammer/usr.bin/find/find.1#18 integrate
Differences ...
==== //depot/projects/hammer/share/man/man9/pmap_remove.9#3 (text+ko) ====
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man9/pmap_remove.9,v 1.2 2004/07/06 07:02:31 ru Exp $
+.\" $FreeBSD: src/share/man/man9/pmap_remove.9,v 1.3 2006/04/03 21:17:36 peter Exp $
.\"
.Dd July 21, 2003
.Dt PMAP_REMOVE 9
@@ -42,7 +42,7 @@
.Ft void
.Fn pmap_remove_all "vm_page_t m"
.Ft void
-.Fn pmap_remove_pages "pmap_t pmap" "vm_offset_t sva" "vm_offset_t eva"
+.Fn pmap_remove_pages "pmap_t pmap"
.Sh DESCRIPTION
The
.Fn pmap_remove
@@ -72,12 +72,8 @@
.Pp
The
.Fn pmap_remove_pages
-function removes all pages from the physical map
-.Fa pmap ,
-within the range of physical addresses bounded by
-.Fa sva
-and
-.Fa eva .
+function removes all user pages from the physical map
+.Fa pmap .
This function is called when a process exits to run down its address space
more quickly than would be the case for calling
.Fn pmap_remove .
==== //depot/projects/hammer/sys/alpha/alpha/pmap.c#51 (text+ko) ====
@@ -148,7 +148,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.187 2005/12/02 18:02:54 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.188 2006/04/03 21:16:07 peter Exp $");
#include <sys/param.h>
#include <sys/systm.h>
==== //depot/projects/hammer/sys/amd64/amd64/pmap.c#150 (text+ko) ====
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.540 2006/04/02 05:45:05 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.542 2006/04/03 21:36:00 peter Exp $");
/*
* Manages physical address maps.
==== //depot/projects/hammer/sys/amd64/include/pmap.h#61 (text+ko) ====
@@ -39,7 +39,7 @@
*
* from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
* from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
- * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.129 2006/03/14 00:01:56 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.130 2006/04/03 21:36:01 peter Exp $
*/
#ifndef _MACHINE_PMAP_H_
==== //depot/projects/hammer/sys/arm/arm/pmap.c#33 (text+ko) ====
@@ -147,7 +147,7 @@
#include "opt_vm.h"
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.45 2006/03/26 22:03:43 cognet Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.46 2006/04/03 21:16:07 peter Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
==== //depot/projects/hammer/sys/i386/i386/pmap.c#83 (text+ko) ====
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.547 2006/04/02 05:45:05 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.548 2006/04/03 21:16:07 peter Exp $");
/*
* Manages physical address maps.
==== //depot/projects/hammer/sys/ia64/ia64/pmap.c#53 (text+ko) ====
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ia64/ia64/pmap.c,v 1.172 2005/11/20 06:09:48 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/ia64/ia64/pmap.c,v 1.173 2006/04/03 21:16:08 peter Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
==== //depot/projects/hammer/sys/kern/kern_exec.c#63 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_exec.c,v 1.290 2006/03/08 20:21:54 ups Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_exec.c,v 1.291 2006/04/03 21:16:08 peter Exp $");
#include "opt_hwpmc_hooks.h"
#include "opt_ktrace.h"
==== //depot/projects/hammer/sys/kern/kern_exit.c#60 (text+ko) ====
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_exit.c,v 1.286 2006/03/14 04:00:21 davidxu Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_exit.c,v 1.287 2006/04/03 21:16:09 peter Exp $");
#include "opt_compat.h"
#include "opt_ktrace.h"
==== //depot/projects/hammer/sys/powerpc/powerpc/mmu_if.m#4 (text+ko) ====
@@ -23,7 +23,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $FreeBSD: src/sys/powerpc/powerpc/mmu_if.m,v 1.2 2005/11/20 06:09:49 alc Exp $
+# $FreeBSD: src/sys/powerpc/powerpc/mmu_if.m,v 1.3 2006/04/03 21:16:09 peter Exp $
#
#include <sys/param.h>
==== //depot/projects/hammer/sys/powerpc/powerpc/pmap_dispatch.c#5 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/powerpc/powerpc/pmap_dispatch.c,v 1.3 2005/11/20 06:09:49 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/powerpc/powerpc/pmap_dispatch.c,v 1.4 2006/04/03 21:16:09 peter Exp $");
/*
* Dispatch MI pmap calls to the appropriate MMU implementation
==== //depot/projects/hammer/sys/sparc64/sparc64/machdep.c#45 (text+ko) ====
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/sparc64/sparc64/machdep.c,v 1.128 2006/03/28 20:28:31 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/sparc64/sparc64/machdep.c,v 1.129 2006/04/03 21:27:01 marius Exp $");
#include "opt_compat.h"
#include "opt_ddb.h"
@@ -464,14 +464,12 @@
int oonstack;
u_long sp;
int sig;
- int code;
oonstack = 0;
td = curthread;
p = td->td_proc;
PROC_LOCK_ASSERT(p, MA_OWNED);
sig = ksi->ksi_signo;
- code = ksi->ksi_code;
psp = p->p_sigacts;
mtx_assert(&psp->ps_mtx, MA_OWNED);
tf = td->td_frame;
@@ -484,7 +482,7 @@
/* Make sure we have a signal trampoline to return to. */
if (p->p_md.md_sigtramp == NULL) {
/*
- * No signal tramoline... kill the process.
+ * No signal trampoline... kill the process.
*/
CTR0(KTR_SIG, "sendsig: no sigtramp");
printf("sendsig: %s is too old, rebuild it\n", p->p_comm);
@@ -518,12 +516,20 @@
/* Build the argument list for the signal handler. */
tf->tf_out[0] = sig;
- tf->tf_out[1] = (register_t)&sfp->sf_si;
tf->tf_out[2] = (register_t)&sfp->sf_uc;
tf->tf_out[4] = (register_t)catcher;
- /* Fill siginfo structure. */
- sf.sf_si = ksi->ksi_info;
- sf.sf_si.si_addr = (void *)tf->tf_sfar; /* XXX */
+ if (SIGISMEMBER(psp->ps_siginfo, sig)) {
+ /* Signal handler installed with SA_SIGINFO. */
+ tf->tf_out[1] = (register_t)&sfp->sf_si;
+
+ /* Fill in POSIX parts. */
+ sf.sf_si = ksi->ksi_info;
+ sf.sf_si.si_signo = sig; /* maybe a translated signal */
+ } else {
+ /* Old FreeBSD-style arguments. */
+ tf->tf_out[1] = ksi->ksi_code;
+ tf->tf_out[3] = (register_t)ksi->ksi_addr;
+ }
/* Copy the sigframe out to the user's stack. */
if (rwindow_save(td) != 0 || copyout(&sf, sfp, sizeof(*sfp)) != 0 ||
==== //depot/projects/hammer/sys/sparc64/sparc64/pmap.c#41 (text+ko) ====
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
- * $FreeBSD: src/sys/sparc64/sparc64/pmap.c,v 1.152 2006/01/01 22:52:21 scottl Exp $
+ * $FreeBSD: src/sys/sparc64/sparc64/pmap.c,v 1.153 2006/04/03 21:16:09 peter Exp $
*/
/*
==== //depot/projects/hammer/sys/sparc64/sparc64/trap.c#20 (text+ko) ====
@@ -37,9 +37,11 @@
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* from: FreeBSD: src/sys/i386/i386/trap.c,v 1.197 2001/07/19
- * $FreeBSD: src/sys/sparc64/sparc64/trap.c,v 1.79 2006/02/28 21:25:00 brueffer Exp $
*/
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: src/sys/sparc64/sparc64/trap.c,v 1.80 2006/04/03 21:27:01 marius Exp $");
+
#include "opt_ddb.h"
#include "opt_ktr.h"
#include "opt_ktrace.h"
@@ -165,7 +167,7 @@
"kernel stack fault",
};
-const int trap_sig[] = {
+static const int trap_sig[] = {
SIGILL, /* reserved */
SIGILL, /* instruction access exception */
SIGILL, /* instruction access error */
@@ -233,6 +235,7 @@
struct proc *p;
int error;
int sig;
+ register_t addr;
ksiginfo_t ksi;
td = PCPU_GET(curthread);
@@ -250,12 +253,15 @@
p = td->td_proc;
td->td_pticks = 0;
td->td_frame = tf;
+ addr = tf->tf_tpc;
if (td->td_ucred != p->p_ucred)
cred_update_thread(td);
switch (tf->tf_type) {
case T_DATA_MISS:
case T_DATA_PROTECTION:
+ addr = tf->tf_sfar;
+ /* FALLTHROUGH */
case T_INSTRUCTION_MISS:
sig = trap_pfault(td, tf);
break;
@@ -288,7 +294,7 @@
ksiginfo_init_trap(&ksi);
ksi.ksi_signo = sig;
ksi.ksi_code = (int)tf->tf_type; /* XXX not POSIX */
- /* ksi.ksi_addr = ? */
+ ksi.ksi_addr = (void *)addr;
ksi.ksi_trapno = (int)tf->tf_type;
trapsignal(td, &ksi);
}
==== //depot/projects/hammer/sys/vm/pmap.h#25 (text+ko) ====
@@ -57,7 +57,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $FreeBSD: src/sys/vm/pmap.h,v 1.74 2005/11/20 06:09:49 alc Exp $
+ * $FreeBSD: src/sys/vm/pmap.h,v 1.75 2006/04/03 21:16:10 peter Exp $
*/
/*
==== //depot/projects/hammer/usr.bin/find/find.1#18 (text+ko) ====
@@ -33,9 +33,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)find.1 8.7 (Berkeley) 5/9/95
-.\" $FreeBSD: src/usr.bin/find/find.1,v 1.74 2006/04/03 20:36:37 ceri Exp $
+.\" $FreeBSD: src/usr.bin/find/find.1,v 1.75 2006/04/03 20:53:34 ceri Exp $
.\"
-.Dd April 2, 2005
+.Dd April 3, 2006
.Dt FIND 1
.Os
.Sh NAME
More information about the p4-projects
mailing list