From: Breno Leitao <leitao@debian.org>
To: Pierre Gondois <pierre.gondois@arm.com>
Cc: linux-kernel@vger.kernel.org, James Morse <james.morse@arm.com>,
Mark Brown <broonie@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>,
Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>,
Dave Jiang <dave.jiang@intel.com>,
"Fabio M. De Francesco" <fabio.m.de.francesco@linux.intel.com>,
Terry Bowman <terry.bowman@amd.com>,
Dan Williams <djbw@kernel.org>, Ard Biesheuvel <ardb@kernel.org>,
Morduan Zang <zhangdandan@uniontech.com>,
linux-acpi@vger.kernel.org, linux-edac@vger.kernel.org,
acpica-devel@lists.linux.dev
Subject: Re: [PATCH v2 5/6] ACPI: APEI: add separate Memory Error Section 2 handlers
Date: Tue, 3 Nov 2026 05:31:57 -0800 [thread overview]
Message-ID: <auniCTG2pbFkGLXT@gmail.com> (raw)
In-Reply-To: <20261019203915.2019037-6-pierre.gondois@arm.com>
On Mon, Oct 19, 2026 at 10:38:44PM +0200, Pierre Gondois wrote:
> +static bool ghes_handle_memory_failure2(struct acpi_hest_generic_data *gdata,
> + int sev, bool sync)
> +{
> + int flags = -1;
> + int sec_sev = ghes_severity(gdata->error_severity);
> + struct cper_sec_mem_err2 *mem_err = acpi_hest_get_payload(gdata);
> +
> + if (!(mem_err->validation_bits & CPER_MEM2_VALID_PA))
> + return false;
> +
> + /* iff following two events can be handled properly by now */
> + if (sec_sev == GHES_SEV_CORRECTED &&
> + (gdata->flags & CPER_SEC_ERROR_THRESHOLD_EXCEEDED))
> + flags = MF_SOFT_OFFLINE;
> + if (sev == GHES_SEV_RECOVERABLE && sec_sev == GHES_SEV_RECOVERABLE)
> + flags = sync ? MF_ACTION_REQUIRED : 0;
> +
> + if (flags != -1)
> + return ghes_do_memory_failure(mem_err->physical_addr, flags);
> +
> + return false;
> +}
This isn't a bug, but the body is ghes_handle_memory_failure() line for
line, apart from the payload type and the PA valid bit.
Could the severity to flags part move into a helper that takes the
physical address, so both share it?
next prev parent reply other threads:[~2026-11-03 13:32 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 20:38 [PATCH v2 0/6] CPER: Add Memory Error Section 2 support Pierre Gondois
2026-10-19 20:38 ` [PATCH v2 1/6] cper: use BIT_ULL() for processor and memory validation bits Pierre Gondois
2026-11-03 13:26 ` Breno Leitao
2026-10-19 20:38 ` [PATCH v2 2/6] cper: add Memory Error Section 2 structures Pierre Gondois
2026-11-03 13:27 ` Breno Leitao
2026-10-19 20:38 ` [PATCH v2 3/6] cper: add helpers to handle Memory Error Section 2 Pierre Gondois
2026-10-19 20:38 ` [PATCH v2 4/6] EDAC/ghes: Extract error report initialization Pierre Gondois
2026-10-20 17:09 ` Jonathan Cameron
2026-10-30 11:37 ` Pierre Gondois
2026-11-03 13:28 ` Breno Leitao
2026-10-19 20:38 ` [PATCH v2 5/6] ACPI: APEI: add separate Memory Error Section 2 handlers Pierre Gondois
2026-10-20 17:17 ` Jonathan Cameron
2026-11-03 12:43 ` Breno Leitao
2026-10-24 21:50 ` Ashok Raj
2026-10-30 10:55 ` Pierre Gondois
2026-11-03 12:56 ` Breno Leitao
2026-11-03 13:31 ` Breno Leitao [this message]
2026-10-19 20:38 ` [PATCH v2 6/6] ACPI: extlog: add Memory Error Section 2 trace event Pierre Gondois
2026-10-24 0:09 ` Jonathan Cameron
2026-10-20 17:10 ` [PATCH v2 0/6] CPER: Add Memory Error Section 2 support Jonathan Cameron
2026-10-22 7:07 ` Pierre Gondois
2026-10-23 21:26 ` Jonathan Cameron
2026-10-23 22:40 ` Mauro Carvalho Chehab
2026-10-24 0:04 ` Jonathan Cameron
2026-10-24 22:05 ` Ashok Raj
2026-10-30 11:51 ` Pierre Gondois
2026-10-30 15:19 ` Jonathan Cameron
2026-10-30 17:16 ` Pierre Gondois
2026-10-30 21:40 ` Jonathan Cameron
2026-11-02 11:33 ` Pierre Gondois
2026-11-02 16:58 ` Jonathan Cameron
2026-10-30 11:38 ` Pierre Gondois
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=auniCTG2pbFkGLXT@gmail.com \
--to=leitao@debian.org \
--cc=acpica-devel@lists.linux.dev \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=broonie@kernel.org \
--cc=dave.jiang@intel.com \
--cc=djbw@kernel.org \
--cc=fabio.m.de.francesco@linux.intel.com \
--cc=guohanjun@huawei.com \
--cc=james.morse@arm.com \
--cc=jonathan.cameron@oss.qualcomm.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-edac@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=terry.bowman@amd.com \
--cc=tony.luck@intel.com \
--cc=xueshuai@linux.alibaba.com \
--cc=zhangdandan@uniontech.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
all inboxes | Powered by JetHome®