Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234882
b: refs/heads/master
c: 69efcc6
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Tejun Heo committed Feb 21, 2011
1 parent 397f88a commit f90974a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 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: 6d496f9f232790d44144f3784856290e0b27b8f3
refs/heads/master: 69efcc6d90d234a3a076afb2c635c1609536faa4
32 changes: 12 additions & 20 deletions trunk/arch/x86/mm/numa_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ static bool __init numa_meminfo_cover_memory(const struct numa_meminfo *mi)

static int __init numa_register_memblks(struct numa_meminfo *mi)
{
int i, j, nid;
int i, nid;

/* Account for nodes with cpus and no memory */
node_possible_map = numa_nodes_parsed;
Expand All @@ -506,28 +506,20 @@ static int __init numa_register_memblks(struct numa_meminfo *mi)

init_memory_mapping_high();

/*
* Finally register nodes. Do it twice in case setup_node_bootmem
* missed one due to missing bootmem.
*/
for (i = 0; i < 2; i++) {
for_each_node_mask(nid, node_possible_map) {
u64 start = (u64)max_pfn << PAGE_SHIFT;
u64 end = 0;
/* Finally register nodes. */
for_each_node_mask(nid, node_possible_map) {
u64 start = (u64)max_pfn << PAGE_SHIFT;
u64 end = 0;

if (node_online(nid))
for (i = 0; i < mi->nr_blks; i++) {
if (nid != mi->blk[i].nid)
continue;

for (j = 0; j < mi->nr_blks; j++) {
if (nid != mi->blk[j].nid)
continue;
start = min(mi->blk[j].start, start);
end = max(mi->blk[j].end, end);
}

if (start < end)
setup_node_bootmem(nid, start, end);
start = min(mi->blk[i].start, start);
end = max(mi->blk[i].end, end);
}

if (start < end)
setup_node_bootmem(nid, start, end);
}

return 0;
Expand Down

0 comments on commit f90974a

Please sign in to comment.