From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Robert Crocombe <rcrocomb@gmail.com>,
linux1394-devel <linux1394-devel@lists.sourceforge.net>
Subject: MMIO write ordering (was Re: ieee1394: host adapter disappears on 1394 bus reset)
Date: Mon, 27 Nov 2006 19:29:27 +0100 [thread overview]
Message-ID: <456B2E87.5000800@s5r6.in-berlin.de> (raw)
In-Reply-To: <456B1C52.4040305@s5r6.in-berlin.de>
I wrote:
> Question to others:
>
> ohci1394.c::ohci_irq_handler() is taking a per-host spinlock around some
> register reads and writes, particularly:
> ...
> spin_lock_irqsave(&ohci->event_lock, flags);
> event = reg_read(ohci, OHCI1394_IntEventClear);
> reg_write(ohci, OHCI1394_IntEventClear, event &
> ~OHCI1394_busReset);
> spin_unlock_irqrestore(&ohci->event_lock, flags);
> ...
> spin_lock_irqsave(&ohci->event_lock, flags);
> reg_write(ohci, OHCI1394_IntMaskClear, OHCI1394_busReset);
> run_an_insane_loop_as_an_alleged_fix_for_dorky_hardware;
> spin_unlock_irqrestore(&ohci->event_lock, flags);
> ...
> spin_lock_irqsave(&ohci->event_lock, flags);
> reg_write(ohci, OHCI1394_IntEventClear, OHCI1394_busReset);
> reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset);
> spin_unlock_irqrestore(&ohci->event_lock, flags);
>
> I think these spinlocks are totally useless 1. because
> ohci_irq_handler() is only called as the hardware interrupt servicing
> routine and 2. because they don't flush the register write operations.
> Right? Wrong? [Ohci1394's reg_write() is a writel().]
Also, what is the status of ordering guarantees --- or lack thereof ---
for writel() under Linux 2.6.16 and 2.6.18? Especially in presence of a
PCI-X to PCI bridge...
--
Stefan Richter
-=====-=-==- =-== ==-==
http://arcgraph.de/sr/
prev parent reply other threads:[~2006-11-27 18:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-22 15:31 ieee1394: host adapter disappears on 1394 bus reset Robert Crocombe
2006-11-22 21:44 ` Stefan Richter
2006-11-23 0:28 ` Robert Crocombe
2006-11-27 15:39 ` Robert Crocombe
2006-11-27 17:11 ` Stefan Richter
2006-11-27 17:46 ` Robert Crocombe
2006-11-27 18:26 ` Stefan Richter
2006-11-27 20:34 ` Robert Crocombe
2006-11-27 22:34 ` Stefan Richter
2006-11-28 19:07 ` Robert Crocombe
2006-11-28 20:14 ` Stefan Richter
2006-11-27 18:29 ` Stefan Richter [this message]
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=456B2E87.5000800@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=rcrocomb@gmail.com \
/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
all inboxes | Powered by JetHome®