]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
arm64: kernel: remove non-legit DT warnings when booting using ACPI
authorSudeep Holla <sudeep.holla@arm.com>
Thu, 23 Jul 2015 17:28:26 +0000 (18:28 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 27 Jul 2015 10:08:41 +0000 (11:08 +0100)
Since both CONFIG_ACPI and CONFIG_OF are enabled when booting using ACPI
tables on ARM64 platforms, we get few device tree warnings which are not
valid for ACPI boot. We can use of_have_populated_dt to check if the
device tree is populated or not before throwing out those errors.

This patch uses of_have_populated_dt to remove non legitimate device
tree warning when booting using ACPI tables.

Cc: Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/setup.c
arch/arm64/kernel/topology.c

index cf609cf3fcb515f30b3df6dc6e23cd97e40fd595..e7a1e719f1272efe16c0a8b16defc1385759c77b 100644 (file)
@@ -423,8 +423,13 @@ void __init setup_arch(char **cmdline_p)
 
 static int __init arm64_device_init(void)
 {
-       of_iommu_init();
-       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+       if (of_have_populated_dt()) {
+               of_iommu_init();
+               of_platform_populate(NULL, of_default_bus_match_table,
+                                    NULL, NULL);
+       } else if (acpi_disabled) {
+               pr_crit("Device tree not populated\n");
+       }
        return 0;
 }
 arch_initcall_sync(arm64_device_init);
index fcb8f7b42271c81b970732bd5bda9b50e5b89b1d..694f6deedbab89509c26d9c9d05d8e6911cf0fbd 100644 (file)
@@ -300,6 +300,6 @@ void __init init_cpu_topology(void)
         * Discard anything that was parsed if we hit an error so we
         * don't use partial information.
         */
-       if (parse_dt_topology())
+       if (of_have_populated_dt() && parse_dt_topology())
                reset_cpu_topology();
 }