Lines Matching full:interrupt

28  * To understand the present state of interrupt handling on i86pc, we must
29 * first consider the history of interrupt controllers and our way of handling
32 * History of Interrupt Controllers on i86pc
37 * The first interrupt controller that attained widespread use on i86pc was
38 * the Intel 8259(A) Programmable Interrupt Controller that first saw use with
39 * the 8086. It took up to 8 interrupt sources and combined them into one
46 * Intel Advanced Programmable Interrupt Controller (APIC)
49 * microarchitecture (i686) Intel introduced a new interrupt controller.
58 * Instead of talking directly to 8259 for status, sending End Of Interrupt
64 * The number of addressable interrupt vectors was increased to 256. However
102 * Interrupt Priority Levels
105 * On i86pc systems there are a total of fifteen interrupt priority levels
107 * non-interrupt processing. To manipulate these values the family of spl
121 * Each interrupt that is registered in the system fires at a specific IPL.
143 * system supports interrupt re-mapping, otherwise the module manages the
150 * Controlling Interrupt Generation on i86pc
165 * whether or not a pending interrupt should be delivered. If the ipl of the
166 * new interrupt is higher than the current value in the PPR, then the lapic
168 * will deliver it once the current interrupt processing has issued an EOI. The
169 * highest unmasked interrupt will be the one delivered.
173 * mask interrupt levels, and the current vector. Because the pcplusmp module
177 * we're servicing a lower priority interrupt.
196 * When a high level interrupt comes in, we will raise the SPL and then pin the
197 * current lwp to the processor. We will use its lwp, but our own interrupt
198 * stack and process the high level interrupt in-situ. These handlers are
200 * spin lock. If the interrupt has a lot of work to do, it must generate a
201 * low-priority software interrupt that will be processed later.
222 * We attempt to process the highest pending software interrupt that we can
224 * on. We process a software interrupt in a similar fashion to a hardware
225 * interrupt.
227 * Traditional Interrupt Flow
231 * interrupt handlers. The apix driver has its own version of do_interrupt().
232 * We come into the interrupt handler with all interrupts masked by the IF
233 * flag. This is because we set up the handler using an interrupt-gate, which
301 * | interrupt | |
311 * Calls made on Interrupt Stacks and Epilogue routines
314 * interrupt stacks and then call the appropriate dispatch function. In the
316 * that we are still on the interrupt thread when we call the epilog routine.
317 * This is not just important, it's necessary. If the interrupt thread blocked,
321 * New Interrupt Flow
324 * The apix module has its own interrupt path. This is done for various
325 * reasons. The first is that rather than having global interrupt vectors, we
333 * currently servicing a higher priority interupt, the new interrupt is treated
344 * Recall that we come into the interrupt handler with all interrupts masked
346 * interrupt-gate which is defined architecturally to have cleared the IF flag
478 * This panic message is intended as an aid to interrupt debugging.
505 * Set cpu's base SPL level to the highest active interrupt level
518 * to dispatch a high-level interrupt.
520 * Returns 0 if we're -not- already on the high-level interrupt stack,
556 * We have interrupted another high-level interrupt. in hilevel_intr_prolog()
567 * Another high-level interrupt is active below this one, so in hilevel_intr_prolog()
568 * there is no need to check for an interrupt thread. That in hilevel_intr_prolog()
569 * will be done by the lowest priority high-level interrupt in hilevel_intr_prolog()
576 * See if we are interrupting a low-level interrupt thread. in hilevel_intr_prolog()
614 * Does most of the work of returning from a high level interrupt.
660 * Check for lower-pil nested high-level interrupt beneath in hilevel_intr_epilog()
669 * find PIL of nested interrupt in hilevel_intr_epilog()
675 * (Another high-level interrupt is active below this one, in hilevel_intr_epilog()
676 * so there is no need to check for an interrupt in hilevel_intr_epilog()
678 * high-level interrupt active.) in hilevel_intr_epilog()
682 * Check to see if there is a low-level interrupt active. in hilevel_intr_epilog()
699 * Set up the cpu, thread and interrupt thread structures for
700 * executing an interrupt thread. The new stack pointer of the
701 * interrupt thread (which *must* be switched to) is returned.
715 * Get set to run an interrupt thread. in intr_thread_prolog()
716 * There should always be an interrupt thread, since we in intr_thread_prolog()
734 * unlink the interrupt thread off the cpu in intr_thread_prolog()
738 * the interrupt thread is set to the pinned thread *before* in intr_thread_prolog()
747 * (threads on the interrupt thread free list could have state in intr_thread_prolog()
792 * then the interrupt was never blocked and the return is in intr_thread_epilog()
798 * the interrupt thread. This means the interrupt must in intr_thread_epilog()
804 * this interrupt thread back on the CPU's free list and in intr_thread_epilog()
823 * Return interrupt thread to pool in intr_thread_epilog()
833 * Return interrupt thread to the pool in intr_thread_epilog()
848 * intr_get_time() is a resource for interrupt handlers to determine how
849 * much time has been spent handling the current interrupt. Such a function
851 * processing of an interrupt. intr_get_time() only returns time spent in the
852 * current interrupt handler.
854 * The caller must be calling from an interrupt handler running at a pil
858 * The first time intr_get_time() is called while handling an interrupt,
859 * it returns the time since the interrupt handler was invoked. Subsequent
874 * by a call to intr_get_time(). At the start of interrupt processing,
875 * [0] and [1] will be equal (or nearly so). As the interrupt consumes
879 * Finally, when the interrupt completes, [1] is updated to the same as [0].
883 * intr_get_time() works much like a higher level interrupt arriving. It
890 * In the normal handling of interrupts, after an interrupt handler returns
897 * interrupt, they update the lower pil's [0] to show time spent in the
900 * called. Time spent in the higher-pil interrupt will not be returned in
901 * the next intr_get_time() call from the original interrupt, because
902 * the higher-pil interrupt's time is accumulated in intrstat[higherpil][].
994 * Get set to run interrupt thread. in dosoftint_prolog()
995 * There should always be an interrupt thread since we in dosoftint_prolog()
1013 * the interrupt thread is set to the pinned thread *before* in dosoftint_prolog()
1033 * Set bit for this pil in CPU's interrupt active bitmask. in dosoftint_prolog()
1070 * then the interrupt was never blocked and the return is in dosoftint_epilog()
1075 * Put thread back on the interrupt thread list. in dosoftint_epilog()
1076 * This was an interrupt thread, so set CPU's base SPL. in dosoftint_epilog()
1107 * Returns the interrupt level of the interrupt thread.
1111 kthread_t *it, /* interrupt thread */ in intr_passivate()
1124 * Create interrupt kstats for this CPU.
1166 * Delete interrupt kstats for this CPU.
1175 * Convert interrupt statistics from CPU ticks to nanoseconds and
1200 * An interrupt thread is ending a time slice, so compute the interval it
1215 * an interrupt thread which no longer has a pinned thread underneath in cpu_intr_swtch_enter()
1217 * its handler. intr_thread() updated the interrupt statistic for its in cpu_intr_swtch_enter()
1241 * An interrupt thread is returning from swtch(). Place a starting timestamp
1258 * Dispatch a hilevel interrupt (one above LOCK_LEVEL)
1270 * Dispatch a soft interrupt
1283 * Must run softint_epilog() on the interrupt thread stack, since in dispatch_softint()
1284 * there may not be a return from it if the interrupt thread blocked. in dispatch_softint()
1290 * Dispatch a normal interrupt
1302 * Must run intr_thread_epilog() on the interrupt thread stack, since in dispatch_hardint()
1303 * there may not be a return from it if the interrupt thread blocked. in dispatch_hardint()
1309 * Deliver any softints the current interrupt priority allows.
1335 * Interrupt service routine, called with interrupts disabled.
1368 * Raise the interrupt priority. in do_interrupt()
1376 * Bail if it is a spurious interrupt in do_interrupt()
1387 * High priority interrupts run on this cpu's interrupt stack. in do_interrupt()
1392 } else { /* already on the interrupt stack */ in do_interrupt()
1398 * Run this interrupt in a separate thread. in do_interrupt()
1535 * higher at any time by an interrupt routine, so we must block interrupts