summaryrefslogtreecommitdiff
path: root/sys/arch/hp300
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2002-05-16 21:11:22 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2002-05-16 21:11:22 +0000
commit76357e74b51c1e82b9c7bf25aa00dd8d38359854 (patch)
treee033e746322cf6955d8ef97c2da6c4257afd634a /sys/arch/hp300
parent9a3de556680432e50b57a65fbc16306e09ab7301 (diff)
Add systrace support to all the remaining architectures.
Tested by various people on various platforms, I'm willing to fix any breakage this causes. ok niels@ deraadt@ and mickey@ (after his comments were applied)
Diffstat (limited to 'sys/arch/hp300')
-rw-r--r--sys/arch/hp300/hp300/conf.c6
-rw-r--r--sys/arch/hp300/hp300/trap.c12
2 files changed, 14 insertions, 4 deletions
diff --git a/sys/arch/hp300/hp300/conf.c b/sys/arch/hp300/hp300/conf.c
index 01dff99f623..e16687b646e 100644
--- a/sys/arch/hp300/hp300/conf.c
+++ b/sys/arch/hp300/hp300/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.28 2001/12/11 23:19:02 miod Exp $ */
+/* $OpenBSD: conf.c,v 1.29 2002/05/16 21:11:13 miod Exp $ */
/* $NetBSD: conf.c,v 1.39 1997/05/12 08:17:53 thorpej Exp $ */
/*-
@@ -131,6 +131,8 @@ cdev_decl(xfs_dev);
#include <altq/altqconf.h>
+#include "systrace.h"
+
struct cdevsw cdevsw[] =
{
cdev_cn_init(1,cn), /* 0: virtual console */
@@ -183,7 +185,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 47 */
cdev_notdef(), /* 48 */
cdev_notdef(), /* 49 */
- cdev_notdef(), /* 50 */
+ cdev_systrace_init(NSYSTRACE,systrace), /* 50 system call tracing */
#ifdef XFS
cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */
#else
diff --git a/sys/arch/hp300/hp300/trap.c b/sys/arch/hp300/hp300/trap.c
index 62884a42eb1..6e1a631927c 100644
--- a/sys/arch/hp300/hp300/trap.c
+++ b/sys/arch/hp300/hp300/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.36 2002/03/14 01:26:31 millert Exp $ */
+/* $OpenBSD: trap.c,v 1.37 2002/05/16 21:11:13 miod Exp $ */
/* $NetBSD: trap.c,v 1.57 1998/02/16 20:58:31 thorpej Exp $ */
/*
@@ -95,6 +95,9 @@
#include <machine/reg.h>
#include <machine/intr.h>
+#include "systrace.h"
+#include <dev/systrace.h>
+
#include <uvm/uvm_extern.h>
#include <uvm/uvm_pmap.h>
@@ -1127,7 +1130,12 @@ syscall(code, frame)
goto bad;
rval[0] = 0;
rval[1] = frame.f_regs[D1];
- error = (*callp->sy_call)(p, args, rval);
+#if NSYSTRACE > 0
+ if (ISSET(p->p_flag, P_SYSTRACE))
+ error = systrace_redirect(code, p, args, rval);
+ else
+#endif
+ error = (*callp->sy_call)(p, args, rval);
switch (error) {
case 0:
frame.f_regs[D0] = rval[0];