mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Segher Boessenkool" <segher@kernel.crashing.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Segher Boessenkool" <segher@kernel.crashing.org>,
	"Ahmed S. Darwish" <darwish.07@gmail.com>,
	x86@kernel.org, "Rusty Russell" <rusty@rustcorp.com.au>,
	"Ingo Molnar" <mingo@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: x86: Is 'volatile' necessary for readb/writeb and friends?
Date: Fri, 4 Dec 2009 20:54:41 +0100 (CET)	[thread overview]
Message-ID: <55137.84.105.60.153.1259956481.squirrel@gate.crashing.org> (raw)
In-Reply-To: <4B194722.9020705@zytor.com>

>>> static inline unsigned char readb(const volatile void __iomem *addr) {
>>
>> This "volatile" is meaningless.
>
> Wrong.  "volatile" here is an assertion that it is safe to pass pointer
> to a volatile object to this function.

Yes, sorry.  What I meant is: this volatile has no effect on what
the rest of the function does.

> Either way, it works, it is guaranteed to be safe, and removing it can
> only introduce bugs, not remove them.

Oh definitely, I wasn't suggesting otherwise.


Segher


      reply	other threads:[~2009-12-04 19:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04  9:21 Ahmed S. Darwish
2009-12-04 14:39 ` Segher Boessenkool
2009-12-04 16:00   ` Arnd Bergmann
2009-12-04 17:30   ` H. Peter Anvin
2009-12-04 19:54     ` Segher Boessenkool [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=55137.84.105.60.153.1259956481.squirrel@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=darwish.07@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rusty@rustcorp.com.au \
    --cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome