Changeset eaeb056 in mainline for kernel/arch/ppc32/src/mm/tlb.c


Ignore:
Timestamp:
2011-05-22T20:05:26Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
34efa8a
Parents:
9ea8fdb4 (diff), 2bdf8313 (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 from lp:~jakub/helenos/mm.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/src/mm/tlb.c

    r9ea8fdb4 reaeb056  
    4949 *
    5050 * @param as       Address space.
    51  * @param lock     Lock/unlock the address space.
    5251 * @param badvaddr Faulting virtual address.
    5352 * @param access   Access mode that caused the fault.
     
    6261    istate_t *istate, int *pfrc)
    6362{
    64         ASSERT(mutex_locked(&as->lock));
    65 
    6663        /*
    6764         * Check if the mapping exists in page tables.
    6865         */
    69         pte_t *pte = page_mapping_find(as, badvaddr);
     66        pte_t *pte = page_mapping_find(as, badvaddr, true);
    7067        if ((pte) && (pte->present)) {
    7168                /*
     
    7976                 * Resort to higher-level page fault handler.
    8077                 */
    81                 page_table_unlock(as, true);
    82                
    8378                int rc = as_page_fault(badvaddr, access, istate);
    8479                switch (rc) {
     
    8883                         * The mapping ought to be in place.
    8984                         */
    90                         page_table_lock(as, true);
    91                         pte = page_mapping_find(as, badvaddr);
     85                        pte = page_mapping_find(as, badvaddr, true);
    9286                        ASSERT((pte) && (pte->present));
    9387                        *pfrc = 0;
    9488                        return pte;
    9589                case AS_PF_DEFER:
    96                         page_table_lock(as, true);
    9790                        *pfrc = rc;
    9891                        return NULL;
    9992                case AS_PF_FAULT:
    100                         page_table_lock(as, true);
    10193                        *pfrc = rc;
    10294                        return NULL;
     
    214206                badvaddr = istate->pc;
    215207       
    216         page_table_lock(as, true);
    217        
    218208        int pfrc;
    219209        pte_t *pte = find_mapping_and_check(as, badvaddr,
     
    223213                switch (pfrc) {
    224214                case AS_PF_FAULT:
    225                         page_table_unlock(as, true);
    226215                        pht_refill_fail(badvaddr, istate);
    227216                        return;
     
    231220                         * or copy_to_uspace().
    232221                         */
    233                         page_table_unlock(as, true);
    234222                        return;
    235223                default:
     
    241229        pte->accessed = 1;
    242230        pht_insert(badvaddr, pte);
    243        
    244         page_table_unlock(as, true);
    245231}
    246232
Note: See TracChangeset for help on using the changeset viewer.