linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc-Christian Petersen <m.c.p@wolk-project.de>
To: Marc Heckmann <mh@nadir.org>,
	linux-kernel@vger.kernel.org,
	Marcelo Tosatti <marcelo@conectiva.com.br>
Subject: Re: UP IO-APIC fix in 2.4.22-pre?
Date: Thu, 31 Jul 2003 09:08:27 +0200	[thread overview]
Message-ID: <200307310821.27648.m.c.p@wolk-project.de> (raw)
In-Reply-To: <20030731002847.GA3549@nadir.org>

[-- Attachment #1: Type: text/plain, Size: 676 bytes --]

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

[-- Attachment #2: IO-APIC-edge-IRQs-on-UP-fix.patch --]
[-- Type: text/x-diff, Size: 1388 bytes --]

--- 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));

  reply	other threads:[~2003-07-31  7:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-31  0:28 UP IO-APIC fix in 2.4.22-pre? Marc Heckmann
2003-07-31  7:08 ` Marc-Christian Petersen [this message]
2003-07-31 15:26   ` Marcelo Tosatti
2003-07-31 15:45     ` Marc Heckmann
2003-07-31 18:45     ` Marc-Christian Petersen
2003-07-31 22:23     ` Marc Heckmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200307310821.27648.m.c.p@wolk-project.de \
    --to=m.c.p@wolk-project.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=mh@nadir.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).