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

Fix a bug in scheduler related to RPC blocking.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/mapper.c

    r435 r438  
    143143    error_t       error;
    144144
    145 #if CONFIG_DEBUG_MAPPER_GET_PAGE
     145#if DEBUG_MAPPER_GET_PAGE
    146146uint32_t cycle = (uint32_t)hal_get_cycles();
    147 if( CONFIG_DEBUG_MAPPER_GET_PAGE < cycle )
     147if( DEBUG_MAPPER_GET_PAGE < cycle )
    148148printk("\n[DBG] %s : thread %x enter for page %d / mapper %x / cycle %d\n",
    149149__FUNCTION__ , CURRENT_THREAD , index , mapper , cycle );
     
    175175        {
    176176
    177 #if (CONFIG_DEBUG_MAPPER_GET_PAGE & 1)
    178 if( CONFIG_DEBUG_MAPPER_GET_PAGE < cycle )
     177#if (DEBUG_MAPPER_GET_PAGE & 1)
     178if( DEBUG_MAPPER_GET_PAGE < cycle )
    179179printk("\n[DBG] %s : missing page => load from device\n", __FUNCTION__ );
    180180#endif
     
    257257    }
    258258
    259 #if CONFIG_DEBUG_MAPPER_GET_PAGE
     259#if DEBUG_MAPPER_GET_PAGE
    260260cycle = (uint32_t)hal_get_cycles();
    261 if( CONFIG_DEBUG_MAPPER_GET_PAGE < cycle )
     261if( DEBUG_MAPPER_GET_PAGE < cycle )
    262262printk("\n[DBG] %s : thread %x exit for page %d / ppn %x / cycle %d\n",
    263263__FUNCTION__, CURRENT_THREAD, index, ppm_page2ppn(XPTR(local_cxy, page)), cycle );
     
    317317    uint8_t  * buf_ptr;        // current buffer  address
    318318
    319 #if CONFIG_DEBUG_MAPPER_MOVE_USER
     319#if DEBUG_MAPPER_MOVE_USER
    320320uint32_t cycle = (uint32_t)hal_get_cycles();
    321 if( CONFIG_DEBUG_MAPPER_MOVE_USER < cycle )
     321if( DEBUG_MAPPER_MOVE_USER < cycle )
    322322printk("\n[DBG] %s : thread %x enter / to_buf %d / buffer %x / cycle %d\n",
    323323__FUNCTION__ , CURRENT_THREAD , to_buffer , buffer , cycle );
     
    347347        else                       page_count = CONFIG_PPM_PAGE_SIZE;
    348348
    349 #if (CONFIG_DEBUG_MAPPER_MOVE_USER & 1)
    350 if( CONFIG_DEBUG_MAPPER_MOVE_USER < cycle )
     349#if (DEBUG_MAPPER_MOVE_USER & 1)
     350if( DEBUG_MAPPER_MOVE_USER < cycle )
    351351printk("\n[DBG] %s : index = %d / offset = %d / count = %d\n",
    352352__FUNCTION__ , index , page_offset , page_count );
     
    379379    }
    380380
    381 #if CONFIG_DEBUG_MAPPER_MOVE_USER
     381#if DEBUG_MAPPER_MOVE_USER
    382382cycle = (uint32_t)hal_get_cycles();
    383 if( CONFIG_DEBUG_MAPPER_MOVE_USER < cycle )
     383if( DEBUG_MAPPER_MOVE_USER < cycle )
    384384printk("\n[DBG] %s : thread %x exit / to_buf %d / buffer %x / cycle %d\n",
    385385__FUNCTION__ , CURRENT_THREAD , to_buffer , buffer , cycle );
     
    412412    uint8_t * buffer_ptr = (uint8_t *)GET_PTR( buffer_xp );
    413413
    414 #if CONFIG_DEBUG_MAPPER_MOVE_KERNEL
     414#if DEBUG_MAPPER_MOVE_KERNEL
    415415uint32_t cycle = (uint32_t)hal_get_cycles();
    416 if( CONFIG_DEBUG_MAPPER_MOVE_KERNEL < cycle )
     416if( DEBUG_MAPPER_MOVE_KERNEL < cycle )
    417417printk("\n[DBG] %s : thread %x enter / to_buf %d / buf_cxy %x / buf_ptr %x / cycle %d\n",
    418418__FUNCTION__ , CURRENT_THREAD , to_buffer , buffer_cxy , buffer_ptr , cycle );
     
    427427    uint32_t last  = max_byte >> CONFIG_PPM_PAGE_SHIFT;
    428428
    429 #if (CONFIG_DEBUG_MAPPER_MOVE_KERNEL & 1)
    430 if( CONFIG_DEBUG_MAPPER_MOVE_KERNEL < cycle )
     429#if (DEBUG_MAPPER_MOVE_KERNEL & 1)
     430if( DEBUG_MAPPER_MOVE_KERNEL < cycle )
    431431printk("\n[DBG] %s : first_page %d / last_page %d\n", __FUNCTION__, first, last );
    432432#endif
     
    459459        else                       page_count = CONFIG_PPM_PAGE_SIZE;
    460460
    461 #if (CONFIG_DEBUG_MAPPER_MOVE_KERNEL & 1)
    462 if( CONFIG_DEBUG_MAPPER_MOVE_KERNEL < cycle )
     461#if (DEBUG_MAPPER_MOVE_KERNEL & 1)
     462if( DEBUG_MAPPER_MOVE_KERNEL < cycle )
    463463printk("\n[DBG] %s : page_index = %d / offset = %d / bytes = %d\n",
    464464__FUNCTION__ , index , page_offset , page_count );
     
    494494    }
    495495
    496 #if CONFIG_DEBUG_MAPPER_MOVE_KERNEL
     496#if DEBUG_MAPPER_MOVE_KERNEL
    497497cycle = (uint32_t)hal_get_cycles();
    498 if( CONFIG_DEBUG_MAPPER_MOVE_KERNEL < cycle )
     498if( DEBUG_MAPPER_MOVE_KERNEL < cycle )
    499499printk("\n[DBG] %s : thread %x exit / to_buf %d / buf_cxy %x / buf_ptr %x / cycle %d\n",
    500500__FUNCTION__ , CURRENT_THREAD , to_buffer , buffer_cxy , buffer_ptr , cycle );
Note: See TracChangeset for help on using the changeset viewer.