From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by ozlabs.org (Postfix) with ESMTP id D798ADDE05 for ; Thu, 7 Jun 2007 08:11:52 +1000 (EST) From: Arnd Bergmann To: linuxppc-dev@ozlabs.org Subject: Re: MPC8349ea Random Device Generator driver Date: Thu, 7 Jun 2007 00:11:42 +0200 References: <20070606220913.GA27820@lixom.net> <46673009.6000109@freescale.com> In-Reply-To: <46673009.6000109@freescale.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Message-Id: <200706070011.43347.arnd@arndb.de> Cc: Olof Johansson , sl@powerlinux.fr, Timur Tabi , Philippe Lachenal List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 <><