]> err.no Git - linux-2.6/commitdiff
sh: pfn_valid() depends on flatmem.
authorPaul Mundt <lethal@linux-sh.org>
Wed, 23 May 2007 08:40:56 +0000 (17:40 +0900)
committerPaul Mundt <lethal@hera.kernel.org>
Fri, 8 Jun 2007 02:43:42 +0000 (02:43 +0000)
pfn_valid() is already defined in the sparsemem case, so we only
need to define this for CONFIG_FLATMEM.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
include/asm-sh/page.h

index 011dfbe14a6b2ad6bba328a799670ec66dcf2af4..cb54b25100b1675dfb23999786c8fdc5139aebc8 100644 (file)
@@ -135,7 +135,9 @@ typedef struct { unsigned long pgd; } pgd_t;
 #define PFN_START              (__MEMORY_START >> PAGE_SHIFT)
 #define ARCH_PFN_OFFSET                (PFN_START)
 #define virt_to_page(kaddr)    pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
+#ifdef CONFIG_FLATMEM
 #define pfn_valid(pfn)         ((pfn) >= min_low_pfn && (pfn) < max_low_pfn)
+#endif
 #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
 
 #define VM_DATA_DEFAULT_FLAGS  (VM_READ | VM_WRITE | VM_EXEC | \