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


Ignore:
Timestamp:
2016-08-31T17:51:04Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fb63c06
Parents:
38dc82d
Message:

Add page_mapping_update()

page_mapping_update() can be used to safely update the accessed and dirty
bits of a PTE in the actual page tables.

File:
1 edited

Legend:

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

    r38dc82d r346b12a2  
    156156}
    157157
     158/** Update mapping for virtual page.
     159 *
     160 * Use only to update accessed and modified/dirty bits.
     161 *
     162 * @param as       Address space to which page belongs.
     163 * @param page     Virtual page.
     164 * @param nolock   True if the page tables need not be locked.
     165 * @param pte      New PTE.
     166 */
     167NO_TRACE void page_mapping_update(as_t *as, uintptr_t page, bool nolock,
     168    pte_t *pte)
     169{
     170        ASSERT(nolock || page_table_locked(as));
     171       
     172        ASSERT(page_mapping_operations);
     173        ASSERT(page_mapping_operations->mapping_find);
     174       
     175        page_mapping_operations->mapping_update(as,
     176            ALIGN_DOWN(page, PAGE_SIZE), nolock, pte);
     177}
     178
    158179/** Make the mapping shared by all page tables (not address spaces).
    159180 *
Note: See TracChangeset for help on using the changeset viewer.