Messages in this thread Patch in this message | | | From | Marc-Christian Petersen <> | Subject | Re: UP IO-APIC fix in 2.4.22-pre? | Date | Thu, 31 Jul 2003 09:08:27 +0200 |
| |
On Thursday 31 July 2003 02:28, Marc Heckmann wrote:
Hi Marc,
> I was just wondering about the bugfix for UP IO-APIC that is in 2.4-ac > and that went into 2.5: > http://linux.bkbits.net:8080/linux-2.5/cset@1.1455.1.9 > Will it make it into 2.4.22? From what I understand this fixes the > following problem that many of us are seeing: > hda: dma_timer_expiry: dma status == 0x24 > hda: lost interrupt > hda: dma_intr: bad DMA status (dma_stat=30) > hda: dma_intr: status=0x50 { DriveReady SeekComplete }
I sent it to Marcelo yesterday. In the meantime you might want to try out the attached patch ontop of 2.4.22-pre9 and see if it fixes the problems for you.
ciao, Marc --- 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 <linux/config.h> +#include <linux/smp_lock.h> #include <asm/atomic.h> #include <asm/irq.h> +#include <asm/current.h> /* * 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)); | |