svn commit: r224114 - head/sys/ia64/ia64
Marcel Moolenaar
marcel at FreeBSD.org
Sat Jul 16 20:16:50 UTC 2011
Author: marcel
Date: Sat Jul 16 20:16:49 2011
New Revision: 224114
URL: http://svn.freebsd.org/changeset/base/224114
Log:
Don't send EOI to the CPU before we handled the interrupt. This could
potentially trigger multiple pending interrupts for level-sensitive
interrupts. However, the event timer interrupt does need EOI before
being handled to avoid missing clock events.
These conflicting requirements are handled by having the XIV handler
inform the dispatch code whether or not it send EOI to the CPU. If not,
the dispatch code will do it. This allows handlers to send EOI before
doing potentially long-running activities, while still have a sensible
default behaviour.
Modified:
head/sys/ia64/ia64/clock.c
head/sys/ia64/ia64/interrupt.c
Modified: head/sys/ia64/ia64/clock.c
==============================================================================
--- head/sys/ia64/ia64/clock.c Sat Jul 16 20:03:23 2011 (r224113)
+++ head/sys/ia64/ia64/clock.c Sat Jul 16 20:16:49 2011 (r224114)
@@ -91,12 +91,14 @@ ia64_ih_clock(struct thread *td, u_int x
ia64_set_itm(itc + load);
} else
ia64_set_itv((1 << 16) | xiv);
+
+ ia64_set_eoi(0);
ia64_srlz_d();
et = &ia64_clock_et;
if (et->et_active)
et->et_event_cb(et, et->et_arg);
- return (0);
+ return (1);
}
/*
Modified: head/sys/ia64/ia64/interrupt.c
==============================================================================
--- head/sys/ia64/ia64/interrupt.c Sat Jul 16 20:03:23 2011 (r224113)
+++ head/sys/ia64/ia64/interrupt.c Sat Jul 16 20:16:49 2011 (r224114)
@@ -320,11 +320,12 @@ ia64_handle_intr(struct trapframe *tf)
td->td_intr_frame = tf;
do {
- ia64_set_eoi(0);
- ia64_srlz_d();
CTR2(KTR_INTR, "INTR: ITC=%u, XIV=%u",
(u_int)tf->tf_special.ifa, xiv);
- (ia64_handler[xiv])(td, xiv, tf);
+ if (!(ia64_handler[xiv])(td, xiv, tf)) {
+ ia64_set_eoi(0);
+ ia64_srlz_d();
+ }
xiv = ia64_get_ivr();
ia64_srlz_d();
} while (xiv != 15);
More information about the svn-src-all
mailing list