Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset aaa6af2 in mainline


Ignore:
Timestamp:
2011-12-20T21:50:12Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
0fd9b35
Parents:
398e33be
Message:

Do not take AS→mutex when reading AS→asid in mips32 TLB-miss handler.
The asid is guaranteed to remain constant while somebody is using the
address space. Moreover, taking the mutex at the beginning of the
miss handler, i.e. before the page tables are searched, breaks kernel
non-identity when someone accesses a non-identity page while holding
e.g. a spinlock (the debug kernel will hit an assertion).

File:
1 edited

Legend:

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

    r398e33be raaa6af2  
    9595       
    9696        badvaddr = cp0_badvaddr_read();
    97        
    98         mutex_lock(&AS->lock);
    9997        asid = AS->asid;
    100         mutex_unlock(&AS->lock);
    10198       
    10299        pte = find_mapping_and_check(badvaddr, PF_ACCESS_READ, istate, &pfrc);
Note: See TracChangeset for help on using the changeset viewer.