diff options
author | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2015-03-25 15:22:13 +0000 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-03-26 15:13:11 +0000 |
commit | fb094eb19900937322848beaf1a622c6afb6250b (patch) | |
tree | 102d75fcef8fa67090c2a84dacf67aee60a626ff /arch/arm64/kernel/acpi.c | |
parent | 54971e43b9d6cb37366d2da64cc5a2d8f8102bc4 (diff) | |
download | op-kernel-dev-fb094eb19900937322848beaf1a622c6afb6250b.zip op-kernel-dev-fb094eb19900937322848beaf1a622c6afb6250b.tar.gz |
ARM64: kernel: acpi: honour acpi=force command line parameter
If acpi=force is passed on the command line, it forces ACPI to be
the only available boot method, hence it must be left enabled even
if the initialization and sanity checks on ACPI tables fails.
This patch refactors ACPI initialization to prevent disabling ACPI
if acpi=force is passed on the command line.
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Hanjun Guo <hanjun.guo@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Hanjun Guo <hanjun.guo@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/acpi.c')
-rw-r--r-- | arch/arm64/kernel/acpi.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index 172b7c9..cd60329 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -43,7 +43,7 @@ static int enabled_cpus; static bool bootcpu_valid __initdata; static bool param_acpi_off __initdata; -bool param_acpi_force __initdata; +static bool param_acpi_force __initdata; static int __init parse_acpi(char *arg) { @@ -284,8 +284,13 @@ out: * We can parse ACPI boot-time tables such as MADT after * this function is called. * - * ACPI is enabled on return if ACPI tables initialized and sanity checks - * passed, disabled otherwise + * On return ACPI is enabled if either: + * + * - ACPI tables are initialized and sanity checks passed + * - acpi=force was passed in the command line and ACPI was not disabled + * explicitly through acpi=off command line parameter + * + * ACPI is disabled on function return otherwise */ void __init acpi_boot_table_init(void) { @@ -309,10 +314,13 @@ void __init acpi_boot_table_init(void) * If ACPI tables are initialized and FADT sanity checks passed, * leave ACPI enabled and carry on booting; otherwise disable ACPI * on initialization error. + * If acpi=force was passed on the command line it forces ACPI + * to be enabled even if its initialization failed. */ if (acpi_table_init() || acpi_fadt_sanity_check()) { pr_err("Failed to init ACPI tables\n"); - disable_acpi(); + if (!param_acpi_force) + disable_acpi(); } } |