Changeset c99693a in mainline
- Timestamp:
- 2011-05-21T16:50:32Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b4ffe5bc
- Parents:
- 235e6c7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/src/mm/tlb.c
r235e6c7 rc99693a 49 49 * 50 50 * @param as Address space. 51 * @param lock Lock/unlock the address space.52 51 * @param badvaddr Faulting virtual address. 53 52 * @param access Access mode that caused the fault. … … 62 61 istate_t *istate, int *pfrc) 63 62 { 64 ASSERT(mutex_locked(&as->lock));65 66 63 /* 67 64 * Check if the mapping exists in page tables. … … 79 76 * Resort to higher-level page fault handler. 80 77 */ 81 page_table_unlock(as, true);82 83 78 int rc = as_page_fault(badvaddr, access, istate); 84 79 switch (rc) { … … 88 83 * The mapping ought to be in place. 89 84 */ 90 page_table_lock(as, true);91 85 pte = page_mapping_find(as, badvaddr, true); 92 86 ASSERT((pte) && (pte->present)); … … 94 88 return pte; 95 89 case AS_PF_DEFER: 96 page_table_lock(as, true);97 90 *pfrc = rc; 98 91 return NULL; 99 92 case AS_PF_FAULT: 100 page_table_lock(as, true);101 93 *pfrc = rc; 102 94 return NULL; … … 214 206 badvaddr = istate->pc; 215 207 216 page_table_lock(as, true);217 218 208 int pfrc; 219 209 pte_t *pte = find_mapping_and_check(as, badvaddr, … … 223 213 switch (pfrc) { 224 214 case AS_PF_FAULT: 225 page_table_unlock(as, true);226 215 pht_refill_fail(badvaddr, istate); 227 216 return; … … 231 220 * or copy_to_uspace(). 232 221 */ 233 page_table_unlock(as, true);234 222 return; 235 223 default: … … 241 229 pte->accessed = 1; 242 230 pht_insert(badvaddr, pte); 243 244 page_table_unlock(as, true);245 231 } 246 232
Note:
See TracChangeset
for help on using the changeset viewer.