Ignore:
Timestamp:
Dec 5, 2014, 3:38:31 PM (10 years ago)
Author:
alain
Message:

Defining the NIC and CMA drivers (validated by the classif application).
Updating other drivers to comply with the new tty0 common file.

File:
1 edited

Legend:

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

    r437 r456  
    2020#include <ioc_driver.h>
    2121#include <utils.h>
    22 #include <tty_driver.h>
     22#include <tty0.h>
    2323#include <ctx_handler.h>
    2424
    25 #if !defined(GIET_NO_HARD_CC)
    26 # error: You must define GIET_NO_HARD_CC in the giet_config.h file
    27 #endif
    28 
    2925///////////////////////////////////////////////////////////////////////////////
    3026// BDV global variables
    3127///////////////////////////////////////////////////////////////////////////////
    3228
    33 #define in_unckdata __attribute__((section (".unckdata")))
    34 #define in_kdata __attribute__((section (".kdata")))
    35 
    36 #if GIET_NO_HARD_CC
    37 in_unckdata giet_lock_t           _bdv_lock __attribute__((aligned(64)));
    38 in_unckdata volatile unsigned int _bdv_status;
    39 in_unckdata volatile unsigned int _bdv_gtid;
    40 #else
    41 in_kdata giet_lock_t           _bdv_lock __attribute__((aligned(64)));
    42 in_kdata volatile unsigned int _bdv_status;
    43 in_kdata volatile unsigned int _bdv_gtid;
    44 #endif
     29spin_lock_t  _bdv_lock __attribute__((aligned(64)));
     30unsigned int _bdv_status;
     31unsigned int _bdv_gtid;
    4532
    4633///////////////////////////////////////////////////////////////////////////////
     
    11097
    11198    // get the lock protecting BDV
    112     _get_lock(&_bdv_lock);
    113 
    114 #if GIET_DEBUG_IOC_DRIVER
    115 _puts("\n[BDV DEBUG] _bdv_access() : P[");
    116 _putd( x );
    117 _puts(",");
    118 _putd( y );
    119 _puts(",");
    120 _putd( p );
    121 _puts("] get bdv_lock at cycle ");
    122 _pud( _get_proctime() );
     99    _lock_acquire( &_bdv_lock );
     100
     101#if GIET_DEBUG_IOC_DRIVER
     102_puts("\n[BDV DEBUG] _bdv_access() : P[");
     103_putd( x );
     104_puts(",");
     105_putd( y );
     106_puts(",");
     107_putd( p );
     108_puts("] get _bdv_lock at cycle ");
     109_putd( _get_proctime() );
    123110_puts("\n");
    124111#endif
     
    172159
    173160        // release lock
    174         _release_lock(&_bdv_lock);     
     161        _lock_release( &_bdv_lock );     
    175162    }
    176163    // in USER or KERNEL mode, we deschedule the task.
     
    233220        // reset _bdv_status and release lock
    234221        _bdv_status = BLOCK_DEVICE_IDLE;
    235         _release_lock(&_bdv_lock);     
     222        _lock_release( &_bdv_lock );     
    236223    }
    237224
     
    246233_putd( _get_proctime() );
    247234_puts(" / error = ");
    248 _putd( error )
     235_putd( error );
    249236_puts("\n");
    250237#endif
Note: See TracChangeset for help on using the changeset viewer.