Ignore:
Timestamp:
2013-04-29T11:29:45Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
aa2b32c
Parents:
ba4799a (diff), df956b9b (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 mainline changes

File:
1 edited

Legend:

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

    rba4799a r06b0211b  
    111111 *
    112112 * @param area Pointer to the address space area.
    113  * @param addr Faulting virtual address.
     113 * @param upage Faulting virtual page.
    114114 * @param access Access mode that caused the fault (i.e. read/write/exec).
    115115 *
     
    117117 * serviced).
    118118 */
    119 int phys_page_fault(as_area_t *area, uintptr_t addr, pf_access_t access)
     119int phys_page_fault(as_area_t *area, uintptr_t upage, pf_access_t access)
    120120{
    121121        uintptr_t base = area->backend_data.base;
     
    123123        ASSERT(page_table_locked(AS));
    124124        ASSERT(mutex_locked(&area->lock));
     125        ASSERT(IS_ALIGNED(upage, PAGE_SIZE));
    125126
    126127        if (!as_area_check_access(area, access))
    127128                return AS_PF_FAULT;
    128129
    129         ASSERT(addr - area->base < area->backend_data.frames * FRAME_SIZE);
    130         page_mapping_insert(AS, addr, base + (addr - area->base),
     130        ASSERT(upage - area->base < area->backend_data.frames * FRAME_SIZE);
     131        page_mapping_insert(AS, upage, base + (upage - area->base),
    131132            as_area_get_flags(area));
    132133       
    133         if (!used_space_insert(area, ALIGN_DOWN(addr, PAGE_SIZE), 1))
     134        if (!used_space_insert(area, upage, 1))
    134135                panic("Cannot insert used space.");
    135136
Note: See TracChangeset for help on using the changeset viewer.