<br><br><div class="gmail_quote">On Mon, Jun 25, 2012 at 3:00 PM, Dave Hylands <span dir="ltr"><<a href="mailto:dhylands@gmail.com" target="_blank">dhylands@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Subbu,<br>
<br>
On Mon, Jun 25, 2012 at 11:18 AM, Subramaniam Appadodharana<br>
<div class="im"><<a href="mailto:c.a.subramaniam@gmail.com">c.a.subramaniam@gmail.com</a>> wrote:<br>
><br>
><br>
> On Mon, Jun 25, 2012 at 1:00 PM, Mulyadi Santosa <<a href="mailto:mulyadi.santosa@gmail.com">mulyadi.santosa@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi.... :)<br>
>><br>
>> On Sun, Jun 24, 2012 at 1:32 AM, Subramaniam Appadodharana<br>
>> <<a href="mailto:c.a.subramaniam@gmail.com">c.a.subramaniam@gmail.com</a>> wrote:<br>
>> > Hi All,<br>
>> > I am trying to understand how vmalloc memory is reserved in kernel. In<br>
>> > 3.4+<br>
>> > latest kernel, the default vmalloc size is 240MB.<br>
>><br>
>> vmalloc reserved address range, you meant?<br>
>><br>
>> >Is this a carveout from<br>
>> > the 1GiB memory that kernel has?<br>
>><br>
>> Yup....<br>
>><br>
>> > In other words can I do a __pa(VMALLOC_START) or __pa(VMALLOC_END)<br>
>> > or __pa(highmemory) irrespective of the vmalloc size that I request, say<br>
>> > doing vmalloc=1G?<br>
>><br>
>> uhm....not sure....vmalloc-ed is not physically contigous. Also, it is<br>
>> set up far after identity mapping setup. So, the value you get from<br>
>> __pa() IMHO would be likely invalid or has no meaning.<br>
>><br>
> I thought that, as log as we know that the address is within the 1GiB, we<br>
> could get the<br>
> pa of the virtual address using __pa(). Is this not the case?<br>
<br>
</div>__pa only works on kernel direct addresses.<br>
<br>
__pa doesn't work on the addresses from vmalloc<br>
<br>
Using __pa on VMALLOC_START or VMALLOC_END doesn't really make sense.<br>
If there were any physical memory there, it would be highmem.<br>
<br></blockquote><div>Okay, but my intention was to just print out the pa for the VMALLOC_START and END, just to know where they are.</div><div>And I thought they will work. no?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
__pa should only be used on memory from PAGE_OFFSET through to (high_memory - 1)<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Dave Hylands<br>
Shuswap, BC, Canada<br>
<a href="http://www.davehylands.com" target="_blank">http://www.davehylands.com</a><br>
</div></div></blockquote></div><br>