From: Magnus Lindholm <linmag7@gmail.com>
To: richard.henderson@linaro.org, mattst88@gmail.com,
linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org
Cc: linmag7@gmail.com
Subject: [PATCH v6 6/6] alpha: stop on fatal Tsunami system ECC and write parity errors
Date: Sun, 11 Oct 2026 21:12:53 +0200 [thread overview]
Message-ID: <20261011191344.981000-7-linmag7@gmail.com> (raw)
In-Reply-To: <20261011191344.981000-1-linmag7@gmail.com>
The 21272 HRM revision 4.0, section 8.8.1.1.2, describes uncorrectable
memory errors reported through PERROR<UECC>. Section 8.8.2.4 describes
PERROR<PERR>: incoming writes with bad parity can poison memory ECC and
have side effects on later writes; software is expected to crash.
PERR also covers parity errors reported by a PCI target on outgoing
writes. Treat either case conservatively as data integrity compromised.
After reporting and acknowledging a system error, panic for UECC or
PERR in either the saved frame or live Pchip snapshot. Saved errors must
not disappear merely because firmware already cleared the live register.
Limit this policy to system-error vectors: incidental PERROR state on a
CPU error or environmental vector must not trigger this new panic path.
This changes the old handler's policy and is kept separate so it can be
reviewed or reverted independently. Hardware UECC/PERR injection has not
been performed; validation of this policy uses synthetic handler tests.
Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/kernel/err_tsunami.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/arch/alpha/kernel/err_tsunami.c b/arch/alpha/kernel/err_tsunami.c
index 91937fd2d6e0..386304776805 100644
--- a/arch/alpha/kernel/err_tsunami.c
+++ b/arch/alpha/kernel/err_tsunami.c
@@ -19,6 +19,7 @@
#include "pci_impl.h"
#define TSUNAMI_PERROR_ERRMASK 0xdffUL
+#define TSUNAMI_PERROR_FATAL (perror_m_uecc | perror_m_perr)
#define TSUNAMI_PERROR_ECCMASK (perror_m_uecc | perror_m_cre)
#define TSUNAMI_PERROR_INV (1UL << 51)
#define TSUNAMI_MISC_NXM (1UL << 28)
@@ -215,14 +216,22 @@ tsunami_machine_check(unsigned long vector, unsigned long la_ptr)
struct el_TSUNAMI_sysdata_mcheck *frame = NULL;
struct tsunami_error_state live;
char *saved_err_prefix = err_print_prefix;
+ u64 perror;
+ bool fatal = false;
/* Synchronize pending accesses before inspecting the chipset. */
mb();
mb();
draina();
tsunami_clear_errors(&live);
- if (vector == SCB_Q_SYSMCHK || vector == SCB_Q_SYSERR)
+ if (vector == SCB_Q_SYSMCHK || vector == SCB_Q_SYSERR) {
frame = tsunami_system_frame(header);
+ perror = live.perror[0] | live.perror[1];
+ if (frame)
+ perror |= tsunami_pchip_error(frame, 0) |
+ tsunami_pchip_error(frame, 1);
+ fatal = perror & TSUNAMI_PERROR_FATAL;
+ }
err_print_prefix = KERN_CRIT;
if (vector == SCB_Q_SYSMCHK || vector == SCB_Q_SYSERR) {
@@ -249,6 +258,8 @@ tsunami_machine_check(unsigned long vector, unsigned long la_ptr)
mb();
}
+ if (fatal)
+ panic("Tsunami: uncorrectable ECC or PCI write parity error");
}
static const char * const CLIPPER_EnvQW1SMIR[] = {
--
2.43.0
next prev parent reply other threads:[~2026-10-11 19:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 19:12 [PATCH v6 0/6] alpha: improve Tsunami machine check reporting Magnus Lindholm
2026-10-11 19:12 ` [PATCH v6 1/6] alpha: move Tsunami machine check handling to err_tsunami.c Magnus Lindholm
2026-10-11 19:12 ` [PATCH v6 2/6] alpha: describe the Tsunami system machine check frame Magnus Lindholm
2026-10-11 19:12 ` [PATCH v6 3/6] alpha: bound EV6 logout decoding by the processor area Magnus Lindholm
2026-10-11 19:59 ` Matt Turner
2026-10-11 19:12 ` [PATCH v6 4/6] alpha: decode and acknowledge Tsunami system machine checks Magnus Lindholm
2026-10-11 20:00 ` Matt Turner
2026-10-11 19:12 ` [PATCH v6 5/6] alpha: decode Clipper environmental events and retain console logs Magnus Lindholm
2026-10-11 20:00 ` Matt Turner
2026-10-11 19:12 ` Magnus Lindholm [this message]
2026-10-11 20:01 ` [PATCH v6 6/6] alpha: stop on fatal Tsunami system ECC and write parity errors Matt Turner
2026-10-12 4:57 ` Magnus Lindholm
2026-10-11 19:59 ` [PATCH v6 0/6] alpha: improve Tsunami machine check reporting Matt Turner
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=20261011191344.981000-7-linmag7@gmail.com \
--to=linmag7@gmail.com \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mattst88@gmail.com \
--cc=richard.henderson@linaro.org \
/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®