public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 0/4] 34xx spurious interrupts unravelling
Date: Fri, 31 Oct 2008 13:07:14 -0700	[thread overview]
Message-ID: <200810311307.15154.david-b@pacbell.net> (raw)
In-Reply-To: <1225480873-30835-1-git-send-email-tony@atomide.com>

On Friday 31 October 2008, Tony Lindgren wrote:
> So it's now starting to look like we need to ensure write posting in
> interrupt handlers for 34xx instead of marking the IO areas as strongly
> ordered.

I always thought the terminology was to "flush posted writes"
by the readback ... a "posted write" being one that's sitting
in a hardware queue, like a letter sitting in a mailbox until
the postal service picks it up (then, much later, delivers it).

Regardless, these patches just go to show that OMAP hardware
is starting to act more like bigger hardware ... like stuff
with PCI busses, where writes are normally posted to bridge
writebuffers and drivers need to defend against the relevant
write latencies.  :)


One thing for folk to remember:  the consequent races happen
outside of IRQ handling too.

Every time you write to an I/O register you should ask when
its effect *must* be known to the hardware ... and ensure some
read flushes that write before that deadline.  When you get it
wrong, be prepared to waste time tracking down intermittent
race induced failures at very low levels.

When in doubt, flush it out!


For PIO drivers, IRQ handling is the main place these races
will appear.  If DMA is in use, there are a boatload of
additional complications that can crop up ... sometimes you
need to worry about when writes get to memory (DMA mapping
ops don't necessarily ensure the CPU write buffer is empty),
and unless the peripheral has an integrated DMA engine you
need to flush writes to the DMA engine separately from
writes to the peripheral.

- Dave

  parent reply	other threads:[~2008-10-31 20:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-31 19:21 [PATCH 0/4] 34xx spurious interrupts unravelling Tony Lindgren
2008-10-31 19:21 ` [PATCH 1/4] Revert "Add MT_MEMORY_SO, mark L3 and L4 to use it" Tony Lindgren
2008-10-31 19:21   ` [PATCH 2/4] ARM: OMAP3: Print debug info on spurious interrupts Tony Lindgren
2008-10-31 19:21     ` [PATCH 3/4] I2C: Ensure write posting for critical i2c-omap writes Tony Lindgren
2008-10-31 19:21       ` [PATCH 4/4] DSPBRIDGE: Ensure write posting when acking mailbox irq Tony Lindgren
2008-10-31 21:06         ` Tony Lindgren
2008-11-01  3:43         ` Woodruff, Richard
2008-11-02 22:10           ` Tony Lindgren
2008-11-03 18:54             ` Tony Lindgren
2008-10-31 21:03       ` [PATCH 3/4] I2C: Ensure write posting for critical i2c-omap writes Tony Lindgren
2008-10-31 20:55     ` [PATCH 2/4] ARM: OMAP3: Print debug info on spurious interrupts Tony Lindgren
2008-10-31 20:07 ` David Brownell [this message]
2008-10-31 20:35   ` [PATCH 0/4] 34xx spurious interrupts unravelling Tony Lindgren
2008-10-31 21:59     ` David Brownell
2008-11-01  4:01       ` Woodruff, Richard
2008-11-01  6:08         ` David Brownell
2008-11-01 12:57           ` Woodruff, Richard
2008-11-01 21:14 ` Felipe Contreras

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=200810311307.15154.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.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