Question about virt_to_page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a question about the virt_to_page function
2.6.5.

My development Linux system has 512 MB memory. 
Through kernel command line (mem=448M), the kernel is
using only 448 MB (setting aside 64 MB).  I have a
driver that uses the upper 64 MB.

I get a virtual address of the 64M region as follows:

cpuAddr = ioremap(0x1c000000, 64MB);

Question: Am I getting a continuous 64MB virtual
address space.

Having a virtual addres within the 64 MB meomry (lets
call it newAddr), I can find it's page/offset as
follows:

page       = virt_to_page(newAddr);      -  (1)
page_ofset = newAddr & (~PAGE_MASK);     -  (1)

I perfrom the above calucation on random virtual
address's withing the 64 MB range.  Once in a while, I
get page == 0.  Can someone help me understand why?

Thank you,
Aha.



		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux