[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250105172741.3476758-2-dmaluka@chromium.org>
Date: Sun, 5 Jan 2025 17:27:40 +0000
From: Dmytro Maluka <dmaluka@...omium.org>
To: Thomas Gleixner <tglx@...utronix.de>,
Rob Herring <robh@...nel.org>
Cc: Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
x86@...nel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)),
"H. Peter Anvin" <hpa@...or.com>,
Saravana Kannan <saravanak@...gle.com>,
Saurabh Sengar <ssengar@...ux.microsoft.com>,
Usama Arif <usamaarif642@...il.com>,
Stephen Boyd <sboyd@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
linux-kernel@...r.kernel.org (open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)),
devicetree@...r.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE),
Pierre-Clément Tosi <ptosi@...gle.com>,
Shikha Panwar <shikhapanwar@...gle.com>,
Will Deacon <will@...nel.org>,
Keir Fraser <keirf@...gle.com>,
Michal Mazurek <mazurekm@...gle.com>,
Bartłomiej Grzesik <bgrzesik@...gle.com>,
Tomasz Nowicki <tnowicki@...gle.com>,
Grzegorz Jaszczyk <jaszczyk@...gle.com>,
Dmytro Maluka <dmaluka@...omium.org>
Subject: [PATCH v2 1/2] x86/of: Don't use DTB for SMP setup if ACPI is enabled
There are cases when it is useful to use both ACPI and DTB provided by
the bootloader, however in such cases we should make sure to prevent
conflicts between the two. Namely, don't try to use DTB for SMP setup
if ACPI is enabled.
Precisely, this prevents at least:
- incorrectly calling register_lapic_address(APIC_DEFAULT_PHYS_BASE)
after the LAPIC was already successfully enumerated via ACPI, causing
noisy kernel warnings and probably potential real issues as well
- failed IOAPIC setup in the case when IOAPIC is enumerated via mptable
instead of ACPI (e.g. with acpi=noirq), due to
mpparse_parse_smp_config() overridden by x86_dtb_parse_smp_config()
Signed-off-by: Dmytro Maluka <dmaluka@...omium.org>
---
arch/x86/kernel/devicetree.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index 59d23cdf4ed0..dd8748c45529 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -2,6 +2,7 @@
/*
* Architecture specific OF callbacks.
*/
+#include <linux/acpi.h>
#include <linux/export.h>
#include <linux/io.h>
#include <linux/interrupt.h>
@@ -313,6 +314,6 @@ void __init x86_flattree_get_config(void)
if (initial_dtb)
early_memunmap(dt, map_len);
#endif
- if (of_have_populated_dt())
+ if (acpi_disabled && of_have_populated_dt())
x86_init.mpparse.parse_smp_cfg = x86_dtb_parse_smp_config;
}
--
2.47.1.613.gc27f4b7a9f-goog
Powered by blists - more mailing lists