summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-04-05 17:31:50 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-04-05 17:31:50 +0000
commita2d42fbc3f1466444ef3d0e68f4d166373f0616a (patch)
treea891e6d629e6fb12e4d4e453175dc9bb3b91f7f1 /sys/arch
parentd9a4c999176d4ebc12b88ac88f0dd165508d0850 (diff)
splx() does not need to return a value.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/vax/include/intr.h11
-rw-r--r--sys/arch/vax/vax/db_machdep.c4
2 files changed, 9 insertions, 6 deletions
diff --git a/sys/arch/vax/include/intr.h b/sys/arch/vax/include/intr.h
index 6a7ce4d4094..8cd3c6eb73e 100644
--- a/sys/arch/vax/include/intr.h
+++ b/sys/arch/vax/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.5 2006/06/02 17:39:58 miod Exp $ */
+/* $OpenBSD: intr.h,v 1.6 2007/04/05 17:31:47 miod Exp $ */
/* $NetBSD: intr.h,v 1.1 1998/08/18 23:55:00 matt Exp $ */
/*
@@ -56,7 +56,7 @@
#define IST_LEVEL 3 /* level-triggered */
#ifndef lint
-#define splx(reg) \
+#define _splset(reg) \
({ \
register int val; \
__asm __volatile ("mfpr $0x12,%0;mtpr %1,$0x12" \
@@ -78,9 +78,12 @@
} \
val; \
})
+
+#define splx(reg) \
+ __asm __volatile ("mtpr %0,$0x12" : : "g" (reg))
#endif
-#define spl0() splx(IPL_NONE)
+#define spl0() _splset(IPL_NONE)
#define splsoftclock() _splraise(IPL_SOFTCLOCK)
#define splsoftnet() _splraise(IPL_SOFTNET)
#define splbio() _splraise(IPL_BIO)
@@ -89,7 +92,7 @@
#define splvm() _splraise(IPL_VM)
#define splclock() _splraise(IPL_CLOCK)
#define splstatclock() _splraise(IPL_STATCLOCK)
-#define splhigh() splx(IPL_HIGH)
+#define splhigh() _splset(IPL_HIGH)
/* These are better to use when playing with VAX buses */
#define spl4() _splraise(0x14)
diff --git a/sys/arch/vax/vax/db_machdep.c b/sys/arch/vax/vax/db_machdep.c
index a4a325e4476..a535110293a 100644
--- a/sys/arch/vax/vax/db_machdep.c
+++ b/sys/arch/vax/vax/db_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.c,v 1.16 2006/07/14 15:22:55 miod Exp $ */
+/* $OpenBSD: db_machdep.c,v 1.17 2007/04/05 17:31:49 miod Exp $ */
/* $NetBSD: db_machdep.c,v 1.17 1999/06/20 00:58:23 ragge Exp $ */
/*
@@ -199,7 +199,7 @@ db_write_bytes(addr, size, data)
void
Debugger()
{
- splsave = splx(0xe);
+ splsave = _splset(0xe);
mtpr(0xf, PR_SIRR); /* beg for debugger */
splx(splsave);
}