summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2011-07-05 17:11:08 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2011-07-05 17:11:08 +0000
commit4dfc91bbef932df5e9fa91333245d21bb446cfec (patch)
tree002654ca18164f7d5f25eea672173e94a4878949 /sys
parent81a7cc32287764010bc77b512fb037b27a8ae362 (diff)
N: Thou shalt not call hardclock() with biglock held.
i386 disobeys the Nth commandment. Fix this. While here, make i386 and amd64 definitions of iplclock and statclock match. ok art@, kettenis@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/isa/clock.c4
-rw-r--r--sys/arch/i386/i386/apicvec.s8
-rw-r--r--sys/arch/i386/include/intr.h4
-rw-r--r--sys/arch/i386/include/intrdefs.h10
-rw-r--r--sys/arch/i386/isa/clock.c4
5 files changed, 12 insertions, 18 deletions
diff --git a/sys/arch/amd64/isa/clock.c b/sys/arch/amd64/isa/clock.c
index 44ba26233b9..7a6aa095b97 100644
--- a/sys/arch/amd64/isa/clock.c
+++ b/sys/arch/amd64/isa/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.18 2011/04/08 08:55:01 jsg Exp $ */
+/* $OpenBSD: clock.c,v 1.19 2011/07/05 17:11:07 oga Exp $ */
/* $NetBSD: clock.c,v 1.1 2003/04/26 18:39:50 fvdl Exp $ */
/*-
@@ -315,7 +315,7 @@ i8254_initclocks(void)
isa_intr_establish(NULL, 0, IST_PULSE, IPL_CLOCK, clockintr,
0, "clock");
- isa_intr_establish(NULL, 8, IST_PULSE, IPL_CLOCK, rtcintr,
+ isa_intr_establish(NULL, 8, IST_PULSE, IPL_STATCLOCK, rtcintr,
0, "rtc");
rtcstart(); /* start the mc146818 clock */
diff --git a/sys/arch/i386/i386/apicvec.s b/sys/arch/i386/i386/apicvec.s
index 9c55a9afaca..f968f1b649c 100644
--- a/sys/arch/i386/i386/apicvec.s
+++ b/sys/arch/i386/i386/apicvec.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: apicvec.s,v 1.23 2011/04/16 00:40:58 deraadt Exp $ */
+/* $OpenBSD: apicvec.s,v 1.24 2011/07/05 17:11:07 oga Exp $ */
/* $NetBSD: apicvec.s,v 1.1.2.2 2000/02/21 21:54:01 sommerfeld Exp $ */
/*-
@@ -170,16 +170,10 @@ XINTR(ltimer):
ioapic_asm_ack()
sti
incl CPUVAR(IDEPTH)
-#ifdef MULTIPROCESSOR
- call _C_LABEL(i386_softintlock)
-#endif
movl %esp,%eax
pushl %eax
call _C_LABEL(lapic_clockintr)
addl $4,%esp
-#ifdef MULTIPROCESSOR
- call _C_LABEL(i386_softintunlock)
-#endif
decl CPUVAR(IDEPTH)
jmp _C_LABEL(Xdoreti)
diff --git a/sys/arch/i386/include/intr.h b/sys/arch/i386/include/intr.h
index 015bea84f8c..a8278c9422f 100644
--- a/sys/arch/i386/include/intr.h
+++ b/sys/arch/i386/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.42 2011/03/23 16:54:35 pirofti Exp $ */
+/* $OpenBSD: intr.h,v 1.43 2011/07/05 17:11:07 oga Exp $ */
/* $NetBSD: intr.h,v 1.5 1996/05/13 06:11:28 mycroft Exp $ */
/*
@@ -107,7 +107,7 @@ void splassert_check(int, const char *);
#define spltty() splraise(IPL_TTY)
#define splaudio() splraise(IPL_AUDIO)
#define splclock() splraise(IPL_CLOCK)
-#define splstatclock() splhigh()
+#define splstatclock() splclock()
#define splipi() splraise(IPL_IPI)
/*
diff --git a/sys/arch/i386/include/intrdefs.h b/sys/arch/i386/include/intrdefs.h
index 7931a6fee3d..9bb0ea26cd9 100644
--- a/sys/arch/i386/include/intrdefs.h
+++ b/sys/arch/i386/include/intrdefs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intrdefs.h,v 1.12 2010/05/22 21:29:55 deraadt Exp $ */
+/* $OpenBSD: intrdefs.h,v 1.13 2011/07/05 17:11:07 oga Exp $ */
/* $NetBSD: intrdefs.h,v 1.2 2003/05/04 22:01:56 fvdl Exp $ */
#ifndef _I386_INTRDEFS_H
@@ -65,10 +65,10 @@
#define IPL_VM MAKEIPL(7) /* memory allocation */
#define IPL_AUDIO MAKEIPL(8) /* audio */
#define IPL_CLOCK MAKEIPL(9) /* clock */
-#define IPL_STATCLOCK MAKEIPL(10) /* statclock */
-#define IPL_SCHED IPL_STATCLOCK
-#define IPL_HIGH MAKEIPL(11) /* everything */
-#define IPL_IPI MAKEIPL(12) /* interprocessor interrupt */
+#define IPL_STATCLOCK IPL_CLOCK /* statclock */
+#define IPL_SCHED IPL_CLOCK
+#define IPL_HIGH MAKEIPL(10) /* everything */
+#define IPL_IPI MAKEIPL(11) /* interprocessor interrupt */
/* Interrupt sharing types. */
#define IST_NONE 0 /* none */
diff --git a/sys/arch/i386/isa/clock.c b/sys/arch/i386/isa/clock.c
index 596a37946dd..c9ac92eb481 100644
--- a/sys/arch/i386/isa/clock.c
+++ b/sys/arch/i386/isa/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.45 2010/08/11 21:22:44 kettenis Exp $ */
+/* $OpenBSD: clock.c,v 1.46 2011/07/05 17:11:07 oga Exp $ */
/* $NetBSD: clock.c,v 1.39 1996/05/12 23:11:54 mycroft Exp $ */
/*-
@@ -390,7 +390,7 @@ i8254_initclocks(void)
/* When using i8254 for clock, we also use the rtc for profclock */
(void)isa_intr_establish(NULL, 0, IST_PULSE, IPL_CLOCK,
clockintr, 0, "clock");
- (void)isa_intr_establish(NULL, 8, IST_PULSE, IPL_CLOCK,
+ (void)isa_intr_establish(NULL, 8, IST_PULSE, IPL_STATCLOCK,
rtcintr, 0, "rtc");
rtcstart(); /* start the mc146818 clock */