linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org
Cc: Olof Johansson <olof@lixom.net>,
	sl@powerlinux.fr, Timur Tabi <timur@freescale.com>,
	Philippe Lachenal <philippe.lachenal@hotmail.fr>
Subject: Re: MPC8349ea Random Device Generator driver
Date: Thu, 7 Jun 2007 00:11:42 +0200	[thread overview]
Message-ID: <200706070011.43347.arnd@arndb.de> (raw)
In-Reply-To: <46673009.6000109@freescale.com>

On Thursday 07 June 2007, Timur Tabi wrote:
> >> =A0=A0=A0=A0=A0u64 v;
> >> =A0=A0=A0=A0=A0v =3D rng->rngisr;
> >>
> >> or something like that. =A0Try to use the built-in support for 64-bit =
data types when possible.
> >=20
> > ...this. NO! Don't reference ioremapped memory from regular code like
> > that. The way he's doing it is the preferred way.
>=20
> Can you explain that better? =A0What is "regular code"?

The only code that is allowed to dereference an __iomem pointer is the
implementation of readl/writel and similar functions.
The code you gave as an example gives you a warning when building with
make C=3D1 using sparse, and missed barriers.

	Arnd <><

  reply	other threads:[~2007-06-06 22:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-05 15:42 MPC8349ea Random Device Generator driver Philippe Lachenal
2007-06-06 14:15 ` Arnd Bergmann
2007-06-07 11:29   ` MPC8349ea Random Number " Philippe Lachenal
2007-06-07 14:03     ` Arnd Bergmann
2007-06-06 21:57 ` MPC8349ea Random Device " Timur Tabi
2007-06-06 22:09   ` Olof Johansson
2007-06-06 22:07     ` Timur Tabi
2007-06-06 22:11       ` Arnd Bergmann [this message]
2007-06-06 22:19         ` Timur Tabi
2007-06-06 22:35           ` Arnd Bergmann
2007-06-06 22:38             ` Timur Tabi
2007-06-06 22:24       ` Olof Johansson
2007-06-06 22:32         ` Timur Tabi
2007-06-06 23:54           ` Olof Johansson
2007-06-07 14:23             ` Timur Tabi
2007-06-07 15:20               ` Olof Johansson
2007-06-07 15:20                 ` Timur Tabi
2007-06-07 15:36                   ` Olof Johansson
2007-06-06 22:48         ` Timur Tabi
2007-06-07  0:00           ` Olof Johansson
2007-06-07  2:55 ` Kim Phillips

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=200706070011.43347.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=olof@lixom.net \
    --cc=philippe.lachenal@hotmail.fr \
    --cc=sl@powerlinux.fr \
    --cc=timur@freescale.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;
as well as URLs for NNTP newsgroup(s).