Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
NOUPSTREAM: arm64/ras: Treat single-bit ECC error in the MMU TC RAM a…
Browse files Browse the repository at this point in the history
…s fatal

A transient single-bit ECC error in the MMU TC RAM might lead to stale
translation in the L2 TLB. Treat this condition as an uncontainable
uncorrected error.

Signed-off-by: Tyler Baicar <[email protected]>
Signed-off-by: Bobo <[email protected]>
  • Loading branch information
Tyler Baicar authored and adamliyi committed Mar 8, 2022
1 parent 8429768 commit 5c85d2e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/arm64/include/asm/ras.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
#define ERR_FR_8B_CEC BIT(1)
#define ERR_FR_16B_CEC BIT(2)

#define ARM_N1_MISC0_UNIT_MASK 0xf
#define ARM_N1_UNIT_L2_TLB 0x2

struct ras_ext_regs {
u64 err_fr;
u64 err_ctlr;
Expand Down
16 changes: 16 additions & 0 deletions arch/arm64/kernel/ras.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,22 @@ void arch_arm_ras_report_error(void)
regs.err_misc1);
}

/*
* Workaround for ARM N1 errata where transient single-bit
* error in the MMU TC RAM might cause corruption. Treat
* these CEs as uncontainable UEs.
*/
if (i == 0 &&
((regs.err_status >> ERR_STATUS_CE_SHIFT) & ERR_STATUS_CE_MASK) == 0x2 &&
(regs.err_misc0 & ARM_N1_MISC0_UNIT_MASK) == ARM_N1_UNIT_L2_TLB) {
pr_err("Upgrading L2 TLB CE to UC\n");
regs.err_status &= ~(ERR_STATUS_CE_MASK);
regs.err_status |= ERR_STATUS_UE;
regs.err_status &= ~(ERR_STATUS_UET_MASK);
pr_err("CPU%u: Upgraded ERR%uSTATUS: 0x%llx\n", cpu_num, i,
regs.err_status);
}

trace_arm_ras_ext_event(0, cpu_num, &regs);

/*
Expand Down

0 comments on commit 5c85d2e

Please sign in to comment.