]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - include/asm-ppc64/page.h
[PATCH] ppc64: sparsemem memory model
[linux-2.6.git] / include / asm-ppc64 / page.h
index 257d87eb7c34b48066def0c4d172d1df3529b6cb..a5893a305a09bdb27a2b12b15980507b25a14d3e 100644 (file)
@@ -217,7 +217,8 @@ extern u64 ppc64_pft_size;          /* Log 2 of page table size */
 #define page_to_pfn(page)      discontigmem_page_to_pfn(page)
 #define pfn_to_page(pfn)       discontigmem_pfn_to_page(pfn)
 #define pfn_valid(pfn)         discontigmem_pfn_valid(pfn)
-#else
+#endif
+#ifdef CONFIG_FLATMEM
 #define pfn_to_page(pfn)       (mem_map + (pfn))
 #define page_to_pfn(page)      ((unsigned long)((page) - mem_map))
 #define pfn_valid(pfn)         ((pfn) < max_mapnr)