mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: moreau francis <francis_moreau2000@yahoo.fr>
To: Andy Isaacson <adi@hexapodia.org>
Cc: "linux-os \(Dick Johnson\)" <linux-os@analogic.com>,
	linux-kernel@vger.kernel.org, alan@lxorguk.ukuu.org.uk
Subject: Re: question on memory barrier
Date: Fri, 26 Aug 2005 09:21:29 +0200 (CEST)	[thread overview]
Message-ID: <20050826072129.71855.qmail@web25802.mail.ukl.yahoo.com> (raw)
In-Reply-To: <20050825145445.GD7319@hexapodia.org>


--- Andy Isaacson <adi@hexapodia.org> a écrit :
> 
> Did you *read* the post?
> 
> # The _only_ acceptable use of "volatile" is basically:
> # 
> # - in _code_ (not data structures), where we might mark a place as making
> #   a special type of access. For example, in the PCI MMIO read functions,
> #   rather than use inline assembly to force the particular access (which
> #   would work equally well), we can force the pointer to a volatile type.
> 
> That's *exactly* what the writel you quote above does!

OK but he speaks about special type of access, no ordering constraint.
I don't think that MIPS cpu reorder memory access, but gcc can ! And I
don't think that the use of 'volatile' can prevent it to do that.


> To return to the point directly at hand - on MIPS architectures to date,
> simply doing your memory access through a "volatile u32 *" is sufficient
> to ensure that the IO hits the bus (assuming that your pointer points to
> kseg1, not kseg0, or is otherwise uncached), because 'volatile' forces
> gcc to generate a "sw" for each store, and all MIPS so far have been
> designed so that multiple uncached writes to mmio locations do generate
> multiple bus transactions.

ok thanks for this, but once again, there's no ordering constraint garantuee.

> 
> I'm not an architect, but I think it would be possible to build a MIPS
> where this was not the case, and require additional contortions from
> users.  Such a MIPS would suck to program and would probably fail in the
> marketplace, and there's no compelling benefit to doing so; ergo, I
> would expect "volatile" to continue to be sufficient on MIPS.
> 

I hope so...It's hard to find out an answer to such questions (maybe
it's the case only for MIPS arch) although it's an important point.

Thanks.
             Francis


	

	
		
___________________________________________________________________________ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com

  reply	other threads:[~2005-08-26  7:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-24 12:43 moreau francis
2005-08-24 13:04 ` linux-os (Dick Johnson)
2005-08-24 17:31   ` moreau francis
2005-08-24 18:22     ` linux-os (Dick Johnson)
2005-08-24 19:32       ` Oliver Neukum
2005-08-24 19:47         ` linux-os (Dick Johnson)
2005-08-24 19:55           ` Oliver Neukum
2005-08-24 19:48     ` Andy Isaacson
2005-08-24 19:53       ` Jesse Barnes
2005-08-24 21:45         ` Alan Cox
2005-08-24 21:22           ` Jesse Barnes
2005-08-24 20:03       ` linux-os (Dick Johnson)
2005-08-24 20:21         ` Oliver Neukum
2005-08-25  2:25         ` David Schwartz
2005-08-25  8:49       ` Denis Vlasenko
2005-08-25  9:14       ` moreau francis
2005-08-25 10:07         ` Alan Cox
2005-08-25 14:54         ` Andy Isaacson
2005-08-26  7:21           ` moreau francis [this message]
2005-08-26 10:37             ` Maciej W. Rozycki
2005-08-25 10:32       ` Maciej W. Rozycki
2005-08-24 21:57 ` Alan Cox

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=20050826072129.71855.qmail@web25802.mail.ukl.yahoo.com \
    --to=francis_moreau2000@yahoo.fr \
    --cc=adi@hexapodia.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.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®