Changeset 06b0211b in mainline for kernel/generic/src/mm/backend_phys.c
- Timestamp:
- 2013-04-29T11:29:45Z (12 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/backend_phys.c
rba4799a r06b0211b 111 111 * 112 112 * @param area Pointer to the address space area. 113 * @param addr Faulting virtual address.113 * @param upage Faulting virtual page. 114 114 * @param access Access mode that caused the fault (i.e. read/write/exec). 115 115 * … … 117 117 * serviced). 118 118 */ 119 int phys_page_fault(as_area_t *area, uintptr_t addr, pf_access_t access)119 int phys_page_fault(as_area_t *area, uintptr_t upage, pf_access_t access) 120 120 { 121 121 uintptr_t base = area->backend_data.base; … … 123 123 ASSERT(page_table_locked(AS)); 124 124 ASSERT(mutex_locked(&area->lock)); 125 ASSERT(IS_ALIGNED(upage, PAGE_SIZE)); 125 126 126 127 if (!as_area_check_access(area, access)) 127 128 return AS_PF_FAULT; 128 129 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), 131 132 as_area_get_flags(area)); 132 133 133 if (!used_space_insert(area, ALIGN_DOWN(addr, PAGE_SIZE), 1))134 if (!used_space_insert(area, upage, 1)) 134 135 panic("Cannot insert used space."); 135 136
Note:
See TracChangeset
for help on using the changeset viewer.