]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-mips/pgtable-64.h
FRV: Wire up new system calls
[linux-2.6-omap-h63xx.git] / include / asm-mips / pgtable-64.h
index a5b18710b6a4a30f0238d07d275ac19d109c40c9..943515f0ef8709c113f8a063ad17fd741820bc4c 100644 (file)
 #define VMALLOC_START          MAP_BASE
 #define VMALLOC_END    \
        (VMALLOC_START + PTRS_PER_PGD * PTRS_PER_PMD * PTRS_PER_PTE * PAGE_SIZE)
-#if defined(CONFIG_MODULES) && !defined(CONFIG_BUILD_ELF64) && \
+#if defined(CONFIG_MODULES) && defined(KBUILD_64BIT_SYM32) && \
        VMALLOC_START != CKSSEG
 /* Load modules into 32bit-compatible segment. */
 #define MODULE_START   CKSSEG
@@ -193,13 +193,13 @@ static inline void pud_clear(pud_t *pudp)
 #define pmd_index(address)     (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
 
 /* to find an entry in a page-table-directory */
-#define pgd_offset(mm,addr)    ((mm)->pgd + pgd_index(addr))
+#define pgd_offset(mm, addr)   ((mm)->pgd + pgd_index(addr))
 
 static inline unsigned long pud_page_vaddr(pud_t pud)
 {
        return pud_val(pud);
 }
-#define pud_phys(pud)          (pud_val(pud) - PAGE_OFFSET)
+#define pud_phys(pud)          virt_to_phys((void *)pud_val(pud))
 #define pud_page(pud)          (pfn_to_page(pud_phys(pud) >> PAGE_SHIFT))
 
 /* Find an entry in the second-level page table.. */
@@ -237,7 +237,7 @@ static inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
 
 #define __swp_type(x)          (((x).val >> 32) & 0xff)
 #define __swp_offset(x)                ((x).val >> 40)
-#define __swp_entry(type,offset) ((swp_entry_t) { pte_val(mk_swap_pte((type),(offset))) })
+#define __swp_entry(type, offset) ((swp_entry_t) { pte_val(mk_swap_pte((type), (offset))) })
 #define __pte_to_swp_entry(pte)        ((swp_entry_t) { pte_val(pte) })
 #define __swp_entry_to_pte(x)  ((pte_t) { (x).val })