From: "H. Peter Anvin" <hpa@zytor.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>
Subject: Re: use of volatile in iounmap()?
Date: Fri, 28 Mar 2008 14:07:34 -0700 [thread overview]
Message-ID: <47ED5E16.4080806@zytor.com> (raw)
In-Reply-To: <20080328210422.GA14484@uranus.ravnborg.org>
Sam Ravnborg wrote:
>>>
>> Yes. The use of volatile in a function prototype like this means that
>> it is valid to pass a volatile pointer to that function -- in other
>> words, we're telling gcc that we're not going to do anything with the
>> pointer that is invalid for a volatile pointer.
> If I understand you correct then it is then not wrong to say
> that we have the argument volatile to avoid warnings from gcc
> when we pass a volatile pointer.
>
> And then having the pointer marked volatile put a few restrictions
> on iounmap().
Correct.
>> A lot of the "volatile considered harmful" stuff that has been bandied
>> about is explicitly about marking *data* items volatile (it does have
>> its uses, but it's easy to get wrong); Linus has explicitly made the
>> distinction between volatile *data* and volatile *operations*.
>
> Yes - but unfortunately the volatile-considered-harmful.txt
> does many deal with the data part.
Yes, it does.
-hpa
next prev parent reply other threads:[~2008-03-28 21:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-28 20:34 use of volatile in iounmap()? Sam Ravnborg
2008-03-28 20:51 ` H. Peter Anvin
2008-03-28 21:04 ` Sam Ravnborg
2008-03-28 21:07 ` H. Peter Anvin [this message]
2008-03-28 21:17 ` Al Viro
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=47ED5E16.4080806@zytor.com \
--to=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sam@ravnborg.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