Changeset 3156582 in mainline for arch/mips/src/interrupt.c
- Timestamp:
- 2005-09-11T12:48:42Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8e3fb24c
- Parents:
- 8491c48
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/mips/src/interrupt.c
r8491c48 r3156582 33 33 #include <time/clock.h> 34 34 #include <panic.h> 35 #include <print.h> 36 #include <symtab.h> 37 #include <arch/drivers/arc.h> 38 39 static void print_regdump(struct exception_regdump *pstate) 40 { 41 char *pcsymbol = ""; 42 char *rasymbol = ""; 43 44 char *s = get_symtab_entry(pstate->epc); 45 if (s) 46 pcsymbol = s; 47 s = get_symtab_entry(pstate->ra); 48 if (s) 49 rasymbol = s; 50 51 printf("PC: %X(%s) RA: %X(%s)\n",pstate->epc,pcsymbol, 52 pstate->ra,rasymbol); 53 } 35 54 36 55 pri_t cpu_priority_high(void) … … 58 77 } 59 78 60 void interrupt( void)79 void interrupt(struct exception_regdump *pstate) 61 80 { 62 81 __u32 cause; … … 70 89 switch (i) { 71 90 case 0: /* SW0 - Software interrupt 0 */ 72 cp0_cause_write(c ause& ~(1 << 8)); /* clear SW0 interrupt */91 cp0_cause_write(cp0_cause_read() & ~(1 << 8)); /* clear SW0 interrupt */ 73 92 break; 74 93 case 1: /* SW1 - Software interrupt 1 */ 75 cp0_cause_write(c ause& ~(1 << 9)); /* clear SW1 interrupt */94 cp0_cause_write(cp0_cause_read() & ~(1 << 9)); /* clear SW1 interrupt */ 76 95 break; 77 96 case 2: /* IRQ0 */ … … 80 99 case 5: /* IRQ3 */ 81 100 case 6: /* IRQ4 */ 101 print_regdump(pstate); 82 102 panic("unhandled interrupt %d\n", i); 83 103 break;
Note:
See TracChangeset
for help on using the changeset viewer.