--- a/arch/i386/kernel/io_apic.c 2003-07-30 11:18:50.000000000 +0200 +++ b/arch/i386/kernel/io_apic.c 2003-07-31 01:40:36.000000000 +0200 @@ -1343,6 +1343,25 @@ static void clear_IO_APIC (void) static void mask_and_ack_level_ioapic_irq (unsigned int irq) { /* nothing */ } +#ifndef CONFIG_SMP + +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 /* CONFIG_SMP */ + static void set_ioapic_affinity (unsigned int irq, unsigned long mask) { unsigned long flags; --- a/include/asm-i386/hw_irq.h 2003-07-17 13:42:13.000000000 +0100 +++ b/include/asm-i386/hw_irq.h 2003-07-17 15:49:58.000000000 +0100 @@ -13,8 +13,10 @@ */ #include +#include #include #include +#include /* * IDT vectors usable for external interrupt sources start @@ -213,7 +215,7 @@ atomic_inc((atomic_t *)&prof_buffer[eip]); } -#ifdef CONFIG_SMP /*more of this file should probably be ifdefed 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)) send_IPI_self(IO_APIC_VECTOR(i));