Subject: Re: how to get the physival address

From: Dan Malek <[email-masked]>
Date: Thu, 05 Apr 2001 02:30:48 -0400

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 http://lists.linuxppc.org/