Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48399
b: refs/heads/master
c: 5441392
h: refs/heads/master
i:
  48397: 0d8915b
  48395: a5fab01
  48391: 6f1ce9d
  48383: d4416ff
v: v3
  • Loading branch information
Amul Shah authored and Andi Kleen committed Feb 13, 2007
1 parent e5b1a13 commit 01d68d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: 076422d2af7e3d8e72c6e70843f6ea377714b082
refs/heads/master: 54413927f022292aeccadd268fbf1c0b42129945
15 changes: 8 additions & 7 deletions trunk/arch/x86_64/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,8 @@ static int __init allocate_cachealigned_memnodemap(void)
unsigned long pad, pad_addr;

memnodemap = memnode.embedded_map;
if (memnodemapsize <= 48) {
printk(KERN_DEBUG "NUMA: Allocated memnodemap from %lx - %lx\n",
nodemap_addr, nodemap_addr + nodemap_size);
if (memnodemapsize <= 48)
return 0;
}

pad = L1_CACHE_BYTES - 1;
pad_addr = 0x8000;
Expand Down Expand Up @@ -110,7 +107,7 @@ static int __init allocate_cachealigned_memnodemap(void)
static int __init
extract_lsb_from_nodes (const struct bootnode *nodes, int numnodes)
{
int i;
int i, nodes_used = 0;
unsigned long start, end;
unsigned long bitfield = 0, memtop = 0;

Expand All @@ -119,11 +116,15 @@ extract_lsb_from_nodes (const struct bootnode *nodes, int numnodes)
end = nodes[i].end;
if (start >= end)
continue;
bitfield |= start | end;
bitfield |= start;
nodes_used++;
if (end > memtop)
memtop = end;
}
i = find_first_bit(&bitfield, sizeof(unsigned long)*8);
if (nodes_used <= 1)
i = 63;
else
i = find_first_bit(&bitfield, sizeof(unsigned long)*8);
memnodemapsize = (memtop >> i)+1;
return i;
}
Expand Down

0 comments on commit 01d68d7

Please sign in to comment.