summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2015-05-01 11:17:23 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2015-05-01 11:17:23 +0000
commit82e11938b5950c89dbc7ee141ceee86166e4aeb2 (patch)
tree242776db7445133c953f0c205626918a8359dd17 /sys
parent37f798e6dead07173645d57b47c7b125e1976910 (diff)
Do not grab the kernel lock for clock interrupts. Help and ok kettenis@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mips64/mips64/clock.c6
-rw-r--r--sys/arch/octeon/dev/octeon_intr.c4
-rw-r--r--sys/arch/sgi/sgi/intr_template.c6
3 files changed, 7 insertions, 9 deletions
diff --git a/sys/arch/mips64/mips64/clock.c b/sys/arch/mips64/mips64/clock.c
index ceb7fce0ea2..53091b2c02a 100644
--- a/sys/arch/mips64/mips64/clock.c
+++ b/sys/arch/mips64/mips64/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.39 2013/06/03 16:55:22 guenther Exp $ */
+/* $OpenBSD: clock.c,v 1.40 2015/05/01 11:17:22 miod Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -146,10 +146,9 @@ cp0_int5(uint32_t mask, struct trap_frame *tf)
if (tf->ipl < IPL_CLOCK) {
#ifdef MULTIPROCESSOR
register_t sr;
- /* Enable interrupts at this (hardware) level again */
+
sr = getsr();
ENABLEIPI();
- __mp_lock(&kernel_lock);
#endif
while (ci->ci_pendingticks) {
cp0_clock_count.ec_count++;
@@ -157,7 +156,6 @@ cp0_int5(uint32_t mask, struct trap_frame *tf)
ci->ci_pendingticks--;
}
#ifdef MULTIPROCESSOR
- __mp_unlock(&kernel_lock);
setsr(sr);
#endif
}
diff --git a/sys/arch/octeon/dev/octeon_intr.c b/sys/arch/octeon/dev/octeon_intr.c
index 0da4f6823a0..65f77e719f1 100644
--- a/sys/arch/octeon/dev/octeon_intr.c
+++ b/sys/arch/octeon/dev/octeon_intr.c
@@ -278,7 +278,7 @@ octeon_iointr(uint32_t hwpend, struct trap_frame *frame)
if (ih->ih_level < IPL_IPI) {
sr = getsr();
ENABLEIPI();
- if (ipl < IPL_SCHED)
+ if (ih->ih_level < IPL_CLOCK)
__mp_lock(&kernel_lock);
}
#endif
@@ -289,7 +289,7 @@ octeon_iointr(uint32_t hwpend, struct trap_frame *frame)
}
#ifdef MULTIPROCESSOR
if (ih->ih_level < IPL_IPI) {
- if (ipl < IPL_SCHED)
+ if (ih->ih_level < IPL_CLOCK)
__mp_unlock(&kernel_lock);
setsr(sr);
}
diff --git a/sys/arch/sgi/sgi/intr_template.c b/sys/arch/sgi/sgi/intr_template.c
index 941b5a1ffba..8fea687f635 100644
--- a/sys/arch/sgi/sgi/intr_template.c
+++ b/sys/arch/sgi/sgi/intr_template.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr_template.c,v 1.14 2014/09/30 06:51:58 jmatthew Exp $ */
+/* $OpenBSD: intr_template.c,v 1.15 2015/05/01 11:17:22 miod Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
@@ -163,7 +163,7 @@ INTR_FUNCTIONNAME(uint32_t hwpend, struct trap_frame *frame)
if (ih->ih_level < IPL_IPI) {
sr = getsr();
ENABLEIPI();
- if (ipl < IPL_SCHED)
+ if (ih->ih_level < IPL_CLOCK)
__mp_lock(&kernel_lock);
}
#endif
@@ -175,7 +175,7 @@ INTR_FUNCTIONNAME(uint32_t hwpend, struct trap_frame *frame)
}
#ifdef MULTIPROCESSOR
if (ih->ih_level < IPL_IPI) {
- if (ipl < IPL_SCHED)
+ if (ih->ih_level < IPL_CLOCK)
__mp_unlock(&kernel_lock);
setsr(sr);
}