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

* Re: Keep bootloader DTB when ACPI is enabled
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2025-01-24 15:03 UTC (permalink / raw)
  To: Stefan Wiehler
  Cc: Frank Rowand, Thomas Gleixner, devicetree, x86, linux-kernel

On Tue, Jan 21, 2025 at 2:18 AM Stefan Wiehler <stefan.wiehler@nokia.com> wrote:
>
> 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].

I think both of these issues are fixed by this series[1]. I intend to
pick up patch 2. Patch 1 can go thru x86 tree.

Rob

[1] https://lore.kernel.org/all/20250105172741.3476758-1-dmaluka@chromium.org

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

* Re: Keep bootloader DTB when ACPI is enabled
  2025-01-24 15:03 ` Rob Herring
@ 2025-01-24 15:17   ` Stefan Wiehler
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Wiehler @ 2025-01-24 15:17 UTC (permalink / raw)
  To: Rob Herring; +Cc: Frank Rowand, Thomas Gleixner, devicetree, x86, linux-kernel

> I think both of these issues are fixed by this series[1]. I intend to
> pick up patch 2. Patch 1 can go thru x86 tree.

Thanks, I was about to send a patch with almost the same diff, so we are on
the same page here.

Kind regards,

Stefan

> [1] https://lore.kernel.org/all/20250105172741.3476758-1-dmaluka@chromium.org

^ 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®