Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108670
b: refs/heads/master
c: 858f774
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Aug 14, 2008
1 parent fe0f4a6 commit e06925f
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 23b49c19f6946cc33392a1fc75dd788dd4a90fb7
refs/heads/master: 858f774733b72609acb28104475f131abb912c08
12 changes: 8 additions & 4 deletions trunk/arch/x86/mm/srat_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ void acpi_numa_arch_fixup(void)
* start of the node, and that the current "end" address is after
* the previous one.
*/
static __init void node_read_chunk(int nid, struct node_memory_chunk_s *memory_chunk)
static __init int node_read_chunk(int nid, struct node_memory_chunk_s *memory_chunk)
{
/*
* Only add present memory as told by the e820.
Expand All @@ -189,10 +189,10 @@ static __init void node_read_chunk(int nid, struct node_memory_chunk_s *memory_c
if (memory_chunk->start_pfn >= max_pfn) {
printk(KERN_INFO "Ignoring SRAT pfns: %08lx - %08lx\n",
memory_chunk->start_pfn, memory_chunk->end_pfn);
return;
return -1;
}
if (memory_chunk->nid != nid)
return;
return -1;

if (!node_has_online_mem(nid))
node_start_pfn[nid] = memory_chunk->start_pfn;
Expand All @@ -202,6 +202,8 @@ static __init void node_read_chunk(int nid, struct node_memory_chunk_s *memory_c

if (node_end_pfn[nid] < memory_chunk->end_pfn)
node_end_pfn[nid] = memory_chunk->end_pfn;

return 0;
}

int __init get_memcfg_from_srat(void)
Expand Down Expand Up @@ -259,7 +261,9 @@ int __init get_memcfg_from_srat(void)
printk(KERN_DEBUG
"chunk %d nid %d start_pfn %08lx end_pfn %08lx\n",
j, chunk->nid, chunk->start_pfn, chunk->end_pfn);
node_read_chunk(chunk->nid, chunk);
if (node_read_chunk(chunk->nid, chunk))
continue;

e820_register_active_regions(chunk->nid, chunk->start_pfn,
min(chunk->end_pfn, max_pfn));
}
Expand Down

0 comments on commit e06925f

Please sign in to comment.