Changeset 313 for trunk/kernel/mm/ppm.c


Ignore:
Timestamp:
Aug 2, 2017, 3:24:57 PM (7 years ago)
Author:
alain
Message:

RSeveral modifs in the page-fault handling.

File:
1 edited

Legend:

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

    r177 r313  
    6161}
    6262
    63 //////////////////////////////////////////
    64 inline ppn_t ppm_page2ppn( page_t * page )
    65 {
    66         ppm_t  * ppm = &LOCAL_CLUSTER->ppm;
    67         return (ppn_t)( page - ppm->pages_tbl );
    68 }
    69 
    70 /////////////////////////////////////////
    71 inline page_t * ppm_ppn2page( ppn_t ppn )
    72 {
    73         ppm_t  * ppm = &LOCAL_CLUSTER->ppm;
    74         return &ppm->pages_tbl[ppn];
    75 }
    76 
    77 ///////////////////////////////////////
    78 inline void * ppm_ppn2vaddr( ppn_t ppn )
    79 {
    80         ppm_t  * ppm  = &LOCAL_CLUSTER->ppm;
    81         return ppm->vaddr_base + (ppn << CONFIG_PPM_PAGE_SHIFT);
    82 }
    83 
    84 //////////////////////////////////////////
    85 inline ppn_t ppm_vaddr2ppn( void * vaddr )
    86 {
    87         ppm_t  * ppm  = &LOCAL_CLUSTER->ppm;
    88         return ( (ppm->vaddr_base - vaddr) >> CONFIG_PPM_PAGE_SHIFT );
    89 }
    90 
    91 
    9263///////////////////////////////////////////
    9364void ppm_free_pages_nolock( page_t * page )
Note: See TracChangeset for help on using the changeset viewer.