Changes in kernel/arch/sparc64/src/mm/sun4u/tlb.c [d70ebffe:560b81c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/mm/sun4u/tlb.c
rd70ebffe r560b81c 197 197 { 198 198 size_t index = (istate->tpc >> MMU_PAGE_WIDTH) % MMU_PAGES_PER_PAGE; 199 pte_t *t; 200 201 t = page_mapping_find(AS, istate->tpc, true); 202 if (t && PTE_EXECUTABLE(t)) { 199 pte_t t; 200 201 bool found = page_mapping_find(AS, istate->tpc, true, &t); 202 if (found && PTE_EXECUTABLE(&t)) { 203 ASSERT(t.p); 204 203 205 /* 204 206 * The mapping was found in the software page hash table. 205 207 * Insert it into ITLB. 206 208 */ 207 t ->a = true;208 itlb_pte_copy( t, index);209 t.a = true; 210 itlb_pte_copy(&t, index); 209 211 #ifdef CONFIG_TSB 210 itsb_pte_copy(t, index); 211 #endif 212 itsb_pte_copy(&t, index); 213 #endif 214 page_mapping_update(AS, istate->tpc, true, &t); 212 215 } else { 213 216 /* … … 233 236 uintptr_t page_16k; 234 237 size_t index; 235 pte_t *t;238 pte_t t; 236 239 as_t *as = AS; 237 240 … … 253 256 } 254 257 255 t = page_mapping_find(as, page_16k, true); 256 if (t) { 258 bool found = page_mapping_find(as, page_16k, true, &t); 259 if (found) { 260 ASSERT(t.p); 261 257 262 /* 258 263 * The mapping was found in the software page hash table. 259 264 * Insert it into DTLB. 260 265 */ 261 t ->a = true;262 dtlb_pte_copy( t, index, true);266 t.a = true; 267 dtlb_pte_copy(&t, index, true); 263 268 #ifdef CONFIG_TSB 264 dtsb_pte_copy(t, index, true); 265 #endif 269 dtsb_pte_copy(&t, index, true); 270 #endif 271 page_mapping_update(as, page_16k, true, &t); 266 272 } else { 267 273 /* … … 283 289 uintptr_t page_16k; 284 290 size_t index; 285 pte_t *t;291 pte_t t; 286 292 as_t *as = AS; 287 293 … … 293 299 as = AS_KERNEL; 294 300 295 t = page_mapping_find(as, page_16k, true); 296 if (t && PTE_WRITABLE(t)) { 301 bool found = page_mapping_find(as, page_16k, true, &t); 302 if (found && PTE_WRITABLE(&t)) { 303 ASSERT(t.p); 304 297 305 /* 298 306 * The mapping was found in the software page hash table and is … … 300 308 * into DTLB. 301 309 */ 302 t ->a = true;303 t ->d = true;310 t.a = true; 311 t.d = true; 304 312 dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_SECONDARY, 305 313 page_16k + index * MMU_PAGE_SIZE); 306 dtlb_pte_copy( t, index, false);314 dtlb_pte_copy(&t, index, false); 307 315 #ifdef CONFIG_TSB 308 dtsb_pte_copy(t, index, false); 309 #endif 316 dtsb_pte_copy(&t, index, false); 317 #endif 318 page_mapping_update(as, page_16k, true, &t); 310 319 } else { 311 320 /*
Note:
See TracChangeset
for help on using the changeset viewer.