]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
arm64 / ACPI: clean the additional checks before calling ghes_notify_sea()
authorDongjiu Geng <gengdongjiu@huawei.com>
Tue, 7 Aug 2018 16:26:15 +0000 (12:26 -0400)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 9 Aug 2018 08:55:18 +0000 (10:55 +0200)
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>
arch/arm64/mm/fault.c
include/acpi/ghes.h

index b8eecc7b953135100ebc573e6f50c049aebd7d64..9ffe01d7042a0ace83fdfb271c961037aa8f9c88 100644 (file)
@@ -727,12 +727,7 @@ static const struct fault_info fault_info[] = {
 
 int handle_guest_sea(phys_addr_t addr, unsigned int esr)
 {
-       int ret = -ENOENT;
-
-       if (IS_ENABLED(CONFIG_ACPI_APEI_SEA))
-               ret = ghes_notify_sea();
-
-       return ret;
+       return ghes_notify_sea();
 }
 
 asmlinkage void __exception do_mem_abort(unsigned long addr, unsigned int esr,
index 1624e2be485c7012dbd39ffadf9520480a0cc5e8..82cb4eb225a4dfac0d129b4b0b565ea890e44046 100644 (file)
@@ -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; \
             section = acpi_hest_get_next(section))
 
+#ifdef CONFIG_ACPI_APEI_SEA
 int ghes_notify_sea(void);
+#else
+static inline int ghes_notify_sea(void) { return -ENOENT; }
+#endif
 
 #endif /* GHES_H */