Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b7ad149d62ffffaccb9f565dfe7e5bae739d6836
Commit:     b7ad149d62ffffaccb9f565dfe7e5bae739d6836
Parent:     f34b439f34c49d7de858234bab5e2dd03cfaf3c1
Author:     Yinghai Lu <[EMAIL PROTECTED]>
AuthorDate: Sun Feb 17 02:02:21 2008 -0800
Committer:  Thomas Gleixner <[EMAIL PROTECTED]>
CommitDate: Mon Feb 18 20:54:14 2008 +0100

    x86: reenable support for system without on node0
    
    One system doesn't have RAM for node0 installed.
    
    SRAT: PXM 0 -> APIC 0 -> Node 0
    SRAT: PXM 0 -> APIC 1 -> Node 0
    SRAT: PXM 1 -> APIC 2 -> Node 1
    SRAT: PXM 1 -> APIC 3 -> Node 1
    SRAT: Node 1 PXM 1 0-a0000
    SRAT: Node 1 PXM 1 0-dd000000
    SRAT: Node 1 PXM 1 0-123000000
    ACPI: SLIT: nodes = 2
     10 13
     13 10
    mapped APIC to ffffffffff5fb000 (        fee00000)
    Bootmem setup node 1 0000000000000000-0000000123000000
      NODE_DATA [000000000000e000 - 0000000000014fff]
      bootmap [0000000000015000 -  00000000000395ff] pages 25
    Could not find start_pfn for node 0
    Pid: 0, comm: swapper Not tainted 2.6.24-smp-g5a514e21-dirty #14
    
    Call Trace:
     [<ffffffff80bab498>] free_area_init_node+0x22/0x381
     [<ffffffff8045ffc5>] generic_swap+0x0/0x17
     [<ffffffff80bab0cc>] find_zone_movable_pfns_for_nodes+0x54/0x271
     [<ffffffff80baba5f>] free_area_init_nodes+0x239/0x287
     [<ffffffff80ba6311>] paging_init+0x46/0x4c
     [<ffffffff80b9dda5>] setup_arch+0x3c3/0x44e
     [<ffffffff80b978be>] start_kernel+0x6f/0x2c7
     [<ffffffff80b971cc>] _sinittext+0x1cc/0x1d3
    
    This happens because node 0 is not online, but the node state in
    mm/page_alloc.c has node 0 set.
    
            nodemask_t node_states[NR_NODE_STATES] __read_mostly = {
                    [N_POSSIBLE] = NODE_MASK_ALL,
                    [N_ONLINE] = { { [0] = 1UL } },
    
    So we need to clear node_online_map before initializing the memory.
    
    Signed-off-by: Yinghai Lu <[EMAIL PROTECTED]>
    Cc: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/mm/numa_64.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index 1aecc65..59898fb 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -494,11 +494,13 @@ void __init numa_initmem_init(unsigned long start_pfn, 
unsigned long end_pfn)
        int i;
 
        nodes_clear(node_possible_map);
+       nodes_clear(node_online_map);
 
 #ifdef CONFIG_NUMA_EMU
        if (cmdline && !numa_emulation(start_pfn, end_pfn))
                return;
        nodes_clear(node_possible_map);
+       nodes_clear(node_online_map);
 #endif
 
 #ifdef CONFIG_ACPI_NUMA
@@ -506,6 +508,7 @@ void __init numa_initmem_init(unsigned long start_pfn, 
unsigned long end_pfn)
                                          end_pfn << PAGE_SHIFT))
                return;
        nodes_clear(node_possible_map);
+       nodes_clear(node_online_map);
 #endif
 
 #ifdef CONFIG_K8_NUMA
@@ -513,6 +516,7 @@ void __init numa_initmem_init(unsigned long start_pfn, 
unsigned long end_pfn)
                                        end_pfn<<PAGE_SHIFT))
                return;
        nodes_clear(node_possible_map);
+       nodes_clear(node_online_map);
 #endif
        printk(KERN_INFO "%s\n",
               numa_off ? "NUMA turned off" : "No NUMA configuration found");
@@ -524,7 +528,6 @@ void __init numa_initmem_init(unsigned long start_pfn, 
unsigned long end_pfn)
        memnode_shift = 63;
        memnodemap = memnode.embedded_map;
        memnodemap[0] = 0;
-       nodes_clear(node_online_map);
        node_set_online(0);
        node_set(0, node_possible_map);
        for (i = 0; i < NR_CPUS; i++)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to