public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Subject: use of volatile in iounmap()?
Date: Fri, 28 Mar 2008 21:34:28 +0100	[thread overview]
Message-ID: <20080328203427.GA14256@uranus.ravnborg.org> (raw)

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.

Thanks,
	Sam

             reply	other threads:[~2008-03-28 20:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-28 20:34 Sam Ravnborg [this message]
2008-03-28 20:51 ` use of volatile in iounmap()? 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

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=20080328203427.GA14256@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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