summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormickey <mickey@openbsd.org>1999-08-12 23:49:07 +0000
committermickey <mickey@openbsd.org>1999-08-12 23:49:07 +0000
commit2f565e7a28ac3cfda31b5a009a9fee7528463040 (patch)
treea05c37d62d4e5a0bb49d098a8460c424d5977da4
parentProbe svr4 before linux (diff)
downloadwireguard-openbsd-2f565e7a28ac3cfda31b5a009a9fee7528463040.tar.xz
wireguard-openbsd-2f565e7a28ac3cfda31b5a009a9fee7528463040.zip
splhigh() when calling pdc
-rw-r--r--sys/arch/hppa/dev/pdc.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/arch/hppa/dev/pdc.c b/sys/arch/hppa/dev/pdc.c
index 100f4dd1fca..695d2721bbd 100644
--- a/sys/arch/hppa/dev/pdc.c
+++ b/sys/arch/hppa/dev/pdc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pdc.c,v 1.7 1999/07/12 18:08:32 mickey Exp $ */
+/* $OpenBSD: pdc.c,v 1.8 1999/08/12 23:49:07 mickey Exp $ */
/*
* Copyright (c) 1998,1999 Michael Shalayeff
@@ -243,7 +243,7 @@ void
pdccninit(cn)
struct consdev *cn;
{
-#ifdef DEBUG
+#ifdef PDC_DEBUG
printf("pdc0: console init\n");
#endif
}
@@ -323,22 +323,26 @@ pdc_call(func, pdc_flag)
{
register register_t ret, opsw;
va_list va;
- int args[10], i;
+ int args[10], i, s;
va_start(va, pdc_flag);
for (i = 0; i < sizeof(args)/sizeof(args[0]); i++)
args[i] = va_arg(va, int);
va_end(va);
-
- if (kernelmapped)
+
+ if (kernelmapped) {
+ splhigh();
opsw = set_psw(PSW_Q |
((!pdc_flag && args[0] == PDC_PIM)? PSW_M:0));
+ }
ret = (func)((void *)args[0], args[1], args[2], args[3], args[4],
args[5], args[6], args[7], args[8], args[9]);
- if (kernelmapped)
+ if (kernelmapped) {
set_psw(opsw);
+ s = splx(s);
+ }
return ret;
}