summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormickey <mickey@openbsd.org>2001-01-29 00:01:58 +0000
committermickey <mickey@openbsd.org>2001-01-29 00:01:58 +0000
commitbed2d21efbfb43a1d9fbba6e93c74cffe43c0405 (patch)
tree5dcaa9ae4f24848342801f10949f7a38cfac4638 /sys
parent$OpenBSD$ (diff)
downloadwireguard-openbsd-bed2d21efbfb43a1d9fbba6e93c74cffe43c0405.tar.xz
wireguard-openbsd-bed2d21efbfb43a1d9fbba6e93c74cffe43c0405.zip
implement a few macros in cpu.h; pointer out by miod@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hppa/hppa/trap.c6
-rw-r--r--sys/arch/hppa/include/cpu.h14
-rw-r--r--sys/arch/hppa/include/intr.h4
3 files changed, 14 insertions, 10 deletions
diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c
index a8f074147e3..5798b6cbff0 100644
--- a/sys/arch/hppa/hppa/trap.c
+++ b/sys/arch/hppa/hppa/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.24 2001/01/22 21:15:23 mickey Exp $ */
+/* $OpenBSD: trap.c,v 1.25 2001/01/29 00:01:59 mickey Exp $ */
/*
* Copyright (c) 1998-2000 Michael Shalayeff
@@ -99,7 +99,7 @@ const char *trap_type[] = {
int trap_types = sizeof(trap_type)/sizeof(trap_type[0]);
u_int32_t sir;
-int want_resched;
+int want_resched, astpending;
void pmap_hptdump __P((void));
void cpu_intr __P((struct trapframe *frame));
@@ -308,7 +308,7 @@ ddb_regs = *frame;
case T_ITLBMISSNA: case T_USER | T_ITLBMISSNA:
case T_DTLBMISSNA: case T_USER | T_DTLBMISSNA:
case T_TLB_DIRTY: case T_USER | T_TLB_DIRTY:
- va = trunc_page(va);
+ va = hppa_trunc_page(va);
vm = p->p_vmspace;
if (!vm) {
diff --git a/sys/arch/hppa/include/cpu.h b/sys/arch/hppa/include/cpu.h
index fe43ccc35fd..87e95be610b 100644
--- a/sys/arch/hppa/include/cpu.h
+++ b/sys/arch/hppa/include/cpu.h
@@ -1,7 +1,7 @@
-/* $OpenBSD: cpu.h,v 1.19 2000/08/15 19:50:42 mickey Exp $ */
+/* $OpenBSD: cpu.h,v 1.20 2001/01/29 00:01:58 mickey Exp $ */
/*
- * Copyright (c) 2000 Michael Shalayeff
+ * Copyright (c) 2000-2001 Michael Shalayeff
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -107,16 +107,16 @@ extern const char *cpu_typename;
#define HPPA_SPA_ENABLE 0x00000020
#define HPPA_NMODSPBUS 64
-#define clockframe trapframe
+#define clockframe trapframe
#define CLKF_BASEPRI(framep) ((framep)->tf_eiem == ~0U)
#define CLKF_PC(framep) ((framep)->tf_iioq_head)
#define CLKF_INTR(framep) ((framep)->tf_flags & TFF_INTR)
#define CLKF_USERMODE(framep) ((framep)->tf_flags & T_USER)
#define CLKF_SYSCALL(framep) ((framep)->tf_flags & TFF_SYS)
-#define signotify(p) (void)(p)
-#define need_resched() {(void)1;}
-#define need_proftick(p) {(void)(p);}
+#define signotify(p) (setsoftast())
+#define need_resched() (want_resched = 1, setsoftast())
+#define need_proftick(p) ((p)->p_flag |= P_OWEUPC, setsoftast())
#ifndef _LOCORE
#ifdef _KERNEL
@@ -125,6 +125,8 @@ extern const char *cpu_typename;
#define MD_CACHE_CTL(a,s,t) \
(((t)? pdcache : fdcache) (HPPA_SID_KERNEL,(vaddr_t)(a),(s)))
+extern int want_resched;
+
#define DELAY(x) delay(x)
static __inline long
diff --git a/sys/arch/hppa/include/intr.h b/sys/arch/hppa/include/intr.h
index 984ad0a5970..95f7552a0f8 100644
--- a/sys/arch/hppa/include/intr.h
+++ b/sys/arch/hppa/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.9 2000/07/06 15:25:03 ho Exp $ */
+/* $OpenBSD: intr.h,v 1.10 2001/01/29 00:01:58 mickey Exp $ */
/*
* Copyright (c) 1990,1991,1992,1994 The University of Utah and
@@ -88,12 +88,14 @@
/* software interrupt register */
extern u_int32_t sir;
+extern int astpending;
#define SIR_CLOCK 0x01
#define SIR_NET 0x02
#define setsoftclock() (sir |= SIR_CLOCK)
#define setsoftnet() (sir |= SIR_NET)
+#define setsoftast() (astpending = 1)
#endif /* !_LOCORE */
#endif /* _MACHINE_INTR_H_ */