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