All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Burgess <lkml@jburgess.uklinux.net>
To: raphael.rigo@inp-net.eu.org
Cc: linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: [OOPS?] 2.6-test11 : problem about irq18.
Date: Mon, 08 Dec 2003 18:48:37 +0000	[thread overview]
Message-ID: <3FD4C785.4080306@jburgess.uklinux.net> (raw)

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

Raphaël Rigo wrote:

 > Dec 7 18:27:45 pici kernel: Disabling IRQ #18
 >
 > I am using a P4 2.6 Ghz without HT activated
 > 512 MB DDR PC3200 on an ASUS P4P800 Deluxe MB.
 > HardDrive is on SATA (native mode) : Maxtor 6Y120MO.

Sounds like the known problem with an interrupt storm with the ICH5
See "Issue #2" at 
http://www.ussg.iu.edu/hypermail/linux/kernel/0312.0/0597.html

 > 2.4.23 doesn't have this problem but keeps using 30-50% CPU even if I 
do nothing.

Try vmstat, I expect you'll see ~100k IRQ/s

You could try using the ata_piix driver (located amongst the SCSI drivers).

If that still doesn't help, you could try adding the patch attached to 
drivers/scsi/libata-core.c
this should make the ata_piix driver catch the spurious interrupts

    Jon


[-- Attachment #2: libata-spurious2.diff --]
[-- Type: text/plain, Size: 1322 bytes --]

--- libata-core.c-orig	2003-12-07 01:54:19.000000000 +0000
+++ libata-core.c	2003-12-07 16:25:11.961806872 +0000
@@ -2386,6 +2386,37 @@
 }
 
 /**
+ *	ata_chk_spurious_int - Check for spurious interrupts
+ *	@ap: port to which command is being issued
+ *
+ *	Examines the DMA status registers and clears
+ *      unexpected interrupts
+ *
+ *	LOCKING:
+ */
+static inline void ata_chk_spurious_int(struct ata_port *ap) {
+	int host_stat;
+	
+	if (ap->flags & ATA_FLAG_MMIO) {
+		void *mmio = (void *) ap->ioaddr.bmdma_addr;
+		host_stat = readb(mmio + ATA_DMA_STATUS);
+	} else
+		host_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
+	
+	if ((host_stat & (ATA_DMA_INTR | ATA_DMA_ERR | ATA_DMA_ACTIVE)) == ATA_DMA_INTR) {
+		if (ap->flags & ATA_FLAG_MMIO) {
+			void *mmio = (void *) ap->ioaddr.bmdma_addr;
+			writeb(host_stat & ~ATA_DMA_ERR, mmio + ATA_DMA_STATUS);
+		} else
+			outb(host_stat & ~ATA_DMA_ERR, ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
+		
+		DPRINTK("ata%u: Caught spurious interrupt, status 0x%X\n", ap->id, host_stat);
+		udelay(1);
+	}
+}
+
+
+/**
  *	ata_interrupt -
  *	@irq:
  *	@dev_instance:
@@ -2417,6 +2448,7 @@
 			qc = ata_qc_from_tag(ap, ap->active_tag);
 			if (qc && ((qc->flags & ATA_QCFLAG_POLL) == 0))
 				handled += ata_host_intr(ap, qc);
+			ata_chk_spurious_int(ap);
 		}
 	}
 

             reply	other threads:[~2003-12-08 18:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-08 18:48 Jon Burgess [this message]
     [not found] ` <3FD5E454.2030404@inp-net.eu.org>
     [not found]   ` <3FD60552.5090903@jburgess.uklinux.net>
     [not found]     ` <3FD6094C.5040502@inp-net.eu.org>
     [not found]       ` <3FD60C5D.6010203@jburgess.uklinux.net>
     [not found]         ` <3FD60EC9.8040709@inp-net.eu.org>
     [not found]           ` <3FD614DB.7090207@jburgess.uklinux.net>
     [not found]             ` <3FD61615.30507@inp-net.eu.org>
     [not found]               ` <3FD6197B.1070704@jburgess.uklinux.net>
     [not found]                 ` <3FD62990.80708@inp-net.eu.org>
2004-01-06 18:32                   ` [2.6.1-rc2] SATA problem Jon Burgess
2004-01-06 19:01                     ` Matthias Hentges
2004-01-06 20:06                       ` Raphaël RIGO
  -- strict thread matches above, loose matches on Subject: below --
2003-12-07 17:48 [OOPS?] 2.6-test11 : problem about irq18 Raphaël Rigo
2003-12-07 18:26 ` Zwane Mwaikambo

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=3FD4C785.4080306@jburgess.uklinux.net \
    --to=lkml@jburgess.uklinux.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raphael.rigo@inp-net.eu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.