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