Re: [PATCH 0/79] smpboot integration

From: Ingo Molnar
Date: Wed Mar 19 2008 - 15:54:54 EST



* Ingo Molnar <mingo@xxxxxxx> wrote:

> the small fix below was needed - it is possible to build ACPI on
> 32-bit with APIC support disabled. Otherwise it's looking good in my
> testing.

another fix for a small (and rare) build bug i found is below: it is
possible to build a kernel with CONFIG_X86_MPPARSE but without
CONFIG_SMP. In that case x86_bios_cpu_apicid has to be provided, and the
use of the early-apicids has to be inhibited.

Ingo

---
arch/x86/kernel/mpparse_32.c | 6 ++++++
1 file changed, 6 insertions(+)

Index: linux/arch/x86/kernel/mpparse_32.c
===================================================================
--- linux.orig/arch/x86/kernel/mpparse_32.c
+++ linux/arch/x86/kernel/mpparse_32.c
@@ -76,6 +76,10 @@ unsigned disabled_cpus __cpuinitdata;
/* Bitmask of physically existing CPUs */
physid_mask_t phys_cpu_present_map;

+#ifndef CONFIG_SMP
+DEFINE_PER_CPU(u16, x86_bios_cpu_apicid) = BAD_APICID;
+#endif
+
/*
* Intel MP BIOS table parsing routines:
*/
@@ -230,6 +234,7 @@ static void __cpuinit MP_processor_info
def_to_bigsmp = 1;
}
}
+#ifdef CONFIG_SMP
/* are we being called early in kernel startup? */
if (x86_cpu_to_apicid_early_ptr) {
u16 *cpu_to_apicid = x86_cpu_to_apicid_early_ptr;
@@ -241,6 +246,7 @@ static void __cpuinit MP_processor_info
per_cpu(x86_cpu_to_apicid, cpu) = m->mpc_apicid;
per_cpu(x86_bios_cpu_apicid, cpu) = m->mpc_apicid;
}
+#endif
cpu_set(cpu, cpu_present_map);
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/