Commit 6e7300cf authored by Bhupesh Sharma's avatar Bhupesh Sharma Committed by Ingo Molnar

efi/bgrt: Enable ACPI BGRT handling on arm64

Now that the ACPI BGRT handling code has been made generic, we can
enable it for arm64.
Signed-off-by: default avatarBhupesh Sharma <bhsharma@redhat.com>
[ Updated commit log to reflect that BGRT is only enabled for arm64, and added
  missing 'return' statement to the dummy acpi_parse_bgrt() function. ]
Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20170404160245.27812-8-ard.biesheuvel@linaro.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 75def552
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/acpi.h> #include <linux/acpi.h>
#include <linux/bootmem.h> #include <linux/bootmem.h>
#include <linux/cpumask.h> #include <linux/cpumask.h>
#include <linux/efi-bgrt.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
...@@ -233,6 +234,8 @@ void __init acpi_boot_table_init(void) ...@@ -233,6 +234,8 @@ void __init acpi_boot_table_init(void)
early_init_dt_scan_chosen_stdout(); early_init_dt_scan_chosen_stdout();
} else { } else {
parse_spcr(earlycon_init_is_deferred); parse_spcr(earlycon_init_is_deferred);
if (IS_ENABLED(CONFIG_ACPI_BGRT))
acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt);
} }
} }
......
...@@ -1564,12 +1564,6 @@ int __init early_acpi_boot_init(void) ...@@ -1564,12 +1564,6 @@ int __init early_acpi_boot_init(void)
return 0; return 0;
} }
static int __init acpi_parse_bgrt(struct acpi_table_header *table)
{
efi_bgrt_init(table);
return 0;
}
int __init acpi_boot_init(void) int __init acpi_boot_init(void)
{ {
/* those are executed after early-quirks are executed */ /* those are executed after early-quirks are executed */
......
...@@ -440,7 +440,7 @@ config ACPI_CUSTOM_METHOD ...@@ -440,7 +440,7 @@ config ACPI_CUSTOM_METHOD
config ACPI_BGRT config ACPI_BGRT
bool "Boottime Graphics Resource Table support" bool "Boottime Graphics Resource Table support"
depends on EFI && X86 depends on EFI && (X86 || ARM64)
help help
This driver adds support for exposing the ACPI Boottime Graphics This driver adds support for exposing the ACPI Boottime Graphics
Resource Table, which allows the operating system to obtain Resource Table, which allows the operating system to obtain
......
...@@ -81,6 +81,12 @@ static struct attribute_group bgrt_attribute_group = { ...@@ -81,6 +81,12 @@ static struct attribute_group bgrt_attribute_group = {
.bin_attrs = bgrt_bin_attributes, .bin_attrs = bgrt_bin_attributes,
}; };
int __init acpi_parse_bgrt(struct acpi_table_header *table)
{
efi_bgrt_init(table);
return 0;
}
static int __init bgrt_init(void) static int __init bgrt_init(void)
{ {
int ret; int ret;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#ifdef CONFIG_ACPI_BGRT #ifdef CONFIG_ACPI_BGRT
void efi_bgrt_init(struct acpi_table_header *table); void efi_bgrt_init(struct acpi_table_header *table);
int __init acpi_parse_bgrt(struct acpi_table_header *table);
/* The BGRT data itself; only valid if bgrt_image != NULL. */ /* The BGRT data itself; only valid if bgrt_image != NULL. */
extern size_t bgrt_image_size; extern size_t bgrt_image_size;
...@@ -14,6 +15,10 @@ extern struct acpi_table_bgrt bgrt_tab; ...@@ -14,6 +15,10 @@ extern struct acpi_table_bgrt bgrt_tab;
#else /* !CONFIG_ACPI_BGRT */ #else /* !CONFIG_ACPI_BGRT */
static inline void efi_bgrt_init(struct acpi_table_header *table) {} static inline void efi_bgrt_init(struct acpi_table_header *table) {}
static inline int __init acpi_parse_bgrt(struct acpi_table_header *table)
{
return 0;
}
#endif /* !CONFIG_ACPI_BGRT */ #endif /* !CONFIG_ACPI_BGRT */
......
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