Changeset 0d107f31 in mainline for kernel/arch/sparc64/src/trap/interrupt.c
- Timestamp:
- 2006-10-13T20:42:54Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7dcf22a
- Parents:
- 8ce8499
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/trap/interrupt.c
r8ce8499 r0d107f31 36 36 #include <arch/trap/interrupt.h> 37 37 #include <interrupt.h> 38 #include <arch/drivers/fhc.h> 39 #include <arch/drivers/kbd.h> 38 #include <irq.h> 40 39 #include <typedefs.h> 41 40 #include <arch/types.h> … … 45 44 #include <arch/barrier.h> 46 45 #include <print.h> 47 #include <genarch/kbd/z8530.h>48 46 #include <arch.h> 49 47 #include <mm/tlb.h> 50 48 #include <config.h> 49 50 /* 51 * To be removed once we get rid of the dependency in ipc_irq_bind_arch(). 52 */ 53 #include <arch/drivers/kbd.h> 54 #include <genarch/kbd/z8530.h> 51 55 52 56 /** Register Interrupt Level Handler. … … 72 76 } 73 77 78 /** Process hardware interrupt. 79 * 80 * @param n Ignored. 81 * @param istate Ignored. 82 */ 74 83 void interrupt(int n, istate_t *istate) 75 84 { … … 80 89 data0 = asi_u64_read(ASI_UDB_INTR_R, ASI_UDB_INTR_R_DATA_0); 81 90 82 switch (data0) { 83 #ifdef CONFIG_Z8530 84 case Z8530_INTRCV_DATA0: 85 if (kbd_type != KBD_Z8530) 86 break; 91 irq_t *irq = irq_dispatch(data0); 92 if (irq) { 87 93 /* 88 * So far, we know we got this interrupt through the FHC. 89 * Since we don't have enough information about the FHC and 90 * because the interrupt looks like level sensitive, 91 * we cannot handle it by scheduling one of the level 92 * interrupt traps. Call the interrupt handler directly. 94 * The IRQ handler was found. 93 95 */ 94 95 if (z8530_belongs_to_kernel) 96 z8530_interrupt(); 97 else 98 ipc_irq_send_notif(0); 99 fhc_clear_interrupt(central_fhc, data0); 100 break; 101 96 irq->handler(irq, irq->arg); 97 } else if (data0 > config.base) { 98 /* 99 * This is a cross-call. 100 * data0 contains address of kernel function. 101 * We call the function only after we verify 102 * it is on of the supported ones. 103 */ 104 #ifdef CONFIG_SMP 105 if (data0 == (uintptr_t) tlb_shootdown_ipi_recv) { 106 tlb_shootdown_ipi_recv(); 107 } 102 108 #endif 103 default: 104 if (data0 > config.base) { 105 /* 106 * This is a cross-call. 107 * data0 contains address of kernel function. 108 * We call the function only after we verify 109 * it is on of the supported ones. 110 */ 111 #ifdef CONFIG_SMP 112 if (data0 == (uintptr_t) tlb_shootdown_ipi_recv) { 113 tlb_shootdown_ipi_recv(); 114 break; 115 } 109 } else { 110 /* 111 * Spurious interrupt. 112 */ 113 #ifdef CONFIG_DEBUG 114 printf("cpu%d: spurious interrupt (intrcv=%#llx, data0=%#llx)\n", CPU->id, intrcv, data0); 116 115 #endif 117 }118 119 printf("cpu%d: spurious interrupt (intrcv=%#llx, data0=%#llx)\n", CPU->id, intrcv, data0);120 break;121 116 } 122 117
Note:
See TracChangeset
for help on using the changeset viewer.