Intel cpus: Fix deadlock on hyper-threading init
authorKyösti Mälkki <kyosti.malkki@gmail.com>
Fri, 9 Mar 2012 15:02:37 +0000 (17:02 +0200)
committerRudolf Marek <r.marek@assembler.cz>
Sun, 25 Mar 2012 18:33:28 +0000 (20:33 +0200)
commit8b28d50cdd1384893ec0565453eea77031aa7ec8
tree1c6bcd46ea37a2d04a03369f6bc95840cdeda7c4
parent2172f61ede0ff7764eae39d4b75085c2dee9b610
Intel cpus: Fix deadlock on hyper-threading init

Only the BSP CPU was able to start its hyper-threading CPU siblings.
When an AP CPU attempts this it calls start_cpu() within start_cpu(),
deadlocking the system with start_cpu_lock.

At the time intel_sibling_init() is run, the BSP CPU is still
walking the cpu_bus linked list in lapic_cpu_init: start_other_cpus().
A sibling CPU appended at the end of this list will get started.

Also fail compile with #error if SERIAL_CPU_INIT==0, as microcode
updates on hyper-threading sibling CPUs must be serialized.

Tested with HT-enabled P4 Xeons on dual-socket604 platform.

Change-Id: I0053f58f49ed604605ce0a55e826d3e1afdc90b6
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/775
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Rudolf Marek <r.marek@assembler.cz>
src/cpu/intel/hyperthreading/intel_sibling.c