Changes in kernel/arch/sparc64/src/mm/sun4v/tlb.c [560b81c:cade9c1] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/mm/sun4v/tlb.c
r560b81c rcade9c1 211 211 { 212 212 uintptr_t va = ALIGN_DOWN(istate->tpc, PAGE_SIZE); 213 pte_t t; 214 215 bool found = page_mapping_find(AS, va, true, &t); 216 if (found && PTE_EXECUTABLE(&t)) { 217 ASSERT(t.p); 218 213 pte_t *t; 214 215 t = page_mapping_find(AS, va, true); 216 217 if (t && PTE_EXECUTABLE(t)) { 219 218 /* 220 219 * The mapping was found in the software page hash table. 221 220 * Insert it into ITLB. 222 221 */ 223 t .a = true;224 itlb_pte_copy( &t);222 t->a = true; 223 itlb_pte_copy(t); 225 224 #ifdef CONFIG_TSB 226 itsb_pte_copy(&t); 227 #endif 228 page_mapping_update(AS, va, true, &t); 225 itsb_pte_copy(t); 226 #endif 229 227 } else { 230 228 /* … … 246 244 void fast_data_access_mmu_miss(unsigned int tt, istate_t *istate) 247 245 { 248 pte_t t;246 pte_t *t; 249 247 uintptr_t va = DMISS_ADDRESS(istate->tlb_tag_access); 250 248 uint16_t ctx = DMISS_CONTEXT(istate->tlb_tag_access); … … 263 261 } 264 262 265 bool found = page_mapping_find(as, va, true, &t); 266 if (found) { 267 ASSERT(t.p); 268 263 t = page_mapping_find(as, va, true); 264 if (t) { 269 265 /* 270 266 * The mapping was found in the software page hash table. 271 267 * Insert it into DTLB. 272 268 */ 273 t .a = true;274 dtlb_pte_copy( &t, true);269 t->a = true; 270 dtlb_pte_copy(t, true); 275 271 #ifdef CONFIG_TSB 276 dtsb_pte_copy(&t, true); 277 #endif 278 page_mapping_update(as, va, true, &t); 272 dtsb_pte_copy(t, true); 273 #endif 279 274 } else { 280 275 /* … … 293 288 void fast_data_access_protection(unsigned int tt, istate_t *istate) 294 289 { 295 pte_t t;290 pte_t *t; 296 291 uintptr_t va = DMISS_ADDRESS(istate->tlb_tag_access); 297 292 uint16_t ctx = DMISS_CONTEXT(istate->tlb_tag_access); … … 301 296 as = AS_KERNEL; 302 297 303 bool found = page_mapping_find(as, va, true, &t); 304 if (found && PTE_WRITABLE(&t)) { 305 ASSERT(t.p); 306 298 t = page_mapping_find(as, va, true); 299 if (t && PTE_WRITABLE(t)) { 307 300 /* 308 301 * The mapping was found in the software page hash table and is … … 310 303 * into DTLB. 311 304 */ 312 t .a = true;313 t .d = true;305 t->a = true; 306 t->d = true; 314 307 mmu_demap_page(va, ctx, MMU_FLAG_DTLB); 315 dtlb_pte_copy( &t, false);308 dtlb_pte_copy(t, false); 316 309 #ifdef CONFIG_TSB 317 dtsb_pte_copy(&t, false); 318 #endif 319 page_mapping_update(as, va, true, &t); 310 dtsb_pte_copy(t, false); 311 #endif 320 312 } else { 321 313 /* … … 391 383 392 384 for (i = 0; i < cnt; i++) { 393 __hypercall_fast5(MMU_DEMAP_PAGE, 0, 0, page + i * PAGE_SIZE,394 asid,MMU_FLAG_DTLB | MMU_FLAG_ITLB);385 __hypercall_fast5(MMU_DEMAP_PAGE, 0, 0, page, asid, 386 MMU_FLAG_DTLB | MMU_FLAG_ITLB); 395 387 } 396 388
Note:
See TracChangeset
for help on using the changeset viewer.