Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116937
b: refs/heads/master
c: e817037
h: refs/heads/master
i:
  116935: 61fdc4e
v: v3
  • Loading branch information
Jon Tollefson authored and Benjamin Herrenschmidt committed Oct 21, 2008
1 parent b4c1e44 commit e41dafb
Show file tree
Hide file tree
Showing 2 changed files with 11 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: a5598ca0d49821912a5053c05f07fd650671eb6d
refs/heads/master: e81703724a966120ace6504c993bda9e084cbf3e
15 changes: 10 additions & 5 deletions trunk/arch/powerpc/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ static int __init get_active_region_work_fn(unsigned long start_pfn,

/*
* get_node_active_region - Return active region containing start_pfn
* Active range returned is empty if none found.
* @start_pfn: The page to return the region for.
* @node_ar: Returned set to the active region containing start_pfn
*/
Expand All @@ -126,6 +127,7 @@ static void __init get_node_active_region(unsigned long start_pfn,

node_ar->nid = nid;
node_ar->start_pfn = start_pfn;
node_ar->end_pfn = start_pfn;
work_with_active_regions(nid, get_active_region_work_fn, node_ar);
}

Expand Down Expand Up @@ -933,18 +935,20 @@ void __init do_init_bootmem(void)
struct node_active_region node_ar;

get_node_active_region(start_pfn, &node_ar);
while (start_pfn < end_pfn) {
while (start_pfn < end_pfn &&
node_ar.start_pfn < node_ar.end_pfn) {
unsigned long reserve_size = size;
/*
* if reserved region extends past active region
* then trim size to active region
*/
if (end_pfn > node_ar.end_pfn)
size = (node_ar.end_pfn << PAGE_SHIFT)
reserve_size = (node_ar.end_pfn << PAGE_SHIFT)
- (start_pfn << PAGE_SHIFT);
dbg("reserve_bootmem %lx %lx nid=%d\n", physbase, size,
node_ar.nid);
dbg("reserve_bootmem %lx %lx nid=%d\n", physbase,
reserve_size, node_ar.nid);
reserve_bootmem_node(NODE_DATA(node_ar.nid), physbase,
size, BOOTMEM_DEFAULT);
reserve_size, BOOTMEM_DEFAULT);
/*
* if reserved region is contained in the active region
* then done.
Expand All @@ -959,6 +963,7 @@ void __init do_init_bootmem(void)
*/
start_pfn = node_ar.end_pfn;
physbase = start_pfn << PAGE_SHIFT;
size = size - reserve_size;
get_node_active_region(start_pfn, &node_ar);
}

Expand Down

0 comments on commit e41dafb

Please sign in to comment.