]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
ARM64 / ACPI: Don't unflatten device tree if acpi=force is passed
authorHanjun Guo <hanjun.guo@linaro.org>
Tue, 24 Mar 2015 14:02:56 +0000 (14:02 +0000)
committerWill Deacon <will.deacon@arm.com>
Thu, 26 Mar 2015 15:13:09 +0000 (15:13 +0000)
Since the policy is that once we pass acpi=force in the early
param, we will not unflatten device tree even if ACPI is disabled
in ACPI table init fails, so fix the code by comparinging both
acpi_disabled and param_acpi_force before the device tree is
unflattened.

CC: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/acpi.h
arch/arm64/kernel/acpi.c
arch/arm64/kernel/setup.c

index 59c05d8ea4a000fc9ae4d5cb47bff84ff9c4262f..e1a89656f17e039d7924fd1ca1bc926183afc7ac 100644 (file)
@@ -38,6 +38,7 @@ typedef u64 phys_cpuid_t;
 extern int acpi_disabled;
 extern int acpi_noirq;
 extern int acpi_pci_disabled;
+extern bool param_acpi_force;
 
 /* 1 to indicate PSCI 0.2+ is implemented */
 static inline bool acpi_psci_present(void)
@@ -91,6 +92,8 @@ void __init acpi_init_cpus(void);
 static inline bool acpi_psci_present(void) { return false; }
 static inline bool acpi_psci_use_hvc(void) { return false; }
 static inline void acpi_init_cpus(void) { }
+
+#define param_acpi_force false
 #endif /* CONFIG_ACPI */
 
 #endif /*_ASM_ACPI_H*/
index 5819ef7aa2c35e7084a0562d0ee3ff7221acbc47..fe9d8f0df4a3d6030281ee29a5a59f18b0fa5642 100644 (file)
@@ -43,7 +43,7 @@ static int enabled_cpus;
 static bool bootcpu_valid  __initdata;
 
 static bool param_acpi_off __initdata;
-static bool param_acpi_force __initdata;
+bool param_acpi_force __initdata;
 
 static int __init parse_acpi(char *arg)
 {
index b2783111fd52b1e213b1be43ec5c0742bf020921..d60b1adc75004f449fb5a406155f5a99ad63a475 100644 (file)
@@ -390,7 +390,7 @@ void __init setup_arch(char **cmdline_p)
 
        early_ioremap_reset();
 
-       if (acpi_disabled) {
+       if (acpi_disabled  && !param_acpi_force) {
                unflatten_device_tree();
                psci_dt_init();
                cpu_read_bootcpu_ops();