RAS: Report ARM processor information to userspace
Subsystems (4)
v3 cover RAS: Report ARM processor information to userspace
The original patch remain unmodified. This is merely a resubmission of the patch to get it moving forward again.
Links:
https://lore.kernel.org/lkml/[email protected]/T/
Shengwei Luo (1):
RAS: Report ARM processor information to userspace
drivers/acpi/apei/ghes.c | 3 +-- drivers/ras/ras.c | 46 ++++++++++++++++++++++++++++++++++++-- include/linux/ras.h | 15 +++++++++++-- include/ras/ras_event.h | 48 +++++++++++++++++++++++++++++++++++----- 4 files changed, 101 insertions(+), 11 deletions(-)
Signature · 1 line
2.43.0
PATCH RESEND v3 1/1 RAS: Report ARM processor information to userspace
From: Shengwei Luo <[email protected]>
The original arm_event trace code only traces out ARM processor error information data. It's not enough for user to take appropriate action.
According to UEFI_2_9 specification chapter N2.4.4, the ARM processor error section includes several ARM processor error information, several ARM processor context information and several vendor specific error information structures. In addition to these info, there are error severity and cpu logical index about the event. Report all of these information to userspace via perf i/f. So that the user can do cpu core isolation according to error severity and other info.
--- drivers/acpi/apei/ghes.c | 3 +-- drivers/ras/ras.c | 46 ++++++++++++++++++++++++++++++++++++-- include/linux/ras.h | 15 +++++++++++-- include/ras/ras_event.h | 48 +++++++++++++++++++++++++++++++++++----- 4 files changed, 101 insertions(+), 11 deletions(-)
drivers/acpi/apei/ghes.c +1 -2
@@ -504,9 +504,8 @@ static bool ghes_handle_arm_hw_error(struct acpi_hest_generic_data *gdata, int sint sec_sev, i;char *p; -log_arm_hw_error (err); - sec_sev =ghes_severity (gdata->error_severity); +log_arm_hw_error (err, sec_sev);if (sev !=GHES_SEV_RECOVERABLE || sec_sev !=GHES_SEV_RECOVERABLE )return false;
drivers/ras/ras.c +44 -2
53 lines not on this page · raw message
include/linux/ras.h +13 -2
@@ -24,7 +24,7 @@ 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); -void log_arm_hw_error (struct cper_sec_proc_arm *err); +void log_arm_hw_error (struct cper_sec_proc_arm *err,const u8 sev);#else static inline void log_non_standard_event(const guid_t *sec_type,
@@ -32,7 +32,18 @@ log_non_standard_event(const guid_t *sec_type, const u8 sev, const u8 *err, const u32 len) { return; }static inline void -log_arm_hw_error (struct cper_sec_proc_arm *err) {return ; } +log_arm_hw_error (struct cper_sec_proc_arm *err,const u8 sev) {return ; }#endif +#if defined(CONFIG_ARM ) || defined(CONFIG_ARM64 ) +#include <asm/smp_plat.h> +/* +* Include ARM specific SMP header which provides a function mapping mpidr to +* cpu logical index. +*/ +#define GET_LOGICAL_INDEX (mpidr) get_logical_index(mpidr & MPIDR_HWID_BITMASK) +#else +#define GET_LOGICAL_INDEX (mpidr) -EINVAL +#endif /* CONFIG_ARM || CONFIG_ARM64 */ +#endif /* __RAS_H__ */
include/ras/ras_event.h +43 -5
72 lines not on this page · raw message
Signature · 1 line
2.43.0
Luck, Tony
maintainerQuoted 11 lines
drivers/acpi/apei/ghes.c | 3 +-- drivers/ras/ras.c | 46 ++++++++++++++++++++++++++++++++++++-- include/linux/ras.h | 15 +++++++++++-- include/ras/ras_event.h | 48 +++++++++++++++++++++++++++++++++++----- 4 files changed, 101 insertions(+), 11 deletions(-)drivers/ras/ras.c +0
-0
drivers/ras/ras.c void log_non_standard_event(const guid_t *sec_type, const guid_t *fru_id, · line 25
Quoted 6 lines
drivers/ras/ras.c +1
-1@@ -21,9 +21,51 @@ 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); } -void log_arm_hw_error (struct cper_sec_proc_arm *err) +void log_arm_hw_error (struct cper_sec_proc_arm *err,const u8 sev) {
What GIT tree is this patch based on? I don't see this log_arm_hw_error() function in drivers/ras/ras.c upstream, or in intel-next.
Should ARM specific code like this be in a file with "arm" in its name? Or at least be inside some #ifdef CONFIG_ARM.
-Tony
Luck, Tony
maintainerQuoted 2 lines
What GIT tree is this patch based on? I don't see this
log_arm_hw_error()function indrivers/ras/ras.cupstream, or in intel-next.
Thirty seconds after hitting SEND, I see I was looking at the wrong GIT tree. This code is based on upstream. Ooops.
Quoted 2 lines
Should ARM specific code like this be in a file with "arm" in its name? Or at least be inside some #ifdef
CONFIG_ARM.
But I stand by this part.
-Tony