[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240829143811.GDZtCH07BFEdbbv9wx@fat_crate.local>
Date: Thu, 29 Aug 2024 16:38:11 +0200
From: Borislav Petkov <bp@...en8.de>
To: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Cc: Tony Luck <tony.luck@...el.com>,
Daniel Ferguson <danielf@...amperecomputing.com>,
Ard Biesheuvel <ardb@...nel.org>, James Morse <james.morse@....com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Len Brown <lenb@...nel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Shiju Jose <shiju.jose@...wei.com>,
Dan Williams <dan.j.williams@...el.com>,
Dave Jiang <dave.jiang@...el.com>, Ira Weiny <ira.weiny@...el.com>,
Shuai Xue <xueshuai@...ux.alibaba.com>,
Steven Rostedt <rostedt@...dmis.org>,
Tyler Baicar <tbaicar@...eaurora.org>,
Will Deacon <will@...nel.org>, Xie XiuQi <xiexiuqi@...wei.com>,
linux-acpi@...r.kernel.org, linux-edac@...r.kernel.org,
linux-efi@...r.kernel.org, linux-kernel@...r.kernel.org,
Shengwei Luo <luoshengwei@...wei.com>,
Jason Tian <jason@...amperecomputing.com>
Subject: Re: [PATCH v2 1/5] RAS: Report all ARM processor CPER information to
userspace
On Thu, Jul 11, 2024 at 08:28:52AM +0200, Mauro Carvalho Chehab wrote:
> In addition to those data, it also exports two fields that are
> parsed by the GHES driver when firmware reports it, e. g.:
>
> - error severity
> - cpu logical index
s/cpu/CPU/g
check your whole set pls.
> Report all of these information to userspace via trace uAPI, So that
> userspace can properly record the error and take decisions related
> to cpu core isolation according to error severity and other info.
>
> After this patch, all the data from ARM Processor record from table
Avoid having "This patch" or "This commit" in the commit message. It is
tautologically useless.
Also, do
$ git grep 'This patch' Documentation/process
for more details.
...
> [mchehab: modified patch description, solve merge conflicts and fix coding style]
> Fixes: e9279e83ad1f ("trace, ras: add ARM processor error trace event")
> Signed-off-by: Shengwei Luo <luoshengwei@...wei.com>
> Signed-off-by: Jason Tian <jason@...amperecomputing.com>
> Signed-off-by: Daniel Ferguson <danielf@...amperecomputing.com>
What is this SOB chain trying to tell me?
All those folks handled the patch?
> Tested-by: Shiju Jose <shiju.jose@...wei.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
> Cc: "Rafael J. Wysocki" <rafael@...nel.org>
> Link: https://uefi.org/specs/UEFI/2.10/Apx_N_Common_Platform_Error_Record.html#arm-processor-error-section
> ---
> drivers/acpi/apei/ghes.c | 11 ++++-----
> drivers/ras/ras.c | 45 +++++++++++++++++++++++++++++++++++--
> include/linux/ras.h | 16 +++++++++++---
> include/ras/ras_event.h | 48 +++++++++++++++++++++++++++++++++++-----
> 4 files changed, 103 insertions(+), 17 deletions(-)
...
> -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)
> {
> - trace_arm_event(err);
> + struct cper_arm_err_info *err_info;
> + struct cper_arm_ctx_info *ctx_info;
> + u8 *ven_err_data;
> + u32 ctx_len = 0;
> + int n, sz, cpu;
> + s32 vsei_len;
> + u32 pei_len;
> + u8 *pei_err;
> + u8 *ctx_err;
> +
> + pei_len = sizeof(struct cper_arm_err_info) * err->err_info_num;
> + pei_err = (u8 *)err + sizeof(struct cper_sec_proc_arm);
> +
> + err_info = (struct cper_arm_err_info *)(err + 1);
> + ctx_info = (struct cper_arm_ctx_info *)(err_info + err->err_info_num);
> + ctx_err = (u8 *)ctx_info;
> + for (n = 0; n < err->context_info_num; n++) {
> + sz = sizeof(struct cper_arm_ctx_info) + ctx_info->size;
> + ctx_info = (struct cper_arm_ctx_info *)((long)ctx_info + sz);
> + ctx_len += sz;
> + }
> +
> + vsei_len = err->section_length - (sizeof(struct cper_sec_proc_arm) +
> + pei_len + ctx_len);
> + if (vsei_len < 0) {
> + pr_warn(FW_BUG
> + "section length: %d\n", err->section_length);
> + pr_warn(FW_BUG
> + "section length is too small\n");
> + pr_warn(FW_BUG
> + "firmware-generated error record is incorrect\n");
No need to break those lines.
> + vsei_len = 0;
> + }
> + ven_err_data = (u8 *)ctx_info;
> +
> + cpu = GET_LOGICAL_INDEX(err->mpidr);
> + /* when return value is invalid, set cpu index to -1 */
Obvious comment - no need for it.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists