Commit 1035a078 authored by Dongjiu Geng's avatar Dongjiu Geng Committed by Rafael J. Wysocki

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: default avatarDongjiu Geng <gengdongjiu@huawei.com>
Acked-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 1ffaddd0
...@@ -727,12 +727,7 @@ static const struct fault_info fault_info[] = { ...@@ -727,12 +727,7 @@ static const struct fault_info fault_info[] = {
int handle_guest_sea(phys_addr_t addr, unsigned int esr) int handle_guest_sea(phys_addr_t addr, unsigned int esr)
{ {
int ret = -ENOENT; return ghes_notify_sea();
if (IS_ENABLED(CONFIG_ACPI_APEI_SEA))
ret = ghes_notify_sea();
return ret;
} }
asmlinkage void __exception do_mem_abort(unsigned long addr, unsigned int esr, asmlinkage void __exception do_mem_abort(unsigned long addr, unsigned int esr,
......
...@@ -118,6 +118,10 @@ static inline void *acpi_hest_get_next(struct acpi_hest_generic_data *gdata) ...@@ -118,6 +118,10 @@ static inline void *acpi_hest_get_next(struct acpi_hest_generic_data *gdata)
(void *)section - (void *)(estatus + 1) < estatus->data_length; \ (void *)section - (void *)(estatus + 1) < estatus->data_length; \
section = acpi_hest_get_next(section)) section = acpi_hest_get_next(section))
#ifdef CONFIG_ACPI_APEI_SEA
int ghes_notify_sea(void); int ghes_notify_sea(void);
#else
static inline int ghes_notify_sea(void) { return -ENOENT; }
#endif
#endif /* GHES_H */ #endif /* GHES_H */
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