Skip to content

Commit 825484e

Browse files
ben717-linuxCharlesWu465
authored andcommitted
drivers: soc: andes: Fix an error for print_detailed_cause() on imprecise exception (torvalds#101)
To print error messages for imprecise exception, extract the field sdcause in the CSR sdcause instead of reading the whole register. Signed-off-by: Ben Zong-You Xie <ben717@andestech.com> Reviewed-on: https://gitea.andestech.com/RD-SW/linux/pulls/101 Reviewed-by: Tim Shih-Ting OuYang <tim609@andestech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com> Reviewed-by: Dylan Dai-Rong Jhong <dylan@andestech.com> Co-authored-by: Ben Zong-You Xie <ben717@andestech.com> Co-committed-by: Ben Zong-You Xie <ben717@andestech.com>
1 parent d38e136 commit 825484e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

drivers/soc/andes/dcause.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ void print_detailed_cause(long scause, unsigned long sdcause)
4545
}
4646
} else {
4747
scause &= ~CAUSE_IRQ_FLAG;
48+
sdcause &= SDCAUSE_DCAUSE_MASK;
4849
switch (scause) {
4950
case IRQ_IMPRECISE_ECC:
5051
pr_info("The detailed trap cause: %s\n",

include/linux/soc/andes/dcause.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#define IRQ_BUS_RW_TRANS 0x111
1111
#define IRQ_PMOVI 0x112
1212

13+
#define SDCAUSE_DCAUSE_MASK 0x1f
14+
1315
static const char *const sdcause_fetch_access[] = {
1416
"Reserved",
1517
"ECC/Parity error",

0 commit comments

Comments
 (0)