Commit 6aa2fdcd authored by Aleksey Makarov's avatar Aleksey Makarov Committed by Kleber Sacilotto de Souza

ARM64: ACPI: enable ACPI_SPCR_TABLE

BugLink: https://bugs.launchpad.net/bugs/1744754

SBBR mentions SPCR as a mandatory ACPI table.  So enable it for ARM64

Earlycon should be set up as early as possible.  ACPI boot tables are
mapped in arch/arm64/kernel/acpi.c:acpi_boot_table_init() that
is called from setup_arch() and that's where we parse SPCR.
So it has to be opted-in per-arch.

When ACPI_SPCR_TABLE is defined initialization of DT earlycon is
deferred until the DT/ACPI decision is done.  Initialize DT earlycon
if ACPI is disabled.
Acked-by: default avatarWill Deacon <will.deacon@arm.com>
Acked-by: default avatarHanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: default avatarAleksey Makarov <aleksey.makarov@linaro.org>
Tested-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Tested-by: default avatarChristopher Covington <cov@codeaurora.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(backported from commit 888125a7)
[ dannf: resolved conflict caused by v4.4 not yet having acpi=on support;
  trivial offset fix in Kconfig ]
Signed-off-by: default avatardann frazier <dann.frazier@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent a8743f18
...@@ -3,6 +3,7 @@ config ARM64 ...@@ -3,6 +3,7 @@ config ARM64
select ACPI_CCA_REQUIRED if ACPI select ACPI_CCA_REQUIRED if ACPI
select ACPI_GENERIC_GSI if ACPI select ACPI_GENERIC_GSI if ACPI
select ACPI_REDUCED_HARDWARE_ONLY if ACPI select ACPI_REDUCED_HARDWARE_ONLY if ACPI
select ACPI_SPCR_TABLE if ACPI
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
select ARCH_HAS_ELF_RANDOMIZE select ARCH_HAS_ELF_RANDOMIZE
select ARCH_HAS_GCOV_PROFILE_ALL select ARCH_HAS_GCOV_PROFILE_ALL
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/memblock.h> #include <linux/memblock.h>
#include <linux/of_fdt.h> #include <linux/of_fdt.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/serial_core.h>
#include <asm/cputype.h> #include <asm/cputype.h>
#include <asm/cpu_ops.h> #include <asm/cpu_ops.h>
...@@ -189,7 +190,7 @@ void __init acpi_boot_table_init(void) ...@@ -189,7 +190,7 @@ void __init acpi_boot_table_init(void)
*/ */
if (param_acpi_off || if (param_acpi_off ||
(!param_acpi_force && of_scan_flat_dt(dt_scan_depth1_nodes, NULL))) (!param_acpi_force && of_scan_flat_dt(dt_scan_depth1_nodes, NULL)))
return; goto done;
/* /*
* ACPI is disabled at this point. Enable it in order to parse * ACPI is disabled at this point. Enable it in order to parse
...@@ -209,6 +210,14 @@ void __init acpi_boot_table_init(void) ...@@ -209,6 +210,14 @@ void __init acpi_boot_table_init(void)
if (!param_acpi_force) if (!param_acpi_force)
disable_acpi(); disable_acpi();
} }
done:
if (acpi_disabled) {
if (earlycon_init_is_deferred)
early_init_dt_scan_chosen_stdout();
} else {
parse_spcr(earlycon_init_is_deferred);
}
} }
#ifdef CONFIG_ACPI_APEI #ifdef CONFIG_ACPI_APEI
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment