Skip to content
  • Mike Travis's avatar
    x86: convert cpu_to_apicid to be a per cpu variable · 71fff5e6
    Mike Travis authored
    
    
    This patch converts the x86_cpu_to_apicid array to be a per cpu
    variable. This saves sizeof(apicid) * NR unused cpus.  Access is mostly
    from startup and CPU HOTPLUG functions.
    
    MP_processor_info() is one of the functions that require access to the
    x86_cpu_to_apicid array before the per_cpu data area is setup.  For this
    case, a pointer to the __initdata array is initialized in setup_arch()
    and removed in smp_prepare_cpus() after the per_cpu data area is
    initialized.
    
    A second change is included to change the initial array value of ARCH
    i386 from 0xff to BAD_APICID to be consistent with ARCH x86_64.
    
    Signed-off-by: default avatarMike Travis <travis@sgi.com>
    Cc: Andi Kleen <ak@suse.de>
    Cc: Christoph Lameter <clameter@sgi.com>
    Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    71fff5e6