mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Keep bootloader DTB when ACPI is enabled
@ 2025-01-21  8:18 Stefan Wiehler
  2025-01-24 15:03 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Wiehler @ 2025-01-21  8:18 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand, Thomas Gleixner; +Cc: devicetree, x86, linux-kernel

Hi all,

We store various metadata (e.g. IDs and serial numbers) in the DT which must be
consistent over multiple product generations; therefore we enable CONFIG_OF
even when ACPI is used for boot. On such ACPI-based (i.e. x86) boards, ACPI is
used for boot while the DT holds only product-specific nodes not of any
interest to the core kernel. While this is currently not an issue on our 6.1
kernel, I noticed that commit 7b937cc243e5 ("of: Create of_root if no dtb
provided by firmware") drops the bootloader provided DTB if ACPI is not
disabled [1]. When one removes this check, several warnings are emitted because
register_lapic_address() and topology_register_boot_apic() are called from both
ACPI and DT initialization [2] [3].

As we need to maintain above use case for the foreseeable future, we would like
to introduce an alternate mode that keeps the bootloader provided DTB even if
ACPI is enabled, via e.g. a new command line parameter "acpi_keep_dtb".
Regarding above warnings, ACPI initialization should take precedence and we
would simply skip the following initialization from DT code if the
"acpi_keep_dtb" command line parameter is present.

Please provide feedback if you would accept such a solution before I start to
implement something.

Kind regards,

Stefan

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/of/fdt.c?id=ffd294d346d185b70e28b1a28abe367bbfe53c04#n1219
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/kernel/apic/apic.c?id=ffd294d346d185b70e28b1a28abe367bbfe53c04#n2083
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/kernel/cpu/topology.c?id=ffd294d346d185b70e28b1a28abe367bbfe53c04#n305

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-24 15:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-21  8:18 Keep bootloader DTB when ACPI is enabled Stefan Wiehler
2025-01-24 15:03 ` Rob Herring
2025-01-24 15:17   ` Stefan Wiehler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®