@@ -526,6 +526,7 @@ static bool ghes_handle_memory_failure(struct acpi_hest_generic_data *gdata,
return false;
}
+#if defined(CONFIG_ARM) || defined (CONFIG_ARM64)
static bool ghes_handle_arm_hw_error(struct acpi_hest_generic_data *gdata,
int sev, bool sync)
{
@@ -571,6 +572,7 @@ static bool ghes_handle_arm_hw_error(struct acpi_hest_generic_data *gdata,
return queued;
}
+#endif
/*
* PCIe AER errors need to be sent to the AER driver for reporting and
@@ -751,9 +753,11 @@ static bool ghes_do_proc(struct ghes *ghes,
}
else if (guid_equal(sec_type, &CPER_SEC_PCIE)) {
ghes_handle_aer(gdata);
+#if defined(CONFIG_ARM) || defined (CONFIG_ARM64)
}
else if (guid_equal(sec_type, &CPER_SEC_PROC_ARM)) {
queued = ghes_handle_arm_hw_error(gdata, sev, sync);
+#endif
} else if (guid_equal(sec_type, &CPER_SEC_CXL_GEN_MEDIA_GUID)) {
struct cxl_cper_event_rec *rec =
acpi_hest_get_payload(gdata);
@@ -21,10 +21,12 @@ void log_non_standard_event(const guid_t *sec_type, const guid_t *fru_id,
trace_non_standard_event(sec_type, fru_id, fru_text, sev, err, len);
}
+#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
void log_arm_hw_error(struct cper_sec_proc_arm *err)
{
trace_arm_event(err);
}
+#endif
static int __init ras_init(void)
{
@@ -24,15 +24,19 @@ int __init parse_cec_param(char *str);
void log_non_standard_event(const guid_t *sec_type,
const guid_t *fru_id, const char *fru_text,
const u8 sev, const u8 *err, const u32 len);
+#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
void log_arm_hw_error(struct cper_sec_proc_arm *err);
+#endif
#else
static inline void
log_non_standard_event(const guid_t *sec_type,
const guid_t *fru_id, const char *fru_text,
const u8 sev, const u8 *err, const u32 len)
{ return; }
+#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
static inline void
log_arm_hw_error(struct cper_sec_proc_arm *err) { return; }
#endif
+#endif
#endif /* __RAS_H__ */
Conditional compilation directives were added in some places to prevent the unnecessary inclusion of ARM specific RAS error handling routines in non-ARM platforms. Signed-off-by: Daniel Ferguson <danielf@os.amperecomputing.com> --- drivers/acpi/apei/ghes.c | 4 ++++ drivers/ras/ras.c | 2 ++ include/linux/ras.h | 4 ++++ 3 files changed, 10 insertions(+)