Changeset 20d50a1 in mainline for arch/mips32/src/mm/as.c
- Timestamp:
- 2006-01-13T13:02:45Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f9425006
- Parents:
- 0369911
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
arch/mips32/src/mm/as.c
r0369911 r20d50a1 27 27 */ 28 28 29 #include <arch/mm/ vm.h>29 #include <arch/mm/as.h> 30 30 #include <arch/mm/tlb.h> 31 #include <mm/vm.h> 31 #include <mm/tlb.h> 32 #include <mm/as.h> 32 33 #include <arch/cp0.h> 33 34 #include <arch.h> 34 35 35 /** Install ASID of the current VM36 /** Install address space. 36 37 * 37 * Install ASID of the current VM.38 * Install ASID and if necessary, purge TLB. 38 39 * 39 * @param vm VMstructure.40 * @param as Address space structure. 40 41 */ 41 void vm_install_arch(vm_t *vm)42 void as_install_arch(as_t *as) 42 43 { 43 44 entry_hi_t hi; 44 45 ipl_t ipl; 45 46 47 /* 48 * If necessary, purge TLB. 49 */ 50 tlb_invalidate_asid(as->asid); /* TODO: do it only if necessary */ 51 52 /* 53 * Install ASID. 54 */ 46 55 hi.value = cp0_entry_hi_read(); 47 56 48 57 ipl = interrupts_disable(); 49 spinlock_lock(& vm->lock);50 hi.asid = vm->asid;58 spinlock_lock(&as->lock); 59 hi.asid = as->asid; 51 60 cp0_entry_hi_write(hi.value); 52 spinlock_unlock(& vm->lock);61 spinlock_unlock(&as->lock); 53 62 interrupts_restore(ipl); 54 63 }
Note:
See TracChangeset
for help on using the changeset viewer.