[PATCH 0/2] of, x86: Restore possibility to use both ACPI and FDT from bootloader

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

 



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. (Note that on arm64 AVF uses DT only, no ACPI.)

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. At the same time, since on x86 the
aforementioned recently introduced restriction is actually useful for
preventing conflicts between ACPI and DT for LAPIC/IOAPIC/HPET setup,
don't remove this restriction completely but relax it: unflatten the
bootloader supplied DTB but don't try to use it for SMP setup.

Note that on arm64 currently ACPI and DT are not used together in any
case (setup_arch() enforces that), and this series doesn't change that.

v1 -> v2:
Split the patch into two, to separate the x86 part from the common part.

Dmytro Maluka (2):
  x86/of: Don't use DTB for SMP setup if ACPI is enabled
  of/fdt: Restore possibility to use both ACPI and FDT from bootloader

 arch/x86/kernel/devicetree.c |  3 ++-
 drivers/of/fdt.c             | 10 +---------
 2 files changed, 3 insertions(+), 10 deletions(-)

-- 
2.47.1.613.gc27f4b7a9f-goog





[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