From: Daniel Ferguson <danielf@os.amperecomputing.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, James Morse <james.morse@arm.com>,
Tony Luck <tony.luck@intel.com>, Borislav Petkov <bp@alien8.de>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-edac@vger.kernel.org,
Daniel Ferguson <danielf@os.amperecomputing.com>
Subject: [PATCH v5 1/2] RAS: ACPI: APEI: add conditional compilation to ARM specific error reporting routines.
Date: Thu, 21 Mar 2024 15:55:53 -0700 [thread overview]
Message-ID: <20240321-b4-arm-ras-error-vendor-info-v5-rc3-v5-1-850f9bfb97a8@os.amperecomputing.com> (raw)
In-Reply-To: <20240321-b4-arm-ras-error-vendor-info-v5-rc3-v5-0-850f9bfb97a8@os.amperecomputing.com>
This prevents 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 | 5 ++++-
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 512067cac170..58014558b8e0 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -525,6 +525,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)
{
@@ -570,6 +571,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
@@ -704,9 +706,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 {
void *err = acpi_hest_get_payload(gdata);
diff --git a/drivers/ras/ras.c b/drivers/ras/ras.c
index a6e4792a1b2e..249dce21a738 100644
--- a/drivers/ras/ras.c
+++ b/drivers/ras/ras.c
@@ -52,10 +52,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 a64182bc72ad..811feb9d8160 100644
--- a/include/linux/ras.h
+++ b/include/linux/ras.h
@@ -24,17 +24,20 @@ 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
struct atl_err {
u64 addr;
--
2.43.0
next prev parent reply other threads:[~2024-03-21 22:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 22:55 [PATCH v5 0/2] Adds additional information to ARM RAS errors Daniel Ferguson
2024-03-21 22:55 ` Daniel Ferguson [this message]
2024-03-21 22:55 ` [PATCH v5 2/2] RAS: Report ARM processor information to userspace Daniel Ferguson
2024-04-26 11:45 ` Shiju Jose
2024-04-11 20:43 ` [PATCH v5 0/2] Adds additional information to ARM RAS errors Daniel Ferguson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240321-b4-arm-ras-error-vendor-info-v5-rc3-v5-1-850f9bfb97a8@os.amperecomputing.com \
--to=danielf@os.amperecomputing.com \
--cc=bp@alien8.de \
--cc=james.morse@arm.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).