Ejemplo n.º 1
0
/*
 * Spurious interrupts should _never_ happen with our APIC/SMP architecture.
 */
fastcall void smp_spurious_interrupt(struct cpu_user_regs *regs)
{
    unsigned long v;
    struct cpu_user_regs *old_regs = set_irq_regs(regs);

    this_cpu(irq_count)++;
    irq_enter();

    /*
     * Check if this is a vectored interrupt (most likely, as this is probably
     * a request to dump local CPU state). Vectored interrupts are ACKed;
     * spurious interrupts are not.
     */
    v = apic_read(APIC_ISR + ((SPURIOUS_APIC_VECTOR & ~0x1f) >> 1));
    if (v & (1 << (SPURIOUS_APIC_VECTOR & 0x1f))) {
        ack_APIC_irq();
        if (this_cpu(state_dump_pending)) {
            this_cpu(state_dump_pending) = 0;
            dump_execstate(regs);
            goto out;
        }
    }

    /* see sw-dev-man vol 3, chapter 7.4.13.5 */
    printk(KERN_INFO "spurious APIC interrupt on CPU#%d, should "
           "never happen.\n", smp_processor_id());

 out:
    irq_exit();
    set_irq_regs(old_regs);
}
Ejemplo n.º 2
0
/*
 * Spurious interrupts should _never_ happen with our APIC/SMP architecture.
 */
void spurious_interrupt(struct cpu_user_regs *regs)
{
    /*
     * Check if this is a vectored interrupt (most likely, as this is probably
     * a request to dump local CPU state). Vectored interrupts are ACKed;
     * spurious interrupts are not.
     */
    if (apic_isr_read(SPURIOUS_APIC_VECTOR)) {
        ack_APIC_irq();
        if (this_cpu(state_dump_pending)) {
            this_cpu(state_dump_pending) = 0;
            dump_execstate(regs);
            goto out;
        }
    }

    /* see sw-dev-man vol 3, chapter 7.4.13.5 */
    printk(KERN_INFO "spurious APIC interrupt on CPU#%d, should "
           "never happen.\n", smp_processor_id());

out: ;
}