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