Call through powerpc_interrupt for all Book-E interrupts

Make int_external_input, int_decrementer, and int_performance_counter all
now use trap_common, just like on AIM.  The effects of this are:

* All traps are now properly displayed in ddb.  Previously traps from
  external input, decrementer, and performance counters, would display as
  just basic stack traces.  Now the frame is displayed.

* External interrupts are now handled with interrupts enabled, so handling
  can be preempted.  This seems to fix a hang found post-r329882.
This commit is contained in:
jhibbits 2018-04-10 17:32:27 +00:00
parent ba15ec2e62
commit f00c87ba49

View File

@ -563,11 +563,7 @@ INTERRUPT(int_instr_storage)
INTERRUPT(int_external_input)
STANDARD_PROLOG(SPR_SPRG1, PC_TEMPSAVE, SPR_SRR0, SPR_SRR1)
FRAME_SETUP(SPR_SPRG1, PC_TEMPSAVE, EXC_EXI)
GET_TOCBASE(%r2)
addi %r3, %r1, CALLSIZE
bl CNAME(powerpc_interrupt)
TOC_RESTORE
b trapexit
b trap_common
INTERRUPT(int_alignment)
@ -603,11 +599,7 @@ INTERRUPT(int_syscall)
INTERRUPT(int_decrementer)
STANDARD_PROLOG(SPR_SPRG1, PC_TEMPSAVE, SPR_SRR0, SPR_SRR1)
FRAME_SETUP(SPR_SPRG1, PC_TEMPSAVE, EXC_DECR)
GET_TOCBASE(%r2)
addi %r3, %r1, CALLSIZE
bl CNAME(powerpc_interrupt)
TOC_RESTORE
b trapexit
b trap_common
/*****************************************************************************
@ -653,11 +645,7 @@ INTERRUPT(int_vecast)
INTERRUPT(int_performance_counter)
STANDARD_PROLOG(SPR_SPRG3, PC_TEMPSAVE, SPR_SRR0, SPR_SRR1)
FRAME_SETUP(SPR_SPRG3, PC_TEMPSAVE, EXC_PERF)
GET_TOCBASE(%r2)
addi %r3, %r1, CALLSIZE
bl CNAME(powerpc_interrupt)
TOC_RESTORE
b trapexit
b trap_common
#endif
@ -1002,7 +990,7 @@ trap_common:
/* Call C trap dispatcher */
GET_TOCBASE(%r2)
addi %r3, %r1, CALLSIZE
bl CNAME(trap)
bl CNAME(powerpc_interrupt)
TOC_RESTORE
.globl CNAME(trapexit) /* exported for db_backtrace use */