diff options
author | Prarit Bhargava <prarit@redhat.com> | 2018-01-18 10:09:51 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-02-07 11:39:58 +0100 |
commit | 0231d00082f61cfe03f2b7c27e5356f8cdf0312c (patch) | |
tree | 24f036cb972640ccdeed395a55d1c37571fcb3db /include | |
parent | 890674343bb2d546825f713542b1e199f0728732 (diff) | |
download | linux-stable-0231d00082f61cfe03f2b7c27e5356f8cdf0312c.tar.gz linux-stable-0231d00082f61cfe03f2b7c27e5356f8cdf0312c.tar.bz2 linux-stable-0231d00082f61cfe03f2b7c27e5356f8cdf0312c.zip |
ACPI: SPCR: Make SPCR available to x86
SPCR is currently only enabled or ARM64 and x86 can use SPCR to setup
an early console.
General fixes include updating Documentation & Kconfig (for x86),
updating comments, and changing parse_spcr() to acpi_parse_spcr(),
and earlycon_init_is_deferred to earlycon_acpi_spcr_enable to be
more descriptive.
On x86, many systems have a valid SPCR table but the table version is
not 2 so the table version check must be a warning.
On ARM64 when the kernel parameter earlycon is used both the early console
and console are enabled. On x86, only the earlycon should be enabled by
by default. Modify acpi_parse_spcr() to allow options for initializing
the early console and console separately.
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Mark Salter <msalter@redhat.com>
Tested-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/acpi.h | 7 | ||||
-rw-r--r-- | include/linux/serial_core.h | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index b8f4c3c776e5..e6b98a32495f 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1249,9 +1249,12 @@ static inline bool acpi_has_watchdog(void) { return false; } #ifdef CONFIG_ACPI_SPCR_TABLE extern bool qdf2400_e44_present; -int parse_spcr(bool earlycon); +int acpi_parse_spcr(bool enable_earlycon, bool enable_console); #else -static inline int parse_spcr(bool earlycon) { return 0; } +static inline int acpi_parse_spcr(bool enable_earlycon, bool enable_console) +{ + return 0; +} #endif #if IS_ENABLED(CONFIG_ACPI_GENERIC_GSI) diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 37b044e78333..aefd0e5115da 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -376,10 +376,10 @@ extern int of_setup_earlycon(const struct earlycon_id *match, const char *options); #ifdef CONFIG_SERIAL_EARLYCON -extern bool earlycon_init_is_deferred __initdata; +extern bool earlycon_acpi_spcr_enable __initdata; int setup_earlycon(char *buf); #else -static const bool earlycon_init_is_deferred; +static const bool earlycon_acpi_spcr_enable; static inline int setup_earlycon(char *buf) { return 0; } #endif |