Changes in kernel/arch/sparc64/src/mm/sun4v/tlb.c [7254df6:346b12a2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/mm/sun4v/tlb.c
r7254df6 r346b12a2 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)) { 218 217 /* 219 218 * The mapping was found in the software page hash table. 220 219 * Insert it into ITLB. 221 220 */ 222 t ->a = true;223 itlb_pte_copy( t);221 t.a = true; 222 itlb_pte_copy(&t); 224 223 #ifdef CONFIG_TSB 225 itsb_pte_copy(t); 226 #endif 224 itsb_pte_copy(&t); 225 #endif 226 page_mapping_update(AS, va, true, &t); 227 227 } else { 228 228 /* … … 244 244 void fast_data_access_mmu_miss(unsigned int tt, istate_t *istate) 245 245 { 246 pte_t *t;246 pte_t t; 247 247 uintptr_t va = DMISS_ADDRESS(istate->tlb_tag_access); 248 248 uint16_t ctx = DMISS_CONTEXT(istate->tlb_tag_access); … … 261 261 } 262 262 263 t = page_mapping_find(as, va, true);264 if ( t) {263 bool found = page_mapping_find(as, va, true, &t); 264 if (found) { 265 265 /* 266 266 * The mapping was found in the software page hash table. 267 267 * Insert it into DTLB. 268 268 */ 269 t ->a = true;270 dtlb_pte_copy( t, true);269 t.a = true; 270 dtlb_pte_copy(&t, true); 271 271 #ifdef CONFIG_TSB 272 dtsb_pte_copy(t, true); 273 #endif 272 dtsb_pte_copy(&t, true); 273 #endif 274 page_mapping_update(as, va, true, &t); 274 275 } else { 275 276 /* … … 288 289 void fast_data_access_protection(unsigned int tt, istate_t *istate) 289 290 { 290 pte_t *t;291 pte_t t; 291 292 uintptr_t va = DMISS_ADDRESS(istate->tlb_tag_access); 292 293 uint16_t ctx = DMISS_CONTEXT(istate->tlb_tag_access); … … 296 297 as = AS_KERNEL; 297 298 298 t = page_mapping_find(as, va, true);299 if ( t && PTE_WRITABLE(t)) {299 bool found = page_mapping_find(as, va, true, &t); 300 if (found && PTE_WRITABLE(&t)) { 300 301 /* 301 302 * The mapping was found in the software page hash table and is … … 303 304 * into DTLB. 304 305 */ 305 t ->a = true;306 t ->d = true;306 t.a = true; 307 t.d = true; 307 308 mmu_demap_page(va, ctx, MMU_FLAG_DTLB); 308 dtlb_pte_copy( t, false);309 dtlb_pte_copy(&t, false); 309 310 #ifdef CONFIG_TSB 310 dtsb_pte_copy(t, false); 311 #endif 311 dtsb_pte_copy(&t, false); 312 #endif 313 page_mapping_update(as, va, true, &t); 312 314 } else { 313 315 /*
Note:
See TracChangeset
for help on using the changeset viewer.