how to get the physival address

Dan Malek dan at
Thu Apr 5 16:30:48 EST 2001

jerry wrote:

> But it does not work  for  defined variable (it was defined in driver so it
> should be in kernel space, isn't it?).

A loadable driver is dynamically allocated from kernel virtual memory.
The dynamic virtual memory does not have the 1:1 mapping property to
real memory that virt_to_phys(), __pa() or anything else expects.  To
me, based upon my past experience, you should be able to get this
mapping information for any virtual address, but others want to
argue about that point.  So, I have "fixed" the PowerPC verions of
these functions in the linuxppc_2_5 kernel, but who knows if it
will last.......

	-- Dan


	I like MMUs because I don't have a real life.

** Sent via the linuxppc-embedded mail list. See

More information about the Linuxppc-embedded mailing list