Changeset 666773c in mainline for kernel/arch/ia64/src/interrupt.c
- Timestamp:
- 2008-12-31T15:33:29Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9805cde
- Parents:
- d8c0dc5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/interrupt.c
rd8c0dc5 r666773c 245 245 { 246 246 cr_ivr_t ivr; 247 irq_t *irq; 247 248 248 249 ivr.value = ivr_read(); 249 250 srlz_d(); 250 251 251 252 252 switch (ivr.vector) { 253 case INTERRUPT_SPURIOUS: 253 254 #ifdef CONFIG_DEBUG 254 255 printf("cpu%d: spurious interrupt\n", CPU->id); 255 256 #endif 256 257 break; 257 258 258 259 #ifdef CONFIG_SMP 259 case VECTOR_TLB_SHOOTDOWN_IPI: 260 tlb_shootdown_ipi_recv(); 260 case VECTOR_TLB_SHOOTDOWN_IPI: 261 tlb_shootdown_ipi_recv(); 262 end_of_local_irq(); 263 break; 264 #endif 265 266 case INTERRUPT_TIMER: 267 irq = irq_dispatch_and_lock(ivr.vector); 268 if (irq) { 269 irq->handler(irq, irq->arg); 270 spinlock_unlock(&irq->lock); 271 } else { 272 panic("\nUnhandled Internal Timer Interrupt (%d)\n", 273 ivr.vector); 274 } 275 break; 276 default: 277 irq = irq_dispatch_and_lock(ivr.vector); 278 if (irq) { 279 /* 280 * The IRQ handler was found. 281 */ 282 if (irq->preack) { 283 /* Send EOI before processing the interrupt */ 284 end_of_local_irq(); 285 } 286 irq->handler(irq, irq->arg); 287 if (!irq->preack) 288 end_of_local_irq(); 289 spinlock_unlock(&irq->lock); 290 } else { 291 /* 292 * Unhandled interrupt. 293 */ 261 294 end_of_local_irq(); 262 break; 295 #ifdef CONFIG_DEBUG 296 printf("\nUnhandled External Interrupt Vector %d\n", 297 ivr.vector); 263 298 #endif 264 265 case INTERRUPT_TIMER:266 {267 268 irq_t *irq = irq_dispatch_and_lock(ivr.vector);269 if (irq) {270 irq->handler(irq, irq->arg);271 spinlock_unlock(&irq->lock);272 } else {273 panic("\nUnhandled Internal Timer Interrupt (%d)\n",ivr.vector);274 }275 }276 break;277 278 default:279 {280 281 int ack=false;282 irq_t *irq = irq_dispatch_and_lock(ivr.vector);283 if (irq) {284 /*285 * The IRQ handler was found.286 */287 288 if (irq->preack) {289 /* Send EOI before processing the interrupt */290 end_of_local_irq();291 ack=true;292 }293 irq->handler(irq, irq->arg);294 spinlock_unlock(&irq->lock);295 } else {296 /*297 * Unhandled interrupt.298 */299 end_of_local_irq();300 ack=true;301 #ifdef CONFIG_DEBUG302 printf("\nUnhandled External Interrupt Vector %d\n",ivr.vector);303 #endif304 }305 if(!ack) end_of_local_irq();306 307 }308 309 310 break;311 299 } 300 break; 301 } 312 302 } 313 303
Note:
See TracChangeset
for help on using the changeset viewer.