Changeset 59fb782 in mainline for kernel/generic/src/mm/backend_anon.c


Ignore:
Timestamp:
2013-03-24T19:38:18Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d965dc3
Parents:
119b46e
Message:

Unify the use of virtual addresses and virtual page addresses in mm code.

  • as_page_fault() accepts faulting address (if available) and propagates the faulting page further along
  • backends' page_fault() handlers assume page fault address
  • page_mapping_create/destroy/find() accept addresses, but pass only page and frame addresses along
  • as_area_create(), as_area_resize() now test whether the address is page-aligned
  • renames of various variables to better fit their purpose (address vs. page)
  • no need to align the addresses in mips32 TLB exception handlers now
File:
1 edited

Legend:

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

    r119b46e r59fb782  
    173173 *
    174174 * @param area Pointer to the address space area.
    175  * @param addr Faulting virtual address.
     175 * @param upage Faulting virtual page.
    176176 * @param access Access mode that caused the fault (i.e. read/write/exec).
    177177 *
     
    179179 *     serviced).
    180180 */
    181 int anon_page_fault(as_area_t *area, uintptr_t addr, pf_access_t access)
    182 {
    183         uintptr_t upage = ALIGN_DOWN(addr, PAGE_SIZE);
     181int anon_page_fault(as_area_t *area, uintptr_t upage, pf_access_t access)
     182{
    184183        uintptr_t kpage;
    185184        uintptr_t frame;
     
    187186        ASSERT(page_table_locked(AS));
    188187        ASSERT(mutex_locked(&area->lock));
     188        ASSERT(IS_ALIGNED(upage, PAGE_SIZE));
    189189
    190190        if (!as_area_check_access(area, access))
Note: See TracChangeset for help on using the changeset viewer.