Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24286
b: refs/heads/master
c: dc8ecb4
h: refs/heads/master
v: v3
  • Loading branch information
KAMEZAWA Hiroyuki authored and Linus Torvalds committed Mar 27, 2006
1 parent 762856f commit 914f66d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad658b385e6308066f9084a7ea01305b223cd3a0
refs/heads/master: dc8ecb43701a78bd3c38e7fed1d1c76840579450
4 changes: 4 additions & 0 deletions trunk/arch/x86_64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ config HAVE_ARCH_EARLY_PFN_TO_NID
def_bool y
depends on NUMA

config OUT_OF_LINE_PFN_TO_PAGE
def_bool y
depends on DISCONTIGMEM

config NR_CPUS
int "Maximum number of CPUs (2-256)"
range 2 255
Expand Down
15 changes: 0 additions & 15 deletions trunk/arch/x86_64/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,21 +377,6 @@ EXPORT_SYMBOL(node_data);
* Should do that.
*/

/* Requires pfn_valid(pfn) to be true */
struct page *pfn_to_page(unsigned long pfn)
{
int nid = phys_to_nid(((unsigned long)(pfn)) << PAGE_SHIFT);
return (pfn - node_start_pfn(nid)) + NODE_DATA(nid)->node_mem_map;
}
EXPORT_SYMBOL(pfn_to_page);

unsigned long page_to_pfn(struct page *page)
{
return (long)(((page) - page_zone(page)->zone_mem_map) +
page_zone(page)->zone_start_pfn);
}
EXPORT_SYMBOL(page_to_pfn);

int pfn_valid(unsigned long pfn)
{
unsigned nid;
Expand Down
4 changes: 0 additions & 4 deletions trunk/include/asm-x86_64/mmzone.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,8 @@ static inline __attribute__((pure)) int phys_to_nid(unsigned long addr)
#define pfn_to_nid(pfn) phys_to_nid((unsigned long)(pfn) << PAGE_SHIFT)
#define kvaddr_to_nid(kaddr) phys_to_nid(__pa(kaddr))

extern struct page *pfn_to_page(unsigned long pfn);
extern unsigned long page_to_pfn(struct page *page);
extern int pfn_valid(unsigned long pfn);
#endif

#define local_mapnr(kvaddr) \
( (__pa(kvaddr) >> PAGE_SHIFT) - node_start_pfn(kvaddr_to_nid(kvaddr)) )
#endif
#endif
3 changes: 1 addition & 2 deletions trunk/include/asm-x86_64/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
#define __boot_va(x) __va(x)
#define __boot_pa(x) __pa(x)
#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) < end_pfn)
#endif

Expand All @@ -140,6 +138,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;

#endif /* __KERNEL__ */

#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>

#endif /* _X86_64_PAGE_H */

0 comments on commit 914f66d

Please sign in to comment.