Why is a PA converted to a VA in pmd_page?

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

 



Hi all,

In <asm>/pgtable.h, it defines the following:

    323 #define pmd_page(pmd) \
    324 ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))

Why does it convert the physical address provided by pmd_val to a virtual
one? The addresses returned from pgd_offset and pmd_offset represent a
physical address, correct? Then why the switch to a virtual address for the
pte_offset?

Aren't these methods called from the kernel in the physical address space
rather than the linear/virtual address space?

I'm confused, please help ;)

Thanks,
Kirk
___________________________________

Kirk True
Movaris Process Server Project Lead
Movaris
(408) 540-1405
___________________________________

--
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