diff options
author | Hanjun Guo <hanjun.guo@linaro.org> | 2015-03-24 10:02:56 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-03-26 11:13:09 -0400 |
commit | 33757ded074918eb49243968a82e7c9ec2d71720 (patch) | |
tree | 112668694f569b3123ea069877883bd89aec2398 /arch/arm64 | |
parent | 735f00bdf23c427af0f54a9e672a93b5d3723f60 (diff) |
ARM64 / ACPI: Don't unflatten device tree if acpi=force is passed
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>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/include/asm/acpi.h | 3 | ||||
-rw-r--r-- | arch/arm64/kernel/acpi.c | 2 | ||||
-rw-r--r-- | arch/arm64/kernel/setup.c | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h index 59c05d8ea4a0..e1a89656f17e 100644 --- a/arch/arm64/include/asm/acpi.h +++ b/arch/arm64/include/asm/acpi.h | |||
@@ -38,6 +38,7 @@ typedef u64 phys_cpuid_t; | |||
38 | extern int acpi_disabled; | 38 | extern int acpi_disabled; |
39 | extern int acpi_noirq; | 39 | extern int acpi_noirq; |
40 | extern int acpi_pci_disabled; | 40 | extern int acpi_pci_disabled; |
41 | extern bool param_acpi_force; | ||
41 | 42 | ||
42 | /* 1 to indicate PSCI 0.2+ is implemented */ | 43 | /* 1 to indicate PSCI 0.2+ is implemented */ |
43 | static inline bool acpi_psci_present(void) | 44 | static inline bool acpi_psci_present(void) |
@@ -91,6 +92,8 @@ void __init acpi_init_cpus(void); | |||
91 | static inline bool acpi_psci_present(void) { return false; } | 92 | static inline bool acpi_psci_present(void) { return false; } |
92 | static inline bool acpi_psci_use_hvc(void) { return false; } | 93 | static inline bool acpi_psci_use_hvc(void) { return false; } |
93 | static inline void acpi_init_cpus(void) { } | 94 | static inline void acpi_init_cpus(void) { } |
95 | |||
96 | #define param_acpi_force false | ||
94 | #endif /* CONFIG_ACPI */ | 97 | #endif /* CONFIG_ACPI */ |
95 | 98 | ||
96 | #endif /*_ASM_ACPI_H*/ | 99 | #endif /*_ASM_ACPI_H*/ |
diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index 5819ef7aa2c3..fe9d8f0df4a3 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c | |||
@@ -43,7 +43,7 @@ static int enabled_cpus; | |||
43 | static bool bootcpu_valid __initdata; | 43 | static bool bootcpu_valid __initdata; |
44 | 44 | ||
45 | static bool param_acpi_off __initdata; | 45 | static bool param_acpi_off __initdata; |
46 | static bool param_acpi_force __initdata; | 46 | bool param_acpi_force __initdata; |
47 | 47 | ||
48 | static int __init parse_acpi(char *arg) | 48 | static int __init parse_acpi(char *arg) |
49 | { | 49 | { |
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index b2783111fd52..d60b1adc7500 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c | |||
@@ -390,7 +390,7 @@ void __init setup_arch(char **cmdline_p) | |||
390 | 390 | ||
391 | early_ioremap_reset(); | 391 | early_ioremap_reset(); |
392 | 392 | ||
393 | if (acpi_disabled) { | 393 | if (acpi_disabled && !param_acpi_force) { |
394 | unflatten_device_tree(); | 394 | unflatten_device_tree(); |
395 | psci_dt_init(); | 395 | psci_dt_init(); |
396 | cpu_read_bootcpu_ops(); | 396 | cpu_read_bootcpu_ops(); |