Subject: Re: pmap_phys_address()
To: Allen Briggs <briggs@netbsd.org>
From: Michael Lorenz <macallan@netbsd.org>
List: tech-kern
Date: 07/16/2007 11:33:30
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Jul 16, 2007, at 09:59, Allen Briggs wrote:

> On Mon, Jul 16, 2007 at 12:35:48AM -0400, Michael Lorenz wrote:
>> pmap_phys_address() is used to translate tokens returned by mmap*()
>> methods to actual physical addresses - usually just a shift or a nop.
>> The problem is, in uvm_pmap.h it's declared with an int as argument
>> which will cause serious problems on 64bit architectures and possibly
>> on some 32bit archs as well.
>> For sanity's sake I hereby propose to change its parameter to paddr_t
>> since that's what it's fed from all mmap*() methods.
>
> Seems reasonable to me.

sparc has a pmap_phys_address() that does nothing but casting the 
parameter to a paddr_t and return it - guess that can be turned into a 
nop macro like on sparc64 and plenty others.

have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iQEVAwUBRpuPyspnzkX8Yg2nAQLzZQf/dKqmpCppBENLwIa6hj9j+h2ragIt5Z3O
npxUlo3+5+wJcJhX7NundfWYQhqFjYvWYJXdsgtMmzOWr+eSSLbepJxHgIDQ5DZp
+q5zIbpxqJymmUuhdmwaCZSDLfIKthGe3/ZT315KnlXLEXjVmkfdpkvVNGfNDPE/
6P1MqNpEWsKye/8TU4uCvKM6WghALc9vZ5lW93LNAa+ohuTHoa2GvLp464N12U1q
dPq73d+YIxIL1wpF6f0WYc45C932zSPSvkTDR4NEt4B69ajsEqI5wnPz7lZoYcdp
vlbm+ALCgCnc/AaetxOyFeVsTvm4aEo9TVo5UKhZi7E27sgjkUcIPg==
=lkps
-----END PGP SIGNATURE-----