Changeset 437 for trunk/kernel/mm/vmm.c


Ignore:
Timestamp:
Mar 28, 2018, 2:40:29 PM (4 years ago)
Author:
alain
Message:

Fix various bugs

File:
1 edited

Legend:

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

    r435 r437  
    673673#endif
    674674
     675#if (CONFIG_DEBUG_VMM_DESTROY & 1 )
     676vmm_display( process , true );
     677#endif
     678
    675679    // get pointer on local VMM
    676680    vmm_t  * vmm = &process->vmm;
     
    690694        vseg    = GET_PTR( vseg_xp );
    691695
    692         // unmap rand release physical pages if required)
     696#if( CONFIG_DEBUG_VMM_DESTROY & 1 )
     697if( CONFIG_DEBUG_VMM_DESTROY < cycle )
     698printk("\n[DBG] %s : %s / vpn_base %x / vpn_size %d\n",
     699__FUNCTION__ , vseg_type_str( vseg->type ), vseg->vpn_base, vseg->vpn_size );
     700#endif
     701
     702        // unmap and release physical pages
    693703        vmm_unmap_vseg( process , vseg );
    694704
     
    11201130        if( attr & GPT_MAPPED )  // entry is mapped
    11211131        {
     1132
     1133#if( CONFIG_DEBUG_VMM_UNMAP_VSEG & 1 )
     1134if( CONFIG_DEBUG_VMM_UNMAP_VSEG < cycle )
     1135printk("- vpn %x / ppn %x\n" , vpn , ppn );
     1136#endif
     1137
    11221138            // check small page
    11231139            assert( (attr & GPT_SMALL) , __FUNCTION__ ,
     
    11401156                // FIXME lock the physical page
    11411157
    1142                 // get extended pointer on pending forks counter
    1143                 forks_xp = XPTR( page_cxy , &page_ptr->forks );
    1144 
    11451158                // get pending forks counter
    1146                 count = hal_remote_lw( forks_xp );
     1159                count = hal_remote_lw( XPTR( page_cxy , &page_ptr->forks ) );
    11471160               
    11481161                if( count )  // decrement pending forks counter
    11491162                {
     1163                    forks_xp = XPTR( page_cxy , &page_ptr->forks );
    11501164                    hal_remote_atomic_add( forks_xp , -1 );
    11511165                } 
Note: See TracChangeset for help on using the changeset viewer.