From: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
To: Pierre Gondois <pierre.gondois@arm.com>
Cc: linux-kernel@vger.kernel.org,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, Tony Luck <tony.luck@intel.com>,
Borislav Petkov <bp@alien8.de>, Hanjun Guo <guohanjun@huawei.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Shuai Xue <xueshuai@linux.alibaba.com>,
Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>,
Pawel Chmielewski <pawel.chmielewski@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
Breno Leitao <leitao@debian.org>,
"Fabio M. De Francesco" <fabio.m.de.francesco@linux.intel.com>,
Terry Bowman <terry.bowman@amd.com>,
Dan Williams <djbw@kernel.org>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com>,
linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev
Subject: Re: [PATCH] ACPI: extlog: Report error severity using GHES bindings in MCE
Date: Mon, 30 Nov 2026 11:28:48 -0800 [thread overview]
Message-ID: <20261130112848.000035fa@oss.qualcomm.com> (raw)
In-Reply-To: <20261130172112.348520-1-pierre.gondois@arm.com>
On Mon, 30 Nov 2026 18:21:09 +0100
Pierre Gondois <pierre.gondois@arm.com> wrote:
> MCE extended logs report raw CPER severity values to
> log_non_standard_event(). GHES relies on the GHES bindings in
> ghes_do_proc(). The rasdaemon interprets the severity
> as a GHES_SEV_* value.
>
> Translate the CPER severity with ghes_severity() before reporting
> the event.
>
> Fixes: a2995f7dab51 ("ACPI: extlog: Trace CPER Non-standard Section Body")
> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
> ---
> drivers/acpi/acpi_extlog.c | 2 +-
> drivers/acpi/apei/ghes.c | 17 -----------------
> include/acpi/ghes.h | 17 +++++++++++++++++
> 3 files changed, 18 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
> index bf5f7b1a9aea..45efc10b51fb 100644
> --- a/drivers/acpi/acpi_extlog.c
> +++ b/drivers/acpi/acpi_extlog.c
> @@ -247,7 +247,7 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
> void *err = acpi_hest_get_payload(gdata);
>
> log_non_standard_event(sec_type, fru_id, fru_text,
> - gdata->error_severity, err,
> + ghes_severity(gdata->error_severity), err,
> gdata->error_data_length);
> }
> }
> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index 5d888c82efea..1d98368d9f78 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -321,23 +321,6 @@ static void ghes_fini(struct ghes *ghes)
> unmap_gen_v2(ghes);
> }
>
> -static inline int ghes_severity(int severity)
> -{
> - switch (severity) {
> - case CPER_SEV_INFORMATIONAL:
> - return GHES_SEV_NO;
> - case CPER_SEV_CORRECTED:
> - return GHES_SEV_CORRECTED;
> - case CPER_SEV_RECOVERABLE:
> - return GHES_SEV_RECOVERABLE;
> - case CPER_SEV_FATAL:
> - return GHES_SEV_PANIC;
> - default:
> - /* Unknown, go panic */
> - return GHES_SEV_PANIC;
> - }
> -}
> -
> static void ghes_copy_tofrom_phys(void *buffer, u64 paddr, u32 len,
> int from_phys,
> enum fixed_addresses fixmap_idx)
> diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h
> index 7acf209061ea..dec7eaf9f651 100644
> --- a/include/acpi/ghes.h
> +++ b/include/acpi/ghes.h
> @@ -54,6 +54,23 @@ enum {
> GHES_SEV_PANIC = 0x3,
> };
>
> +static inline int ghes_severity(int severity)
> +{
> + switch (severity) {
> + case CPER_SEV_INFORMATIONAL:
> + return GHES_SEV_NO;
> + case CPER_SEV_CORRECTED:
> + return GHES_SEV_CORRECTED;
> + case CPER_SEV_RECOVERABLE:
> + return GHES_SEV_RECOVERABLE;
> + case CPER_SEV_FATAL:
> + return GHES_SEV_PANIC;
> + default:
> + /* Unknown, go panic */
> + return GHES_SEV_PANIC;
> + }
> +}
> +
> #ifdef CONFIG_ACPI_APEI_GHES
> /**
> * ghes_register_vendor_record_notifier - register a notifier for vendor
next prev parent reply other threads:[~2026-11-30 19:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 17:21 [PATCH] ACPI: extlog: Report error severity using GHES bindings in MCE Pierre Gondois
2026-11-30 17:22 ` Pierre Gondois
2026-11-30 19:28 ` Jonathan Cameron [this message]
2026-12-01 17:56 ` Breno Leitao
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=20261130112848.000035fa@oss.qualcomm.com \
--to=jonathan.cameron@oss.qualcomm.com \
--cc=acpica-devel@lists.linux.dev \
--cc=bp@alien8.de \
--cc=dave.jiang@intel.com \
--cc=djbw@kernel.org \
--cc=fabio.m.de.francesco@linux.intel.com \
--cc=guohanjun@huawei.com \
--cc=leitao@debian.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.wieczor-retman@intel.com \
--cc=mchehab@kernel.org \
--cc=pawel.chmielewski@intel.com \
--cc=pierre.gondois@arm.com \
--cc=rafael@kernel.org \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=terry.bowman@amd.com \
--cc=tony.luck@intel.com \
--cc=xueshuai@linux.alibaba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.