these are used in context of dma mapping. go through documentation/dma-mapping.txt for more information.
On Wed, Dec 3, 2008 at 9:11 AM, loody <[EMAIL PROTECTED]> wrote: > Dear all: > If I remember correctly, the translation between virtual and physical > memory should use page table. > But in include/asm/memory.h, these 2 functions seem don't use page > table to do the translation. > > #define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET) > #define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET) > > where > in mmu mode > #define PHYS_OFFSET UL(0x00000000) > > #ifndef PAGE_OFFSET > #define PAGE_OFFSET UL(0xc0000000) > #endif > > > > not in mmu mode > #ifndef PHYS_OFFSET > #define PHYS_OFFSET (CONFIG_DRAM_BASE) > #endif > > #ifndef PAGE_OFFSET > #define PAGE_OFFSET (PHYS_OFFSET) > #endif > > Why they don't need page table to do the page table translation? cz they are directly mapped. > > Except the caller is at the first page and in kernel, the first page > is located at the first frame. > thanks for your help, > miloody > > -- > To unsubscribe from this list: send an email with > "unsubscribe kernelnewbies" to [EMAIL PROTECTED] > Please read the FAQ at http://kernelnewbies.org/FAQ > > -- Thanks, Mahaveer Mobile - 9970365267
