Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-0]: src/sys/compat/linux/arch/mips Pull up revision 1.21 (reque...
details: https://anonhg.NetBSD.org/src/rev/27397af0e154
branches: netbsd-2-0
changeset: 561570:27397af0e154
user: tron <tron%NetBSD.org@localhost>
date: Tue Jun 22 08:47:35 2004 +0000
description:
Pull up revision 1.21 (requested by manu in ticket #519):
Build COMPAT_LINUX again on mips after the siginfo change.
diffstat:
sys/compat/linux/arch/mips/linux_machdep.c | 48 +++++++++++++++---------------
1 files changed, 24 insertions(+), 24 deletions(-)
diffs (105 lines):
diff -r c90bbcc18082 -r 27397af0e154 sys/compat/linux/arch/mips/linux_machdep.c
--- a/sys/compat/linux/arch/mips/linux_machdep.c Tue Jun 22 08:45:39 2004 +0000
+++ b/sys/compat/linux/arch/mips/linux_machdep.c Tue Jun 22 08:47:35 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_machdep.c,v 1.20 2003/12/04 19:38:22 atatat Exp $ */
+/* $NetBSD: linux_machdep.c,v 1.20.2.1 2004/06/22 08:47:35 tron Exp $ */
/*-
* Copyright (c) 1995, 2000, 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.20 2003/12/04 19:38:22 atatat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.20.2.1 2004/06/22 08:47:35 tron Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -121,11 +121,11 @@
*/
void
-linux_sendsig(sig, mask, code) /* XXX Check me */
- int sig;
+linux_sendsig(ksi, mask)
+ const ksiginfo_t *ksi;
const sigset_t *mask;
- u_long code;
{
+ const int sig = ksi->ksi_signo;
struct lwp *l = curlwp;
struct proc *p = l->l_proc;
struct linux_sigframe *fp;
@@ -161,7 +161,7 @@
+ p->p_sigctx.ps_sigstk.ss_size);
else
/* cast for _MIPS_BSD_API == _MIPS_BSD_API_LP32_64CLEAN case */
- fp = (struct linux_sigframe *)(u_int32_t)f->f_regs[SP];
+ fp = (struct linux_sigframe *)(u_int32_t)f->f_regs[_R_SP];
/*
* Build stack frame for signal trampoline.
@@ -179,12 +179,12 @@
for (i=0; i<32; i++) {
sf.lsf_sc.lsc_regs[i] = f->f_regs[i];
}
- sf.lsf_sc.lsc_mdhi = f->f_regs[MULHI];
- sf.lsf_sc.lsc_mdlo = f->f_regs[MULLO];
- sf.lsf_sc.lsc_pc = f->f_regs[PC];
- sf.lsf_sc.lsc_status = f->f_regs[SR];
- sf.lsf_sc.lsc_cause = f->f_regs[CAUSE];
- sf.lsf_sc.lsc_badvaddr = f->f_regs[BADVADDR];
+ sf.lsf_sc.lsc_mdhi = f->f_regs[_R_MULHI];
+ sf.lsf_sc.lsc_mdlo = f->f_regs[_R_MULLO];
+ sf.lsf_sc.lsc_pc = f->f_regs[_R_PC];
+ sf.lsf_sc.lsc_status = f->f_regs[_R_SR];
+ sf.lsf_sc.lsc_cause = f->f_regs[_R_CAUSE];
+ sf.lsf_sc.lsc_badvaddr = f->f_regs[_R_BADVADDR];
/*
* Save signal stack. XXX broken
@@ -208,19 +208,19 @@
}
/* Set up the registers to return to sigcode. */
- f->f_regs[A0] = native_to_linux_signo[sig];
- f->f_regs[A1] = 0;
- f->f_regs[A2] = (unsigned long)&fp->lsf_sc;
+ f->f_regs[_R_A0] = native_to_linux_signo[sig];
+ f->f_regs[_R_A1] = 0;
+ f->f_regs[_R_A2] = (unsigned long)&fp->lsf_sc;
#ifdef DEBUG_LINUX
printf("sigcontext is at %p\n", &fp->lsf_sc);
#endif /* DEBUG_LINUX */
- f->f_regs[SP] = (unsigned long)fp;
+ f->f_regs[_R_SP] = (unsigned long)fp;
/* Signal trampoline code is at base of user stack. */
- f->f_regs[RA] = (unsigned long)p->p_sigctx.ps_sigcode;
- f->f_regs[T9] = (unsigned long)catcher;
- f->f_regs[PC] = (unsigned long)catcher;
+ f->f_regs[_R_RA] = (unsigned long)p->p_sigctx.ps_sigcode;
+ f->f_regs[_R_T9] = (unsigned long)catcher;
+ f->f_regs[_R_PC] = (unsigned long)catcher;
/* Remember that we're now on the signal stack. */
if (onstack)
@@ -267,11 +267,11 @@
f = (struct frame *)l->l_md.md_regs;
for (i=0; i<32; i++)
f->f_regs[i] = ksf.lsf_sc.lsc_regs[i];
- f->f_regs[MULLO] = ksf.lsf_sc.lsc_mdlo;
- f->f_regs[MULHI] = ksf.lsf_sc.lsc_mdhi;
- f->f_regs[PC] = ksf.lsf_sc.lsc_pc;
- f->f_regs[BADVADDR] = ksf.lsf_sc.lsc_badvaddr;
- f->f_regs[CAUSE] = ksf.lsf_sc.lsc_cause;
+ f->f_regs[_R_MULLO] = ksf.lsf_sc.lsc_mdlo;
+ f->f_regs[_R_MULHI] = ksf.lsf_sc.lsc_mdhi;
+ f->f_regs[_R_PC] = ksf.lsf_sc.lsc_pc;
+ f->f_regs[_R_BADVADDR] = ksf.lsf_sc.lsc_badvaddr;
+ f->f_regs[_R_CAUSE] = ksf.lsf_sc.lsc_cause;
/* Restore signal stack. */
p->p_sigctx.ps_sigstk.ss_flags &= ~SS_ONSTACK;
Home |
Main Index |
Thread Index |
Old Index