-/* $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)
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++;
ci->ci_pendingticks--;
}
#ifdef MULTIPROCESSOR
- __mp_unlock(&kernel_lock);
setsr(sr);
#endif
}
if (ih->ih_level < IPL_IPI) {
sr = getsr();
ENABLEIPI();
- if (ipl < IPL_SCHED)
+ if (ih->ih_level < IPL_CLOCK)
__mp_lock(&kernel_lock);
}
#endif
}
#ifdef MULTIPROCESSOR
if (ih->ih_level < IPL_IPI) {
- if (ipl < IPL_SCHED)
+ if (ih->ih_level < IPL_CLOCK)
__mp_unlock(&kernel_lock);
setsr(sr);
}
-/* $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.
if (ih->ih_level < IPL_IPI) {
sr = getsr();
ENABLEIPI();
- if (ipl < IPL_SCHED)
+ if (ih->ih_level < IPL_CLOCK)
__mp_lock(&kernel_lock);
}
#endif
}
#ifdef MULTIPROCESSOR
if (ih->ih_level < IPL_IPI) {
- if (ipl < IPL_SCHED)
+ if (ih->ih_level < IPL_CLOCK)
__mp_unlock(&kernel_lock);
setsr(sr);
}