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