Changeset c9f0975 in mainline for kernel/generic/src/mm/page.c


Ignore:
Timestamp:
2011-06-01T10:04:32Z (13 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
65c3794
Parents:
049a16f (diff), df29f24 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge with usb/development

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/page.c

    r049a16f rc9f0975  
    112112 * using flags. Allocate and setup any missing page tables.
    113113 *
    114  * @param as    Address space to wich page belongs.
     114 * @param as    Address space to which page belongs.
    115115 * @param page  Virtual address of the page to be mapped.
    116116 * @param frame Physical address of memory frame to which the mapping is
     
    139139 * this call visible.
    140140 *
    141  * @param as   Address space to wich page belongs.
     141 * @param as   Address space to which page belongs.
    142142 * @param page Virtual address of the page to be demapped.
    143143 *
     
    156156}
    157157
    158 /** Find mapping for virtual page
    159  *
    160  * Find mapping for virtual page.
    161  *
    162  * @param as   Address space to wich page belongs.
    163  * @param page Virtual page.
     158/** Find mapping for virtual page.
     159 *
     160 * @param as     Address space to which page belongs.
     161 * @param page   Virtual page.
     162 * @param nolock True if the page tables need not be locked.
    164163 *
    165164 * @return NULL if there is no such mapping; requested mapping
     
    167166 *
    168167 */
    169 NO_TRACE pte_t *page_mapping_find(as_t *as, uintptr_t page)
    170 {
    171         ASSERT(page_table_locked(as));
     168NO_TRACE pte_t *page_mapping_find(as_t *as, uintptr_t page, bool nolock)
     169{
     170        ASSERT(nolock || page_table_locked(as));
    172171       
    173172        ASSERT(page_mapping_operations);
    174173        ASSERT(page_mapping_operations->mapping_find);
    175174       
    176         return page_mapping_operations->mapping_find(as, page);
     175        return page_mapping_operations->mapping_find(as, page, nolock);
    177176}
    178177
     
    188187        mutex_lock(&AS->lock);
    189188       
    190         pte_t *pte = page_mapping_find(AS, virt_address);
     189        pte_t *pte = page_mapping_find(AS, virt_address, true);
    191190        if (!PTE_VALID(pte) || !PTE_PRESENT(pte)) {
    192191                mutex_unlock(&AS->lock);
Note: See TracChangeset for help on using the changeset viewer.