]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-alpha/mmzone.h
avr32: types: use <asm-generic/int-*.h> for the avr32 architecture
[linux-2.6-omap-h63xx.git] / include / asm-alpha / mmzone.h
index c9004398f27380457d5113b1d6a0b558575e771d..8af56ce346add9d2bebd26641f30656141464a03 100644 (file)
@@ -5,7 +5,6 @@
 #ifndef _ASM_MMZONE_H_
 #define _ASM_MMZONE_H_
 
-#include <linux/config.h>
 #include <asm/smp.h>
 
 struct bootmem_data_t; /* stupid forward decl. */
@@ -76,6 +75,7 @@ PLAT_NODE_DATA_LOCALNR(unsigned long p, int n)
 #define VALID_PAGE(page)       (((page) - mem_map) < max_mapnr)
 
 #define pmd_page(pmd)          (pfn_to_page(pmd_val(pmd) >> 32))
+#define pgd_page(pgd)          (pfn_to_page(pgd_val(pgd) >> 32))
 #define pte_pfn(pte)           (pte_val(pte) >> 32)
 
 #define mk_pte(page, pgprot)                                                \
@@ -83,8 +83,7 @@ PLAT_NODE_DATA_LOCALNR(unsigned long p, int n)
        pte_t pte;                                                           \
        unsigned long pfn;                                                   \
                                                                             \
-       pfn = ((unsigned long)((page)-page_zone(page)->zone_mem_map)) << 32; \
-       pfn += page_zone(page)->zone_start_pfn << 32;                        \
+       pfn = page_to_pfn(page) << 32; \
        pte_val(pte) = pfn | pgprot_val(pgprot);                             \
                                                                             \
        pte;                                                                 \