cpu/x86/lapic.h: Fix CONFIG_X2APIC_RUNTIME
The deadlock prevention is also needed with CONFIG_X2APIC_RUNTIME when the cpu is in x2apic mode. TESTED: Fixes SMI generation on xeon_sp hardware with CONFIG_X2APIC_RUNTIME. Change-Id: I6a71204fcff35e11613fc8363ce061b348e73496 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67239 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Zhang <jonzhang@fb.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
a23aa1ca90
commit
f158c9c961
|
@ -155,7 +155,9 @@ static __always_inline void lapic_send_ipi_self(uint32_t icrlow)
|
|||
/* In case of X2APIC force a short delay, to prevent deadlock in a case
|
||||
* the immediately following code acquires some lock, like with printk().
|
||||
*/
|
||||
while (CONFIG(X2APIC_ONLY) && i--)
|
||||
const bool x2apic = is_x2apic_mode();
|
||||
|
||||
while (x2apic && i--)
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue