]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM64 / ACPI: Select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on ARM64
authorAl Stone <al.stone@linaro.org>
Tue, 24 Mar 2015 14:02:51 +0000 (14:02 +0000)
committerWill Deacon <will.deacon@arm.com>
Thu, 26 Mar 2015 15:13:08 +0000 (15:13 +0000)
ACPI reduced hardware mode is disabled by default, but ARM64
can only run properly in ACPI hardware reduced mode, so select
ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on ARM64.

If the firmware is not using hardware reduced ACPI mode, we
will disable ACPI to avoid nightmare such as accessing some
registers which are not available on ARM64.

CC: Catalin Marinas <catalin.marinas@arm.com>
CC: Will Deacon <will.deacon@arm.com>
Reviewed-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Tested-by: Yijing Wang <wangyijing@huawei.com>
Tested-by: Mark Langsdorf <mlangsdo@redhat.com>
Tested-by: Jon Masters <jcm@redhat.com>
Tested-by: Timur Tabi <timur@codeaurora.org>
Tested-by: Robert Richter <rrichter@cavium.com>
Acked-by: Robert Richter <rrichter@cavium.com>
Signed-off-by: Al Stone <al.stone@linaro.org>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/Kconfig
arch/arm64/kernel/acpi.c

index 1b8e97331ffbdba1e8a6c6307ab76d3bc2f73028..d00ab9a71d595c20e366b91ef2f8710927e430d0 100644 (file)
@@ -1,5 +1,6 @@
 config ARM64
        def_bool y
+       select ACPI_REDUCED_HARDWARE_ONLY if ACPI
        select ARCH_BINFMT_ELF_RANDOMIZE_PIE
        select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
        select ARCH_HAS_GCOV_PROFILE_ALL
index 6468f88985305bfe1e10b14a27483c0980b14bf9..5819ef7aa2c35e7084a0562d0ee3ff7221acbc47 100644 (file)
@@ -303,6 +303,11 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
         */
        if (table->revision > 5 ||
            (table->revision == 5 && fadt->minor_revision >= 1)) {
+               if (!acpi_gbl_reduced_hardware) {
+                       pr_err("Not hardware reduced ACPI mode, will not be supported\n");
+                       goto disable_acpi;
+               }
+
                /*
                 * ACPI 5.1 only has two explicit methods to boot up SMP,
                 * PSCI and Parking protocol, but the Parking protocol is
@@ -319,8 +324,9 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
 
        pr_warn("Unsupported FADT revision %d.%d, should be 5.1+, will disable ACPI\n",
                table->revision, fadt->minor_revision);
-       disable_acpi();
 
+disable_acpi:
+       disable_acpi();
        return -EINVAL;
 }