Ignore:
Timestamp:
Apr 21, 2014, 5:46:38 AM (10 years ago)
Author:
alain
Message:

The main modif is in TTY driver: The hard lock implemented in the
vci_multi_tty component is not used anymore, because this (non cacheable)
lock was not scalable... It has been replaced by a software (cacheable) lock
that has a better scalability in case of hardware cache coherence.
(see the _tty_get_lock() and _tty_release_lock() functions)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_drivers/tty_driver.c

    r297 r313  
    4040
    4141#define in_unckdata __attribute__((section (".unckdata")))
     42#define in_kdata    __attribute__((section (".kdata")))
    4243
    4344//////////////////////////////////////////////////////////////////////////////
     
    4647
    4748in_unckdata volatile unsigned int _tty_rx_buf[NB_TTY_CHANNELS];
     49
    4850in_unckdata volatile unsigned int _tty_rx_full[NB_TTY_CHANNELS]
    4951                                     = { [0 ... NB_TTY_CHANNELS - 1] = 0 };
     52
     53in_kdata unsigned int _tty_lock[NB_TTY_CHANNELS]
     54                        = { [0 ... NB_TTY_CHANNELS - 1] = 0 };
    5055
    5156//////////////////////////////////////////////////////////////////////////////
     
    150155{
    151156    if( channel >= NB_TTY_CHANNELS ) _exit();
     157
    152158    _it_disable( save_sr_ptr );
    153     while ( _tty_get_register( channel, TTY_CONFIG ) ); // busy waiting
     159
     160//    while ( _tty_get_register( channel, TTY_CONFIG ) ); // busy waiting
     161
     162    _get_lock( &_tty_lock[channel] );
    154163}
    155164
     
    165174    if( channel >= NB_TTY_CHANNELS ) _exit();
    166175
    167     _tty_set_register( channel, TTY_CONFIG, 0 );
     176//    _tty_set_register( channel, TTY_CONFIG, 0 );
     177
     178    _release_lock( &_tty_lock[channel] );
     179   
    168180    _it_restore( save_sr_ptr );
    169181}
Note: See TracChangeset for help on using the changeset viewer.