Changeset 3422fb6 in mainline


Ignore:
Timestamp:
2017-09-03T19:23:25Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a5d0143
Parents:
9306cd7
Message:

Do not register IRQs inside of answerboxes

Location:
kernel/generic
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/ddi/irq.h

    r9306cd7 r3422fb6  
    9090        /** Counter. */
    9191        size_t counter;
    92        
    93         /**
    94          * Link between IRQs that are notifying the same answerbox. The list is
    95          * protected by the answerbox irq_lock.
    96          */
    97         link_t link;
    9892} ipc_notif_cfg_t;
    9993
  • kernel/generic/include/ipc/ipc.h

    r9306cd7 r3422fb6  
    9292        /** Notifications from IRQ handlers. */
    9393        list_t irq_notifs;
    94         /** IRQs with notifications to this answerbox. */
    95         list_t irq_list;
    9694} answerbox_t;
    9795
  • kernel/generic/src/ddi/irq.c

    r9306cd7 r3422fb6  
    110110        link_initialize(&irq->link);
    111111        irq_spinlock_initialize(&irq->lock, "irq.lock");
    112         link_initialize(&irq->notif_cfg.link);
    113112        irq->inr = -1;
    114113       
  • kernel/generic/src/ipc/ipc.c

    r9306cd7 r3422fb6  
    147147        list_initialize(&box->answers);
    148148        list_initialize(&box->irq_notifs);
    149         list_initialize(&box->irq_list);
    150149        box->task = task;
    151150}
  • kernel/generic/src/ipc/irq.c

    r9306cd7 r3422fb6  
    347347        irq_spinlock_lock(&irq_uspace_hash_table_lock, true);
    348348        irq_spinlock_lock(&irq->lock, false);
    349         irq_spinlock_lock(&box->irq_lock, false);
    350349       
    351350        cap->type = CAP_TYPE_IRQ;
    352351        hash_table_insert(&irq_uspace_hash_table, key, &irq->link);
    353         list_append(&irq->notif_cfg.link, &box->irq_list);
    354        
    355         irq_spinlock_unlock(&box->irq_lock, false);
     352       
    356353        irq_spinlock_unlock(&irq->lock, false);
    357354        irq_spinlock_unlock(&irq_uspace_hash_table_lock, true);
     
    383380        irq_spinlock_lock(&irq_uspace_hash_table_lock, true);
    384381        irq_spinlock_lock(&irq->lock, false);
    385         irq_spinlock_lock(&box->irq_lock, false);
    386382       
    387383        assert(irq->notif_cfg.answerbox == box);
    388        
    389         /* Remove the IRQ from the answerbox's list. */
    390         list_remove(&irq->notif_cfg.link);
    391384       
    392385        /* Remove the IRQ from the uspace IRQ hash table. */
    393386        hash_table_remove_item(&irq_uspace_hash_table, &irq->link);
    394387       
    395         irq_spinlock_unlock(&box->irq_lock, false);
    396388        /* irq->lock unlocked by the hash table remove_callback */
    397389        irq_spinlock_unlock(&irq_uspace_hash_table_lock, true);
Note: See TracChangeset for help on using the changeset viewer.