Commit d6d3baa5 authored by Alexander Atanasov's avatar Alexander Atanasov Committed by Jeff Garzik

[PATCH] Fix irq handling of IO-APIC edge IRQs on UP

send_IPI_self is needed to resend irqs with IRQ_PENDING status when
enabled.

Checked with Ingo, and it's in 2.4-ac for some time.

This should fix ide lost interrupts on UP with IO-APIC

Ide trigers it this way:
 - disable_irq
 - do stuff that triggers IRQ.
 - irq is IRQ_PENDING
 - enable_irq
 - IRQ is lost, needs to be resend.

I'll send the patch to fixup IDE disable_irq logic to Bart.
parent b87c49b1
......@@ -682,6 +682,21 @@ __initcall(balanced_irq_init);
#else /* !SMP */
static inline void move_irq(int irq) { }
void send_IPI_self(int vector)
{
unsigned int cfg;
/*
* Wait for idle.
*/
apic_wait_icr_idle();
cfg = APIC_DM_FIXED | APIC_DEST_SELF | vector | APIC_DEST_LOGICAL;
/*
* Send the IPI. The write to APIC_ICR fires this off.
*/
apic_write_around(APIC_ICR, cfg);
}
#endif /* defined(CONFIG_SMP) */
......
......@@ -107,7 +107,7 @@ static inline void x86_do_profile(struct pt_regs * regs)
atomic_inc((atomic_t *)&prof_buffer[eip]);
}
#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP)
#if defined(CONFIG_X86_IO_APIC)
static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i)
{
if (IO_APIC_IRQ(i))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment