Keep bootloader DTB when ACPI is enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux