[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240226-b4-arm-ras-error-vendor-info-v4-rc3-v4-1-08e0f168fec1@os.amperecomputing.com>
Date: Mon, 26 Feb 2024 12:15:19 -0800
From: Daniel Ferguson <danielf@...amperecomputing.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>,
James Morse <james.morse@....com>, Tony Luck <tony.luck@...el.com>,
Borislav Petkov <bp@...en8.de>
Cc: linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-edac@...r.kernel.org,
Daniel Ferguson <danielf@...amperecomputing.com>
Subject: [PATCH v4 1/2] RAS: ACPI: APEI: add conditional compilation to ARM
specific error reporting routines.
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@...amperecomputing.com>
---
drivers/acpi/apei/ghes.c | 4 ++++
drivers/ras/ras.c | 2 ++
include/linux/ras.h | 4 ++++
3 files changed, 10 insertions(+)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index fe825a432c5b..5980f70ca0e4 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -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);
diff --git a/drivers/ras/ras.c b/drivers/ras/ras.c
index 95540ea8dd9d..355c0d78bd50 100644
--- a/drivers/ras/ras.c
+++ b/drivers/ras/ras.c
@@ -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)
{
diff --git a/include/linux/ras.h b/include/linux/ras.h
index 1f4048bf2674..bded04044d33 100644
--- a/include/linux/ras.h
+++ b/include/linux/ras.h
@@ -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__ */
--
2.43.0
Powered by blists - more mailing lists