Ignore:
Timestamp:
Jul 17, 2017, 11:41:25 AM (5 years ago)
Author:
alain
Message:

Change dev_pic_enable_irq() and dev_pic_disable_irq() prototypes
to handle remote IRQs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/devices/dev_pic.h

    r201 r205  
    8383 ****************************************************************************************/
    8484
    85 typedef void   (pic_bind_t)    ( lid_t lid , struct chdev_s * src_chdev );   
    86 typedef void   (pic_enable_t)  ( lid_t lid , struct chdev_s * src_chdev );   
    87 typedef void   (pic_disable_t) ( lid_t lid , struct chdev_s * src_chdev );   
    88 typedef void   (pic_timer_t)  ( uint32_t period );   
    89 typedef void   (pic_ipi_t)     ( cxy_t cxy , lid_t lid );
    90 typedef void   (pic_init_t)    ( uint32_t * lapic_base );
     85typedef void   (bind_irq_t)     ( lid_t lid , struct chdev_s * src_chdev );   
     86typedef void   (enable_irq_t)   ( lid_t lid , xptr_t src_chdev_xp );   
     87typedef void   (disable_irq_t)  ( lid_t lid , xptr_t src_chdev_xp );   
     88typedef void   (enable_timer_t) ( uint32_t period );   
     89typedef void   (send_ipi_t)     ( cxy_t cxy , lid_t lid );
     90typedef void   (extend_init_t)  ( uint32_t * lapic_base );
    9191 
    9292typedef struct pic_extend_s
    9393{
    94     pic_bind_t    * bind_irq;      /*! pointer on the driver "bind_irq" function        */
    95     pic_enable_t  * enable_irq;    /*! pointer on the driver "enable_irq" function      */
    96     pic_disable_t * disable_irq;   /*! pointer on the driver "disable_irq" function     */
    97     pic_timer_t   * enable_timer;  /*! pointer on the driver "enable_timer" function    */
    98     pic_ipi_t     * send_ipi;      /*! pointer on the driver "send_ipi" function        */
    99     pic_init_t    * extend_init;   /*! pointer on the driver "init_extend" function     */
     94    bind_irq_t      * bind_irq;      /*! pointer on the driver "bind_irq" function      */
     95    enable_irq_t    * enable_irq;    /*! pointer on the driver "enable_irq" function    */
     96    disable_irq_t   * disable_irq;   /*! pointer on the driver "disable_irq" function   */
     97    enable_timer_t  * enable_timer;  /*! pointer on the driver "enable_timer" function  */
     98    send_ipi_t      * send_ipi;      /*! pointer on the driver "send_ipi" function      */
     99    extend_init_t   * extend_init;   /*! pointer on the driver "init_extend" function   */
    100100}
    101101pic_extend_t;
    102102
    103 /******************************************************************************************
     103/*****************************************************************************************
    104104 * This structure defines the input IRQS for the external IOPIC controller, that is used
    105105 * by external peripherals (IOC, NIC, TXT, etc.) to signal completion of an I/O operation.
     
    186186
    187187/*****************************************************************************************
    188  * This function disables the IRQ generated by a local chdev, defined by the <src_chdev>
    189  * argument. It can be used for both internal & external IRQs.
    190  *****************************************************************************************
    191  * @ lid        : target core local index.
    192  * @ src_chdev  : local pointer on source chdev descriptor.
    193  ****************************************************************************************/
    194 void dev_pic_disable_irq( lid_t            lid,
    195                           struct chdev_s * src_chdev );
    196 
    197 /*****************************************************************************************
    198  * This function enables the IRQ generated by a local chdev, defined by the <src_chdev>
    199  * argument. It can be used for both internal & external IRQs.
    200  *****************************************************************************************
    201  * @ lid        : target core local index.
    202  * @ src_chdev  : local pointer on source chdev descriptor.
    203  ****************************************************************************************/
    204 void dev_pic_enable_irq( lid_t            lid,
    205                          struct chdev_s * src_chdev );
     188 * This function enables remote IRQ generated by a remote chdev, defined by the
     189 * <src_chdev_xp> argument. It can be called by any thread running in any cluster,
     190 * and can be used for both internal & external IRQs.
     191 *****************************************************************************************
     192 * @ lid           : target core local index (in cluster containing the source chdev).
     193 * @ src_chdev_xp  : extended  pointer on source chdev descriptor.
     194 ****************************************************************************************/
     195void dev_pic_enable_irq( lid_t   lid,
     196                         xptr_t  src_chdev_xp );
     197
     198/*****************************************************************************************
     199 * This function disables remote IRQ generated by a remote chdev, defined by the
     200 * <src_chdev_xp> argument. It can be called by any thread running in any cluster,
     201 * and can be used for both internal & external IRQs.
     202 *****************************************************************************************
     203 * @ lid           : target core local index (in cluster containing the source chdev).
     204 * @ src_chdev_xp  : extended pointer on sour chdev descriptor.
     205 ****************************************************************************************/
     206void dev_pic_disable_irq( lid_t   lid,
     207                          xptr_t  src_chdev_xp );
    206208
    207209/*****************************************************************************************
Note: See TracChangeset for help on using the changeset viewer.