diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-06-06 16:28:23 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-06 16:38:35 +0200 |
commit | ea57a5a6db8961de35cd1a4a80d8e01ee4307973 (patch) | |
tree | a6e71962a0f48eb61a9787deb29160fec2876885 | |
parent | x86: linked list of setup_data for i386 (diff) | |
download | linux-ea57a5a6db8961de35cd1a4a80d8e01ee4307973.tar.xz linux-ea57a5a6db8961de35cd1a4a80d8e01ee4307973.zip |
x86, 32-bit: SRAT fix
we were adding reserved BIOS ranges as general memory as well => not good.
solves this crash:
[ 20.068075] hostname used greatest stack depth: 6464 bytes left
[ 20.121404] BUG: unable to handle kernel <1>BUG: unable to handle kernel NULL pointer dereference at 00000b8c
[ 20.121404] IP: [<c01160ae>] kmap_atomic_prot+0x2d/0x1c3
[ 20.121404] *pdpt = 00000000367eb001 *pde = 0000000000000000
[ 20.121404] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
[ 20.121404]
[ 20.121404] Pid: 2061, comm: rc.sysinit Not tainted (2.6.26-rc3 #2440)
[ 20.121404] EIP: 0060:[<c01160ae>] EFLAGS: 00010206 CPU: 0
[ 20.121404] EIP is at kmap_atomic_prot+0x2d/0x1c3
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/srat_32.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/x86/kernel/srat_32.c b/arch/x86/kernel/srat_32.c index 32d8b1142938..5eedd3fd4d49 100644 --- a/arch/x86/kernel/srat_32.c +++ b/arch/x86/kernel/srat_32.c @@ -240,6 +240,7 @@ static int __init acpi20_parse_srat(struct acpi_table_srat *sratp) for (i = 0; i < MAX_APICID; i++) apicid_2_node[i] = pxm_to_node(apicid_to_pxm[i]); + remove_all_active_ranges(); for (j = 0; j < num_memory_chunks; j++){ struct node_memory_chunk_s * chunk = &node_memory_chunk[j]; printk("chunk %d nid %d start_pfn %08lx end_pfn %08lx\n", @@ -247,14 +248,8 @@ static int __init acpi20_parse_srat(struct acpi_table_srat *sratp) node_read_chunk(chunk->nid, chunk); e820_register_active_regions(chunk->nid, chunk->start_pfn, min(chunk->end_pfn, max_pfn)); - } - - for_each_online_node(nid) { - unsigned long start = node_start_pfn[nid]; - unsigned long end = node_end_pfn[nid]; - - memory_present(nid, start, end); - node_remap_size[nid] = node_memmap_size_bytes(nid, start, end); + memory_present(chunk->nid, chunk->start_pfn, + min(chunk->end_pfn, max_pfn)); } return 1; out_fail: |