Changeset 864a081 in mainline for kernel/arch/mips32/src/mm/tlb.c
- Timestamp:
- 2011-05-24T03:40:00Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bf49001
- Parents:
- 5c460cc (diff), d4c472b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/src/mm/tlb.c
r5c460cc r864a081 100 100 mutex_unlock(&AS->lock); 101 101 102 page_table_lock(AS, true);103 104 102 pte = find_mapping_and_check(badvaddr, PF_ACCESS_READ, istate, &pfrc); 105 103 if (!pte) { … … 113 111 * or copy_to_uspace(). 114 112 */ 115 page_table_unlock(AS, true);116 113 return; 117 114 default: … … 144 141 tlbwr(); 145 142 146 page_table_unlock(AS, true);147 143 return; 148 144 149 145 fail: 150 page_table_unlock(AS, true);151 146 tlb_refill_fail(istate); 152 147 } … … 176 171 index.value = cp0_index_read(); 177 172 178 page_table_lock(AS, true);179 180 173 /* 181 174 * Fail if the entry is not in TLB. … … 197 190 * or copy_to_uspace(). 198 191 */ 199 page_table_unlock(AS, true);200 192 return; 201 193 default: … … 227 219 tlbwi(); 228 220 229 page_table_unlock(AS, true);230 221 return; 231 222 232 223 fail: 233 page_table_unlock(AS, true);234 224 tlb_invalid_fail(istate); 235 225 } … … 259 249 index.value = cp0_index_read(); 260 250 261 page_table_lock(AS, true);262 263 251 /* 264 252 * Fail if the entry is not in TLB. … … 280 268 * or copy_to_uspace(). 281 269 */ 282 page_table_unlock(AS, true);283 270 return; 284 271 default: … … 311 298 tlbwi(); 312 299 313 page_table_unlock(AS, true);314 300 return; 315 301 316 302 fail: 317 page_table_unlock(AS, true);318 303 tlb_modified_fail(istate); 319 304 } … … 364 349 pte_t *pte; 365 350 366 ASSERT(mutex_locked(&AS->lock));367 368 351 hi.value = cp0_entry_hi_read(); 369 352 … … 379 362 * Check if the mapping exists in page tables. 380 363 */ 381 pte = page_mapping_find(AS, badvaddr );364 pte = page_mapping_find(AS, badvaddr, true); 382 365 if (pte && pte->p && (pte->w || access != PF_ACCESS_WRITE)) { 383 366 /* … … 393 376 * Resort to higher-level page fault handler. 394 377 */ 395 page_table_unlock(AS, true);396 378 switch (rc = as_page_fault(badvaddr, access, istate)) { 397 379 case AS_PF_OK: … … 400 382 * The mapping ought to be in place. 401 383 */ 402 page_table_lock(AS, true); 403 pte = page_mapping_find(AS, badvaddr); 384 pte = page_mapping_find(AS, badvaddr, true); 404 385 ASSERT(pte && pte->p); 405 386 ASSERT(pte->w || access != PF_ACCESS_WRITE); … … 407 388 break; 408 389 case AS_PF_DEFER: 409 page_table_lock(AS, true);410 390 *pfrc = AS_PF_DEFER; 411 391 return NULL; 412 392 break; 413 393 case AS_PF_FAULT: 414 page_table_lock(AS, true);415 394 *pfrc = AS_PF_FAULT; 416 395 return NULL;
Note:
See TracChangeset
for help on using the changeset viewer.