Changes in kernel/arch/ia64/src/interrupt.c [d99c1d2:22a28a69] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/interrupt.c
rd99c1d2 r22a28a69 57 57 #include <putchar.h> 58 58 59 #define VECTORS_64_BUNDLE 20 60 #define VECTORS_16_BUNDLE 48 61 #define VECTORS_16_BUNDLE_START 0x5000 62 #define VECTOR_MAX 0x7f00 63 64 #define BUNDLE_SIZE 16 59 #define VECTORS_64_BUNDLE 20 60 #define VECTORS_16_BUNDLE 48 61 #define VECTORS_16_BUNDLE_START 0x5000 62 63 #define VECTOR_MAX 0x7f00 64 65 #define BUNDLE_SIZE 16 65 66 66 67 static const char *vector_names_64_bundle[VECTORS_64_BUNDLE] = { … … 132 133 } 133 134 134 static void dump_interrupted_context(istate_t *istate) 135 { 136 const char *ifa = symtab_fmt_name_lookup(istate->cr_ifa); 137 const char *iipa = symtab_fmt_name_lookup(istate->cr_iipa); 138 const char *iip = symtab_fmt_name_lookup(istate->cr_iip); 139 140 putchar('\n'); 141 printf("Interrupted context dump:\n"); 135 void istate_decode(istate_t *istate) 136 { 142 137 printf("ar.bsp=%p\tar.bspstore=%p\n", istate->ar_bsp, 143 138 istate->ar_bspstore); … … 149 144 istate->cr_ipsr); 150 145 151 printf("cr.iip=%#018llx, #%d\t(%s)\n", istate->cr_iip, 152 istate->cr_isr.ei, iip); 153 printf("cr.iipa=%#018llx\t(%s)\n", istate->cr_iipa, iipa); 154 printf("cr.ifa=%#018llx\t(%s)\n", istate->cr_ifa, ifa); 146 printf("cr.iip=%#018llx, #%d\t(%s)\n", istate->cr_iip, istate->cr_isr.ei, 147 symtab_fmt_name_lookup(istate->cr_iip)); 148 printf("cr.iipa=%#018llx\t(%s)\n", istate->cr_iipa, 149 symtab_fmt_name_lookup(istate->cr_iipa)); 150 printf("cr.ifa=%#018llx\t(%s)\n", istate->cr_ifa, 151 symtab_fmt_name_lookup(istate->cr_ifa)); 155 152 } 156 153 … … 184 181 185 182 fault_if_from_uspace(istate, "General Exception (%s).", desc); 186 187 dump_interrupted_context(istate); 188 panic("General Exception (%s).", desc); 183 panic_badtrap(istate, vector, "General Exception (%s).", desc); 189 184 } 190 185 … … 196 191 fault_if_from_uspace(istate, "Interruption: %#hx (%s).", 197 192 (uint16_t) vector, vector_to_string(vector)); 198 dump_interrupted_context(istate); 199 panic("Interruption: %#hx (%s).", (uint16_t) vector, 200 vector_to_string(vector)); 193 panic_badtrap(istate, vector, "Interruption: %#hx (%s).", 194 (uint16_t) vector, vector_to_string(vector)); 201 195 #endif 202 196 } … … 218 212 istate->cr_ipsr.ri++; 219 213 } 220 214 221 215 return syscall_handler(istate->in0, istate->in1, istate->in2, 222 216 istate->in3, istate->in4, istate->in5, istate->in6); … … 227 221 fault_if_from_uspace(istate, "Interruption: %#hx (%s).", 228 222 (uint16_t) vector, vector_to_string(vector)); 229 dump_interrupted_context(istate); 230 panic("Interruption: %#hx (%s).", (uint16_t) vector, 231 vector_to_string(vector)); 223 panic_badtrap(istate, vector, "Interruption: %#hx (%s).", 224 (uint16_t) vector, vector_to_string(vector)); 232 225 } 233 226 234 227 static void end_of_local_irq(void) 235 228 { 236 asm volatile ("mov cr.eoi=r0;;"); 237 } 238 229 asm volatile ( 230 "mov cr.eoi=r0;;" 231 ); 232 } 239 233 240 234 void external_interrupt(uint64_t vector, istate_t *istate) 241 235 { 242 236 cr_ivr_t ivr; 243 irq_t *irq;244 237 245 238 ivr.value = ivr_read(); 246 239 srlz_d(); 247 240 241 irq_t *irq; 242 248 243 switch (ivr.vector) { 249 244 case INTERRUPT_SPURIOUS: … … 252 247 #endif 253 248 break; 254 249 255 250 #ifdef CONFIG_SMP 256 251 case VECTOR_TLB_SHOOTDOWN_IPI: … … 259 254 break; 260 255 #endif 261 256 262 257 case INTERRUPT_TIMER: 263 258 irq = irq_dispatch_and_lock(ivr.vector); 264 259 if (irq) { 265 260 irq->handler(irq); 266 spinlock_unlock(&irq->lock);261 irq_spinlock_unlock(&irq->lock, false); 267 262 } else { 268 263 panic("Unhandled Internal Timer Interrupt (%d).", … … 283 278 if (!irq->preack) 284 279 end_of_local_irq(); 285 spinlock_unlock(&irq->lock);280 irq_spinlock_unlock(&irq->lock, false); 286 281 } else { 287 282 /*
Note:
See TracChangeset
for help on using the changeset viewer.