Rev 740 | Rev 753 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 740 | Rev 741 | ||
---|---|---|---|
Line 92... | Line 92... | ||
92 | * Check if there is an unallocated ASID. |
92 | * Check if there is an unallocated ASID. |
93 | */ |
93 | */ |
94 | 94 | ||
95 | ipl = interrupts_disable(); |
95 | ipl = interrupts_disable(); |
96 | spinlock_lock(&asidlock); |
96 | spinlock_lock(&asidlock); |
97 | if (asids_allocated == ASIDS_ALLOCABLE) { |
97 | if (ASID_STEALING_ENABLED && asids_allocated == ASIDS_ALLOCABLE) { |
98 | 98 | ||
99 | /* |
99 | /* |
100 | * All ASIDs are already allocated. |
100 | * All ASIDs are already allocated. |
101 | * Resort to stealing. |
101 | * Resort to stealing. |
102 | */ |
102 | */ |
Line 119... | Line 119... | ||
119 | */ |
119 | */ |
120 | asid = as->asid; |
120 | asid = as->asid; |
121 | ASSERT(asid != ASID_INVALID); |
121 | ASSERT(asid != ASID_INVALID); |
122 | 122 | ||
123 | /* |
123 | /* |
- | 124 | * Notify the address space from wich the ASID |
|
- | 125 | * was stolen by invalidating its asid member. |
|
- | 126 | */ |
|
- | 127 | as->asid = ASID_INVALID; |
|
- | 128 | spinlock_unlock(&as->lock); |
|
- | 129 | ||
- | 130 | /* |
|
124 | * Get the system rid of the stolen ASID. |
131 | * Get the system rid of the stolen ASID. |
125 | */ |
132 | */ |
126 | tlb_shootdown_start(TLB_INVL_ASID, asid, 0, 0); |
133 | tlb_shootdown_start(TLB_INVL_ASID, asid, 0, 0); |
127 | tlb_shootdown_finalize(); |
134 | tlb_shootdown_finalize(); |
128 | tlb_invalidate_asid(asid); |
135 | tlb_invalidate_asid(asid); |
129 | as->asid = ASID_INVALID; |
- | |
130 | - | ||
131 | spinlock_unlock(&as->lock); |
- | |
132 | } else { |
136 | } else { |
133 | 137 | ||
134 | /* |
138 | /* |
135 | * There is at least one unallocated ASID. |
139 | * There is at least one unallocated ASID. |
136 | * Find it and assign it. |
140 | * Find it and assign it. |