From: Tejun Heo <htejun@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"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 19:25:10 +0900 [thread overview]
Message-ID: <462F2C86.7030009@gmail.com> (raw)
In-Reply-To: <20070425112533.19d4a1aa@the-village.bc.nu>
Alan Cox wrote:
>> 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);
>> }
>>
>
> Actually now I think about it the problem is even worse. On older systems
> IRQ delivery for SMP machines is asynchronous. So the following can occur
>
>
> device raises IRQ line
> IRQ request hits APIC bus
>
> We write IRQ off
> We clear IRQ pending
>
> We read back to ensure the write took
>
>
> IRQ arrives on CPU APIC
>
> (and yes this happens on dual P3 boxes - NE2K has some fantastic bugs at
> one point due to this)
I think the second patch should work regardless of IRQ posting. No?
--
tejun
next prev parent reply other threads:[~2007-04-25 10:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-24 18:28 2.6.21-rc7-mm1 BUG at kernel/sched-clock.c:175 init_sched_clock() Berck E. Nash
2007-04-25 8:16 ` Andrew Morton
2007-04-25 8:42 ` Tejun Heo
2007-04-25 8:54 ` Tejun Heo
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 [this message]
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=462F2C86.7030009@gmail.com \
--to=htejun@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--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 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.