Ignore:
Timestamp:
Sep 18, 2012, 6:38:49 PM (12 years ago)
Author:
karaoui
Message:
  • updating irq_handler.c/drivers.c to support the nex affectations of timers
  • When using an xicu the number of timer is set to 32
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/sys/irq_handler.c

    r215 r216  
    4545    unsigned int        irq_id;
    4646
     47
    4748    // get the highest priority active IRQ index
    4849    if ( _icu_get_index( pid / NB_PROCS_MAX,
     
    5556    }
    5657
     58
    5759    if ( irq_id < 32 )  // do nothing if no interrupt active
    5860    {
     
    6062        unsigned int isr_id     = entry & 0x000000FF;
    6163        unsigned int channel_id = (entry>>16) & 0x0000FFFF;
    62         if      ( isr_id == ISR_SWITCH  ) _isr_switch();
     64        if      ( isr_id == ISR_SWITCH  ) _isr_switch( channel_id );
    6365        else if ( isr_id == ISR_IOC     ) _isr_ioc();
    6466        else if ( isr_id == ISR_DMA     ) _isr_dma( channel_id );
     
    169171    // aknowledge IRQ
    170172    if ( _timer_reset_irq( cluster_id,
    171                            NB_PROCS_MAX + timer_id ) )
     173                           timer_id ) )
    172174    {
    173175        _get_lock(&_tty_put_lock);
     
    230232// The ISR acknowledges the IRQ and calls the _ctx_switch() function.
    231233/////////////////////////////////////////////////////////////////////////////////////
    232 void _isr_switch()
     234void _isr_switch( unsigned int timer_id)
    233235{
    234236    // get cluster index and proc local index
    235     unsigned int pid        = _procid();
    236     unsigned int local_id   = pid % NB_PROCS_MAX;
    237     unsigned int cluster_id = pid / NB_PROCS_MAX;
     237    unsigned int cluster_id = _procid() / NB_PROCS_MAX;
    238238
    239239    // acknowledge IRQ
    240     if ( _timer_reset_irq( cluster_id, local_id ) )
     240    if ( _timer_reset_irq( cluster_id, timer_id ) )
    241241    {
    242242        _get_lock(&_tty_put_lock);
Note: See TracChangeset for help on using the changeset viewer.