GHES that supose to be handled by NMI is specific for x86 architecture, ARM does not have such interrupt. It needs be replaced by some equivalent.
Signed-off-by: Tomasz Nowicki tomasz.nowicki@linaro.org --- drivers/acpi/apei/ghes.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 0d83ac7..5d8c2f9 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -50,9 +50,13 @@ #include <linux/aer.h>
#include <acpi/ghes.h> +#ifdef CONFIG_X86 #include <asm/mce.h> +#endif #include <asm/tlbflush.h> +#ifdef CONFIG_X86 #include <asm/nmi.h> +#endif
#include "apei-internal.h"
@@ -87,7 +91,9 @@ bool ghes_disable; module_param_named(disable, ghes_disable, bool, 0);
+#ifdef CONFIG_X86 static int ghes_panic_timeout __read_mostly = 30; +#endif
/* * All error sources notified with SCI shares one notifier function, @@ -101,11 +107,13 @@ static LIST_HEAD(ghes_sci); static LIST_HEAD(ghes_nmi); static DEFINE_MUTEX(ghes_list_mutex);
+#ifdef CONFIG_X86 /* * NMI may be triggered on any CPU, so ghes_nmi_lock is used for * mutual exclusion. */ static DEFINE_RAW_SPINLOCK(ghes_nmi_lock); +#endif
/* * Because the memory area used to transfer hardware error information @@ -250,10 +258,12 @@ static int ghes_estatus_pool_expand(unsigned long len) return 0; }
+#ifdef CONFIG_X86 static void ghes_estatus_pool_shrink(unsigned long len) { ghes_estatus_pool_size_request -= PAGE_ALIGN(len); } +#endif
static struct ghes *ghes_new(struct acpi_hest_generic *generic) { @@ -749,6 +759,7 @@ static void ghes_proc_in_irq(struct irq_work *irq_work) } }
+#ifdef CONFIG_X86 static void ghes_print_queued_estatus(void) { struct llist_node *llnode; @@ -844,11 +855,13 @@ out: raw_spin_unlock(&ghes_nmi_lock); return ret; } +#endif
static struct notifier_block ghes_notifier_sci = { .notifier_call = ghes_notify_sci, };
+#ifdef CONFIG_X86 static unsigned long ghes_esource_prealloc_size( const struct acpi_hest_generic *generic) { @@ -863,12 +876,15 @@ static unsigned long ghes_esource_prealloc_size(
return prealloc_size; } +#endif
static int ghes_probe(struct platform_device *ghes_dev) { struct acpi_hest_generic *generic; struct ghes *ghes = NULL; +#ifdef CONFIG_X86 unsigned long len; +#endif int rc = -EINVAL;
generic = *(struct acpi_hest_generic **)ghes_dev->dev.platform_data; @@ -940,6 +956,7 @@ static int ghes_probe(struct platform_device *ghes_dev) mutex_unlock(&ghes_list_mutex); break; case ACPI_HEST_NOTIFY_NMI: +#ifdef CONFIG_X86 len = ghes_esource_prealloc_size(generic); ghes_estatus_pool_expand(len); mutex_lock(&ghes_list_mutex); @@ -948,6 +965,7 @@ static int ghes_probe(struct platform_device *ghes_dev) "ghes"); list_add_rcu(&ghes->list, &ghes_nmi); mutex_unlock(&ghes_list_mutex); +#endif break; default: BUG(); @@ -969,7 +987,9 @@ static int ghes_remove(struct platform_device *ghes_dev) { struct ghes *ghes; struct acpi_hest_generic *generic; +#ifdef CONFIG_X86 unsigned long len; +#endif
ghes = platform_get_drvdata(ghes_dev); generic = ghes->generic; @@ -990,6 +1010,7 @@ static int ghes_remove(struct platform_device *ghes_dev) mutex_unlock(&ghes_list_mutex); break; case ACPI_HEST_NOTIFY_NMI: +#ifdef CONFIG_X86 mutex_lock(&ghes_list_mutex); list_del_rcu(&ghes->list); if (list_empty(&ghes_nmi)) @@ -1002,6 +1023,7 @@ static int ghes_remove(struct platform_device *ghes_dev) synchronize_rcu(); len = ghes_esource_prealloc_size(generic); ghes_estatus_pool_shrink(len); +#endif break; default: BUG();