diff options
author | Dongjiu Geng <gengdongjiu@huawei.com> | 2018-08-07 12:26:15 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-08-09 04:55:18 -0400 |
commit | 1035a0783523d8c730c44944a71b254f3a649e25 (patch) | |
tree | 3c140cfe4f68ccd26390a0fc662ab7277cd87d73 | |
parent | 1ffaddd029c867d134a1dde39f540dcc8c52e274 (diff) |
arm64 / ACPI: clean the additional checks before calling ghes_notify_sea()
In order to remove the additional check before calling the
ghes_notify_sea(), make stub definition when !CONFIG_ACPI_APEI_SEA.
After this cleanup, we can simply call the ghes_notify_sea() to let
APEI driver handle the SEA notification.
Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | arch/arm64/mm/fault.c | 7 | ||||
-rw-r--r-- | include/acpi/ghes.h | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index b8eecc7b9531..9ffe01d7042a 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c | |||
@@ -727,12 +727,7 @@ static const struct fault_info fault_info[] = { | |||
727 | 727 | ||
728 | int handle_guest_sea(phys_addr_t addr, unsigned int esr) | 728 | int handle_guest_sea(phys_addr_t addr, unsigned int esr) |
729 | { | 729 | { |
730 | int ret = -ENOENT; | 730 | return ghes_notify_sea(); |
731 | |||
732 | if (IS_ENABLED(CONFIG_ACPI_APEI_SEA)) | ||
733 | ret = ghes_notify_sea(); | ||
734 | |||
735 | return ret; | ||
736 | } | 731 | } |
737 | 732 | ||
738 | asmlinkage void __exception do_mem_abort(unsigned long addr, unsigned int esr, | 733 | asmlinkage void __exception do_mem_abort(unsigned long addr, unsigned int esr, |
diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h index 1624e2be485c..82cb4eb225a4 100644 --- a/include/acpi/ghes.h +++ b/include/acpi/ghes.h | |||
@@ -118,6 +118,10 @@ static inline void *acpi_hest_get_next(struct acpi_hest_generic_data *gdata) | |||
118 | (void *)section - (void *)(estatus + 1) < estatus->data_length; \ | 118 | (void *)section - (void *)(estatus + 1) < estatus->data_length; \ |
119 | section = acpi_hest_get_next(section)) | 119 | section = acpi_hest_get_next(section)) |
120 | 120 | ||
121 | #ifdef CONFIG_ACPI_APEI_SEA | ||
121 | int ghes_notify_sea(void); | 122 | int ghes_notify_sea(void); |
123 | #else | ||
124 | static inline int ghes_notify_sea(void) { return -ENOENT; } | ||
125 | #endif | ||
122 | 126 | ||
123 | #endif /* GHES_H */ | 127 | #endif /* GHES_H */ |