mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Berck E. Nash" <flyboy@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jeff Garzik <jeff@garzik.org>,
	linux-ide@vger.kernel.org
Subject: Re: 2.6.21-rc7-mm1 BUG at kernel/sched-clock.c:175 init_sched_clock()
Date: Wed, 25 Apr 2007 17:54:32 +0900	[thread overview]
Message-ID: <20070425085432.GD17130@htj.dyndns.org> (raw)
In-Reply-To: <462F1481.8010807@gmail.com>

On Wed, Apr 25, 2007 at 05:42:41PM +0900, Tejun Heo wrote:
> Andrew Morton wrote:
> >> [    2.953862] RIP: 0010:[<ffffffff803ae98b>]  [<ffffffff803ae98b>] scsi_schedule_eh+0xa/0x57
> >> [    3.058672]  [<ffffffff803e1e01>] ata_port_schedule_eh+0x4c/0x50
> >> [    3.064725]  [<ffffffff803e1ea7>] ata_port_abort+0xa2/0xae
> >> [    3.070248]  [<ffffffff803e1ef9>] ata_port_freeze+0x46/0x57
> >> [    3.075853]  [<ffffffff803e4c39>] ahci_interrupt+0x300/0x47a
> >> [    3.081552]  [<ffffffff8020eb83>] handle_IRQ_event+0x27/0x57
> >> [    3.087253]  [<ffffffff8029a021>] handle_edge_irq+0xee/0x133
> >> [    3.092960]  [<ffffffff8025f4e1>] do_IRQ+0x6d/0xd5
> >> [    3.097793]  [<ffffffff80255071>] ret_from_intr+0x0/0xa
> >> [    3.103059]  [<ffffffff8024e88b>] mwait_idle+0x46/0x4b
> >> [    3.108231]  [<ffffffff802422f4>] cpu_idle+0x87/0xaa
> >> [    3.113227]  [<ffffffff8025c988>] rest_init+0x49/0x4b
> >> [    3.118322]  [<ffffffff805dca5d>] start_kernel+0x291/0x29c
> >> [    3.123837]  [<ffffffff805dc13a>] _sinittext+0x13a/0x141
> >>
> > 
> > So we took an AHCI interrupt when ata_port.scsi_host was still NULL.
> > 
> > It appears that ATA is presently requesting its IRQ before allocating all
> > the resources which are needed to handle an interrupt.  Does this
> > (resource-leaky) patch fix things?
> 
> No, that would break host probing.  The port is in frozen (controller
> initialized and IRQs masked off) state, so it's not allowed to take
> interrupt.  If interrupt triggers at this point, it's low level driver
> bug.  Berck, how reliably can you reproduce this problem?  Can you post
> the result of 'lspci -nn'?

Berck, does this patch fix your problem?

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 72c286e..a128717 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1369,10 +1369,14 @@ static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc)
 
 static void ahci_freeze(struct ata_port *ap)
 {
+	void __iomem *mmio = ap->host->iomap[AHCI_PCI_BAR];
 	void __iomem *port_mmio = ahci_port_base(ap);
 
 	/* turn IRQ off */
 	writel(0, port_mmio + PORT_IRQ_MASK);
+
+	/* clear IRQ pending bit */
+	writel(1 << ap->port_no, mmio + HOST_IRQ_STAT);
 }
 
 static void ahci_thaw(struct ata_port *ap)

  reply	other threads:[~2007-04-25  8:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-24 18:28 Berck E. Nash
2007-04-25  8:16 ` Andrew Morton
2007-04-25  8:42   ` Tejun Heo
2007-04-25  8:54     ` Tejun Heo [this message]
2007-04-25  9:30       ` Tejun Heo
2007-04-25 12:28         ` Berck E. Nash
2007-04-25 23:51         ` Berck E. Nash
2007-04-30  1:28           ` Tejun Heo
2007-04-30 12:07             ` Berck E. Nash
2007-05-01  9:02               ` Tejun Heo
2007-04-25 10:21       ` Alan Cox
2007-04-25 10:25       ` Alan Cox
2007-04-25 10:25         ` Tejun Heo
2007-04-25 10:35           ` Alan Cox
2007-04-25  8:55     ` Andrew Morton
2007-04-25  9:15       ` Tejun Heo

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=20070425085432.GD17130@htj.dyndns.org \
    --to=htejun@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=flyboy@gmail.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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

Powered by JetHome