Re: kernel VM area issue

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

 



On Tue, Oct 02, 2001 at 04:40:28PM +0200, Martin Maletinsky wrote:
> 1) They may be within the start region of kernel virtual addresses (the addresses between PAGE_OFFSET and PAGE_OFFSET + size of physical memory). This region provides a 1:1
> mapping between physikal and (kernel) virtual addresses, phys_to_virt() and virt_to_phys() provide conversion between (kernel) virtual addresses from this region and
> physikal addresses.

Note that virt_to_phys/phys_to_virt are a 2.2-legacy interface.
As Linux 2.4 has a mm that is fundamentally page-based due to the highmem
support you did not claim to understand above, virt_to_page/page_address
are the preffered interface.

For a page that actually is highmem use kmap(page) instead and unmap it
with kunmap(page) again.

Both give you a kernel-virtual and not a physical address.
For lowmem pages __pa(addr) gives the real physical address.

	Christoph

-- 
Whip me.  Beat me.  Make me maintain AIX.
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[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