Ignore:
Timestamp:
2013-03-26T15:06:35Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ea15a89a
Parents:
8a26f82 (diff), 5c4356b (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

    r8a26f82 rb2fa2d86  
    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.