Skip to content

Commit

Permalink
[IA64] - Make pfn_valid more precise for SGI Altix systems
Browse files Browse the repository at this point in the history
A single SGI Altix system can be divided into multiple partitions,
each running their own instance of the Linux kernel.  pfn_valid()
is currently not optimal for any but the first partition, since it
does not compare the pfn with min_low_pfn before calling the more
costly ia64_pfn_valid().

Signed-off-by: Dean Roe <roe@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Dean Roe authored and Tony Luck committed Nov 29, 2005
1 parent 624f54b commit b77dae5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions arch/ia64/kernel/ia64_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ EXPORT_SYMBOL(clear_page);

#ifdef CONFIG_VIRTUAL_MEM_MAP
#include <linux/bootmem.h>
EXPORT_SYMBOL(min_low_pfn); /* defined by bootmem.c, but not exported by generic code */
EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic code */
#endif

Expand Down
3 changes: 2 additions & 1 deletion include/asm-ia64/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ extern int ia64_pfn_valid (unsigned long pfn);
# define pfn_to_page(pfn) (mem_map + (pfn))
#elif defined(CONFIG_DISCONTIGMEM)
extern struct page *vmem_map;
extern unsigned long min_low_pfn;
extern unsigned long max_low_pfn;
# define pfn_valid(pfn) (((pfn) < max_low_pfn) && ia64_pfn_valid(pfn))
# define pfn_valid(pfn) (((pfn) >= min_low_pfn) && ((pfn) < max_low_pfn) && ia64_pfn_valid(pfn))
# define page_to_pfn(page) ((unsigned long) (page - vmem_map))
# define pfn_to_page(pfn) (vmem_map + (pfn))
#endif
Expand Down

0 comments on commit b77dae5

Please sign in to comment.