summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1999-08-12 23:49:08 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1999-08-12 23:49:08 +0000
commiteac8d7f931fce4f803d93b64d1a493d508094768 (patch)
tree5682a4a17b03ef63f494e069fb5df6251c00b014
parentc2b3cd088f737b14ba8c43bf9cc8bae1b08c59aa (diff)
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;
}