Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit aaadbe5

Browse files
ben717-linuxDylan-Jhong
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 <[email protected]> Reviewed-on: https://gitea.andestech.com/RD-SW/linux/pulls/101 Reviewed-by: Tim Shih-Ting OuYang <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Dylan Dai-Rong Jhong <[email protected]> Co-authored-by: Ben Zong-You Xie <[email protected]> Co-committed-by: Ben Zong-You Xie <[email protected]>
1 parent 83dcb7a commit aaadbe5

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/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)