Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292651
b: refs/heads/master
c: f5bf18f
h: refs/heads/master
i:
  292649: e0a64dc
  292647: cc641f6
v: v3
  • Loading branch information
Nishanth Aravamudan authored and Linus Torvalds committed Mar 22, 2012
1 parent fe290ad commit 1b96955
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 23 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: f0cb3c76ae1ced85f9034480b1b24cd96530ec78
refs/heads/master: f5bf18fa22f8c41a13eb8762c7373eb3a93a7333
5 changes: 2 additions & 3 deletions trunk/mm/bootmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,14 +766,13 @@ void * __init alloc_bootmem_section(unsigned long size,
unsigned long section_nr)
{
bootmem_data_t *bdata;
unsigned long pfn, goal, limit;
unsigned long pfn, goal;

pfn = section_nr_to_pfn(section_nr);
goal = pfn << PAGE_SHIFT;
limit = section_nr_to_pfn(section_nr + 1) << PAGE_SHIFT;
bdata = &bootmem_node_data[early_pfn_to_nid(pfn)];

return alloc_bootmem_core(bdata, size, SMP_CACHE_BYTES, goal, limit);
return alloc_bootmem_core(bdata, size, SMP_CACHE_BYTES, goal, 0);
}
#endif

Expand Down
30 changes: 11 additions & 19 deletions trunk/mm/sparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,29 +353,21 @@ static void __init sparse_early_usemaps_alloc_node(unsigned long**usemap_map,

usemap = sparse_early_usemaps_alloc_pgdat_section(NODE_DATA(nodeid),
usemap_count);
if (usemap) {
for (pnum = pnum_begin; pnum < pnum_end; pnum++) {
if (!present_section_nr(pnum))
continue;
usemap_map[pnum] = usemap;
usemap += size;
if (!usemap) {
usemap = alloc_bootmem_node(NODE_DATA(nodeid), size * usemap_count);
if (!usemap) {
printk(KERN_WARNING "%s: allocation failed\n", __func__);
return;
}
return;
}

usemap = alloc_bootmem_node(NODE_DATA(nodeid), size * usemap_count);
if (usemap) {
for (pnum = pnum_begin; pnum < pnum_end; pnum++) {
if (!present_section_nr(pnum))
continue;
usemap_map[pnum] = usemap;
usemap += size;
check_usemap_section_nr(nodeid, usemap_map[pnum]);
}
return;
for (pnum = pnum_begin; pnum < pnum_end; pnum++) {
if (!present_section_nr(pnum))
continue;
usemap_map[pnum] = usemap;
usemap += size;
check_usemap_section_nr(nodeid, usemap_map[pnum]);
}

printk(KERN_WARNING "%s: allocation failed\n", __func__);
}

#ifndef CONFIG_SPARSEMEM_VMEMMAP
Expand Down

0 comments on commit 1b96955

Please sign in to comment.