Changeset 567807b1 in mainline for arch/ppc64/src/mm/page.c


Ignore:
Timestamp:
2006-05-24T17:03:29Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8d6bc2d5
Parents:
82da5f5
Message:

Modify the hierarchy of page fault handlers to pass access mode that caused the fault.
Architectures are required to pass either PF_ACCESS_READ, PF_ACCESS_WRITE or PF_ACCESS_EXEC
to as_page_fault(), depending on the cause of the fault.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ppc64/src/mm/page.c

    r82da5f5 r567807b1  
    5454 * @param lock     Lock/unlock the address space.
    5555 * @param badvaddr Faulting virtual address.
     56 * @param access   Access mode that caused the fault.
    5657 * @param istate   Pointer to interrupted state.
    5758 * @param pfrc     Pointer to variable where as_page_fault() return code will be stored.
     
    5960 *
    6061 */
    61 static pte_t *find_mapping_and_check(as_t *as, bool lock, __address badvaddr, istate_t *istate, int *pfcr)
     62static pte_t *find_mapping_and_check(as_t *as, bool lock, __address badvaddr, int access,
     63                                     istate_t *istate, int *pfcr)
    6264{
    6365        /*
     
    7981                 */
    8082                page_table_unlock(as, lock);
    81                 switch (rc = as_page_fault(badvaddr, istate)) {
     83                switch (rc = as_page_fault(badvaddr, access, istate)) {
    8284                        case AS_PF_OK:
    8385                                /*
     
    212214        page_table_lock(as, lock);
    213215       
    214         pte = find_mapping_and_check(as, lock, badvaddr, istate, &pfcr);
     216        pte = find_mapping_and_check(as, lock, badvaddr, PF_ACCESS_READ /* FIXME */, istate, &pfcr);
    215217        if (!pte) {
    216218                switch (pfcr) {
Note: See TracChangeset for help on using the changeset viewer.