Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99986
b: refs/heads/master
c: 996cf44
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Jul 8, 2008
1 parent d6a9276 commit c4f753f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: 28bb22379513ca3cac9d13766064a219c5fc21a9
refs/heads/master: 996cf4438f9ed711c98a3cb5ab88f842a4102427
11 changes: 7 additions & 4 deletions trunk/arch/x86/mm/discontig_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,20 @@ static void __init propagate_e820_map_node(int nid)
*/
static void __init allocate_pgdat(int nid)
{
if (nid && node_has_online_mem(nid) && node_remap_start_vaddr[nid])
char buf[16];

if (node_has_online_mem(nid) && node_remap_start_vaddr[nid])
NODE_DATA(nid) = (pg_data_t *)node_remap_start_vaddr[nid];
else {
unsigned long pgdat_phys;
pgdat_phys = find_e820_area(min_low_pfn<<PAGE_SHIFT,
(nid ? max_low_pfn:max_pfn_mapped)<<PAGE_SHIFT,
max_pfn_mapped<<PAGE_SHIFT,
sizeof(pg_data_t),
PAGE_SIZE);
NODE_DATA(nid) = (pg_data_t *)(pfn_to_kaddr(pgdat_phys>>PAGE_SHIFT));
reserve_early(pgdat_phys, pgdat_phys + sizeof(pg_data_t),
"NODE_DATA");
memset(buf, 0, sizeof(buf));
sprintf(buf, "NODE_DATA %d", nid);
reserve_early(pgdat_phys, pgdat_phys + sizeof(pg_data_t), buf);
}
printk(KERN_DEBUG "allocate_pgdat: node %d NODE_DATA %08lx\n",
nid, (unsigned long)NODE_DATA(nid));
Expand Down

0 comments on commit c4f753f

Please sign in to comment.