Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=54ffaa45c5f572ff6c344ca583137d0edf2d78cc
Commit:     54ffaa45c5f572ff6c344ca583137d0edf2d78cc
Parent:     3ceba7815cfc0b5d4c2bef5bb58e0c766da63549
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 19 20:35:02 2007 +0200
Committer:  Thomas Gleixner <[EMAIL PROTECTED]>
CommitDate: Fri Oct 19 20:35:02 2007 +0200

    x86: fix CONFIG_NUMA and nosmp | maxcpus=0/1 crash
    
    x86 NUMA kernels crash in the scheduler setup code if "nosmp" or
    "maxcpus=0" is passed on the boot command line:
    
    | Brought up 1 CPUs
    | BUG: unable to handle kernel NULL pointer dereference at virtual address 
00000000
    | printing eip: c011f0b5 *pde = 00000000
    | Oops: 0000 [#1] SMP
    |
    | Pid: 1, comm: swapper Not tainted (2.6.23 #67)
    | EIP: 0060:[<c011f0b5>] EFLAGS: 00010246 CPU: 0
    | EIP is at sd_degenerate+0x35/0x40
    
    the reason is sloppy spaghetti code in smpboot_32.c that resulted in a
    missing map_cpu_to_logical_apicid() call - which also had the side-effect
    of setting up the cpu_2_node[] entry for the lone CPU. That resulted in
    node_to_cpumask(0) resulting in 00000000 - confusing the sched-domains
    setup code.
    
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/kernel/smpboot_32.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c
index be3faac..65e5de7 100644
--- a/arch/x86/kernel/smpboot_32.c
+++ b/arch/x86/kernel/smpboot_32.c
@@ -1008,6 +1008,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
                printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell 
your hw vendor)\n");
                smpboot_clear_io_apic_irqs();
                phys_cpu_present_map = physid_mask_of_physid(0);
+               map_cpu_to_logical_apicid();
                cpu_set(0, per_cpu(cpu_sibling_map, 0));
                cpu_set(0, per_cpu(cpu_core_map, 0));
                return;
@@ -1029,6 +1030,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
                }
                smpboot_clear_io_apic_irqs();
                phys_cpu_present_map = physid_mask_of_physid(0);
+               map_cpu_to_logical_apicid();
                cpu_set(0, per_cpu(cpu_sibling_map, 0));
                cpu_set(0, per_cpu(cpu_core_map, 0));
                return;
-
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