From: Paul Mundt Date: Wed, 23 May 2007 08:40:56 +0000 (+0900) Subject: sh: pfn_valid() depends on flatmem. X-Git-Tag: firefly_0821_release~27981^2~54 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5900711ad7173b1cf3ee72eb21572e20b263ca0d;p=firefly-linux-kernel-4.4.55.git sh: pfn_valid() depends on flatmem. pfn_valid() is already defined in the sparsemem case, so we only need to define this for CONFIG_FLATMEM. Signed-off-by: Paul Mundt --- diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index 011dfbe14a6b..cb54b25100b1 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h @@ -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 | \