alpha: improve Tsunami machine check reporting
Magnus Lindholm
maintainerv6 cover alpha: improve Tsunami machine check reporting
This series adds Tsunami/Typhoon system-error diagnostics and Clipper ES40 environmental reporting. It applies to v7.3-rc1 on the Alpha for-next branch at 33465f6ab697.
Thanks to Matt Turner for reviewing v5, building each patch for GENERIC and SHARK with W=1, building its tip for DP264 and EIGER, and booting GENERIC on QEMU Clipper with two CPUs. His Reviewed-by tags are carried on patches 1 and 2; patch 1 also incorporates his build-ordering nit.
Changes since v5:
- Add bounded raw dumps for rejected EV6/system/environmental frames. Round down to whole quadwords and cap fallback dumps at 1 KiB.
- Clarify that ES40 documents the short EV6 frame; the corresponding Titan/Nautilus firmware behavior has not been verified.
- Move the non-generic Tsunami err_ev6.o dependency to patch 4.
- Correct the obsolete PERROR bit-9 RTO definitions: HRM rev. 4.0, Table 10-42 specifies reserved MBZ/RAZ, so the 0xdff mask is retained.
- Drop the ES40-specific system reason-code restriction, retain structural bounds checks, and restore CPU register/PC output for system errors.
- Remove inactive expected-probe handling and its changelog claims.
- Report valid environmental notifications with no recognized fault bits, including their status context; remove "Set =" from door messages.
- Keep PCI initialization in sys_dp264.c and error registration in the error file. Restrict console-log scanning to Clipper pending testing on older Tsunami firmware.
- Put UECC/PERR panic policy in patch 6 with its HRM rationale. Only system-error vectors can trigger it, not incidental live PERROR bits during CPU or environmental notifications.
PERRMASK remains as configured by firmware. Inverted SMIR halt/reset bits remain undecoded. Console environmental records remain raw because ES40 Table D-18 has conflicting offsets. Restricting console-log scanning avoids extending it to untested boards; it does not validate arbitrary firmware pointers or establish nonempty-log coverage on Clipper.
Testing:
- Native ASan/UBSan tests exercise the actual EV6/Tsunami handlers and console helpers, including malformed/short frames, raw-dump bounds, unfamiliar reason codes, separate live snapshots, register reporting, fault-free environmental notifications and system-only fatal policy.
- W=1 vmlinux builds passed for minimal GENERIC, SHARK, DP264 and EIGER configurations using GCC 15.0.1. The existing saved_config COMMON-symbol modpost warning remains; no compiler warnings in the final build logs.
- git am on the stated base reproduces the final source tree. git diff --check passes; checkpatch reports no errors.
V6 was boot-tested on my AlphaServer ES40 using my ES40 configuration, with GENERIC_ENTRY enabled. Unplugging and reconnecting a PSU power cable produced three correctable environmental notifications (code 206). PSU 1 was first reported enabled but failed, then its enabled indication was absent. After reconnection, its enabled indication returned and its individual failure indication cleared. No oops or panic appeared in the available log during this test.
SMIR bit 0 remained set in all three reports, so this test does not exercise notification reporting with all recognized fault bits clear. That path, malformed-frame raw dumps, system-error register reporting and the UECC/PERR panic policy remain covered by synthetic tests only. V6 hatch testing and nonempty firmware console-log testing remain outstanding. PALcode clearing behavior, inverted halt/reset polarity and corresponding firmware layouts on other boards remain unverified.
Earlier v4 testing used PSU power-cable changes, opened hatches and a CALLSYS-based software trigger with modified handling. Matt's build and QEMU results above apply to v5.
Magnus Lindholm (6):
alpha: move Tsunami machine check handling to err_tsunami.c
alpha: describe the Tsunami system machine check frame
alpha: bound EV6 logout decoding by the processor area
alpha: decode and acknowledge Tsunami system machine checks
alpha: decode Clipper environmental events and retain console logs
alpha: stop on fatal Tsunami system ECC and write parity errors
arch/alpha/include/asm/core_tsunami.h | 8 +- arch/alpha/include/asm/err_common.h | 2 + arch/alpha/kernel/Makefile | 4 +- arch/alpha/kernel/core_tsunami.c | 34 -- arch/alpha/kernel/err_common.c | 13 + arch/alpha/kernel/err_ev6.c | 38 +- arch/alpha/kernel/err_impl.h | 1 + arch/alpha/kernel/err_tsunami.c | 592 ++++++++++++++++++++++++++ arch/alpha/kernel/proto.h | 2 + arch/alpha/kernel/sys_dp264.c | 5 +- 10 files changed, 651 insertions(+), 48 deletions(-) create mode 100644 arch/alpha/kernel/err_tsunami.c
base-commit: 33465f6ab697abceafd9a340067a544d551c4412
Signature · 1 line
2.43.0
Magnus Lindholm
maintainerPATCH v6 1/6 alpha: move Tsunami machine check handling to err_tsunami.c
Move the existing handler and PCI error clearing helpers without changing their behavior. Build the error objects for ALPHA_TSUNAMI so that all Tsunami configurations, including non-generic Shark, can use them.
--- arch/alpha/kernel/Makefile | 4 ++- arch/alpha/kernel/core_tsunami.c | 34 ----------------------- arch/alpha/kernel/err_tsunami.c | 47 ++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 35 deletions(-) create mode 100644 arch/alpha/kernel/err_tsunami.c
arch/alpha/kernel/Makefile +3 -1
@@ -39,7 +39,7 @@ obj-y += err_ev7.o err_titan.o err_marvel.o endif obj-y += irq_pyxis.o irq_i8259.o irq_srm.o -obj-y += err_ev6.o +obj-y += err_ev6.o err_tsunami.o obj-y += es1888.o smc37c669.o smc37c93x.o pc873xx.o gct.o obj-y += srmcons.o
@@ -89,4 +89,6 @@ obj-$(CONFIG_ALPHA_MARVEL) += err_ev7.o err_marvel.o obj-$(CONFIG_ALPHA_NAUTILUS) += err_ev6.o obj-$(CONFIG_ALPHA_TITAN) += err_ev6.o err_titan.o +obj-$(CONFIG_ALPHA_TSUNAMI) += err_tsunami.o + endif # GENERIC
arch/alpha/kernel/core_tsunami.c +0 -34
@@ -448,37 +448,3 @@ tsunami_kill_arch(int mode)if (TSUNAMI_cchip->csc.csr &1L <<14 )tsunami_kill_one_pchip (TSUNAMI_pchip1,1 ); } - -static inline void -tsunami_pci_clr_err_1 (tsunami_pchip *pchip) -{ - pchip->perror.csr; - pchip->perror.csr =0x040 ; -mb (); - pchip->perror.csr; -} - -static inline void -tsunami_pci_clr_err (void ) -{ -tsunami_pci_clr_err_1 (TSUNAMI_pchip0); - -/* TSUNAMI and TYPHOON can have 2, but might only have 1 (DS10) */ -if (TSUNAMI_cchip->csc.csr &1L <<14 ) -tsunami_pci_clr_err_1 (TSUNAMI_pchip1); -} - -void -tsunami_machine_check (unsigned long vector,unsigned long la_ptr) -{ -/* Clear error before any reporting. */ -mb (); -mb ();/* magic */ -draina (); -tsunami_pci_clr_err (); -wrmces (0x7 ); -mb (); - -process_mcheck_info (vector, la_ptr,"TSUNAMI" , -mcheck_expected (smp_processor_id ())); -}
arch/alpha/kernel/err_tsunami.c new file +47 -0
47 lines not on this page · raw message
Signature · 1 line
2.43.0
Magnus Lindholm
maintainerPATCH v6 2/6 alpha: describe the Tsunami system machine check frame
In reply to Magnus LindholmDefine the five system-specific quadwords in the SRM logout frame, as documented in the AlphaServer ES40 Service Guide, Table D-19.
--- arch/alpha/include/asm/core_tsunami.h | 5 +++++ 1 file changed, 5 insertions(+)
arch/alpha/include/asm/core_tsunami.h +5 -0
@@ -283,6 +283,11 @@ union TPchipPERRMASK {* Data structure for handling TSUNAMI machine checks: */ struct el_TSUNAMI_sysdata_mcheck { +u64 sesf; +u64 dir; +u64 misc; +u64 p0_perror; +u64 p1_perror; };
Signature · 1 line
2.43.0
Magnus Lindholm
maintainerPATCH v6 3/6 alpha: bound EV6 logout decoding by the processor area
In reply to Magnus LindholmThe ES40 Service Guide, Table D-19, documents a correctable frame with its system area at 0x58 and total size 0x80. The existing EV6 decoder interprets system words as extended CPU registers and reads past its end. This establishes the layout for ES40; whether Titan and Nautilus PALcode also emits this short frame has not been verified.
Validate the processor area before decoding it and only print extended registers when present. Preserve rejected frames with a raw dump rather than trusting their invalid offsets. Cap the dump at 1 KiB and round down to complete quadwords. This still relies on firmware supplying an accessible frame of its advertised size; the cap is not pointer validation.
--- arch/alpha/kernel/err_common.c | 13 ++++++++++++ arch/alpha/kernel/err_ev6.c | 38 +++++++++++++++++++++++++--------- arch/alpha/kernel/err_impl.h | 1 + 3 files changed, 42 insertions(+), 10 deletions(-)
arch/alpha/kernel/err_common.c +13 -0
@@ -44,6 +44,19 @@ mchk_dump_mem(void *data, size_t length, char **annotation) } } +/* Preserve rejected frames without trusting their internal offsets. */ +void +mchk_dump_logout_frame_raw (struct el_common *header) +{ +size_t length = header->size; + +/* Bound diagnostic output and never read a partial final quadword. */ +if (length >1024 ) + length =1024 ; + length &= ~7UL ; +mchk_dump_mem (header, length,NULL ); +} +void mchk_dump_logout_frame (struct el_common *mchk_header) {
arch/alpha/kernel/err_ev6.c +28 -10
@@ -190,6 +190,25 @@ ev6_process_logout_frame(struct el_common *mchk_header, int print) (struct el_common_EV6_mcheck *)mchk_header;int status =MCHK_DISPOSITION_UNKNOWN_ERROR ; +/* +* ES40 correctable frames end the CPU area before EXC_ADDR (Table +* D-19). Validate both regions before decoding or dumping any data. +*/ +if (mchk_header->proc_offset != offsetof(struct el_common_EV6_mcheck , + I_STAT) || + mchk_header->sys_offset < offsetof(struct el_common_EV6_mcheck , + EXC_ADDR) || + mchk_header->sys_offset > mchk_header->size || + ((mchk_header->sys_offset | mchk_header->size) &7 )) { +if (print) { +printk ("%s Invalid EV6 logout frame: size %x, CPU %x, system %x\n" , + err_print_prefix, mchk_header->size, + mchk_header->proc_offset, mchk_header->sys_offset); +mchk_dump_logout_frame_raw (mchk_header); + } +return MCHK_DISPOSITION_UNKNOWN_ERROR ; + } + status |=ev6_parse_ibox (ev6mchk->I_STAT, print); status |=ev6_parse_mbox (ev6mchk->MM_STAT, ev6mchk->DC_STAT, ev6mchk->C_STAT, print);
@@ -203,16 +222,15 @@ ev6_process_logout_frame(struct el_common *mchk_header, int print)if (status !=MCHK_DISPOSITION_DISMISS ) {char *saved_err_prefix = err_print_prefix; -/* -* Dump some additional information from the frame -*/ -printk ("%s EXC_ADDR: 0x%016lx IER_CM: 0x%016lx" -" ISUM: 0x%016lx\n" -" PAL_BASE: 0x%016lx I_CTL: 0x%016lx" -" PCTX: 0x%016lx\n" , - err_print_prefix, - ev6mchk->EXC_ADDR, ev6mchk->IER_CM, ev6mchk->ISUM, - ev6mchk->PAL_BASE, ev6mchk->I_CTL, ev6mchk->PCTX); +/* These registers are absent from short correctable frames. */ +if (mchk_header->sys_offset >=sizeof (*ev6mchk)) +printk ("%s EXC_ADDR: 0x%016lx IER_CM: 0x%016lx" +" ISUM: 0x%016lx\n" +" PAL_BASE: 0x%016lx I_CTL: 0x%016lx" +" PCTX: 0x%016lx\n" , + err_print_prefix, + ev6mchk->EXC_ADDR, ev6mchk->IER_CM, ev6mchk->ISUM, + ev6mchk->PAL_BASE, ev6mchk->I_CTL, ev6mchk->PCTX);if (status ==MCHK_DISPOSITION_UNKNOWN_ERROR ) { printk("%s UNKNOWN error, frame follows:\n",
arch/alpha/kernel/err_impl.h +1 -0
@@ -47,6 +47,7 @@ struct el_subpacket_handler {extern char *err_print_prefix;extern void mchk_dump_mem (void *,size_t ,char **); +extern void mchk_dump_logout_frame_raw (struct el_common *header);extern void mchk_dump_logout_frame (struct el_common *);extern void el_print_timestamp (union el_timestamp *);extern void el_process_subpackets (struct el_subpacket *,int );
Signature · 1 line
2.43.0
Re: [PATCH v6 3/6] alpha: bound EV6 logout decoding by the processor area
arch/alpha/kernel/err_ev6.c ev6_process_logout_frame(struct el_common *mchk_header, int print) · line 198
Quoted 2 lines
arch/alpha/kernel/err_ev6.c +2
-0+ if (mchk_header->proc_offset != offsetof(struct el_common_EV6_mcheck, + I_STAT) ||
This is stricter for Titan and Nautilus too, since both reach this through ev6_machine_check() and Titan also through privateer_process_logout_frame(). A frame that fails the check now gets a raw dump where it used to get a decode. I think that is the right trade, and the changelog says it is unverified there.
Magnus Lindholm
maintainerPATCH v6 4/6 alpha: decode and acknowledge Tsunami system machine checks
In reply to Magnus LindholmDecode PCI and ECC transactions separately, honor invalid transaction information, and select Pchip errors using the logout summary. Report master aborts without importing Titan-specific dismissal policy. Delegate processor vectors to the bounded EV6 decoder.
Capture live PERROR and MISC before acknowledging their defined W1C bits and report live status absent from the saved frame. Leave PERRMASK unchanged. HRM revision 4.0, Table 10-42 marks bit 9 reserved (MBZ/RAZ); remove the obsolete RTO definition and reserve its bitfield position.
Use the system vector and frame bounds without restricting the reason code to the ES40 values. Preserve invalid frames and unknown environmental layouts in bounded raw dumps. Restore CPU register output for system errors, including the PC needed to diagnose NXM.
Do not retain expected-probe handling: its only Tsunami writer is under the undefined NXM_MACHINE_CHECKS_ON_TSUNAMI. Fatal-error policy is left for a separate patch.
--- arch/alpha/include/asm/core_tsunami.h | 3 +- arch/alpha/kernel/Makefile | 2 +- arch/alpha/kernel/err_tsunami.c | 241 ++++++++++++++++++++++++-- 3 files changed, 225 insertions(+), 21 deletions(-)
arch/alpha/include/asm/core_tsunami.h +1 -2
@@ -105,7 +105,6 @@ extern int TSUNAMI_bootcpu;#define perror_m_ta 0x40#define perror_m_rdpe 0x80#define perror_m_nds 0x100 -#define perror_m_rto 0x200#define perror_m_uecc 0x400#define perror_m_cre 0x800#define perror_m_addrl 0xFFFFFFFF0000UL
@@ -123,7 +122,7 @@ union TPchipPERROR { unsigned perror_v_ta : 1; unsigned perror_v_rdpe : 1; unsigned perror_v_nds : 1; - unsigned perror_v_rto : 1; + unsigned perror_v_reserved : 1; /* PERROR<9>: MBZ, RAZ */ unsigned perror_v_uecc : 1; unsigned perror_v_cre : 1; unsigned perror_v_rsvd1 : 4;
arch/alpha/kernel/Makefile +1 -1
@@ -89,6 +89,6 @@ obj-$(CONFIG_ALPHA_MARVEL) += err_ev7.o err_marvel.o obj-$(CONFIG_ALPHA_NAUTILUS) += err_ev6.o obj-$(CONFIG_ALPHA_TITAN) += err_ev6.o err_titan.o -obj-$(CONFIG_ALPHA_TSUNAMI) += err_tsunami.o +obj-$(CONFIG_ALPHA_TSUNAMI) += err_ev6.o err_tsunami.o endif # GENERIC
arch/alpha/kernel/err_tsunami.c +223 -18
268 lines not on this page · raw message
Signature · 1 line
2.43.0
Matt Turner
maintainerRe: [PATCH v6 4/6] alpha: decode and acknowledge Tsunami system machine checks
Quoted 2 lines
+#include <
asm/irq_regs.h>
#include <asm/core_tsunami.h>
Patch 1 already includes this a few lines down, so it is now included twice.
arch/alpha/kernel/err_tsunami.c line 68
Quoted 2 lines
arch/alpha/kernel/err_tsunami.c +2
-0+/* INV invalidates SYN, CMD and ADDR; SERR has no command/address. */ +if (perror & (TSUNAMI_PERROR_INV | perror_m_serr)) {
If SERR is set together with another error bit, this throws away the transaction that the other error latched. Can it test for SERR being the only error bit?
Similarly, with an ECC bit and a PCI bit both set, the fields are decoded as ECC. We cannot tell which came first, but a comment saying so would help.
Quoted 1 line
+
tsunami_clear_errors(&live);
This runs for every vector, and tsunami_report_live_errors() then prints whatever was latched. Does a PERROR bit still latch when its PERRMASK bit is clear? If it does, NDS left over from config probing will show up at KERN_CRIT on an unrelated CPU error.
arch/alpha/kernel/err_tsunami.c line 233
Quoted 2 lines
arch/alpha/kernel/err_tsunami.c +2
-0+tsunami_process_logout_frame (header,1 ); +dik_show_regs (get_irq_regs (),NULL );
For the correctable vector this is a full register dump per CRE. Titan only does it under alpha_verbose_mcheck. The old code dumped as well, so it is not a regression, but would you want the same gate for 620?
arch/alpha/kernel/err_tsunami.c line 252
Quoted 6 lines
arch/alpha/kernel/err_tsunami.c +2
-2+mb (); + } -process_mcheck_info (vector, la_ptr,"TSUNAMI" , -mcheck_expected (smp_processor_id ())); }
This leaves a blank line before the closing brace until patch 6.
Magnus Lindholm
maintainerPATCH v6 5/6 alpha: decode Clipper environmental events and retain console logs
In reply to Magnus LindholmRestrict ES40 live environmental decoding to Clipper. Honor print control, validate bounds and masks, and separate fault bits from status context. Report valid notifications even when no recognized fault bits are set, so door-closed and supply-return notifications are not silently discarded. Do not infer a recovery transition from a single status snapshot.
Keep inverted SMIR halt/reset bits undecoded and print their raw value. Use plain door-status messages without the manual's "Set =" prefix. Dump unknown or truncated environmental frames raw.
Register bounded console decoders from the error file, but keep the PCI init hook and console-log invocation in sys_dp264.c, as Titan does. Limit console-log scanning to Clipper pending older-board firmware tests. The ES40 boot and QEMU Clipper test do not establish that nonempty console logs are safe on DS10, DS20 or XP1000 firmware.
Print console environmental packets raw: ES40 Table D-18's sys_offset conflicts with its field offsets. Actual SRM records are still needed. Terminate annotation arrays and reject invalid packet bounds/revisions.
--- arch/alpha/include/asm/err_common.h | 2 + arch/alpha/kernel/err_tsunami.c | 329 ++++++++++++++++++++++++++++ arch/alpha/kernel/proto.h | 2 + arch/alpha/kernel/sys_dp264.c | 5 +- 4 files changed, 337 insertions(+), 1 deletion(-)
arch/alpha/include/asm/err_common.h +2 -0
@@ -47,6 +47,8 @@# define EL_TYPE__REGATTA__PROCESSOR_ERROR_FRAME (1)# define EL_TYPE__REGATTA__SYSTEM_ERROR_FRAME (2)# define EL_TYPE__REGATTA__ENVIRONMENTAL_FRAME (3) +# define EL_TYPE__REGATTA__TSUNAMI_PCHIP0_EXTENDED (6) +# define EL_TYPE__REGATTA__TSUNAMI_PCHIP1_EXTENDED (7)# define EL_TYPE__REGATTA__TITAN_PCHIP0_EXTENDED (8)# define EL_TYPE__REGATTA__TITAN_PCHIP1_EXTENDED (9)# define EL_TYPE__REGATTA__TITAN_MEMORY_EXTENDED (10)
arch/alpha/kernel/err_tsunami.c +329 -0
332 lines not on this page · raw message
arch/alpha/kernel/proto.h +2 -0
@@ -78,6 +78,8 @@ extern struct _alpha_agp_info *titan_agp_info(void);extern struct pci_ops tsunami_pci_ops;extern void tsunami_init_arch (void );extern void tsunami_kill_arch (int ); +extern void tsunami_register_error_handlers (void ); +extern void clipper_machine_check (unsigned long vector,unsigned long la_ptr);extern void tsunami_machine_check (unsigned long vector,unsigned long la_ptr);extern void tsunami_pci_tbi (struct pci_controller *,dma_addr_t ,dma_addr_t );
arch/alpha/kernel/sys_dp264.c +4 -1
@@ -32,6 +32,7 @@#include "proto.h" #include "irq_impl.h" +#include "err_impl.h" #include "pci_impl.h" #include "machvec_impl.h"
@@ -533,6 +534,8 @@ monet_init_pci(void)static void __init clipper_init_pci (void ) { +tsunami_register_error_handlers (); +cdl_check_console_data_log ();common_init_pci ();locate_and_init_vga (NULL ); }
@@ -627,7 +630,7 @@ struct alpha_machine_vector clipper_mv __initmv = {DO_EV6_MMU ,DO_DEFAULT_RTC ,DO_TSUNAMI_IO , - .machine_check = tsunami_machine_check, + .machine_check = clipper_machine_check, .max_isa_dma_address = ALPHA_MAX_ISA_DMA_ADDRESS, .min_io_address = DEFAULT_IO_BASE, .min_mem_address = DEFAULT_MEM_BASE,
Signature · 1 line
2.43.0
Matt Turner
maintainerRe: [PATCH v6 5/6] alpha: decode Clipper environmental events and retain console logs
arch/alpha/kernel/err_tsunami.c tsunami_machine_check(unsigned long vector, unsigned long la_ptr) · line 499
Quoted 2 lines
arch/alpha/kernel/err_tsunami.c +2
-0+if (header->code !=0x206 || +clipper_process_environment (header,0 ) !=MCHK_DISPOSITION_DISMISS ) {
clipper_process_environment() returns MCHK_DISPOSITION_REPORT for any valid frame and UNKNOWN_ERROR for a truncated one. It never returns DISMISS, so this condition is always true. The silent first pass can go, and the body can lose a level of indentation.
Quoted 1 line
+ status |=
CLIPPER_BITS(CLIPPER_EnvQW1SMIR, frame->smir, 0x15);
Your cover letter says SMIR bit 0 stayed set in all three reports, including the one after the supply was reconnected and its own failure bit had cleared. With this mask that last report prints "System Power Supply failure detected" for a recovery. Bit 0 looks latched, or inverted like the halt and reset bits. I would treat it as raw context (mask 0x14) until we know. Could you post the dmesg from that test?
Quoted 1 line
+ if (
packet->type==EL_TYPE__REGATTA__PROCESSOR_ERROR_FRAME||
Minor: Titan prints by_type.regatta_frame.cpuid for these. It would be useful here as well.
Magnus Lindholm
maintainerPATCH v6 6/6 alpha: stop on fatal Tsunami system ECC and write parity errors
In reply to Magnus LindholmThe 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.
--- arch/alpha/kernel/err_tsunami.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
arch/alpha/kernel/err_tsunami.c +12 -1
@@ -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[] = {
Signature · 1 line
2.43.0
Matt Turner
maintainerRe: [PATCH v6 6/6] alpha: stop on fatal Tsunami system ECC and write parity errors
Quoted 1 line
+#define
TSUNAMI_PERROR_FATAL(perror_m_uecc|perror_m_perr)
Why PERR and not RDPE? Bad parity on data read from PCI seems just as bad for the consumer. If the HRM says the Pchip poisons that data and the CPU takes a 670 for it, please say so in the changelog.
Quoted 1 line
+ perror = live.perror[0] | live.perror[1];
The changelog says incidental PERROR state on a CPU or environmental vector cannot trigger the panic. It still can on a system vector: UECC or PERR latched before an unrelated NXM will panic here. That may be what you want, since the error is real either way, but the changelog should cover it. It also depends on the PERRMASK question I asked on patch 4.
Two things that I think belong in the changelog:
A CPU-detected uncorrectable ECC error (670 through ev6_machine_check()) still does not panic, so after this patch the policy differs by who detected the error.
A PCI card with a marginal connection that asserts PERR# now takes the machine down, where before it logged and carried on.
Magnus Lindholm
maintainerRe: [PATCH v6 6/6] alpha: stop on fatal Tsunami system ECC and write parity errors
Hi Matt,
Quoted 16 lines · Matt Turner
Quoted 2 lines
+#define
TSUNAMI_PERROR_FATAL(perror_m_uecc|perror_m_perr)Why PERR and not RDPE? Bad parity on data read from PCI seems just as bad for the consumer. If the HRM says the Pchip poisons that data and the CPU takes a 670 for it, please say so in the changelog.
Quoted 1 line
+ perror = live.perror[0] | live.perror[1];
The changelog says incidental PERROR state on a CPU or environmental vector cannot trigger the panic. It still can on a system vector: UECC or PERR latched before an unrelated NXM will panic here. That may be what you want, since the error is real either way, but the changelog should cover it. It also depends on the PERRMASK question I asked on patch 4.
Quoted 8 lines
Two things that I think belong in the changelog:
A CPU-detected uncorrectable ECC error (670 through
ev6_machine_check()) still does not panic, so after this patch the policy differs by who detected the error.A PCI card with a marginal connection that asserts PERR# now takes the machine down, where before it logged and carried on.
Thanks, these are good points. Would it make sense to drop patch 6 for now and address the panic policy in a follow-up? That would let us consider RDPE, CPU-detected ECC and previously latched errors alongside UECC/PERR, including the impact of a device asserting PERR#.
V7 could then focus on the reporting and acknowledgment improvements. That would preserve the existing continuation behavior for now, without implying that continuing after an uncorrectable error is safe.
Magnus
Matt Turner
maintainerRe: [PATCH v6 6/6] alpha: stop on fatal Tsunami system ECC and write parity errors
Quoted 34 lines · Magnus Lindholm
Hi Matt,
Quoted 16 lines · Matt Turner
Quoted 2 lines
+#define
TSUNAMI_PERROR_FATAL(perror_m_uecc|perror_m_perr)Why PERR and not RDPE? Bad parity on data read from PCI seems just as bad for the consumer. If the HRM says the Pchip poisons that data and the CPU takes a 670 for it, please say so in the changelog.
Quoted 1 line
+ perror = live.perror[0] | live.perror[1];
The changelog says incidental PERROR state on a CPU or environmental vector cannot trigger the panic. It still can on a system vector: UECC or PERR latched before an unrelated NXM will panic here. That may be what you want, since the error is real either way, but the changelog should cover it. It also depends on the PERRMASK question I asked on patch 4.
Quoted 8 lines
Two things that I think belong in the changelog:
A CPU-detected uncorrectable ECC error (670 through
ev6_machine_check()) still does not panic, so after this patch the policy differs by who detected the error.A PCI card with a marginal connection that asserts PERR# now takes the machine down, where before it logged and carried on.
Thanks, these are good points. Would it make sense to drop patch 6 for now and address the panic policy in a follow-up? That would let us consider RDPE, CPU-detected ECC and previously latched errors alongside UECC/PERR, including the impact of a device asserting PERR#.
Quoted 5 lines
V7 could then focus on the reporting and acknowledgment improvements. That would preserve the existing continuation behavior for now, without implying that continuing after an uncorrectable error is safe.
Magnus
Yeah, that seems reasonable to me.
Magnus Lindholm
maintainerRe: [PATCH v6 6/6] alpha: stop on fatal Tsunami system ECC and write parity errors
Hi Matt,
Quoted 36 lines · Matt Turner
Quoted 34 lines · Magnus Lindholm
Hi Matt,
Quoted 16 lines · Matt Turner
Quoted 2 lines
+#define
TSUNAMI_PERROR_FATAL(perror_m_uecc|perror_m_perr)Why PERR and not RDPE? Bad parity on data read from PCI seems just as bad for the consumer. If the HRM says the Pchip poisons that data and the CPU takes a 670 for it, please say so in the changelog.
Quoted 1 line
+ perror = live.perror[0] | live.perror[1];
The changelog says incidental PERROR state on a CPU or environmental vector cannot trigger the panic. It still can on a system vector: UECC or PERR latched before an unrelated NXM will panic here. That may be what you want, since the error is real either way, but the changelog should cover it. It also depends on the PERRMASK question I asked on patch 4.
Quoted 8 lines
Two things that I think belong in the changelog:
A CPU-detected uncorrectable ECC error (670 through
ev6_machine_check()) still does not panic, so after this patch the policy differs by who detected the error.A PCI card with a marginal connection that asserts PERR# now takes the machine down, where before it logged and carried on.
Thanks, these are good points. Would it make sense to drop patch 6 for now and address the panic policy in a follow-up? That would let us consider RDPE, CPU-detected ECC and previously latched errors alongside UECC/PERR, including the impact of a device asserting PERR#.
Quoted 7 lines
Quoted 5 lines
V7 could then focus on the reporting and acknowledgment improvements. That would preserve the existing continuation behavior for now, without implying that continuing after an uncorrectable error is safe.
Magnus
Yeah, that seems reasonable to me.
I'll put out a v7, focusing on reporting and acknowledgment improvements, preserving the existing continuation behavior.
Regards,
Magnus
Matt Turner
maintainerQuoted 2 lines · Magnus Lindholm
This series adds Tsunami/Typhoon system-error diagnostics and Clipper ES40 environmental reporting.
I built each patch as vmlinux with W=1 for GENERIC, DP264, SHARK and EIGER (gcc 16.2.0). All 24 builds pass with no warnings in the files the series touches, so the err_ev6.o move to patch 4 bisects fine. The tip boots GENERIC on QEMU Clipper as far as mounting root.
I have not exercised any of the machine check paths, and I did not check the PERROR field layout, subpacket types 6/7 or the Clipper bit tables against the manuals.
Comments on 4, 5 and 6 in reply to those patches.