Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131499
b: refs/heads/master
c: cc2559b
h: refs/heads/master
i:
  131497: 0d10c0f
  131495: 0b62e61
v: v3
  • Loading branch information
KAMEZAWA Hiroyuki authored and Linus Torvalds committed Feb 18, 2009
1 parent 2adb935 commit e78b574
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 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: f2dbcfa738368c8a40d4a5f0b65dc9879577cb21
refs/heads/master: cc2559bccc72767cb446f79b071d96c30c26439b
2 changes: 1 addition & 1 deletion trunk/arch/ia64/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int __meminit __early_pfn_to_nid(unsigned long pfn)
return node_memblk[i].nid;
}

return 0;
return -1;
}

#ifdef CONFIG_MEMORY_HOTPLUG
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/mmzone.h
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ void sparse_init(void);
#endif /* CONFIG_SPARSEMEM */

#ifdef CONFIG_NODES_SPAN_OTHER_NODES
#define early_pfn_in_nid(pfn, nid) (early_pfn_to_nid(pfn) == (nid))
bool early_pfn_in_nid(unsigned long pfn, int nid);
#else
#define early_pfn_in_nid(pfn, nid) (1)
#endif
Expand Down
23 changes: 20 additions & 3 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3000,16 +3000,33 @@ int __meminit __early_pfn_to_nid(unsigned long pfn)
if (start_pfn <= pfn && pfn < end_pfn)
return early_node_map[i].nid;
}

return 0;
/* This is a memory hole */
return -1;
}
#endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */

int __meminit early_pfn_to_nid(unsigned long pfn)
{
return __early_pfn_to_nid(pfn);
int nid;

nid = __early_pfn_to_nid(pfn);
if (nid >= 0)
return nid;
/* just returns 0 */
return 0;
}

#ifdef CONFIG_NODES_SPAN_OTHER_NODES
bool __meminit early_pfn_in_nid(unsigned long pfn, int node)
{
int nid;

nid = __early_pfn_to_nid(pfn);
if (nid >= 0 && nid != node)
return false;
return true;
}
#endif

/* Basic iterator support to walk early_node_map[] */
#define for_each_active_range_index_in_nid(i, nid) \
Expand Down

0 comments on commit e78b574

Please sign in to comment.