This is a note to let you know that I've just added the patch titled of/fdt: Restore possibility to use both ACPI and FDT from bootloader to the 6.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: of-fdt-restore-possibility-to-use-both-acpi-and-fdt-.patch and it can be found in the queue-6.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 232ce0542cbcb7030414373b65f273cc2f7c5410 Author: Dmytro Maluka <dmaluka@xxxxxxxxxxxx> Date: Sun Jan 5 17:27:41 2025 +0000 of/fdt: Restore possibility to use both ACPI and FDT from bootloader [ Upstream commit 14bce187d1600710623d81888da3501bbc470ba2 ] There are cases when the bootloader provides information to the kernel in both ACPI and DTB, not interchangeably. One such use case is virtual machines in Android. When running on x86, the Android Virtualization Framework (AVF) boots VMs with ACPI like it is usually done on x86 (i.e. the virtual LAPIC, IOAPIC, HPET, PCI MMCONFIG etc are described in ACPI) but also passes various AVF-specific boot parameters in DTB. This allows reusing the same implementations of various AVF components on both arm64 and x86. Commit 7b937cc243e5 ("of: Create of_root if no dtb provided by firmware") removed the possibility to do that, since among other things it introduced forcing emptying the bootloader-provided DTB if ACPI is enabled (probably assuming that if ACPI is available, a DTB can only be useful for applying overlays to it afterwards, for testing purposes). So restore this possibility. Instead of completely preventing using ACPI and DT together, rely on arch-specific setup code to prevent using both to set up the same things (see various acpi_disabled checks under arch/). Fixes: 7b937cc243e5 ("of: Create of_root if no dtb provided by firmware") Signed-off-by: Dmytro Maluka <dmaluka@xxxxxxxxxxxx> Link: https://lore.kernel.org/r/20250105172741.3476758-3-dmaluka@xxxxxxxxxxxx Signed-off-by: Rob Herring (Arm) <robh@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index d3ecf2bdd2023..8c80f4dc8b3fa 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -8,7 +8,6 @@ #define pr_fmt(fmt) "OF: fdt: " fmt -#include <linux/acpi.h> #include <linux/crash_dump.h> #include <linux/crc32.h> #include <linux/kernel.h> @@ -1215,14 +1214,7 @@ void __init unflatten_device_tree(void) /* Save the statically-placed regions in the reserved_mem array */ fdt_scan_reserved_mem_reg_nodes(); - /* Don't use the bootloader provided DTB if ACPI is enabled */ - if (!acpi_disabled) - fdt = NULL; - - /* - * Populate an empty root node when ACPI is enabled or bootloader - * doesn't provide one. - */ + /* Populate an empty root node when bootloader doesn't provide one */ if (!fdt) { fdt = (void *) __dtb_empty_root_begin; /* fdt_totalsize() will be used for copy size */