Changeset 438 for trunk/kernel/devices


Ignore:
Timestamp:
Apr 4, 2018, 2:49:02 PM (6 years ago)
Author:
alain
Message:

Fix a bug in scheduler related to RPC blocking.

Location:
trunk/kernel/devices
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/devices/dev_fbf.c

    r437 r438  
    177177{
    178178
    179 #if CONFIG_DEBUG_DEV_FBF_RX
     179#if DEBUG_DEV_FBF_RX
    180180uint32_t cycle = (uint32_t)hal_get_cycle();
    181 if( CONFIG_DEBUG_DEV_FBF_RX < cycle )
     181if( DEBUG_DEV_FBF_RX < cycle )
    182182printk("\n[DBG] %s : thread %x enter / process %x / vaddr %x / size %x\n",
    183183__FUNCTION__ , this, this->process->pid , buffer , buf_paddr );
     
    186186    return dev_fbf_access( false , buffer , length , offset );
    187187
    188 #if CONFIG_DEBUG_DEV_FBF_RX
     188#if DEBUG_DEV_FBF_RX
    189189cycle = (uint32_t)hal_get_cycle();
    190 if( CONFIG_DEBUG_DEV_FBF_RX < cycle )
     190if( DEBUG_DEV_FBF_RX < cycle )
    191191printk("\n[DBG] %s : thread %x exit / process %x / vaddr %x / size %x\n",
    192192__FUNCTION__ , this, this->process->pid , buffer , buf_paddr );
     
    201201{
    202202
    203 #if CONFIG_DEBUG_DEV_FBF_TX
     203#if DEBUG_DEV_FBF_TX
    204204uint32_t cycle = (uint32_t)hal_get_cycle();
    205 if( CONFIG_DEBUG_DEV_FBF_TX < cycle )
     205if( DEBUG_DEV_FBF_TX < cycle )
    206206printk("\n[DBG] %s : thread %x enter / process %x / vaddr %x / size %x\n",
    207207__FUNCTION__ , this, this->process->pid , buffer , buf_paddr );
     
    210210    return dev_fbf_access( true , buffer , length , offset );
    211211
    212 #if CONFIG_DEBUG_DEV_FBF_RX
     212#if DEBUG_DEV_FBF_RX
    213213cycle = (uint32_t)hal_get_cycle();
    214 if( CONFIG_DEBUG_DEV_FBF_RX < cycle )
     214if( DEBUG_DEV_FBF_RX < cycle )
    215215printk("\n[DBG] %s : thread %x exit / process %x / vaddr %x / size %x\n",
    216216__FUNCTION__ , this, this->process->pid , buffer , buf_paddr );
  • trunk/kernel/devices/dev_ioc.c

    r437 r438  
    136136{
    137137
    138 #if CONFIG_DEBUG_DEV_IOC_RX
     138#if DEBUG_DEV_IOC_RX
    139139uint32_t cycle = (uint32_t)hal_get_cycles();
    140 if( CONFIG_DEBUG_DEV_IOC_RX < cycle )
     140if( DEBUG_DEV_IOC_RX < cycle )
    141141printk("\n[DBG] %s : thread %x enters / lba  %x / buffer %x / cycle %d\n",
    142142__FUNCTION__ , this, lba, buffer, cycle );
     
    145145    return dev_ioc_access( IOC_READ , buffer , lba , count );
    146146
    147 #if CONFIG_DEBUG_DEV_IOC_RX
     147#if DEBUG_DEV_IOC_RX
    148148cycle = (uint32_t)hal_get_cycles();
    149 if( CONFIG_DEBUG_DEV_IOC_RX < cycle )
     149if( DEBUG_DEV_IOC_RX < cycle )
    150150printk("\n[DBG] %s : thread %x exit / lba  %x / buffer %x / cycle %d\n",
    151151__FUNCTION__ , this, lba, buffer, cycle );
     
    160160{
    161161
    162 #if CONFIG_DEBUG_DEV_IOC_TX
     162#if DEBUG_DEV_IOC_TX
    163163uint32_t cycle = (uint32_t)hal_get_cycles();
    164 if( CONFIG_DEBUG_DEV_IOC_TX < cycle )
     164if( DEBUG_DEV_IOC_TX < cycle )
    165165printk("\n[DBG] %s : thread %x enters / lba  %x / buffer %x / cycle %d\n",
    166166__FUNCTION__ , this, lba, buffer, cycle );
     
    169169    return dev_ioc_access( IOC_WRITE , buffer , lba , count );
    170170
    171 #if CONFIG_DEBUG_DEV_IOC_TX
     171#if DEBUG_DEV_IOC_TX
    172172cycle = (uint32_t)hal_get_cycles();
    173 if( CONFIG_DEBUG_DEV_IOC_TX < cycle )
     173if( DEBUG_DEV_IOC_TX < cycle )
    174174printk("\n[DBG] %s : thread %x exit / lba  %x / buffer %x / cycle %d\n",
    175175__FUNCTION__ , this, lba, buffer, cycle );
     
    186186    thread_t * this = CURRENT_THREAD;
    187187
    188 #if CONFIG_DEBUG_DEV_IOC_RX
     188#if DEBUG_DEV_IOC_RX
    189189uint32_t cycle = (uint32_t)hal_get_cycles();
    190 if( CONFIG_DEBUG_DEV_IOC_RX < cycle )
     190if( DEBUG_DEV_IOC_RX < cycle )
    191191printk("\n[DBG] %s : thread %x enters / lba  %x / buffer %x / cycle %d\n",
    192192__FUNCTION__ , this, lba, buffer, cycle );
     
    227227    dev_pic_enable_irq( lid , ioc_xp );
    228228
    229 #if CONFIG_DEBUG_DEV_IOC_RX
     229#if DEBUG_DEV_IOC_RX
    230230cycle = (uint32_t)hal_get_cycles();
    231 if( CONFIG_DEBUG_DEV_IOC_RX < cycle )
     231if( DEBUG_DEV_IOC_RX < cycle )
    232232printk("\n[DBG] %s : thread %x exit / lba  %x / buffer %x / cycle %d\n",
    233233__FUNCTION__ , this, lba, buffer, cycle );
  • trunk/kernel/devices/dev_mmc.c

    r437 r438  
    9999    thread_t * this = CURRENT_THREAD;
    100100
    101 #if CONFIG_DEBUG_DEV_MMC
     101#if DEBUG_DEV_MMC
    102102uint32_t cycle = (uint32_t)hal_get_cycles();
    103 if( CONFIG_DEBUG_DEV_MMC < cycle )
     103if( DEBUG_DEV_MMC < cycle )
    104104printk("\n[DBG] %s : thread %x enters / process %x / buf_xp = %l\n",
    105105__FUNCTION__, this, this->process->pid , buf_xp );
     
    128128    error = dev_mmc_access( this );
    129129
    130 #if CONFIG_DEBUG_DEV_MMC
     130#if DEBUG_DEV_MMC
    131131cycle = (uint32_t)hal_get_cycles();
    132 if( CONFIG_DEBUG_DEV_MMC < cycle )
     132if( DEBUG_DEV_MMC < cycle )
    133133printk("\n[DBG] %s : thread %x exit / process %x / buf_xp = %l\n",
    134134__FUNCTION__, this, this->process->pid , buf_xp );
     
    147147    thread_t * this = CURRENT_THREAD;
    148148
    149 #if CONFIG_DEBUG_DEV_MMC
     149#if DEBUG_DEV_MMC
    150150uint32_t cycle = (uint32_t)hal_get_cycles();
    151 if( CONFIG_DEBUG_DEV_MMC < cycle )
     151if( DEBUG_DEV_MMC < cycle )
    152152printk("\n[DBG] %s : thread %x enters / process %x / buf_xp = %l\n",
    153153__FUNCTION__, this, this->process->pid , buf_xp );
     
    176176    error = dev_mmc_access( this );
    177177
    178 #if CONFIG_DEBUG_DEV_MMC
     178#if DEBUG_DEV_MMC
    179179cycle = (uint32_t)hal_get_cycles();
    180 if( CONFIG_DEBUG_DEV_MMC < cycle )
     180if( DEBUG_DEV_MMC < cycle )
    181181printk("\n[DBG] %s : thread %x exit / process %x / buf_xp = %l\n",
    182182__FUNCTION__, this, this->process->pid , buf_xp );
  • trunk/kernel/devices/dev_nic.c

    r437 r438  
    9999    core_t * core = thread_ptr->core;
    100100
    101 #if CONFIG_DEBUG_DEV_NIC_RX
     101#if DEBUG_DEV_NIC_RX
    102102uint32_t cycle = (uint32_t)hal_get_cycles();
    103 if( CONFIG_DEBUG_DEV_NIC_RX < cycle )
     103if( DEBUG_DEV_NIC_RX < cycle )
    104104printk("\n[DBG] %s : thread %x enters for packet %x in cluster %x\n",
    105105__FUNCTION__ , thread_ptr , pkd , local_cxy );
     
    153153    pkd->length = thread_ptr->nic_cmd.length;
    154154
    155 #if CONFIG_DEBUG_DEV_NIC_RX
     155#if DEBUG_DEV_NIC_RX
    156156cycle = (uint32_t)hal_get_cycles();
    157 if( CONFIG_DEBUG_DEV_NIC_RX < cycle )
     157if( DEBUG_DEV_NIC_RX < cycle )
    158158printk("\n[DBG] %s : thread %x exit for packet %x in cluster %x\n",
    159159__FUNCTION__ , thread_ptr , pkd , local_cxy );
     
    177177    core_t * core = thread_ptr->core;
    178178
    179 #if CONFIG_DEBUG_DEV_NIC_RX
     179#if DEBUG_DEV_NIC_RX
    180180uint32_t cycle = (uint32_t)hal_get_cycles();
    181 if( CONFIG_DEBUG_DEV_NIC_RX < cycle )
     181if( DEBUG_DEV_NIC_RX < cycle )
    182182printk("\n[DBG] %s : thread %x enters for packet %x in cluster %x\n",
    183183__FUNCTION__ , thread_ptr , pkd , local_cxy );
     
    229229    if( error ) return error;
    230230
    231 #if CONFIG_DEBUG_DEV_NIC_RX
     231#if DEBUG_DEV_NIC_RX
    232232cycle = (uint32_t)hal_get_cycles();
    233 if( CONFIG_DEBUG_DEV_NIC_RX < cycle )
     233if( DEBUG_DEV_NIC_RX < cycle )
    234234printk("\n[DBG] %s : thread %x exit for packet %x in cluster %x\n",
    235235__FUNCTION__ , thread_ptr , pkd , local_cxy );
  • trunk/kernel/devices/dev_pic.c

    r437 r438  
    8686{
    8787
    88 #if CONFIG_DEBUG_DEV_PIC
    89 uint32_t cycle = (uint32_t)hal_get_cycles();
    90 if( CONFIG_DEBUG_DEV_PIC < cycle )
     88#if DEBUG_DEV_PIC
     89uint32_t cycle = (uint32_t)hal_get_cycles();
     90if( DEBUG_DEV_PIC < cycle )
    9191printk("\n[DBG] %s : core[%x,%d] / src_chdev_cxy %x / src_chdev_ptr %x / cycle %d\n",
    9292__FUNCTION__, local_cxy, lid, GET_CXY(src_chdev_xp), GET_PTR(src_chdev_xp), cycle );
     
    109109{
    110110
    111 #if CONFIG_DEBUG_DEV_PIC
    112 uint32_t cycle = (uint32_t)hal_get_cycles();
    113 if( CONFIG_DEBUG_DEV_PIC < cycle )
     111#if DEBUG_DEV_PIC
     112uint32_t cycle = (uint32_t)hal_get_cycles();
     113if( DEBUG_DEV_PIC < cycle )
    114114printk("\n[DBG] %s : core[%x,%d] / src_chdev_cxy %x / src_chdev_ptr %x / cycle %d\n",
    115115__FUNCTION__, local_cxy, lid, GET_CXY(src_chdev_xp), GET_PTR(src_chdev_xp), cycle );
     
    131131{
    132132
    133 #if CONFIG_DEBUG_DEV_PIC
    134 uint32_t cycle = (uint32_t)hal_get_cycles();
    135 if( CONFIG_DEBUG_DEV_PIC < cycle )
     133#if DEBUG_DEV_PIC
     134uint32_t cycle = (uint32_t)hal_get_cycles();
     135if( DEBUG_DEV_PIC < cycle )
    136136printk("\n[DBG] %s : core[%x,%d] / period %d / cycle %d\n",
    137137__FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , period, cycle );
     
    153153{
    154154
    155 #if CONFIG_DEBUG_DEV_PIC
    156 uint32_t cycle = (uint32_t)hal_get_cycles();
    157 if( CONFIG_DEBUG_DEV_PIC < cycle )
     155#if DEBUG_DEV_PIC
     156uint32_t cycle = (uint32_t)hal_get_cycles();
     157if( DEBUG_DEV_PIC < cycle )
    158158printk("\n[DBG] %s : core[%x,%d] / cycle %d\n",
    159159__FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , cycle );
     
    176176{
    177177
    178 #if CONFIG_DEBUG_DEV_PIC
    179 uint32_t cycle = (uint32_t)hal_get_cycles();
    180 if( CONFIG_DEBUG_DEV_PIC < cycle )
     178#if DEBUG_DEV_PIC
     179uint32_t cycle = (uint32_t)hal_get_cycles();
     180if( DEBUG_DEV_PIC < cycle )
    181181printk("\n[DBG] %s : src_core[%x,%d] / dst_core[%x,%d] / cycle %d\n",
    182182__FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, cxy, lid, cycle );
     
    198198{
    199199
    200 #if CONFIG_DEBUG_DEV_PIC
    201 uint32_t cycle = (uint32_t)hal_get_cycles();
    202 if( CONFIG_DEBUG_DEV_PIC < cycle )
     200#if DEBUG_DEV_PIC
     201uint32_t cycle = (uint32_t)hal_get_cycles();
     202if( DEBUG_DEV_PIC < cycle )
    203203printk("\n[DBG] %s : core[%x,%d] / cycle %d\n",
    204204__FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, cycle );
  • trunk/kernel/devices/dev_txt.c

    r436 r438  
    3838extern chdev_directory_t  chdev_dir;         // allocated in kernel_init.c
    3939
    40 #if (CONFIG_DEBUG_SYS_READ & 1)
     40#if (DEBUG_SYS_READ & 1)
    4141extern uint32_t enter_txt_read;
    4242extern uint32_t exit_txt_read;
    4343#endif
    4444
    45 #if (CONFIG_DEBUG_SYS_WRITE & 1)
     45#if (DEBUG_SYS_WRITE & 1)
    4646extern uint32_t enter_txt_write;
    4747extern uint32_t exit_txt_write;
     
    161161{
    162162
    163 #if (CONFIG_DEBUG_SYS_WRITE & 1)
     163#if (DEBUG_SYS_WRITE & 1)
    164164enter_txt_write = hal_time_stamp();
    165165#endif
    166166
    167 #if CONFIG_DEBUG_DEV_TXT_TX
     167#if DEBUG_DEV_TXT_TX
    168168uint32_t cycle = (uint32_t)hal_get_cycles();
    169 if( CONFIG_DEBUG_DEV_TXT_TX < cycle )
     169if( DEBUG_DEV_TXT_TX < cycle )
    170170printk("\n[DBG] %s : thread %x enters / cycle %d\n", __FUNCTION__, CURRENT_THREAD, cycle );
    171171#endif
     
    173173    return dev_txt_access( TXT_WRITE , channel , buffer , count );
    174174
    175 #if CONFIG_DEBUG_DEV_TXT_TX
     175#if DEBUG_DEV_TXT_TX
    176176cycle = (uint32_t)hal_get_cycles();
    177 if( CONFIG_DEBUG_DEV_TXT_TX < cycle )
     177if( DEBUG_DEV_TXT_TX < cycle )
    178178printk("\n[DBG] %s : thread %x exit / cycle %d\n", __FUNCTION__, CURRENT_THREAD, cycle );
    179179#endif
    180180
    181 #if (CONFIG_DEBUG_SYS_WRITE & 1)
     181#if (DEBUG_SYS_WRITE & 1)
    182182exit_txt_write = hal_time_stamp();
    183183#endif
     
    190190{
    191191
    192 #if (CONFIG_DEBUG_SYS_READ & 1)
     192#if (DEBUG_SYS_READ & 1)
    193193enter_txt_read = hal_time_stamp();
    194194#endif
    195195
    196 #if CONFIG_DEBUG_DEV_TXT_RX
     196#if DEBUG_DEV_TXT_RX
    197197uint32_t cycle = (uint32_t)hal_get_cycles();
    198 if( CONFIG_DEBUG_DEV_TXT_RX < cycle )
     198if( DEBUG_DEV_TXT_RX < cycle )
    199199printk("\n[DBG] %s : thread %x enters / cycle %d\n", __FUNCTION__, CURRENT_THREAD, cycle );
    200200#endif
     
    202202    return dev_txt_access( TXT_READ , channel , buffer , 1 );
    203203
    204 #if CONFIG_DEBUG_DEV_TXT_RX
     204#if DEBUG_DEV_TXT_RX
    205205cycle = (uint32_t)hal_get_cycles();
    206 if( CONFIG_DEBUG_DEV_TXT_RX < cycle )
     206if( DEBUG_DEV_TXT_RX < cycle )
    207207printk("\n[DBG] %s : thread %x exit / cycle %d\n", __FUNCTION__, CURRENT_THREAD, cycle );
    208208#endif
    209209
    210 #if (CONFIG_DEBUG_SYS_READ & 1)
     210#if (DEBUG_SYS_READ & 1)
    211211exit_txt_read = hal_time_stamp();
    212212#endif
Note: See TracChangeset for help on using the changeset viewer.