summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/cpu/x86/lapic.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/cpu/x86/lapic.h b/src/include/cpu/x86/lapic.h
index 5fa5608db9..cfb9c9098b 100644
--- a/src/include/cpu/x86/lapic.h
+++ b/src/include/cpu/x86/lapic.h
@@ -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();
}