Skip to content
Snippets Groups Projects
Commit a274e5f5 authored by Dmytro Maluka's avatar Dmytro Maluka Committed by Tomasz Nowicki
Browse files

UPSTREAM: of/fdt: Restore possibility to use both ACPI and FDT from bootloader


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 7b937cc2 ("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: 7b937cc2 ("of: Create of_root if no dtb provided by firmware")
Signed-off-by: default avatarDmytro Maluka <dmaluka@chromium.org>
Link: https://lore.kernel.org/r/20250105172741.3476758-3-dmaluka@chromium.org


Signed-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
(cherry picked from commit 14bce187)
Bug: 378675550
Change-Id: Ib0342a18f61efbf5b6603073652e175035a405a9
parent d48566e8
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment