All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
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 21:17:07 +0000	[thread overview]
Message-ID: <20080328211707.GD10722@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20080328203427.GA14256@uranus.ravnborg.org>

On Fri, Mar 28, 2008 at 09:34:28PM +0100, Sam Ravnborg wrote:
> While reviewing some CAN driver I stumbled on iounmap
> which has following prototype on x86:
> 
> extern void iounmap(volatile void __iomem *addr);
> 
> I argued that the driver should not use volatile
> but then I cannot explain why the argument to
> iounmap takes a volatile.
> 
> The same goes for many other functions in
> the io*.h headers.
> 
> Grepping the other archs they mostly follow
> same pattern.
> 
> Can anyone explain the rational for volatile in this case.

"Passing a pointer to volatile is allowed, along with passing pointers
to unqualified".

      parent reply	other threads:[~2008-03-28 21:17 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
2008-03-28 21:17 ` Al Viro [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=20080328211707.GD10722@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.