2022-02-28 21:31:31

by Mateusz Jończyk

[permalink] [raw]
Subject: [PATCH 02/10] x86/apic: fix panic message when x2APIC is not supported

The correct course of action is to enable x2APIC support in the kernel,
not to disable it in the BIOS (which may be impossible).
x2APIC has performance and functionality benefits, so it is best to use
it if it is available on the platform.

Signed-off-by: Mateusz Jończyk <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: [email protected]
Cc: "H. Peter Anvin" <[email protected]>
Cc: Johan Hovold <[email protected]>
Cc: "Maciej W. Rozycki" <[email protected]>
Cc: Yinghai Lu <[email protected]>
---
arch/x86/kernel/apic/apic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index b70344bf6600..840511aadbca 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1899,7 +1899,7 @@ static int __init validate_x2apic(void)
/*
* Checkme: Can we simply turn off x2apic here instead of panic?
*/
- panic("BIOS has enabled x2apic but kernel doesn't support x2apic, please disable x2apic in BIOS.\n");
+ panic("Kernel does not support x2APIC, please recompile with CONFIG_X86_X2APIC or disable x2APIC in BIOS");
}
early_initcall(validate_x2apic);

--
2.25.1