Changeset 6cd9aa6 in mainline
- Timestamp:
- 2009-02-15T23:13:55Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 17f168e
- Parents:
- fa09449
- Location:
- kernel
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/interrupt.c
rfa09449 r6cd9aa6 174 174 ack = true; 175 175 } 176 irq->handler(irq , irq->arg);176 irq->handler(irq); 177 177 spinlock_unlock(&irq->lock); 178 178 } else { -
kernel/arch/arm32/src/drivers/gxemul.c
rfa09449 r6cd9aa6 185 185 * 186 186 * @param irq IRQ information. 187 * @param arg Not used. 188 */ 189 static void gxemul_irq_handler(irq_t *irq, void *arg, ...) 187 */ 188 static void gxemul_irq_handler(irq_t *irq) 190 189 { 191 190 if ((irq->notif_cfg.notify) && (irq->notif_cfg.answerbox)) { … … 205 204 } 206 205 207 static irq_ownership_t gxemul_claim(void )206 static irq_ownership_t gxemul_claim(void *instance) 208 207 { 209 208 return IRQ_ACCEPT; … … 267 266 } 268 267 269 static irq_ownership_t gxemul_timer_claim(void )268 static irq_ownership_t gxemul_timer_claim(void *instance) 270 269 { 271 270 return IRQ_ACCEPT; … … 277 276 * @param arg Not used. 278 277 */ 279 static void gxemul_timer_irq_handler(irq_t *irq , void *arg, ...)278 static void gxemul_timer_irq_handler(irq_t *irq) 280 279 { 281 280 /* … … 371 370 if (irq) { 372 371 /* The IRQ handler was found. */ 373 irq->handler(irq , irq->arg);372 irq->handler(irq); 374 373 spinlock_unlock(&irq->lock); 375 374 } else { -
kernel/arch/ia32/src/drivers/i8254.c
rfa09449 r6cd9aa6 62 62 static irq_t i8254_irq; 63 63 64 static irq_ownership_t i8254_claim(void )64 static irq_ownership_t i8254_claim(void *instance) 65 65 { 66 66 return IRQ_ACCEPT; 67 67 } 68 68 69 static void i8254_irq_handler(irq_t *irq , void *arg __attribute__((unused)), ...)69 static void i8254_irq_handler(irq_t *irq) 70 70 { 71 71 /* -
kernel/arch/ia32/src/interrupt.c
rfa09449 r6cd9aa6 189 189 ack = true; 190 190 } 191 irq->handler(irq , irq->arg);191 irq->handler(irq); 192 192 spinlock_unlock(&irq->lock); 193 193 } else { -
kernel/arch/ia32/src/smp/apic.c
rfa09449 r6cd9aa6 133 133 } 134 134 135 static irq_ownership_t l_apic_timer_claim(void )135 static irq_ownership_t l_apic_timer_claim(void *instance) 136 136 { 137 137 return IRQ_ACCEPT; 138 138 } 139 139 140 static void l_apic_timer_irq_handler(irq_t *irq , void *arg __attribute__((unused)), ...)140 static void l_apic_timer_irq_handler(irq_t *irq) 141 141 { 142 142 /* -
kernel/arch/ia64/src/drivers/it.c
rfa09449 r6cd9aa6 57 57 static irq_t it_irq; 58 58 59 static irq_ownership_t it_claim(void );60 static void it_interrupt(irq_t *irq , void *arg, ...);59 static irq_ownership_t it_claim(void *); 60 static void it_interrupt(irq_t *irq); 61 61 62 62 /** Initialize Interval Timer. */ … … 105 105 * @return Always IRQ_ACCEPT. 106 106 */ 107 irq_ownership_t it_claim(void )107 irq_ownership_t it_claim(void *instance) 108 108 { 109 109 return IRQ_ACCEPT; … … 111 111 112 112 /** Process Interval Timer interrupt. */ 113 void it_interrupt(irq_t *irq , void *arg, ...)113 void it_interrupt(irq_t *irq) 114 114 { 115 115 int64_t c; -
kernel/arch/ia64/src/interrupt.c
rfa09449 r6cd9aa6 267 267 irq = irq_dispatch_and_lock(ivr.vector); 268 268 if (irq) { 269 irq->handler(irq , irq->arg);269 irq->handler(irq); 270 270 spinlock_unlock(&irq->lock); 271 271 } else { … … 284 284 end_of_local_irq(); 285 285 } 286 irq->handler(irq , irq->arg);286 irq->handler(irq); 287 287 if (!irq->preack) 288 288 end_of_local_irq(); -
kernel/arch/ia64/src/ski/ski.c
rfa09449 r6cd9aa6 187 187 * @return Always IRQ_DECLINE. 188 188 */ 189 static irq_ownership_t ski_kbd_claim(void )189 static irq_ownership_t ski_kbd_claim(void *instance) 190 190 { 191 191 return IRQ_DECLINE; -
kernel/arch/mips32/src/drivers/msim.c
rfa09449 r6cd9aa6 95 95 96 96 /** Process keyboard interrupt. */ 97 static void msim_irq_handler(irq_t *irq , void *arg, ...)97 static void msim_irq_handler(irq_t *irq) 98 98 { 99 99 if ((irq->notif_cfg.notify) && (irq->notif_cfg.answerbox)) … … 111 111 } 112 112 113 static irq_ownership_t msim_claim(void )113 static irq_ownership_t msim_claim(void *instance) 114 114 { 115 115 return IRQ_ACCEPT; -
kernel/arch/mips32/src/drivers/serial.c
rfa09449 r6cd9aa6 113 113 114 114 /** Process keyboard interrupt. Does not work in simics? */ 115 static void serial_irq_handler(irq_t *irq , void *arg, ...)115 static void serial_irq_handler(irq_t *irq) 116 116 { 117 117 if ((irq->notif_cfg.notify) && (irq->notif_cfg.answerbox)) … … 121 121 } 122 122 123 static irq_ownership_t serial_claim(void )123 static irq_ownership_t serial_claim(void *instance) 124 124 { 125 125 return IRQ_ACCEPT; -
kernel/arch/mips32/src/exception.c
rfa09449 r6cd9aa6 145 145 146 146 /* decode interrupt number and process the interrupt */ 147 cause = (cp0_cause_read() >> 8) & 0xff;147 cause = (cp0_cause_read() >> 8) & 0xff; 148 148 149 149 for (i = 0; i < 8; i++) { … … 154 154 * The IRQ handler was found. 155 155 */ 156 irq->handler(irq , irq->arg);156 irq->handler(irq); 157 157 spinlock_unlock(&irq->lock); 158 158 } else { … … 161 161 */ 162 162 #ifdef CONFIG_DEBUG 163 printf("cpu%u: spurious interrupt (inum=%d)\n", CPU->id, i); 163 printf("cpu%u: spurious interrupt (inum=%d)\n", 164 CPU->id, i); 164 165 #endif 165 166 } -
kernel/arch/mips32/src/interrupt.c
rfa09449 r6cd9aa6 101 101 } 102 102 103 static irq_ownership_t timer_claim(void )103 static irq_ownership_t timer_claim(void *instance) 104 104 { 105 105 return IRQ_ACCEPT; 106 106 } 107 107 108 static void timer_irq_handler(irq_t *irq , void *arg, ...)108 static void timer_irq_handler(irq_t *irq) 109 109 { 110 110 unsigned long drift; -
kernel/arch/ppc32/src/drivers/cuda.c
rfa09449 r6cd9aa6 250 250 } 251 251 252 static void cuda_irq_handler(irq_t *irq , void *arg, ...)252 static void cuda_irq_handler(irq_t *irq) 253 253 { 254 254 if ((irq->notif_cfg.notify) && (irq->notif_cfg.answerbox)) … … 265 265 } 266 266 267 static irq_ownership_t cuda_claim(void )267 static irq_ownership_t cuda_claim(void *instance) 268 268 { 269 269 return IRQ_ACCEPT; -
kernel/arch/ppc32/src/interrupt.c
rfa09449 r6cd9aa6 74 74 } 75 75 76 irq->handler(irq , irq->arg);76 irq->handler(irq); 77 77 spinlock_unlock(&irq->lock); 78 78 } else { -
kernel/arch/sparc64/include/cpu_family.h
rfa09449 r6cd9aa6 81 81 /** @} 82 82 */ 83 -
kernel/arch/sparc64/include/cpu_node.h
rfa09449 r6cd9aa6 57 57 /** @} 58 58 */ 59 -
kernel/arch/sparc64/src/drivers/sgcn.c
rfa09449 r6cd9aa6 320 320 * The driver works in polled mode, so no interrupt should be handled by it. 321 321 */ 322 static irq_ownership_t sgcn_claim(void )322 static irq_ownership_t sgcn_claim(void *instance) 323 323 { 324 324 return IRQ_DECLINE; … … 328 328 * The driver works in polled mode, so no interrupt should be handled by it. 329 329 */ 330 static void sgcn_irq_handler(irq_t *irq , void *arg, ...)330 static void sgcn_irq_handler(irq_t *irq) 331 331 { 332 332 panic("Not yet implemented, SGCN works in polled mode."); -
kernel/arch/sparc64/src/trap/interrupt.c
rfa09449 r6cd9aa6 87 87 * The IRQ handler was found. 88 88 */ 89 irq->handler(irq , irq->arg);89 irq->handler(irq); 90 90 /* 91 91 * See if there is a clear-interrupt-routine and call it. -
kernel/genarch/include/kbd/ns16550.h
rfa09449 r6cd9aa6 47 47 extern void ns16550_release(void); 48 48 extern char ns16550_key_read(chardev_t *); 49 extern irq_ownership_t ns16550_claim(void );50 extern void ns16550_irq_handler(irq_t * , void *, ...);49 extern irq_ownership_t ns16550_claim(void *); 50 extern void ns16550_irq_handler(irq_t *); 51 51 52 52 #include <arch/types.h> -
kernel/genarch/include/kbd/z8530.h
rfa09449 r6cd9aa6 50 50 extern void z8530_interrupt(void); 51 51 extern char z8530_key_read(chardev_t *); 52 extern irq_ownership_t z8530_claim(void );53 extern void z8530_irq_handler(irq_t * , void *, ...);52 extern irq_ownership_t z8530_claim(void *); 53 extern void z8530_irq_handler(irq_t *); 54 54 55 55 #endif -
kernel/genarch/src/kbd/i8042.c
rfa09449 r6cd9aa6 124 124 } 125 125 126 static irq_ownership_t i8042_claim(void )126 static irq_ownership_t i8042_claim(void *instance) 127 127 { 128 128 return IRQ_ACCEPT; 129 129 } 130 130 131 static void i8042_irq_handler(irq_t *irq , void *arg, ...)131 static void i8042_irq_handler(irq_t *irq) 132 132 { 133 133 if (irq->notif_cfg.notify && irq->notif_cfg.answerbox) -
kernel/genarch/src/kbd/ns16550.c
rfa09449 r6cd9aa6 211 211 } 212 212 213 irq_ownership_t ns16550_claim(void )213 irq_ownership_t ns16550_claim(void *instance) 214 214 { 215 215 return (ns16550_lsr_read(&ns16550) & LSR_DATA_READY); 216 216 } 217 217 218 void ns16550_irq_handler(irq_t *irq , void *arg, ...)218 void ns16550_irq_handler(irq_t *irq) 219 219 { 220 220 if (irq->notif_cfg.notify && irq->notif_cfg.answerbox) -
kernel/genarch/src/kbd/z8530.c
rfa09449 r6cd9aa6 195 195 } 196 196 197 irq_ownership_t z8530_claim(void )197 irq_ownership_t z8530_claim(void *instance) 198 198 { 199 199 return (z8530_read_a(&z8530, RR0) & RR0_RCA); 200 200 } 201 201 202 void z8530_irq_handler(irq_t *irq , void *arg, ...)202 void z8530_irq_handler(irq_t *irq) 203 203 { 204 204 if (irq->notif_cfg.notify && irq->notif_cfg.answerbox) -
kernel/generic/include/ddi/irq.h
rfa09449 r6cd9aa6 80 80 81 81 struct irq; 82 typedef void (* irq_handler_t)(struct irq * irq, void *arg, ...);82 typedef void (* irq_handler_t)(struct irq *); 83 83 84 84 /** Type for function used to clear the interrupt. */ 85 typedef void (* cir_t)(void * arg, inr_t inr);85 typedef void (* cir_t)(void *, inr_t); 86 86 87 87 /** IPC notification config structure. … … 140 140 irq_trigger_t trigger; 141 141 /** Claim ownership of the IRQ. */ 142 irq_ownership_t (* claim)(void );142 irq_ownership_t (* claim)(void *); 143 143 /** Handler for this IRQ and device. */ 144 144 irq_handler_t handler; 145 /** Argument for the handler. */146 void * arg;145 /** Instance argument for the handler and the claim function. */ 146 void *instance; 147 147 148 148 /** Clear interrupt routine. */ … … 155 155 } irq_t; 156 156 157 extern void irq_init(count_t inrs, count_t chains);158 extern void irq_initialize(irq_t * irq);159 extern void irq_register(irq_t * irq);160 extern irq_t *irq_dispatch_and_lock(inr_t inr);161 extern irq_t *irq_find_and_lock(inr_t inr, devno_t devno);157 extern void irq_init(count_t, count_t); 158 extern void irq_initialize(irq_t *); 159 extern void irq_register(irq_t *); 160 extern irq_t *irq_dispatch_and_lock(inr_t); 161 extern irq_t *irq_find_and_lock(inr_t, devno_t); 162 162 163 163 #endif -
kernel/generic/src/console/console.c
rfa09449 r6cd9aa6 102 102 * @return Always returns IRQ_DECLINE. 103 103 */ 104 static irq_ownership_t klog_claim(void )104 static irq_ownership_t klog_claim(void *instance) 105 105 { 106 106 return IRQ_DECLINE; -
kernel/generic/src/console/kconsole.c
rfa09449 r6cd9aa6 104 104 * 105 105 */ 106 static irq_ownership_t kconsole_claim(void )106 static irq_ownership_t kconsole_claim(void *instance) 107 107 { 108 108 return IRQ_DECLINE; -
kernel/generic/src/ddi/irq.c
rfa09449 r6cd9aa6 40 40 * This code is designed to support: 41 41 * - multiple devices sharing single IRQ 42 * - multiple IRQs per signle device 42 * - multiple IRQs per single device 43 * - multiple instances of the same device 43 44 * 44 45 * … … 145 146 irq->claim = NULL; 146 147 irq->handler = NULL; 147 irq-> arg= NULL;148 irq->instance = NULL; 148 149 irq->cir = NULL; 149 150 irq->cir_arg = NULL; … … 307 308 if (devno == -1) { 308 309 /* Invoked by irq_dispatch_and_lock(). */ 309 rv = ((irq->inr == inr) && (irq->claim() == IRQ_ACCEPT)); 310 rv = ((irq->inr == inr) && 311 (irq->claim(irq->instance) == IRQ_ACCEPT)); 310 312 } else { 311 313 /* Invoked by irq_find_and_lock(). */ … … 366 368 if (devno == -1) { 367 369 /* Invoked by irq_dispatch_and_lock() */ 368 rv = (irq->claim( ) == IRQ_ACCEPT);370 rv = (irq->claim(irq->instance) == IRQ_ACCEPT); 369 371 } else { 370 372 /* Invoked by irq_find_and_lock() */
Note:
See TracChangeset
for help on using the changeset viewer.