Changeset 879585a3 in mainline for kernel/arch/mips32/src/mm/as.c


Ignore:
Timestamp:
2007-03-31T22:22:50Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
31d8e10
Parents:
563c2dd
Message:

Simplify synchronization in as_switch().
The function was oversynchronized, which
was causing deadlocks on the address
space mutex.

Now, address spaces can only be switched
when the asidlock is held. This also protects
stealing of ASIDs. No other synchronization
is necessary.

File:
1 edited

Legend:

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

    r563c2dd r879585a3  
    3535#include <arch/mm/as.h>
    3636#include <genarch/mm/as_pt.h>
     37#include <genarch/mm/page_pt.h>
    3738#include <genarch/mm/asid_fifo.h>
    3839#include <arch/mm/tlb.h>
     
    4041#include <mm/as.h>
    4142#include <arch/cp0.h>
    42 #include <arch.h>
    4343
    4444/** Architecture dependent address space init. */
     
    5858{
    5959        entry_hi_t hi;
    60         ipl_t ipl;
    6160
    6261        /*
     
    6564        hi.value = cp0_entry_hi_read();
    6665
    67         ipl = interrupts_disable();
    68         spinlock_lock(&as->lock);
    6966        hi.asid = as->asid;
    7067        cp0_entry_hi_write(hi.value);   
    71         spinlock_unlock(&as->lock);
    72         interrupts_restore(ipl);
    7368}
    7469
Note: See TracChangeset for help on using the changeset viewer.