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/hal/tsar_mips32/core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/core/hal_exception.c

    r437 r438  
    201201    }
    202202
    203 #if CONFIG_DEBUG_HAL_EXCEPTIONS
     203#if DEBUG_HAL_EXCEPTIONS
    204204uint32_t cycle = (uint32_t)hal_get_cycles();
    205 if( CONFIG_DEBUG_HAL_EXCEPTIONS < cycle )
     205if( DEBUG_HAL_EXCEPTIONS < cycle )
    206206printk("\n[DBG] %s : thread %x enter / is_ins %d / %s / vaddr %x / cycle %d\n",
    207207__FUNCTION__, this, is_ins, hal_mmu_exception_str(excp_code), bad_vaddr, cycle );
     
    229229            {
    230230
    231 #if CONFIG_DEBUG_HAL_EXCEPTIONS
     231#if DEBUG_HAL_EXCEPTIONS
    232232cycle = (uint32_t)hal_get_cycles();
    233 if( CONFIG_DEBUG_HAL_EXCEPTIONS < cycle )
     233if( DEBUG_HAL_EXCEPTIONS < cycle )
    234234printk("\n[DBG] %s : thread %x exit / page-fault handled for vaddr = %x\n",
    235235__FUNCTION__ , this , bad_vaddr );
     
    268268                {
    269269
    270 #if CONFIG_DEBUG_HAL_EXCEPTIONS
     270#if DEBUG_HAL_EXCEPTIONS
    271271cycle = (uint32_t)hal_get_cycles();
    272 if( CONFIG_DEBUG_HAL_EXCEPTIONS < cycle )
     272if( DEBUG_HAL_EXCEPTIONS < cycle )
    273273printk("\n[DBG] %s : thread %x exit / copy-on-write handled for vaddr = %x\n",
    274274__FUNCTION__ , this , bad_vaddr );
     
    390390    excPC          = uzone[UZ_EPC];
    391391
    392 #if CONFIG_DEBUG_HAL_EXCEPTIONS
     392#if DEBUG_HAL_EXCEPTIONS
    393393uint32_t cycle = (uint32_t)hal_get_cycles();
    394 if( CONFIG_DEBUG_HAL_EXCEPTIONS < cycle )
     394if( DEBUG_HAL_EXCEPTIONS < cycle )
    395395printk("\n[DBG] %s : thread %x enter / core[%x,%d] / pid %x / epc %x / xcode %x / cycle %d\n",
    396396__FUNCTION__, this, local_cxy, this->core->lid, this->process->pid, excPC, excCode, cycle );
     
    450450    }
    451451
    452 #if CONFIG_DEBUG_HAL_EXCEPTIONS
     452#if DEBUG_HAL_EXCEPTIONS
    453453cycle = (uint32_t)hal_get_cycles();
    454 if( CONFIG_DEBUG_HAL_EXCEPTIONS < cycle )
     454if( DEBUG_HAL_EXCEPTIONS < cycle )
    455455printk("\n[DBG] %s : thread %x exit / core[%x,%d] / pid %x / epc %x / xcode %x / cycle %d\n",
    456456__FUNCTION__, this, local_cxy, this->core->lid, this->process->pid, excPC, excCode, cycle );
  • trunk/hal/tsar_mips32/core/hal_gpt.c

    r432 r438  
    132132    xptr_t     page_xp;
    133133
    134 #if CONFIG_DEBUG_GPT_ACCESS
     134#if DEBUG_GPT_ACCESS
    135135uint32_t cycle = (uint32_t)hal_get_cycles;
    136 if( CONFIG_DEBUG_GPT_ACCESS < cycle )
     136if( DEBUG_GPT_ACCESS < cycle )
    137137printk("\n[DBG] %s : thread %x enter / cycle %d\n",
    138138__FUNCTION__, CURRENT_THREAD, cycle );
     
    161161        gpt->ppn  = ppm_page2ppn( page_xp );
    162162
    163 #if CONFIG_DEBUG_GPT_ACCESS
     163#if DEBUG_GPT_ACCESS
    164164cycle = (uint32_t)hal_get_cycles;
    165 if( CONFIG_DEBUG_GPT_ACCESS < cycle )
     165if( DEBUG_GPT_ACCESS < cycle )
    166166printk("\n[DBG] %s : thread %x exit / cycle %d\n",
    167167__FUNCTION__, CURRENT_THREAD, cycle );
     
    340340    uint32_t            tsar_attr;           // PTE attributes for TSAR MMU
    341341
    342 #if CONFIG_DEBUG_GPT_ACCESS
     342#if DEBUG_GPT_ACCESS
    343343uint32_t cycle = (uint32_t)hal_get_cycles;
    344 if( CONFIG_DEBUG_GPT_ACCESS < cycle )
     344if( DEBUG_GPT_ACCESS < cycle )
    345345printk("\n[DBG] %s : thread %x enter / vpn %x / attr %x / ppn %x / cycle %d\n",
    346346__FUNCTION__, CURRENT_THREAD, vpn, attr, ppn, cycle );
     
    357357    tsar_attr = gpt2tsar( attr );
    358358
    359 #if (CONFIG_DEBUG_GPT_ACCESS & 1)
    360 if( CONFIG_DEBUG_GPT_ACCESS < cycle )
     359#if (DEBUG_GPT_ACCESS & 1)
     360if( DEBUG_GPT_ACCESS < cycle )
    361361printk("\n[DBG] %s : thread %x / vpn %x / &pt1 %x / tsar_attr %x\n",
    362362__FUNCTION__, CURRENT_THREAD, vpn, pt1, tsar_attr );
     
    392392        pte1 = *pte1_ptr;
    393393       
    394 #if (CONFIG_DEBUG_GPT_ACCESS & 1)
    395 if( CONFIG_DEBUG_GPT_ACCESS < cycle )
     394#if (DEBUG_GPT_ACCESS & 1)
     395if( DEBUG_GPT_ACCESS < cycle )
    396396printk("\n[DBG] %s : thread %x / vpn %x / current_pte1 %x\n",
    397397__FUNCTION__, CURRENT_THREAD, vpn, pte1 );
     
    437437            pt2     = (uint32_t *)GET_PTR( ppm_ppn2base( pt2_ppn ) );
    438438
    439 #if (CONFIG_DEBUG_GPT_ACCESS & 1)
    440 if( CONFIG_DEBUG_GPT_ACCESS < cycle )
     439#if (DEBUG_GPT_ACCESS & 1)
     440if( DEBUG_GPT_ACCESS < cycle )
    441441printk("\n[DBG] %s : thread %x / vpn %x / pte1 %x / &pt2 %x\n",
    442442__FUNCTION__, CURRENT_THREAD, vpn, pte1, pt2 );
     
    452452        hal_fence();
    453453
    454 #if CONFIG_DEBUG_GPT_ACCESS
     454#if DEBUG_GPT_ACCESS
    455455cycle = (uint32_t)hal_get_cycles;
    456 if( CONFIG_DEBUG_GPT_ACCESS < cycle )
     456if( DEBUG_GPT_ACCESS < cycle )
    457457printk("\n[DBG] %s : thread %x exit / vpn %x / pte2_attr %x / pte2_ppn %x / cycle %d\n",
    458458__FUNCTION__, CURRENT_THREAD, vpn, pt2[2 * ix2], pt2[2 * ix2 + 1], cycle );
     
    762762    ppn_t        dst_pt2_ppn;
    763763
    764 #if CONFIG_DEBUG_GPT_ACCESS
     764#if DEBUG_GPT_ACCESS
    765765uint32_t cycle = (uint32_t)hal_get_cycles;
    766 if( CONFIG_DEBUG_GPT_ACCESS < cycle )
     766if( DEBUG_GPT_ACCESS < cycle )
    767767printk("\n[DBG] %s : thread %x enter / vpn %x / cycle %d\n",
    768768__FUNCTION__, CURRENT_THREAD, vpn, cycle );
     
    853853            *ppn    = src_pte2_ppn;
    854854       
    855 #if CONFIG_DEBUG_GPT_ACCESS
     855#if DEBUG_GPT_ACCESS
    856856cycle = (uint32_t)hal_get_cycles;
    857 if( CONFIG_DEBUG_GPT_ACCESS < cycle )
     857if( DEBUG_GPT_ACCESS < cycle )
    858858printk("\n[DBG] %s : thread %x exit / copy done for vpn %x / cycle %d\n",
    859859__FUNCTION__, CURRENT_THREAD, vpn, cycle );
     
    870870    *ppn    = 0;
    871871   
    872 #if CONFIG_DEBUG_GPT_ACCESS
     872#if DEBUG_GPT_ACCESS
    873873cycle = (uint32_t)hal_get_cycles;
    874 if( CONFIG_DEBUG_GPT_ACCESS < cycle )
     874if( DEBUG_GPT_ACCESS < cycle )
    875875printk("\n[DBG] %s : thread %x exit / nothing done for vpn %x / cycle %d\n",
    876876__FUNCTION__, CURRENT_THREAD, vpn, cycle );
  • trunk/hal/tsar_mips32/core/hal_kentry.S

    r432 r438  
    200200        mtc0    $3,         $12                         # set new c0_sr
    201201
    202 #--------------------------
    203 #if CONFIG_DEBUG_HAL_KENTRY
     202#--------------------
     203#if DEBUG_HAL_KENTRY
    204204
    205205    # display "enter" message
     
    349349    sw      $5,    8($4)                # current uzone pointer <= previous
    350350
    351 #--------------------------
    352 #if CONFIG_DEBUG_HAL_KENTRY
     351#-------------------
     352#if DEBUG_HAL_KENTRY
    353353
    354354    # display "exit" message
Note: See TracChangeset for help on using the changeset viewer.