Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/powerpc Include <uvm/uvm_extern.h>.
details: https://anonhg.NetBSD.org/src/rev/42f96c73c1e7
branches: trunk
changeset: 762708:42f96c73c1e7
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Sat Feb 26 05:25:27 2011 +0000
description:
Include <uvm/uvm_extern.h>.
s/tf->/tf->tf_/.
diffstat:
sys/arch/powerpc/powerpc/darwin_machdep.c | 74 +++++++++++++++---------------
1 files changed, 38 insertions(+), 36 deletions(-)
diffs (138 lines):
diff -r b7c59d880d58 -r 42f96c73c1e7 sys/arch/powerpc/powerpc/darwin_machdep.c
--- a/sys/arch/powerpc/powerpc/darwin_machdep.c Sat Feb 26 05:23:22 2011 +0000
+++ b/sys/arch/powerpc/powerpc/darwin_machdep.c Sat Feb 26 05:25:27 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: darwin_machdep.c,v 1.28 2009/04/13 11:54:58 he Exp $ */
+/* $NetBSD: darwin_machdep.c,v 1.29 2011/02/26 05:25:27 kiyohara Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: darwin_machdep.c,v 1.28 2009/04/13 11:54:58 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: darwin_machdep.c,v 1.29 2011/02/26 05:25:27 kiyohara Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -38,6 +38,8 @@
#include <sys/mount.h>
#include <sys/signal.h>
+#include <uvm/uvm_extern.h>
+
#include <compat/sys/signal.h>
#include <compat/sys/signalvar.h>
@@ -92,7 +94,7 @@
l->l_sigstk.ss_size);
stack_size = l->l_sigstk.ss_size;
} else {
- sfp = (struct darwin_sigframe *)tf->fixreg[1];
+ sfp = (struct darwin_sigframe *)tf->tf_fixreg[1];
stack_size = 0;
}
/* 16 bytes alignement */
@@ -100,17 +102,17 @@
/* Prepare the signal frame */
memset(&sf, 0, sizeof(sf));
- sf.dmc.es.dar = tf->dar;
- sf.dmc.es.dsisr = tf->dsisr;
- sf.dmc.es.exception = tf->exc;
+ sf.dmc.es.dar = tf->tf_dar;
+ sf.dmc.es.dsisr = tf->tf_dsisr;
+ sf.dmc.es.exception = tf->tf_exc;
- sf.dmc.ss.srr0 = tf->srr0;
- sf.dmc.ss.srr1 = tf->srr1 & PSL_USERSRR1;
- memcpy(&sf.dmc.ss.gpreg[0], &tf->fixreg[0], sizeof(sf.dmc.ss.gpreg));
- sf.dmc.ss.cr = tf->cr;
- sf.dmc.ss.xer = tf->xer;
- sf.dmc.ss.lr = tf->lr;
- sf.dmc.ss.ctr = tf->ctr;
+ sf.dmc.ss.srr0 = tf->tf_srr0;
+ sf.dmc.ss.srr1 = tf->tf_srr1 & PSL_USERSRR1;
+ memcpy(&sf.dmc.ss.gpreg[0], &tf->tf_fixreg[0], sizeof(sf.dmc.ss.gpreg));
+ sf.dmc.ss.cr = tf->tf_cr;
+ sf.dmc.ss.xer = tf->tf_xer;
+ sf.dmc.ss.lr = tf->tf_lr;
+ sf.dmc.ss.ctr = tf->tf_ctr;
sf.dmc.ss.mq = 0; /* XXX */
/* XXX What should we do with th FP regs? */
@@ -154,18 +156,18 @@
}
/* Prepare registers */
- tf->fixreg[1] = (u_long)sfp;
- tf->fixreg[3] = (u_long)catcher;
+ tf->tf_fixreg[1] = (u_long)sfp;
+ tf->tf_fixreg[3] = (u_long)catcher;
if (SIGACTION(p, sig).sa_flags & SA_SIGINFO)
- tf->fixreg[4] = 2; /* with siginfo */
+ tf->tf_fixreg[4] = 2; /* with siginfo */
else
- tf->fixreg[4] = 1; /* without siginfo */
- tf->fixreg[5] = (u_long)sig;
- tf->fixreg[6] = (u_long)&sfp->duc.si;
- tf->fixreg[7] = (u_long)&sfp->duc.uctx;
- tf->lr = (u_long)tf->srr0;
- tf->srr0 = (u_long)ps->sa_sigdesc[sig].sd_tramp;
- tf->srr1 = (PSL_EE | PSL_ME | PSL_IR | PSL_DR | PSL_PR);
+ tf->tf_fixreg[4] = 1; /* without siginfo */
+ tf->tf_fixreg[5] = (u_long)sig;
+ tf->tf_fixreg[6] = (u_long)&sfp->duc.si;
+ tf->tf_fixreg[7] = (u_long)&sfp->duc.uctx;
+ tf->tf_lr = (u_long)tf->tf_srr0;
+ tf->tf_srr0 = (u_long)ps->sa_sigdesc[sig].sd_tramp;
+ tf->tf_srr1 = (PSL_EE | PSL_ME | PSL_IR | PSL_DR | PSL_PR);
/* Remember that we're now on the signal stack. */
if (onstack)
@@ -214,22 +216,22 @@
tf = trapframe(l);
if (!PSL_USEROK_P(mctx.ss.srr1)) {
DPRINTF(("uctx.ss.srr1 = 0x%08x, rf->srr1 = 0x%08lx\n",
- mctx.ss.srr1, tf->srr1));
+ mctx.ss.srr1, tf->tf_srr1));
return (EINVAL);
}
/* Restore the context */
- tf->dar = mctx.es.dar;
- tf->dsisr = mctx.es.dsisr;
- tf->exc = mctx.es.exception;
+ tf->tf_dar = mctx.es.dar;
+ tf->tf_dsisr = mctx.es.dsisr;
+ tf->tf_exc = mctx.es.exception;
- tf->srr0 = mctx.ss.srr0;
- tf->srr1 = mctx.ss.srr1;
- memcpy(&tf->fixreg[0], &mctx.ss.gpreg[0], sizeof(mctx.ss.gpreg));
- tf->cr = mctx.ss.cr;
- tf->xer = mctx.ss.xer;
- tf->lr = mctx.ss.lr;
- tf->ctr = mctx.ss.ctr;
+ tf->tf_srr0 = mctx.ss.srr0;
+ tf->tf_srr1 = mctx.ss.srr1;
+ memcpy(&tf->tf_fixreg[0], &mctx.ss.gpreg[0], sizeof(mctx.ss.gpreg));
+ tf->tf_cr = mctx.ss.cr;
+ tf->tf_xer = mctx.ss.xer;
+ tf->tf_lr = mctx.ss.lr;
+ tf->tf_ctr = mctx.ss.ctr;
/* Restore signal stack */
if (uctx.uc_onstack & SS_ONSTACK)
@@ -286,8 +288,8 @@
child_return(arg);
- tf->fixreg[FIRSTARG] = p->p_pid;
- tf->srr0 +=4;
+ tf->tf_fixreg[FIRSTARG] = p->p_pid;
+ tf->tf_srr0 +=4;
return;
}
Home |
Main Index |
Thread Index |
Old Index