Changeset eaeb056 in mainline for kernel/arch/ppc32/src/mm/tlb.c
- Timestamp:
- 2011-05-22T20:05:26Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 34efa8a
- Parents:
- 9ea8fdb4 (diff), 2bdf8313 (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/ppc32/src/mm/tlb.c
r9ea8fdb4 reaeb056 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. 68 65 */ 69 pte_t *pte = page_mapping_find(as, badvaddr );66 pte_t *pte = page_mapping_find(as, badvaddr, true); 70 67 if ((pte) && (pte->present)) { 71 68 /* … … 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 pte = page_mapping_find(as, badvaddr); 85 pte = page_mapping_find(as, badvaddr, true); 92 86 ASSERT((pte) && (pte->present)); 93 87 *pfrc = 0; 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.