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

From: Mateusz Jończyk
Date: Sun Sep 11 2022 - 04:47:54 EST


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 <mat.jonczyk@xxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
Cc: x86@xxxxxxxxxx
Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
Cc: Johan Hovold <johan@xxxxxxxxxx>
Cc: "Maciej W. Rozycki" <macro@xxxxxxxxxxx>
Cc: Yinghai Lu <yinghai@xxxxxxxxxx>
---
v2: add a newline at the end of the text

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 6d303d1d276c..206a2693a27a 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1902,7 +1902,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.\n");
}
early_initcall(validate_x2apic);

--
2.25.1