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


Ignore:
Timestamp:
2011-05-22T20:05:26Z (13 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/mips32/src/mm/tlb.c

    r9ea8fdb4 reaeb056  
    100100        mutex_unlock(&AS->lock);
    101101       
    102         page_table_lock(AS, true);
    103        
    104102        pte = find_mapping_and_check(badvaddr, PF_ACCESS_READ, istate, &pfrc);
    105103        if (!pte) {
     
    113111                         * or copy_to_uspace().
    114112                         */
    115                         page_table_unlock(AS, true);
    116113                        return;
    117114                default:
     
    144141        tlbwr();
    145142
    146         page_table_unlock(AS, true);
    147143        return;
    148144       
    149145fail:
    150         page_table_unlock(AS, true);
    151146        tlb_refill_fail(istate);
    152147}
     
    176171        index.value = cp0_index_read();
    177172
    178         page_table_lock(AS, true);     
    179        
    180173        /*
    181174         * Fail if the entry is not in TLB.
     
    197190                         * or copy_to_uspace().
    198191                         */
    199                         page_table_unlock(AS, true);                     
    200192                        return;
    201193                default:
     
    227219        tlbwi();
    228220
    229         page_table_unlock(AS, true);
    230221        return;
    231222       
    232223fail:
    233         page_table_unlock(AS, true);
    234224        tlb_invalid_fail(istate);
    235225}
     
    259249        index.value = cp0_index_read();
    260250
    261         page_table_lock(AS, true);     
    262        
    263251        /*
    264252         * Fail if the entry is not in TLB.
     
    280268                         * or copy_to_uspace().
    281269                         */
    282                         page_table_unlock(AS, true);                     
    283270                        return;
    284271                default:
     
    311298        tlbwi();
    312299
    313         page_table_unlock(AS, true);
    314300        return;
    315301       
    316302fail:
    317         page_table_unlock(AS, true);
    318303        tlb_modified_fail(istate);
    319304}
     
    364349        pte_t *pte;
    365350
    366         ASSERT(mutex_locked(&AS->lock));
    367 
    368351        hi.value = cp0_entry_hi_read();
    369352
     
    379362         * Check if the mapping exists in page tables.
    380363         */     
    381         pte = page_mapping_find(AS, badvaddr);
     364        pte = page_mapping_find(AS, badvaddr, true);
    382365        if (pte && pte->p && (pte->w || access != PF_ACCESS_WRITE)) {
    383366                /*
     
    393376                 * Resort to higher-level page fault handler.
    394377                 */
    395                 page_table_unlock(AS, true);
    396378                switch (rc = as_page_fault(badvaddr, access, istate)) {
    397379                case AS_PF_OK:
     
    400382                         * The mapping ought to be in place.
    401383                         */
    402                         page_table_lock(AS, true);
    403                         pte = page_mapping_find(AS, badvaddr);
     384                        pte = page_mapping_find(AS, badvaddr, true);
    404385                        ASSERT(pte && pte->p);
    405386                        ASSERT(pte->w || access != PF_ACCESS_WRITE);
     
    407388                        break;
    408389                case AS_PF_DEFER:
    409                         page_table_lock(AS, true);
    410390                        *pfrc = AS_PF_DEFER;
    411391                        return NULL;
    412392                        break;
    413393                case AS_PF_FAULT:
    414                         page_table_lock(AS, true);
    415394                        *pfrc = AS_PF_FAULT;
    416395                        return NULL;
Note: See TracChangeset for help on using the changeset viewer.