• Yinghai Lu's avatar
    x86: get boot_cpu_id as early for k8_scan_nodes · 8643f9d0
    Yinghai Lu authored
    When acpi=off or there is no SRAT defined, apicid_to_node is got from K8
    Northbridge PCI configuration space in k8_scan_nodes() in
    arch/x86_64/mm/k8toplogy.c.
    
    The problem is that it assumes bsp apic id is 0 at that point.
    
    For four socket system with Quad core cpus installed, all cpus apic id
    is offset by 4, and bsp apic id is 4.
    
    For eight socket system with dual core cpus installed, all cpus apic id
    is offset by 2, and bsp apic id is 2.
    
    We need get boot_cpu_id --- bsp apic id, before k8_scan_nodes by called.
    
    So create early_acpi_boot_init and early_get_smp_config for get boot_cpu_id.
    Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    8643f9d0
apic_64.c 31.8 KB