Changes in kernel/arch/sparc64/src/mm/sun4u/tlb.c [0ff03f3:0e78394] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/mm/sun4u/tlb.c
r0ff03f3 r0e78394 206 206 pte_t *t; 207 207 208 page_table_lock(AS, true);209 208 t = page_mapping_find(AS, page_16k, true); 210 209 if (t && PTE_EXECUTABLE(t)) { … … 218 217 itsb_pte_copy(t, index); 219 218 #endif 220 page_table_unlock(AS, true);221 219 } else { 222 220 /* … … 224 222 * handler. 225 223 */ 226 page_table_unlock(AS, true);227 224 if (as_page_fault(page_16k, PF_ACCESS_EXEC, istate) == 228 225 AS_PF_FAULT) { … … 250 247 size_t index; 251 248 pte_t *t; 249 as_t *as = AS; 252 250 253 251 page_8k = (uint64_t) tag.vpn << MMU_PAGE_WIDTH; … … 261 259 "Dereferencing NULL pointer."); 262 260 } else if (page_8k >= end_of_identity) { 263 /* 264 * The kernel is accessing the I/O space. 265 * We still do identity mapping for I/O, 266 * but without caching. 267 */ 268 dtlb_insert_mapping(page_8k, KA2PA(page_8k), 269 PAGESIZE_8K, false, false); 270 return; 261 /* Kernel non-identity. */ 262 as = AS_KERNEL; 263 } else { 264 do_fast_data_access_mmu_miss_fault(istate, tag, 265 "Unexpected kernel page fault."); 271 266 } 272 do_fast_data_access_mmu_miss_fault(istate, tag, "Unexpected " 273 "kernel page fault."); 274 } 275 276 page_table_lock(AS, true); 277 t = page_mapping_find(AS, page_16k, true); 267 } 268 269 t = page_mapping_find(as, page_16k, true); 278 270 if (t) { 279 271 /* … … 286 278 dtsb_pte_copy(t, index, true); 287 279 #endif 288 page_table_unlock(AS, true);289 280 } else { 290 281 /* 291 282 * Forward the page fault to the address space page fault 292 283 * handler. 293 */ 294 page_table_unlock(AS, true); 284 */ 295 285 if (as_page_fault(page_16k, PF_ACCESS_READ, istate) == 296 286 AS_PF_FAULT) { … … 314 304 size_t index; 315 305 pte_t *t; 306 as_t *as = AS; 316 307 317 308 page_16k = ALIGN_DOWN((uint64_t) tag.vpn << MMU_PAGE_WIDTH, PAGE_SIZE); 318 309 index = tag.vpn % MMU_PAGES_PER_PAGE; /* 16K-page emulation */ 319 310 320 page_table_lock(AS, true); 321 t = page_mapping_find(AS, page_16k, true); 311 if (tag.context == ASID_KERNEL) 312 as = AS_KERNEL; 313 314 t = page_mapping_find(as, page_16k, true); 322 315 if (t && PTE_WRITABLE(t)) { 323 316 /* … … 334 327 dtsb_pte_copy(t, index, false); 335 328 #endif 336 page_table_unlock(AS, true);337 329 } else { 338 330 /* … … 340 332 * handler. 341 333 */ 342 page_table_unlock(AS, true);343 334 if (as_page_fault(page_16k, PF_ACCESS_WRITE, istate) == 344 335 AS_PF_FAULT) {
Note:
See TracChangeset
for help on using the changeset viewer.