diff options
author | Steve French <sfrench@us.ibm.com> | 2007-10-20 04:26:44 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-10-20 04:26:44 +0000 |
commit | 748c5151deb56e4b7b5a9b07a884243764933831 (patch) | |
tree | e9dd45b8806d00b56503cfa55c46f3ebce0d151c /arch/x86/kernel/mpparse_64.c | |
parent | 4879b44829d94a1f8facf90cced3c5f23c5a8c62 (diff) | |
parent | e8b8c977734193adedf2b0f607d6252c78e86394 (diff) | |
download | talos-obmc-linux-748c5151deb56e4b7b5a9b07a884243764933831.tar.gz talos-obmc-linux-748c5151deb56e4b7b5a9b07a884243764933831.zip |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/x86/kernel/mpparse_64.c')
-rw-r--r-- | arch/x86/kernel/mpparse_64.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/x86/kernel/mpparse_64.c b/arch/x86/kernel/mpparse_64.c index 8bf0ca03ac8e..ef4aab123581 100644 --- a/arch/x86/kernel/mpparse_64.c +++ b/arch/x86/kernel/mpparse_64.c @@ -57,6 +57,8 @@ unsigned long mp_lapic_addr = 0; /* Processor that is doing the boot up */ unsigned int boot_cpu_id = -1U; +EXPORT_SYMBOL(boot_cpu_id); + /* Internal processor count */ unsigned int num_processors __cpuinitdata = 0; @@ -86,7 +88,7 @@ static int __init mpf_checksum(unsigned char *mp, int len) return sum & 0xFF; } -static void __cpuinit MP_processor_info (struct mpc_config_processor *m) +static void __cpuinit MP_processor_info(struct mpc_config_processor *m) { int cpu; cpumask_t tmp_map; @@ -123,7 +125,18 @@ static void __cpuinit MP_processor_info (struct mpc_config_processor *m) cpu = 0; } bios_cpu_apicid[cpu] = m->mpc_apicid; - x86_cpu_to_apicid[cpu] = m->mpc_apicid; + /* + * We get called early in the the start_kernel initialization + * process when the per_cpu data area is not yet setup, so we + * use a static array that is removed after the per_cpu data + * area is created. + */ + if (x86_cpu_to_apicid_ptr) { + u8 *x86_cpu_to_apicid = (u8 *)x86_cpu_to_apicid_ptr; + x86_cpu_to_apicid[cpu] = m->mpc_apicid; + } else { + per_cpu(x86_cpu_to_apicid, cpu) = m->mpc_apicid; + } cpu_set(cpu, cpu_possible_map); cpu_set(cpu, cpu_present_map); |