Changeset 8fe2c9bd in mainline
- Timestamp:
- 2013-03-22T12:30:41Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 119b46e
- Parents:
- 89f61be
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/src/mm/tlb.c
r89f61be r8fe2c9bd 94 94 entry_lo_t lo; 95 95 uintptr_t badvaddr; 96 uintptr_t page; 96 97 pte_t *pte; 97 98 98 99 badvaddr = cp0_badvaddr_read(); 99 100 pte = page_mapping_find(AS, badvaddr, true); 100 page = ALIGN_DOWN(badvaddr, PAGE_SIZE); 101 102 pte = page_mapping_find(AS, page, true); 101 103 if (pte && pte->p) { 102 104 /* … … 123 125 } 124 126 125 (void) as_page_fault( badvaddr, PF_ACCESS_READ, istate);127 (void) as_page_fault(page, PF_ACCESS_READ, istate); 126 128 } 127 129 … … 135 137 tlb_index_t index; 136 138 uintptr_t badvaddr; 139 uintptr_t page; 137 140 pte_t *pte; 138 141 … … 158 161 159 162 badvaddr = cp0_badvaddr_read(); 160 161 pte = page_mapping_find(AS, badvaddr, true); 163 page = ALIGN_DOWN(badvaddr, PAGE_SIZE); 164 165 pte = page_mapping_find(AS, page, true); 162 166 if (pte && pte->p) { 163 167 /* … … 185 189 } 186 190 187 (void) as_page_fault( badvaddr, PF_ACCESS_READ, istate);191 (void) as_page_fault(page, PF_ACCESS_READ, istate); 188 192 } 189 193 … … 197 201 tlb_index_t index; 198 202 uintptr_t badvaddr; 203 uintptr_t page; 199 204 pte_t *pte; 200 205 201 206 badvaddr = cp0_badvaddr_read(); 207 page = ALIGN_DOWN(badvaddr, PAGE_SIZE); 202 208 203 209 /* … … 221 227 } 222 228 223 pte = page_mapping_find(AS, badvaddr, true);229 pte = page_mapping_find(AS, page, true); 224 230 if (pte && pte->p && pte->w) { 225 231 /* … … 248 254 } 249 255 250 (void) as_page_fault( badvaddr, PF_ACCESS_WRITE, istate);256 (void) as_page_fault(page, PF_ACCESS_WRITE, istate); 251 257 } 252 258
Note:
See TracChangeset
for help on using the changeset viewer.