Messages in this thread Patch in this message | | | From | Liguang Zhang <> | Subject | [PATCH] arm64: traps: clean up arm64_ras_serror_get_severity() | Date | Wed, 12 Aug 2020 19:09:18 +0800 |
| |
Function arm64_is_fatal_ras_serror() is always called after arm64_is_ras_serror(), so we should remove some needless arm64_is_ras_serror() call in function arm64_ras_serror_get_severity().
Signed-off-by: Liguang Zhang <zhangliguang@linux.alibaba.com> --- arch/arm64/include/asm/traps.h | 9 +-------- arch/arm64/kernel/traps.c | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/arch/arm64/include/asm/traps.h b/arch/arm64/include/asm/traps.h index cee5928e1b7d..287b4d64dc67 100644 --- a/arch/arm64/include/asm/traps.h +++ b/arch/arm64/include/asm/traps.h @@ -79,13 +79,6 @@ static inline bool arm64_is_ras_serror(u32 esr) */ static inline u32 arm64_ras_serror_get_severity(u32 esr) { - u32 aet = esr & ESR_ELx_AET; - - if (!arm64_is_ras_serror(esr)) { - /* Not a RAS error, we can't interpret the ESR. */ - return ESR_ELx_AET_UC; - } - /* * AET is RES0 if 'the value returned in the DFSC field is not * [ESR_ELx_FSC_SERROR]' @@ -95,7 +88,7 @@ static inline u32 arm64_ras_serror_get_severity(u32 esr) return ESR_ELx_AET_UC; } - return aet; + return esr & ESR_ELx_AET; } bool arm64_is_fatal_ras_serror(struct pt_regs *regs, unsigned int esr); diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index 13ebd5ca2070..635d4cca0a4b 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -913,7 +913,7 @@ bool arm64_is_fatal_ras_serror(struct pt_regs *regs, unsigned int esr) case ESR_ELx_AET_UC: /* Uncontainable or Uncategorized error */ default: /* Error has been silently propagated */ - arm64_serror_panic(regs, esr); + return true; } } -- 2.19.1.6.gb485710b
| |