MPC8349ea Random Device Generator driver

Arnd Bergmann arnd at arndb.de
Thu Jun 7 08:11:42 EST 2007


On Thursday 07 June 2007, Timur Tabi wrote:
> >>      u64 v;
> >>      v = rng->rngisr;
> >>
> >> or something like that.  Try to use the built-in support for 64-bit data types when possible.
> > 
> > ...this. NO! Don't reference ioremapped memory from regular code like
> > that. The way he's doing it is the preferred way.
> 
> Can you explain that better?  What 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=1 using sparse, and missed barriers.

	Arnd <><



More information about the Linuxppc-dev mailing list