Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 24abb85d in mainline


Ignore:
Timestamp:
2017-08-18T23:27:08Z (3 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
4d76cfc
Parents:
e9d15d9
Message:

Remove SYS_DEVICE_ASSIGN_DEVNO

Files:
2 deleted
40 edited

Legend:

Unmodified
Added
Removed
  • abi/include/abi/syscall.h

    re9d15d9 r24abb85d  
    8181        SYS_PERM_REVOKE,
    8282       
    83         SYS_DEVICE_ASSIGN_DEVNO,
    8483        SYS_PHYSMEM_MAP,
    8584        SYS_PHYSMEM_UNMAP,
  • kernel/Makefile

    re9d15d9 r24abb85d  
    209209        generic/src/ddi/ddi.c \
    210210        generic/src/ddi/irq.c \
    211         generic/src/ddi/device.c \
    212211        generic/src/debug/symtab.c \
    213212        generic/src/debug/stacktrace.c \
  • kernel/arch/arm32/src/interrupt.c

    re9d15d9 r24abb85d  
    3838#include <arch/machine_func.h>
    3939#include <ddi/irq.h>
    40 #include <ddi/device.h>
    4140#include <interrupt.h>
    4241
  • kernel/arch/arm32/src/mach/beagleboardxm/beagleboardxm.c

    re9d15d9 r24abb85d  
    4444#include <mm/km.h>
    4545#include <ddi/ddi.h>
    46 #include <ddi/device.h>
    4746
    4847static void bbxm_init(void);
     
    117116        static irq_t timer_irq;
    118117        irq_initialize(&timer_irq);
    119         timer_irq.devno = device_assign_devno();
    120118        timer_irq.inr = AMDM37x_GPT1_IRQ;
    121119        timer_irq.claim = bb_timer_irq_claim;
  • kernel/arch/arm32/src/mach/beaglebone/beaglebone.c

    re9d15d9 r24abb85d  
    4646#include <interrupt.h>
    4747#include <ddi/ddi.h>
    48 #include <ddi/device.h>
    4948#include <mm/km.h>
    5049
     
    129128        static irq_t timer_irq;
    130129        irq_initialize(&timer_irq);
    131         timer_irq.devno = device_assign_devno();
    132130        timer_irq.inr = AM335x_DMTIMER2_IRQ;
    133131        timer_irq.claim = bbone_timer_irq_claim;
  • kernel/arch/arm32/src/mach/gta02/gta02.c

    re9d15d9 r24abb85d  
    4848#include <interrupt.h>
    4949#include <ddi/ddi.h>
    50 #include <ddi/device.h>
    5150#include <log.h>
    5251
     
    241240{
    242241        irq_initialize(&gta02_timer_irq);
    243         gta02_timer_irq.devno = device_assign_devno();
    244242        gta02_timer_irq.inr = GTA02_TIMER_IRQ;
    245243        gta02_timer_irq.claim = gta02_timer_irq_claim;
  • kernel/arch/arm32/src/mach/integratorcp/integratorcp.c

    re9d15d9 r24abb85d  
    4343#include <console/console.h>
    4444#include <sysinfo/sysinfo.h>
    45 #include <ddi/device.h>
    4645#include <mm/page.h>
    4746#include <mm/frame.h>
     
    207206{
    208207        irq_initialize(&icp.timer_irq);
    209         icp.timer_irq.devno = device_assign_devno();
    210208        icp.timer_irq.inr = ICP_TIMER_IRQ;
    211209        icp.timer_irq.claim = icp_timer_claim;
  • kernel/arch/arm32/src/mach/raspberrypi/raspberrypi.c

    re9d15d9 r24abb85d  
    5050#include <interrupt.h>
    5151#include <ddi/ddi.h>
    52 #include <ddi/device.h>
    5352
    5453#define RPI_DEFAULT_MEMORY_START        0
     
    118117        static irq_t timer_irq;
    119118        irq_initialize(&timer_irq);
    120         timer_irq.devno = device_assign_devno();
    121119        timer_irq.inr = BCM2835_TIMER1_IRQ;
    122120        timer_irq.claim = raspberrypi_timer_irq_claim;
  • kernel/arch/ia32/src/drivers/i8254.c

    re9d15d9 r24abb85d  
    5151#include <arch.h>
    5252#include <ddi/irq.h>
    53 #include <ddi/device.h>
    5453
    5554#define CLK_PORT1  ((ioport8_t *) 0x40U)
     
    8685        irq_initialize(&i8254_irq);
    8786        i8254_irq.preack = true;
    88         i8254_irq.devno = device_assign_devno();
    8987        i8254_irq.inr = IRQ_CLK;
    9088        i8254_irq.claim = i8254_claim;
  • kernel/arch/ia32/src/smp/apic.c

    re9d15d9 r24abb85d  
    4747#include <arch.h>
    4848#include <ddi/irq.h>
    49 #include <ddi/device.h>
    5049
    5150#ifdef CONFIG_SMP
     
    190189        irq_initialize(&l_apic_timer_irq);
    191190        l_apic_timer_irq.preack = true;
    192         l_apic_timer_irq.devno = device_assign_devno();
    193191        l_apic_timer_irq.inr = IRQ_CLK;
    194192        l_apic_timer_irq.claim = l_apic_timer_claim;
  • kernel/arch/ia64/src/drivers/it.c

    re9d15d9 r24abb85d  
    4242#include <time/clock.h>
    4343#include <ddi/irq.h>
    44 #include <ddi/device.h>
    4544#include <arch.h>
    4645
     
    6665                irq_initialize(&it_irq);
    6766                it_irq.inr = INTERRUPT_TIMER;
    68                 it_irq.devno = device_assign_devno();
    6967                it_irq.claim = it_claim;
    7068                it_irq.handler = it_interrupt;
  • kernel/arch/mips32/src/interrupt.c

    re9d15d9 r24abb85d  
    4141#include <time/clock.h>
    4242#include <ipc/sysipc.h>
    43 #include <ddi/device.h>
    4443
    4544#define IRQ_COUNT   8
     
    175174       
    176175        irq_initialize(&timer_irq);
    177         timer_irq.devno = device_assign_devno();
    178176        timer_irq.inr = TIMER_IRQ;
    179177        timer_irq.claim = timer_claim;
     
    186184#ifdef MACHINE_msim
    187185        irq_initialize(&dorder_irq);
    188         dorder_irq.devno = device_assign_devno();
    189186        dorder_irq.inr = DORDER_IRQ;
    190187        dorder_irq.claim = dorder_claim;
  • kernel/arch/sparc64/src/drivers/niagara.c

    re9d15d9 r24abb85d  
    3939#include <console/console.h>
    4040#include <ddi/ddi.h>
    41 #include <ddi/device.h>
    4241#include <arch/asm.h>
    4342#include <arch.h>
  • kernel/genarch/src/drivers/dsrln/dsrlnin.c

    re9d15d9 r24abb85d  
    4040#include <mm/slab.h>
    4141#include <arch/asm.h>
    42 #include <ddi/device.h>
    4342
    4443static irq_ownership_t dsrlnin_claim(irq_t *irq)
     
    6463               
    6564                irq_initialize(&instance->irq);
    66                 instance->irq.devno = device_assign_devno();
    6765                instance->irq.inr = inr;
    6866                instance->irq.claim = dsrlnin_claim;
  • kernel/genarch/src/drivers/i8042/i8042.c

    re9d15d9 r24abb85d  
    4444#include <console/chardev.h>
    4545#include <mm/slab.h>
    46 #include <ddi/device.h>
    4746#include <time/delay.h>
    4847
     
    113112               
    114113                irq_initialize(&instance->irq);
    115                 instance->irq.devno = device_assign_devno();
    116114                instance->irq.inr = inr;
    117115                instance->irq.claim = i8042_claim;
  • kernel/genarch/src/drivers/ns16550/ns16550.c

    re9d15d9 r24abb85d  
    4141#include <console/chardev.h>
    4242#include <mm/slab.h>
    43 #include <ddi/device.h>
    4443#include <str.h>
    4544
     
    138137               
    139138                irq_initialize(&instance->irq);
    140                 instance->irq.devno = device_assign_devno();
    141139                instance->irq.inr = inr;
    142140                instance->irq.claim = ns16550_claim;
  • kernel/genarch/src/drivers/omap/uart.c

    re9d15d9 r24abb85d  
    3737#include <assert.h>
    3838#include <genarch/drivers/omap/uart.h>
    39 #include <ddi/device.h>
    4039#include <str.h>
    4140#include <mm/km.h>
     
    161160        /* Initialize IRQ */
    162161        irq_initialize(&uart->irq);
    163         uart->irq.devno = device_assign_devno();
    164162        uart->irq.inr = interrupt;
    165163        uart->irq.claim = omap_uart_claim;
  • kernel/genarch/src/drivers/pl011/pl011.c

    re9d15d9 r24abb85d  
    3939#include <console/chardev.h>
    4040#include <console/console.h>
    41 #include <ddi/device.h>
    4241#include <arch/asm.h>
    4342#include <mm/slab.h>
     
    127126        /* Initialize IRQ */
    128127        irq_initialize(&uart->irq);
    129         uart->irq.devno = device_assign_devno();
    130128        uart->irq.inr = interrupt;
    131129        uart->irq.claim = pl011_uart_claim;
  • kernel/genarch/src/drivers/pl050/pl050.c

    re9d15d9 r24abb85d  
    4141#include <console/chardev.h>
    4242#include <mm/slab.h>
    43 #include <ddi/device.h>
    4443
    4544#define PL050_KEY_RELEASE 0xF0
     
    8786
    8887                irq_initialize(&instance->irq);
    89                 instance->irq.devno = device_assign_devno();
    9088                instance->irq.inr = inr;
    9189                instance->irq.claim = pl050_claim;
  • kernel/genarch/src/drivers/s3c24xx/uart.c

    re9d15d9 r24abb85d  
    4242#include <console/chardev.h>
    4343#include <console/console.h>
    44 #include <ddi/device.h>
    4544#include <arch/asm.h>
    4645#include <mm/slab.h>
     
    123122        /* Initialize IRQ structure. */
    124123        irq_initialize(&uart->irq);
    125         uart->irq.devno = device_assign_devno();
    126124        uart->irq.inr = inr;
    127125        uart->irq.claim = s3c24xx_uart_claim;
  • kernel/genarch/src/drivers/via-cuda/cuda.c

    re9d15d9 r24abb85d  
    4040#include <arch/asm.h>
    4141#include <mm/slab.h>
    42 #include <ddi/device.h>
    4342#include <synch/spinlock.h>
    4443#include <mem.h>
     
    106105
    107106                irq_initialize(&instance->irq);
    108                 instance->irq.devno = device_assign_devno();
    109107                instance->irq.inr = inr;
    110108                instance->irq.claim = cuda_claim;
  • kernel/generic/include/ddi/irq.h

    re9d15d9 r24abb85d  
    4343#include <proc/task.h>
    4444#include <ipc/ipc.h>
     45
     46typedef enum {
     47        IRQ_HT_KEY_INR,
     48        IRQ_HT_KEY_MODE
     49} irq_ht_key_t;
     50
     51typedef enum {
     52        IRQ_HT_MODE_CLAIM,
     53        IRQ_HT_MODE_NO_CLAIM
     54} irq_ht_mode_t;
    4555
    4656typedef enum {
     
    91101 *
    92102 * If one device has multiple interrupts, there will be multiple irq_t
    93  * instantions with the same devno.
    94  *
     103 * instantions.
    95104 */
    96105typedef struct irq {
     
    112121         */
    113122        bool preack;
    114        
    115         /** Unique device number. -1 if not yet assigned. */
    116         devno_t devno;
    117123       
    118124        /** Actual IRQ number. -1 if not yet assigned. */
  • kernel/generic/include/ipc/irq.h

    re9d15d9 r24abb85d  
    4747#include <adt/list.h>
    4848
    49 extern int ipc_irq_subscribe(answerbox_t *, inr_t, devno_t, sysarg_t,
    50     irq_code_t *);
    5149
    5250extern irq_ownership_t ipc_irq_top_half_claim(irq_t *);
    5351extern void ipc_irq_top_half_handler(irq_t *);
    5452
     53extern int ipc_irq_subscribe(answerbox_t *, inr_t, sysarg_t, irq_code_t *);
    5554extern int ipc_irq_unsubscribe(answerbox_t *, int);
    5655extern void ipc_irq_cleanup(answerbox_t *);
  • kernel/generic/include/ipc/sysipc.h

    re9d15d9 r24abb85d  
    5656extern sysarg_t sys_ipc_hangup(sysarg_t);
    5757
    58 extern sysarg_t sys_ipc_irq_subscribe(inr_t, devno_t, sysarg_t, irq_code_t *);
     58extern sysarg_t sys_ipc_irq_subscribe(inr_t, sysarg_t, irq_code_t *);
    5959extern sysarg_t sys_ipc_irq_unsubscribe(sysarg_t);
    6060
  • kernel/generic/include/typedefs.h

    re9d15d9 r24abb85d  
    4949
    5050typedef int32_t inr_t;
    51 typedef int32_t devno_t;
    5251
    5352typedef volatile uint8_t ioport8_t;
  • kernel/generic/src/console/kconsole.c

    re9d15d9 r24abb85d  
    5555#include <str.h>
    5656#include <sysinfo/sysinfo.h>
    57 #include <ddi/device.h>
    5857#include <symtab.h>
    5958#include <errno.h>
  • kernel/generic/src/ddi/irq.c

    re9d15d9 r24abb85d  
    5959 * Note about the irq_hash_table.
    6060 *
    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.
    6465 */
    6566
     
    7374#include <mem.h>
    7475#include <arch.h>
    75 
    76 #define KEY_INR    0
    77 #define KEY_DEVNO  1
    7876
    7977/** Spinlock protecting the kernel IRQ hash table.
     
    174172        link_initialize(&irq->notif_cfg.link);
    175173        irq->inr = -1;
    176         irq->devno = -1;
    177174       
    178175        irq_initialize_arch(irq);
     
    190187{
    191188        sysarg_t key[] = {
    192                 (sysarg_t) irq->inr,
    193                 (sysarg_t) irq->devno
     189                [IRQ_HT_KEY_INR] = (sysarg_t) irq->inr,
     190                [IRQ_HT_KEY_MODE] = (sysarg_t) IRQ_HT_MODE_NO_CLAIM
    194191        };
    195192       
     
    208205        link_t *lnk;
    209206        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
    212209        };
    213210       
     
    231228        link_t *lnk;
    232229        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
    235232        };
    236233       
     
    290287 * be collisions between different INRs.
    291288 *
    292  * The devno is 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.
    295292 *
    296293 * @return Index into the hash table.
     
    299296size_t irq_ht_hash(sysarg_t key[])
    300297{
    301         inr_t inr = (inr_t) key[KEY_INR];
     298        inr_t inr = (inr_t) key[IRQ_HT_KEY_INR];
    302299        return inr % buckets;
    303300}
     
    308305 * more complex architecture setup in which there are way too many interrupt
    309306 * numbers (i.e. inr's) to arrange the hash table so that collisions occur only
    310  * among same inrs of different devnos. So the explicit check for inr match must
    311  * be done.  Second, if devno is -1, the second key (i.e. devno) is not used for
    312  * 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.
    313310 *
    314311 * This function assumes interrupts are already disabled.
    315312 *
    316  * @param key  Keys (i.e. inr and devno).
     313 * @param key  Keys (i.e. inr and mode).
    317314 * @param keys This is 2.
    318315 * @param item The item to compare the key with.
     
    325322{
    326323        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];
    329326       
    330327        bool rv;
    331328       
    332329        irq_spinlock_lock(&irq->lock, false);
    333         if (devno == -1) {
     330        if (mode == IRQ_HT_MODE_CLAIM) {
    334331                /* 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));
    337333        } else {
    338334                /* Invoked by irq_find_and_lock(). */
    339                 rv = ((irq->inr == inr) && (irq->devno == devno));
     335                rv = false;
    340336        }
    341337       
     
    363359 * no collisions between different INRs.
    364360 *
    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.
    366362 *
    367363 * @return Index into the hash table.
     
    370366size_t irq_lin_hash(sysarg_t key[])
    371367{
    372         inr_t inr = (inr_t) key[KEY_INR];
     368        inr_t inr = (inr_t) key[IRQ_HT_KEY_INR];
    373369        return inr;
    374370}
     
    385381 * This function assumes interrupts are already disabled.
    386382 *
    387  * @param key  Keys (i.e. inr and devno).
     383 * @param key  Keys (i.e. inr and mode).
    388384 * @param keys This is 2.
    389385 * @param item The item to compare the key with.
     
    396392{
    397393        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];
    399395        bool rv;
    400396       
    401397        irq_spinlock_lock(&irq->lock, false);
    402         if (devno == -1) {
     398        if (mode == IRQ_HT_MODE_CLAIM) {
    403399                /* Invoked by irq_dispatch_and_lock() */
    404400                rv = (irq->claim(irq) == IRQ_ACCEPT);
    405401        } else {
    406402                /* Invoked by irq_find_and_lock() */
    407                 rv = (irq->devno == devno);
     403                rv = false;
    408404        }
    409405       
  • kernel/generic/src/ipc/irq.c

    re9d15d9 r24abb85d  
    294294 * @param box     Receiving answerbox.
    295295 * @param inr     IRQ number.
    296  * @param devno   Device number.
    297296 * @param imethod Interface and method to be associated with the
    298297 *                notification.
     
    303302 *
    304303 */
    305 int ipc_irq_subscribe(answerbox_t *box, inr_t inr, devno_t devno,
    306     sysarg_t imethod, irq_code_t *ucode)
     304int ipc_irq_subscribe(answerbox_t *box, inr_t inr, sysarg_t imethod,
     305    irq_code_t *ucode)
    307306{
    308307        sysarg_t key[] = {
    309                 (sysarg_t) inr,
    310                 (sysarg_t) devno
     308                [IRQ_HT_KEY_INR] = (sysarg_t) inr,
     309                [IRQ_HT_KEY_MODE] = (sysarg_t) IRQ_HT_MODE_NO_CLAIM
    311310        };
    312311       
     
    334333        irq_t *irq = &kobj->irq;
    335334        irq_initialize(irq);
    336         irq->devno = devno;
    337335        irq->inr = inr;
    338336        irq->claim = ipc_irq_top_half_claim;
     
    349347         */
    350348        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 */
    366349        irq_spinlock_lock(&irq->lock, false);
    367350        irq_spinlock_lock(&box->irq_lock, false);
  • kernel/generic/src/ipc/sysipc.c

    re9d15d9 r24abb85d  
    801801 *
    802802 * @param inr     IRQ number.
    803  * @param devno   Device number.
    804803 * @param imethod Interface and method to be associated with the notification.
    805804 * @param ucode   Uspace pointer to the top-half pseudocode.
     
    810809 *
    811810 */
    812 sysarg_t sys_ipc_irq_subscribe(inr_t inr, devno_t devno, sysarg_t imethod,
    813     irq_code_t *ucode)
     811sysarg_t sys_ipc_irq_subscribe(inr_t inr, sysarg_t imethod, irq_code_t *ucode)
    814812{
    815813        if (!(perm_get(TASK) & PERM_IRQ_REG))
    816814                return EPERM;
    817815       
    818         return ipc_irq_subscribe(&TASK->answerbox, inr, devno, imethod, ucode);
     816        return ipc_irq_subscribe(&TASK->answerbox, inr, imethod, ucode);
    819817}
    820818
  • kernel/generic/src/syscall/syscall.c

    re9d15d9 r24abb85d  
    4545#include <arch.h>
    4646#include <debug.h>
    47 #include <ddi/device.h>
    4847#include <interrupt.h>
    4948#include <ipc/sysipc.h>
     
    175174       
    176175        /* DDI related syscalls. */
    177         [SYS_DEVICE_ASSIGN_DEVNO] = (syshandler_t) sys_device_assign_devno,
    178176        [SYS_PHYSMEM_MAP] = (syshandler_t) sys_physmem_map,
    179177        [SYS_PHYSMEM_UNMAP] = (syshandler_t) sys_physmem_unmap,
  • uspace/lib/c/generic/async.c

    re9d15d9 r24abb85d  
    10221022 *
    10231023 * @param inr     IRQ number.
    1024  * @param devno   Device number of the device generating inr.
    10251024 * @param handler Notification handler.
    10261025 * @param data    Notification handler client data.
     
    10311030 *
    10321031 */
    1033 int async_irq_subscribe(int inr, int devno,
    1034     async_notification_handler_t handler, void *data, const irq_code_t *ucode)
     1032int async_irq_subscribe(int inr, async_notification_handler_t handler,
     1033    void *data, const irq_code_t *ucode)
    10351034{
    10361035        notification_t *notification =
     
    10521051        futex_up(&async_futex);
    10531052       
    1054         return ipc_irq_subscribe(inr, devno, imethod, ucode);
     1053        return ipc_irq_subscribe(inr, imethod, ucode);
    10551054}
    10561055
  • uspace/lib/c/generic/ddi.c

    re9d15d9 r24abb85d  
    5050#include "private/libc.h"
    5151
    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 }
    6252
    6353/** Map a piece of physical memory to task.
  • uspace/lib/c/generic/irq.c

    re9d15d9 r24abb85d  
    5555 *
    5656 * @param inr    IRQ number.
    57  * @param devno  Device number of the device generating inr.
    5857 * @param method Use this method for notifying me.
    5958 * @param ucode  Top-half pseudocode handler.
     
    6362 *
    6463 */
    65 int ipc_irq_subscribe(int inr, int devno, sysarg_t method,
    66     const irq_code_t *ucode)
     64int ipc_irq_subscribe(int inr, sysarg_t method, const irq_code_t *ucode)
    6765{
    6866        if (ucode == NULL)
    6967                ucode = &default_ucode;
    7068       
    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);
    7370}
    7471
  • uspace/lib/c/include/async.h

    re9d15d9 r24abb85d  
    166166    sysarg_t, async_port_handler_t, void *, port_id_t *);
    167167
    168 extern int async_irq_subscribe(int, int, async_notification_handler_t, void *,
     168extern int async_irq_subscribe(int, async_notification_handler_t, void *,
    169169    const irq_code_t *);
    170170extern int async_irq_unsubscribe(int);
  • uspace/lib/c/include/ipc/irq.h

    re9d15d9 r24abb85d  
    3939#include <abi/ddi/irq.h>
    4040
    41 extern int ipc_irq_subscribe(int, int, sysarg_t, const irq_code_t *);
     41extern int ipc_irq_subscribe(int, sysarg_t, const irq_code_t *);
    4242extern int ipc_irq_unsubscribe(int);
    4343
  • uspace/lib/drv/generic/interrupt.c

    re9d15d9 r24abb85d  
    4646    interrupt_handler_t *handler, const irq_code_t *irq_code)
    4747{
    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);
    5050}
    5151
  • uspace/srv/hid/input/port/msim.c

    re9d15d9 r24abb85d  
    9797        msim_ranges[0].base = paddr;
    9898        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);
    101100       
    102101        return 0;
  • uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c

    re9d15d9 r24abb85d  
    137137            (void *) ts->paddr, inr);
    138138
    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);
    141140
    142141        s3c24xx_ts_wait_for_int_mode(ts, updn_down);
  • uspace/srv/hw/bus/cuda_adb/cuda_adb.c

    re9d15d9 r24abb85d  
    282282        cuda_irq_code.ranges[0].base = (uintptr_t) instance->cuda_physical;
    283283        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);
    286285
    287286        /* Enable SR interrupt. */
  • uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c

    re9d15d9 r24abb85d  
    193193            (void *) uart->paddr, inr);
    194194
    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);
    197196
    198197        /* Enable FIFO, Tx trigger level: empty, Rx trigger level: 1 byte. */
Note: See TracChangeset for help on using the changeset viewer.