Changeset 24abb85d in mainline
- Timestamp:
- 2017-08-18T23:27:08Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4d76cfc
- Parents:
- e9d15d9
- Files:
-
- 2 deleted
- 40 edited
Legend:
- Unmodified
- Added
- Removed
-
abi/include/abi/syscall.h
re9d15d9 r24abb85d 81 81 SYS_PERM_REVOKE, 82 82 83 SYS_DEVICE_ASSIGN_DEVNO,84 83 SYS_PHYSMEM_MAP, 85 84 SYS_PHYSMEM_UNMAP, -
kernel/Makefile
re9d15d9 r24abb85d 209 209 generic/src/ddi/ddi.c \ 210 210 generic/src/ddi/irq.c \ 211 generic/src/ddi/device.c \212 211 generic/src/debug/symtab.c \ 213 212 generic/src/debug/stacktrace.c \ -
kernel/arch/arm32/src/interrupt.c
re9d15d9 r24abb85d 38 38 #include <arch/machine_func.h> 39 39 #include <ddi/irq.h> 40 #include <ddi/device.h>41 40 #include <interrupt.h> 42 41 -
kernel/arch/arm32/src/mach/beagleboardxm/beagleboardxm.c
re9d15d9 r24abb85d 44 44 #include <mm/km.h> 45 45 #include <ddi/ddi.h> 46 #include <ddi/device.h>47 46 48 47 static void bbxm_init(void); … … 117 116 static irq_t timer_irq; 118 117 irq_initialize(&timer_irq); 119 timer_irq.devno = device_assign_devno();120 118 timer_irq.inr = AMDM37x_GPT1_IRQ; 121 119 timer_irq.claim = bb_timer_irq_claim; -
kernel/arch/arm32/src/mach/beaglebone/beaglebone.c
re9d15d9 r24abb85d 46 46 #include <interrupt.h> 47 47 #include <ddi/ddi.h> 48 #include <ddi/device.h>49 48 #include <mm/km.h> 50 49 … … 129 128 static irq_t timer_irq; 130 129 irq_initialize(&timer_irq); 131 timer_irq.devno = device_assign_devno();132 130 timer_irq.inr = AM335x_DMTIMER2_IRQ; 133 131 timer_irq.claim = bbone_timer_irq_claim; -
kernel/arch/arm32/src/mach/gta02/gta02.c
re9d15d9 r24abb85d 48 48 #include <interrupt.h> 49 49 #include <ddi/ddi.h> 50 #include <ddi/device.h>51 50 #include <log.h> 52 51 … … 241 240 { 242 241 irq_initialize(>a02_timer_irq); 243 gta02_timer_irq.devno = device_assign_devno();244 242 gta02_timer_irq.inr = GTA02_TIMER_IRQ; 245 243 gta02_timer_irq.claim = gta02_timer_irq_claim; -
kernel/arch/arm32/src/mach/integratorcp/integratorcp.c
re9d15d9 r24abb85d 43 43 #include <console/console.h> 44 44 #include <sysinfo/sysinfo.h> 45 #include <ddi/device.h>46 45 #include <mm/page.h> 47 46 #include <mm/frame.h> … … 207 206 { 208 207 irq_initialize(&icp.timer_irq); 209 icp.timer_irq.devno = device_assign_devno();210 208 icp.timer_irq.inr = ICP_TIMER_IRQ; 211 209 icp.timer_irq.claim = icp_timer_claim; -
kernel/arch/arm32/src/mach/raspberrypi/raspberrypi.c
re9d15d9 r24abb85d 50 50 #include <interrupt.h> 51 51 #include <ddi/ddi.h> 52 #include <ddi/device.h>53 52 54 53 #define RPI_DEFAULT_MEMORY_START 0 … … 118 117 static irq_t timer_irq; 119 118 irq_initialize(&timer_irq); 120 timer_irq.devno = device_assign_devno();121 119 timer_irq.inr = BCM2835_TIMER1_IRQ; 122 120 timer_irq.claim = raspberrypi_timer_irq_claim; -
kernel/arch/ia32/src/drivers/i8254.c
re9d15d9 r24abb85d 51 51 #include <arch.h> 52 52 #include <ddi/irq.h> 53 #include <ddi/device.h>54 53 55 54 #define CLK_PORT1 ((ioport8_t *) 0x40U) … … 86 85 irq_initialize(&i8254_irq); 87 86 i8254_irq.preack = true; 88 i8254_irq.devno = device_assign_devno();89 87 i8254_irq.inr = IRQ_CLK; 90 88 i8254_irq.claim = i8254_claim; -
kernel/arch/ia32/src/smp/apic.c
re9d15d9 r24abb85d 47 47 #include <arch.h> 48 48 #include <ddi/irq.h> 49 #include <ddi/device.h>50 49 51 50 #ifdef CONFIG_SMP … … 190 189 irq_initialize(&l_apic_timer_irq); 191 190 l_apic_timer_irq.preack = true; 192 l_apic_timer_irq.devno = device_assign_devno();193 191 l_apic_timer_irq.inr = IRQ_CLK; 194 192 l_apic_timer_irq.claim = l_apic_timer_claim; -
kernel/arch/ia64/src/drivers/it.c
re9d15d9 r24abb85d 42 42 #include <time/clock.h> 43 43 #include <ddi/irq.h> 44 #include <ddi/device.h>45 44 #include <arch.h> 46 45 … … 66 65 irq_initialize(&it_irq); 67 66 it_irq.inr = INTERRUPT_TIMER; 68 it_irq.devno = device_assign_devno();69 67 it_irq.claim = it_claim; 70 68 it_irq.handler = it_interrupt; -
kernel/arch/mips32/src/interrupt.c
re9d15d9 r24abb85d 41 41 #include <time/clock.h> 42 42 #include <ipc/sysipc.h> 43 #include <ddi/device.h>44 43 45 44 #define IRQ_COUNT 8 … … 175 174 176 175 irq_initialize(&timer_irq); 177 timer_irq.devno = device_assign_devno();178 176 timer_irq.inr = TIMER_IRQ; 179 177 timer_irq.claim = timer_claim; … … 186 184 #ifdef MACHINE_msim 187 185 irq_initialize(&dorder_irq); 188 dorder_irq.devno = device_assign_devno();189 186 dorder_irq.inr = DORDER_IRQ; 190 187 dorder_irq.claim = dorder_claim; -
kernel/arch/sparc64/src/drivers/niagara.c
re9d15d9 r24abb85d 39 39 #include <console/console.h> 40 40 #include <ddi/ddi.h> 41 #include <ddi/device.h>42 41 #include <arch/asm.h> 43 42 #include <arch.h> -
kernel/genarch/src/drivers/dsrln/dsrlnin.c
re9d15d9 r24abb85d 40 40 #include <mm/slab.h> 41 41 #include <arch/asm.h> 42 #include <ddi/device.h>43 42 44 43 static irq_ownership_t dsrlnin_claim(irq_t *irq) … … 64 63 65 64 irq_initialize(&instance->irq); 66 instance->irq.devno = device_assign_devno();67 65 instance->irq.inr = inr; 68 66 instance->irq.claim = dsrlnin_claim; -
kernel/genarch/src/drivers/i8042/i8042.c
re9d15d9 r24abb85d 44 44 #include <console/chardev.h> 45 45 #include <mm/slab.h> 46 #include <ddi/device.h>47 46 #include <time/delay.h> 48 47 … … 113 112 114 113 irq_initialize(&instance->irq); 115 instance->irq.devno = device_assign_devno();116 114 instance->irq.inr = inr; 117 115 instance->irq.claim = i8042_claim; -
kernel/genarch/src/drivers/ns16550/ns16550.c
re9d15d9 r24abb85d 41 41 #include <console/chardev.h> 42 42 #include <mm/slab.h> 43 #include <ddi/device.h>44 43 #include <str.h> 45 44 … … 138 137 139 138 irq_initialize(&instance->irq); 140 instance->irq.devno = device_assign_devno();141 139 instance->irq.inr = inr; 142 140 instance->irq.claim = ns16550_claim; -
kernel/genarch/src/drivers/omap/uart.c
re9d15d9 r24abb85d 37 37 #include <assert.h> 38 38 #include <genarch/drivers/omap/uart.h> 39 #include <ddi/device.h>40 39 #include <str.h> 41 40 #include <mm/km.h> … … 161 160 /* Initialize IRQ */ 162 161 irq_initialize(&uart->irq); 163 uart->irq.devno = device_assign_devno();164 162 uart->irq.inr = interrupt; 165 163 uart->irq.claim = omap_uart_claim; -
kernel/genarch/src/drivers/pl011/pl011.c
re9d15d9 r24abb85d 39 39 #include <console/chardev.h> 40 40 #include <console/console.h> 41 #include <ddi/device.h>42 41 #include <arch/asm.h> 43 42 #include <mm/slab.h> … … 127 126 /* Initialize IRQ */ 128 127 irq_initialize(&uart->irq); 129 uart->irq.devno = device_assign_devno();130 128 uart->irq.inr = interrupt; 131 129 uart->irq.claim = pl011_uart_claim; -
kernel/genarch/src/drivers/pl050/pl050.c
re9d15d9 r24abb85d 41 41 #include <console/chardev.h> 42 42 #include <mm/slab.h> 43 #include <ddi/device.h>44 43 45 44 #define PL050_KEY_RELEASE 0xF0 … … 87 86 88 87 irq_initialize(&instance->irq); 89 instance->irq.devno = device_assign_devno();90 88 instance->irq.inr = inr; 91 89 instance->irq.claim = pl050_claim; -
kernel/genarch/src/drivers/s3c24xx/uart.c
re9d15d9 r24abb85d 42 42 #include <console/chardev.h> 43 43 #include <console/console.h> 44 #include <ddi/device.h>45 44 #include <arch/asm.h> 46 45 #include <mm/slab.h> … … 123 122 /* Initialize IRQ structure. */ 124 123 irq_initialize(&uart->irq); 125 uart->irq.devno = device_assign_devno();126 124 uart->irq.inr = inr; 127 125 uart->irq.claim = s3c24xx_uart_claim; -
kernel/genarch/src/drivers/via-cuda/cuda.c
re9d15d9 r24abb85d 40 40 #include <arch/asm.h> 41 41 #include <mm/slab.h> 42 #include <ddi/device.h>43 42 #include <synch/spinlock.h> 44 43 #include <mem.h> … … 106 105 107 106 irq_initialize(&instance->irq); 108 instance->irq.devno = device_assign_devno();109 107 instance->irq.inr = inr; 110 108 instance->irq.claim = cuda_claim; -
kernel/generic/include/ddi/irq.h
re9d15d9 r24abb85d 43 43 #include <proc/task.h> 44 44 #include <ipc/ipc.h> 45 46 typedef enum { 47 IRQ_HT_KEY_INR, 48 IRQ_HT_KEY_MODE 49 } irq_ht_key_t; 50 51 typedef enum { 52 IRQ_HT_MODE_CLAIM, 53 IRQ_HT_MODE_NO_CLAIM 54 } irq_ht_mode_t; 45 55 46 56 typedef enum { … … 91 101 * 92 102 * If one device has multiple interrupts, there will be multiple irq_t 93 * instantions with the same devno. 94 * 103 * instantions. 95 104 */ 96 105 typedef struct irq { … … 112 121 */ 113 122 bool preack; 114 115 /** Unique device number. -1 if not yet assigned. */116 devno_t devno;117 123 118 124 /** Actual IRQ number. -1 if not yet assigned. */ -
kernel/generic/include/ipc/irq.h
re9d15d9 r24abb85d 47 47 #include <adt/list.h> 48 48 49 extern int ipc_irq_subscribe(answerbox_t *, inr_t, devno_t, sysarg_t,50 irq_code_t *);51 49 52 50 extern irq_ownership_t ipc_irq_top_half_claim(irq_t *); 53 51 extern void ipc_irq_top_half_handler(irq_t *); 54 52 53 extern int ipc_irq_subscribe(answerbox_t *, inr_t, sysarg_t, irq_code_t *); 55 54 extern int ipc_irq_unsubscribe(answerbox_t *, int); 56 55 extern void ipc_irq_cleanup(answerbox_t *); -
kernel/generic/include/ipc/sysipc.h
re9d15d9 r24abb85d 56 56 extern sysarg_t sys_ipc_hangup(sysarg_t); 57 57 58 extern sysarg_t sys_ipc_irq_subscribe(inr_t, devno_t,sysarg_t, irq_code_t *);58 extern sysarg_t sys_ipc_irq_subscribe(inr_t, sysarg_t, irq_code_t *); 59 59 extern sysarg_t sys_ipc_irq_unsubscribe(sysarg_t); 60 60 -
kernel/generic/include/typedefs.h
re9d15d9 r24abb85d 49 49 50 50 typedef int32_t inr_t; 51 typedef int32_t devno_t;52 51 53 52 typedef volatile uint8_t ioport8_t; -
kernel/generic/src/console/kconsole.c
re9d15d9 r24abb85d 55 55 #include <str.h> 56 56 #include <sysinfo/sysinfo.h> 57 #include <ddi/device.h>58 57 #include <symtab.h> 59 58 #include <errno.h> -
kernel/generic/src/ddi/irq.c
re9d15d9 r24abb85d 59 59 * Note about the irq_hash_table. 60 60 * 61 * The hash table is configured to use two keys: inr and devno. However, the 62 * hash index is computed only from inr. Moreover, if devno is -1, the match is 63 * based on the return value of the claim() function instead of on devno. 61 * The hash table is configured to use two keys: inr and mode. However, the 62 * hash index is computed only from inr. Moreover, if mode is IRQ_HT_MODE_CLAIM, 63 * the match is based also on the return value of the claim(). Otherwise the 64 * the keys do not match. 64 65 */ 65 66 … … 73 74 #include <mem.h> 74 75 #include <arch.h> 75 76 #define KEY_INR 077 #define KEY_DEVNO 178 76 79 77 /** Spinlock protecting the kernel IRQ hash table. … … 174 172 link_initialize(&irq->notif_cfg.link); 175 173 irq->inr = -1; 176 irq->devno = -1;177 174 178 175 irq_initialize_arch(irq); … … 190 187 { 191 188 sysarg_t key[] = { 192 (sysarg_t) irq->inr,193 (sysarg_t) irq->devno189 [IRQ_HT_KEY_INR] = (sysarg_t) irq->inr, 190 [IRQ_HT_KEY_MODE] = (sysarg_t) IRQ_HT_MODE_NO_CLAIM 194 191 }; 195 192 … … 208 205 link_t *lnk; 209 206 sysarg_t key[] = { 210 (sysarg_t) inr,211 (sysarg_t) -1 /* Search will use claim() instead of devno */207 [IRQ_HT_KEY_INR] = (sysarg_t) inr, 208 [IRQ_HT_KEY_MODE] = (sysarg_t) IRQ_HT_MODE_CLAIM 212 209 }; 213 210 … … 231 228 link_t *lnk; 232 229 sysarg_t key[] = { 233 (sysarg_t) inr,234 (sysarg_t) -1 /* Search will use claim() instead of devno */230 [IRQ_HT_KEY_INR] = (sysarg_t) inr, 231 [IRQ_HT_KEY_MODE] = (sysarg_t) IRQ_HT_MODE_CLAIM 235 232 }; 236 233 … … 290 287 * be collisions between different INRs. 291 288 * 292 * The devnois not used to compute the hash.293 * 294 * @param key The first of the keys is inr and the second is devno or -1.289 * The mode is not used to compute the hash. 290 * 291 * @param key The first of the keys is inr and the second is mode. 295 292 * 296 293 * @return Index into the hash table. … … 299 296 size_t irq_ht_hash(sysarg_t key[]) 300 297 { 301 inr_t inr = (inr_t) key[ KEY_INR];298 inr_t inr = (inr_t) key[IRQ_HT_KEY_INR]; 302 299 return inr % buckets; 303 300 } … … 308 305 * more complex architecture setup in which there are way too many interrupt 309 306 * numbers (i.e. inr's) to arrange the hash table so that collisions occur only 310 * among same inrs of different dev nos. So the explicit check for inr match must311 * be done. Second, if devno is -1, the second key (i.e. devno) is not used for312 * the match and the result of the claim() function is used instead.307 * among same inrs of different devices. So the explicit check for inr match 308 * must be done. Second, if mode is IRQ_HT_MODE_CLAIM, the result of the 309 * claim() function is used for the match. Otherwise the key does not match. 313 310 * 314 311 * This function assumes interrupts are already disabled. 315 312 * 316 * @param key Keys (i.e. inr and devno).313 * @param key Keys (i.e. inr and mode). 317 314 * @param keys This is 2. 318 315 * @param item The item to compare the key with. … … 325 322 { 326 323 irq_t *irq = hash_table_get_instance(item, irq_t, link); 327 inr_t inr = (inr_t) key[ KEY_INR];328 devno_t devno = (devno_t) key[KEY_DEVNO];324 inr_t inr = (inr_t) key[IRQ_HT_KEY_INR]; 325 irq_ht_mode_t mode = (irq_ht_mode_t) key[IRQ_HT_KEY_MODE]; 329 326 330 327 bool rv; 331 328 332 329 irq_spinlock_lock(&irq->lock, false); 333 if ( devno == -1) {330 if (mode == IRQ_HT_MODE_CLAIM) { 334 331 /* Invoked by irq_dispatch_and_lock(). */ 335 rv = ((irq->inr == inr) && 336 (irq->claim(irq) == IRQ_ACCEPT)); 332 rv = ((irq->inr == inr) && (irq->claim(irq) == IRQ_ACCEPT)); 337 333 } else { 338 334 /* Invoked by irq_find_and_lock(). */ 339 rv = ((irq->inr == inr) && (irq->devno == devno));335 rv = false; 340 336 } 341 337 … … 363 359 * no collisions between different INRs. 364 360 * 365 * @param key The first of the keys is inr and the second is devno or -1.361 * @param key The first of the keys is inr and the second is mode. 366 362 * 367 363 * @return Index into the hash table. … … 370 366 size_t irq_lin_hash(sysarg_t key[]) 371 367 { 372 inr_t inr = (inr_t) key[ KEY_INR];368 inr_t inr = (inr_t) key[IRQ_HT_KEY_INR]; 373 369 return inr; 374 370 } … … 385 381 * This function assumes interrupts are already disabled. 386 382 * 387 * @param key Keys (i.e. inr and devno).383 * @param key Keys (i.e. inr and mode). 388 384 * @param keys This is 2. 389 385 * @param item The item to compare the key with. … … 396 392 { 397 393 irq_t *irq = list_get_instance(item, irq_t, link); 398 devno_t devno = (devno_t) key[KEY_DEVNO];394 irq_ht_mode_t mode = (irq_ht_mode_t) key[IRQ_HT_KEY_MODE]; 399 395 bool rv; 400 396 401 397 irq_spinlock_lock(&irq->lock, false); 402 if ( devno == -1) {398 if (mode == IRQ_HT_MODE_CLAIM) { 403 399 /* Invoked by irq_dispatch_and_lock() */ 404 400 rv = (irq->claim(irq) == IRQ_ACCEPT); 405 401 } else { 406 402 /* Invoked by irq_find_and_lock() */ 407 rv = (irq->devno == devno);403 rv = false; 408 404 } 409 405 -
kernel/generic/src/ipc/irq.c
re9d15d9 r24abb85d 294 294 * @param box Receiving answerbox. 295 295 * @param inr IRQ number. 296 * @param devno Device number.297 296 * @param imethod Interface and method to be associated with the 298 297 * notification. … … 303 302 * 304 303 */ 305 int ipc_irq_subscribe(answerbox_t *box, inr_t inr, devno_t devno,306 sysarg_t imethod,irq_code_t *ucode)304 int ipc_irq_subscribe(answerbox_t *box, inr_t inr, sysarg_t imethod, 305 irq_code_t *ucode) 307 306 { 308 307 sysarg_t key[] = { 309 (sysarg_t) inr,310 (sysarg_t) devno308 [IRQ_HT_KEY_INR] = (sysarg_t) inr, 309 [IRQ_HT_KEY_MODE] = (sysarg_t) IRQ_HT_MODE_NO_CLAIM 311 310 }; 312 311 … … 334 333 irq_t *irq = &kobj->irq; 335 334 irq_initialize(irq); 336 irq->devno = devno;337 335 irq->inr = inr; 338 336 irq->claim = ipc_irq_top_half_claim; … … 349 347 */ 350 348 irq_spinlock_lock(&irq_uspace_hash_table_lock, true); 351 352 link_t *hlp = hash_table_find(&irq_uspace_hash_table, key);353 if (hlp) {354 irq_t *hirq = hash_table_get_instance(hlp, irq_t, link);355 356 /* hirq is locked */357 irq_spinlock_unlock(&hirq->lock, false);358 code_free(code);359 irq_spinlock_unlock(&irq_uspace_hash_table_lock, true);360 361 kobject_free(TASK, cap);362 return EEXIST;363 }364 365 /* Locking is not really necessary, but paranoid */366 349 irq_spinlock_lock(&irq->lock, false); 367 350 irq_spinlock_lock(&box->irq_lock, false); -
kernel/generic/src/ipc/sysipc.c
re9d15d9 r24abb85d 801 801 * 802 802 * @param inr IRQ number. 803 * @param devno Device number.804 803 * @param imethod Interface and method to be associated with the notification. 805 804 * @param ucode Uspace pointer to the top-half pseudocode. … … 810 809 * 811 810 */ 812 sysarg_t sys_ipc_irq_subscribe(inr_t inr, devno_t devno, sysarg_t imethod, 813 irq_code_t *ucode) 811 sysarg_t sys_ipc_irq_subscribe(inr_t inr, sysarg_t imethod, irq_code_t *ucode) 814 812 { 815 813 if (!(perm_get(TASK) & PERM_IRQ_REG)) 816 814 return EPERM; 817 815 818 return ipc_irq_subscribe(&TASK->answerbox, inr, devno,imethod, ucode);816 return ipc_irq_subscribe(&TASK->answerbox, inr, imethod, ucode); 819 817 } 820 818 -
kernel/generic/src/syscall/syscall.c
re9d15d9 r24abb85d 45 45 #include <arch.h> 46 46 #include <debug.h> 47 #include <ddi/device.h>48 47 #include <interrupt.h> 49 48 #include <ipc/sysipc.h> … … 175 174 176 175 /* DDI related syscalls. */ 177 [SYS_DEVICE_ASSIGN_DEVNO] = (syshandler_t) sys_device_assign_devno,178 176 [SYS_PHYSMEM_MAP] = (syshandler_t) sys_physmem_map, 179 177 [SYS_PHYSMEM_UNMAP] = (syshandler_t) sys_physmem_unmap, -
uspace/lib/c/generic/async.c
re9d15d9 r24abb85d 1022 1022 * 1023 1023 * @param inr IRQ number. 1024 * @param devno Device number of the device generating inr.1025 1024 * @param handler Notification handler. 1026 1025 * @param data Notification handler client data. … … 1031 1030 * 1032 1031 */ 1033 int async_irq_subscribe(int inr, int devno,1034 async_notification_handler_t handler,void *data, const irq_code_t *ucode)1032 int async_irq_subscribe(int inr, async_notification_handler_t handler, 1033 void *data, const irq_code_t *ucode) 1035 1034 { 1036 1035 notification_t *notification = … … 1052 1051 futex_up(&async_futex); 1053 1052 1054 return ipc_irq_subscribe(inr, devno,imethod, ucode);1053 return ipc_irq_subscribe(inr, imethod, ucode); 1055 1054 } 1056 1055 -
uspace/lib/c/generic/ddi.c
re9d15d9 r24abb85d 50 50 #include "private/libc.h" 51 51 52 53 /** Return unique device number.54 *55 * @return New unique device number.56 *57 */58 int device_assign_devno(void)59 {60 return __SYSCALL0(SYS_DEVICE_ASSIGN_DEVNO);61 }62 52 63 53 /** Map a piece of physical memory to task. -
uspace/lib/c/generic/irq.c
re9d15d9 r24abb85d 55 55 * 56 56 * @param inr IRQ number. 57 * @param devno Device number of the device generating inr.58 57 * @param method Use this method for notifying me. 59 58 * @param ucode Top-half pseudocode handler. … … 63 62 * 64 63 */ 65 int ipc_irq_subscribe(int inr, int devno, sysarg_t method, 66 const irq_code_t *ucode) 64 int ipc_irq_subscribe(int inr, sysarg_t method, const irq_code_t *ucode) 67 65 { 68 66 if (ucode == NULL) 69 67 ucode = &default_ucode; 70 68 71 return __SYSCALL4(SYS_IPC_IRQ_SUBSCRIBE, inr, devno, method, 72 (sysarg_t) ucode); 69 return __SYSCALL3(SYS_IPC_IRQ_SUBSCRIBE, inr, method, (sysarg_t) ucode); 73 70 } 74 71 -
uspace/lib/c/include/async.h
re9d15d9 r24abb85d 166 166 sysarg_t, async_port_handler_t, void *, port_id_t *); 167 167 168 extern int async_irq_subscribe(int, int,async_notification_handler_t, void *,168 extern int async_irq_subscribe(int, async_notification_handler_t, void *, 169 169 const irq_code_t *); 170 170 extern int async_irq_unsubscribe(int); -
uspace/lib/c/include/ipc/irq.h
re9d15d9 r24abb85d 39 39 #include <abi/ddi/irq.h> 40 40 41 extern int ipc_irq_subscribe(int, int,sysarg_t, const irq_code_t *);41 extern int ipc_irq_subscribe(int, sysarg_t, const irq_code_t *); 42 42 extern int ipc_irq_unsubscribe(int); 43 43 -
uspace/lib/drv/generic/interrupt.c
re9d15d9 r24abb85d 46 46 interrupt_handler_t *handler, const irq_code_t *irq_code) 47 47 { 48 return async_irq_subscribe(irq, dev->handle,49 (async_notification_handler_t) handler,dev, irq_code);48 return async_irq_subscribe(irq, (async_notification_handler_t) handler, 49 dev, irq_code); 50 50 } 51 51 -
uspace/srv/hid/input/port/msim.c
re9d15d9 r24abb85d 97 97 msim_ranges[0].base = paddr; 98 98 msim_cmds[0].addr = (void *) paddr; 99 async_irq_subscribe(inr, device_assign_devno(), msim_irq_handler, NULL, 100 &msim_kbd); 99 async_irq_subscribe(inr, msim_irq_handler, NULL, &msim_kbd); 101 100 102 101 return 0; -
uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c
re9d15d9 r24abb85d 137 137 (void *) ts->paddr, inr); 138 138 139 async_irq_subscribe(inr, device_assign_devno(), s3c24xx_ts_irq_handler, 140 NULL, &ts_irq_code); 139 async_irq_subscribe(inr, s3c24xx_ts_irq_handler, NULL, &ts_irq_code); 141 140 142 141 s3c24xx_ts_wait_for_int_mode(ts, updn_down); -
uspace/srv/hw/bus/cuda_adb/cuda_adb.c
re9d15d9 r24abb85d 282 282 cuda_irq_code.ranges[0].base = (uintptr_t) instance->cuda_physical; 283 283 cuda_irq_code.cmds[0].addr = (void *) &((cuda_t *) instance->cuda_physical)->ifr; 284 async_irq_subscribe(10, device_assign_devno(), cuda_irq_handler, NULL, 285 &cuda_irq_code); 284 async_irq_subscribe(10, cuda_irq_handler, NULL, &cuda_irq_code); 286 285 287 286 /* Enable SR interrupt. */ -
uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c
re9d15d9 r24abb85d 193 193 (void *) uart->paddr, inr); 194 194 195 async_irq_subscribe(inr, device_assign_devno(), s3c24xx_uart_irq_handler, 196 NULL, &uart_irq_code); 195 async_irq_subscribe(inr, s3c24xx_uart_irq_handler, NULL, &uart_irq_code); 197 196 198 197 /* Enable FIFO, Tx trigger level: empty, Rx trigger level: 1 byte. */
Note:
See TracChangeset
for help on using the changeset viewer.