linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Is in_le32 and out_le32 atomic?
Date: Mon, 11 Dec 2006 17:48:38 +1100	[thread overview]
Message-ID: <1165819718.7260.40.camel@localhost.localdomain> (raw)
In-Reply-To: <200612082115.38812.arnd@arndb.de>

On Fri, 2006-12-08 at 21:15 +0100, Arnd Bergmann wrote:
> On Friday 08 December 2006 21:05, Wolfgang Grandegger wrote:
> > Can anybody tell me why the spin_* protection is needed? I thought that 
> > 32-bit read and write operations are atomic.
> > 
> The spinlocks are needed to guarantee ordering between the completion of
> the i/o access and other code. A typical problem is that a store is
> still on its way to the I/O device while the CPU has already left the
> function that initiated it, and might call code that relies on the
> value having arrived there.

That will not help much with the spinlock, especially not seeing how
they are used in the code.

I think the lock is totally spurrious in that case.

Ben.

  reply	other threads:[~2006-12-11  6:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-08 20:05 Is in_le32 and out_le32 atomic? Wolfgang Grandegger
2006-12-08 20:15 ` Arnd Bergmann
2006-12-11  6:48   ` Benjamin Herrenschmidt [this message]
2006-12-11  8:11     ` Wolfgang Grandegger
2006-12-11  9:05       ` Benjamin Herrenschmidt
2006-12-11  6:47 ` Benjamin Herrenschmidt

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=1165819718.7260.40.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=arnd@arndb.de \
    --cc=linuxppc-embedded@ozlabs.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;
as well as URLs for NNTP newsgroup(s).