Changeset 879585a3 in mainline for kernel/arch
- Timestamp:
- 2007-03-31T22:22:50Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 31d8e10
- Parents:
- 563c2dd
- Location:
- kernel/arch
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/mm/as.c
r563c2dd r879585a3 37 37 #include <arch/mm/page.h> 38 38 #include <genarch/mm/as_ht.h> 39 #include <genarch/mm/page_ht.h> 39 40 #include <genarch/mm/asid_fifo.h> 40 41 #include <mm/asid.h> 41 #include <arch.h>42 42 #include <arch/barrier.h> 43 #include <synch/spinlock.h>44 43 45 44 /** Architecture dependent address space init. */ … … 56 55 void as_install_arch(as_t *as) 57 56 { 58 ipl_t ipl;59 57 region_register rr; 60 58 int i; 61 62 ipl = interrupts_disable();63 spinlock_lock(&as->lock);64 59 65 60 ASSERT(as->asid != ASID_INVALID); … … 81 76 srlz_d(); 82 77 srlz_i(); 83 84 spinlock_unlock(&as->lock);85 interrupts_restore(ipl);86 78 } 87 79 -
kernel/arch/mips32/src/mm/as.c
r563c2dd r879585a3 35 35 #include <arch/mm/as.h> 36 36 #include <genarch/mm/as_pt.h> 37 #include <genarch/mm/page_pt.h> 37 38 #include <genarch/mm/asid_fifo.h> 38 39 #include <arch/mm/tlb.h> … … 40 41 #include <mm/as.h> 41 42 #include <arch/cp0.h> 42 #include <arch.h>43 43 44 44 /** Architecture dependent address space init. */ … … 58 58 { 59 59 entry_hi_t hi; 60 ipl_t ipl;61 60 62 61 /* … … 65 64 hi.value = cp0_entry_hi_read(); 66 65 67 ipl = interrupts_disable();68 spinlock_lock(&as->lock);69 66 hi.asid = as->asid; 70 67 cp0_entry_hi_write(hi.value); 71 spinlock_unlock(&as->lock);72 interrupts_restore(ipl);73 68 } 74 69 -
kernel/arch/ppc32/src/mm/as.c
r563c2dd r879585a3 55 55 { 56 56 asid_t asid; 57 ipl_t ipl;58 57 uint32_t sr; 59 58 60 ipl = interrupts_disable();61 spinlock_lock(&as->lock);62 63 59 asid = as->asid; 64 60 … … 80 76 ); 81 77 } 82 83 spinlock_unlock(&as->lock);84 interrupts_restore(ipl);85 78 } 86 79 -
kernel/arch/ppc64/src/mm/as.c
r563c2dd r879585a3 27 27 */ 28 28 29 29 /** @addtogroup ppc64mm 30 30 * @{ 31 31 */ … … 42 42 } 43 43 44 44 /** @} 45 45 */ 46 46 -
kernel/arch/sparc64/src/mm/as.c
r563c2dd r879585a3 43 43 #include <arch/mm/tsb.h> 44 44 #include <arch/memstr.h> 45 #include <synch/mutex.h>46 45 #include <arch/asm.h> 47 46 #include <mm/frame.h> … … 101 100 { 102 101 #ifdef CONFIG_TSB 103 ipl_t ipl;104 105 ipl = interrupts_disable();106 mutex_lock_active(&as->lock); /* completely unnecessary, but polite */107 102 tsb_invalidate(as, 0, (count_t) -1); 108 mutex_unlock(&as->lock);109 interrupts_restore(ipl);110 103 #endif 111 104 return 0; … … 124 117 125 118 /* 126 * Note that we don't lock the address space.127 * That's correct - we can afford it here128 * because we only read members that are129 * currently read-only.119 * Note that we don't and may not lock the address space. That's ok 120 * since we only read members that are currently read-only. 121 * 122 * Moreover, the as->asid is protected by asidlock, which is being held. 130 123 */ 131 124 132 125 /* 133 * Write ASID to secondary context register. 134 * The primary context register has to be set 135 * from TL>0 so it will be filled from the 136 * secondary context register from the TL=1 137 * code just before switch to userspace. 126 * Write ASID to secondary context register. The primary context 127 * register has to be set from TL>0 so it will be filled from the 128 * secondary context register from the TL=1 code just before switch to 129 * userspace. 138 130 */ 139 131 ctx.v = 0; … … 185 177 186 178 /* 187 * Note that we don't lock the address space.188 * That's correct - we can afford it here189 * because we only read members that are190 * currently read-only.179 * Note that we don't and may not lock the address space. That's ok 180 * since we only read members that are currently read-only. 181 * 182 * Moreover, the as->asid is protected by asidlock, which is being held. 191 183 */ 192 184
Note:
See TracChangeset
for help on using the changeset viewer.