Changeset 313


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)

Location:
soft/giet_vm/giet_drivers
Files:
6 edited

Legend:

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

    r297 r313  
    109109{
    110110
    111 #if GIET_DEBUG_BDV_DRIVER
     111#if GIET_DEBUG_IOC_DRIVER
    112112unsigned int procid  = _get_procid();
    113113unsigned int cxy     = procid / NB_PROCS_MAX;
     
    148148            status = _bdv_get_register( BLOCK_DEVICE_STATUS );
    149149
    150 #if GIET_DEBUG_BDV_DRIVER
     150#if GIET_DEBUG_IOC_DRIVER
    151151_printf("\n[BDV DEBUG] _bdv_access() : ... waiting on BDV_STATUS register ...\n");
    152152#endif
     
    208208    }
    209209
    210 #if GIET_DEBUG_BDV_DRIVER
     210#if GIET_DEBUG_IOC_DRIVER
    211211_printf("\n[BDV DEBUG] Processor[%d,%d,%d] exit _bdv_access() at cycle %d\n",
    212212        x, y, lpid, _get_proctime() );
  • soft/giet_vm/giet_drivers/dma_driver.c

    r298 r313  
    195195#if NB_DMA_CHANNELS > 0
    196196
    197     unsigned int procid    = _get_procid();
     197    unsigned int procid     = _get_procid();
    198198    unsigned int cluster_xy = procid/NB_PROCS_MAX;
    199199    unsigned int channel_id = procid%NB_PROCS_MAX;
     
    208208
    209209_printf("\n[DMA DEBUG] Processor[%d,%d,%d] enters _dma_copy() at cycle %d\n"
    210         " - vspace_id  = %d\n"
    211         " - cluster_xy = %x\n"
    212         " - channel_id = %d\n"
    213         " - dest       = %x\n"
    214         " - source     = %x\n"
    215         " - bytes      = %x\n",
    216         x, y, channel_id, _get_proctime(), vspace_id, cluster_xy,
    217         (unsigned int)dest, (unsigned int)source, size );
     210        " - vspace_id   = %d\n"
     211        " - src_vaddr   = %x\n"
     212        " - dst_vaddr   = %x\n"
     213        " - bytes       = %x\n",
     214        x, y, channel_id, _get_proctime(), vspace_id,
     215        (unsigned int)source, (unsigned int)dest, size );
    218216#endif
    219217
     
    257255
    258256#if GIET_DEBUG_DMA_DRIVER
    259 _printf(" - src_paddr  = %llx\n"
    260         " - dst_paddr  = %llx\n",
     257_printf(" - src_paddr   = %l\n"
     258        " - dst_paddr   = %l\n",
    261259        src_paddr, dst_paddr );
    262260#endif
  • soft/giet_vm/giet_drivers/ioc_driver.c

    r297 r313  
    164164        " - channel  = %d\n"
    165165        " - mode     = %d\n"
    166         " - vaddr    = %d\n"
     166        " - vaddr    = %x\n"
    167167        " - sectors  = %d\n"
    168         " - lba      = %d\n",
     168        " - lba      = %x\n",
    169169        x, y, lpid, _get_proctime(), channel, mode, buf_vaddr, count, lba );
    170170#endif
  • soft/giet_vm/giet_drivers/pic_driver.c

    r298 r313  
    4242
    4343/////////////////////////////////////////////////////////////////////////////////
    44 // This function initializes the XICU target physical address corresponding
    45 // to a given HWI channel.
     44// This function initializes the XICU target physical address (vaddr + extend)
     45// corresponding to a given HWI channel.
    4646/////////////////////////////////////////////////////////////////////////////////
    4747void _pic_init( unsigned int channel,      // source PIC HWI channel
  • soft/giet_vm/giet_drivers/rdk_driver.c

    r298 r313  
    4747
    4848#if GIET_DEBUG_IOC_DRIVER
    49 _tty_get_lock( 0 );
    50 _puts("\n[IOC DEBUG] Enter _rdk_read() at cycle ");
    51 _putd( _get_proctime() );
    52 _puts(" for processor ");
    53 _putd( _get_procid() );
    54 _puts("\n - vaddr   = ");
    55 _putx( buffer );
    56 _puts("\n - sectors = ");
    57 _putd( count );
    58 _puts("\n - lba     = ");
    59 _putx( lba );
    60 _puts("\n");
    61 _tty_release_lock( 0 );
     49_printf("\n[IOC DEBUG] Enter _rdk_read() at cycle %d"
     50        "\n - vaddr   = %x"
     51        "\n - sectors = %d"
     52        "\n - lba     = %x",
     53        _get_proctime(), buffer, count, lba );
    6254#endif
    6355
     
    8476
    8577#if GIET_DEBUG_IOC_DRIVER
    86 _tty_get_lock( 0 );
    87 _puts("\n[IOC DEBUG] Enter _rdk_write() at cycle ");
    88 _putd( _get_proctime() );
    89 _puts(" for processor ");
    90 _putd( _get_procid() );
    91 _puts("\n - vaddr   = ");
    92 _putx( buffer );
    93 _puts("\n - sectors = ");
    94 _putd( count );
    95 _puts("\n - lba     = ");
    96 _putx( lba );
    97 _puts("\n");
    98 _tty_release_lock( 0 );
     78_printf("\n[IOC DEBUG] Enter _rdk_write() at cycle %d"
     79        "\n - vaddr   = %x"
     80        "\n - sectors = %d"
     81        "\n - lba     = %x",
     82        _get_proctime(), buffer, count, lba );
    9983#endif
    10084
  • 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.