Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/usermode Use the machdep.h and now use the md_check...



details:   https://anonhg.NetBSD.org/src/rev/091587a12f0f
branches:  trunk
changeset: 769402:091587a12f0f
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Thu Sep 08 15:13:27 2011 +0000

description:
Use the machdep.h and now use the md_check_syscall_opcode()

diffstat:

 sys/arch/usermode/dev/cpu.c       |  6 +++---
 sys/arch/usermode/usermode/trap.c |  9 +++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diffs (73 lines):

diff -r 26d01b06def9 -r 091587a12f0f sys/arch/usermode/dev/cpu.c
--- a/sys/arch/usermode/dev/cpu.c       Thu Sep 08 15:11:42 2011 +0000
+++ b/sys/arch/usermode/dev/cpu.c       Thu Sep 08 15:13:27 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.39 2011/09/08 14:47:17 reinoud Exp $ */
+/* $NetBSD: cpu.c,v 1.40 2011/09/08 15:13:27 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
 #include "opt_hz.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.39 2011/09/08 14:47:17 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.40 2011/09/08 15:13:27 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -48,6 +48,7 @@
 #include <machine/cpu.h>
 #include <machine/mainbus.h>
 #include <machine/pcb.h>
+#include <machine/machdep.h>
 #include <machine/thunk.h>
 
 #include <uvm/uvm_extern.h>
@@ -297,7 +298,6 @@
        panic("%s: shouldn't return", __func__);
 }
 
-extern void syscall(void);
 void
 cpu_lwp_fork(struct lwp *l1, struct lwp *l2, void *stack, size_t stacksize,
     void (*func)(void *), void *arg)
diff -r 26d01b06def9 -r 091587a12f0f sys/arch/usermode/usermode/trap.c
--- a/sys/arch/usermode/usermode/trap.c Thu Sep 08 15:11:42 2011 +0000
+++ b/sys/arch/usermode/usermode/trap.c Thu Sep 08 15:13:27 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.35 2011/09/08 14:49:42 reinoud Exp $ */
+/* $NetBSD: trap.c,v 1.36 2011/09/08 15:13:27 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk <reinoud%netbsd.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.35 2011/09/08 14:49:42 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.36 2011/09/08 15:13:27 reinoud Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -41,6 +41,7 @@
 #include <machine/cpu.h>
 #include <machine/pcb.h>
 #include <machine/pmap.h>
+#include <machine/machdep.h>
 #include <machine/thunk.h>
 
 
@@ -285,10 +286,10 @@
                memcpy(&pcb->pcb_userland_ucp, uct, sizeof(ucontext_t));
 
                /* if its a syscall, switch to the syscall entry */
-//             if (syscall_check_opcode(info->si_addr)) {
+               if (md_check_syscall_opcode(info->si_addr)) {
                        thunk_setcontext(&pcb->pcb_syscall_ucp);
                        /* NOT REACHED */
-//             }
+               }
 
                panic("should deliver a trap to the process : illegal instruction "
                        "encountered\n");



Home | Main Index | Thread Index | Old Index