Commit 70e2700a authored by Ian Wienand's avatar Ian Wienand Committed by Tony Luck

[IA64] VIRTUAL_MEM_MAP can be set when DISCONTIGMEM isn't; handle it

Patch developed by Ian Wienand under advice from Bill Irwin.
Signed-off-by: default avatarWilliam Irwin <wli@holomorphy.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 69792c3a
......@@ -84,6 +84,13 @@ extern int ia64_pfn_valid (unsigned long pfn);
#endif
#ifndef CONFIG_DISCONTIGMEM
# ifdef CONFIG_VIRTUAL_MEM_MAP
extern struct page *vmem_map;
# define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn))
# define page_to_pfn(page) ((unsigned long) (page - vmem_map))
# define pfn_to_page(pfn) (vmem_map + (pfn))
# endif
#else /* !CONFIG_VIRTUAL_MEM_MAP */
#define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn))
#define page_to_pfn(page) ((unsigned long) (page - mem_map))
#define pfn_to_page(pfn) (mem_map + (pfn))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment