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