diff options
| author | bigmagic <[email protected]> | 2020-04-07 11:26:30 +0800 |
|---|---|---|
| committer | bigmagic <[email protected]> | 2020-04-07 14:39:20 +0800 |
| commit | c024e2e485c813aa1c70e079f61fe50a80d8215c (patch) | |
| tree | 98262faf7d1b49b5a35ba4dd353210f26753675c /libcpu/mips/common/exception.c | |
| parent | 990f731b776055390db854f9cc980799e39247e8 (diff) | |
add ls2k bsp config
Diffstat (limited to 'libcpu/mips/common/exception.c')
| -rw-r--r-- | libcpu/mips/common/exception.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libcpu/mips/common/exception.c b/libcpu/mips/common/exception.c index 11192955cf..cd7d97e6c0 100644 --- a/libcpu/mips/common/exception.c +++ b/libcpu/mips/common/exception.c @@ -117,14 +117,14 @@ int rt_hw_exception_init(void) void rt_general_exc_dispatch(struct pt_regs *regs) { - rt_ubase_t cause, exccode; + rt_ubase_t exccode = 0; - exccode = (cause & CAUSEF_EXCCODE) >> CAUSEB_EXCCODE; if (exccode == 0) { rt_ubase_t status, pending; status = read_c0_status(); - pending = (cause & CAUSEF_IP) & (status & ST0_IM); + + pending = (CAUSEF_IP) & (status & ST0_IM); if (pending & CAUSEF_IP0) rt_do_mips_cpu_irq(0); if (pending & CAUSEF_IP1) |
