Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/mm/sun4u/tlb.c

    r560b81c rd70ebffe  
    197197{
    198198        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)) {
    205203                /*
    206204                 * The mapping was found in the software page hash table.
    207205                 * Insert it into ITLB.
    208206                 */
    209                 t.a = true;
    210                 itlb_pte_copy(&t, index);
     207                t->a = true;
     208                itlb_pte_copy(t, index);
    211209#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
    215212        } else {
    216213                /*
     
    236233        uintptr_t page_16k;
    237234        size_t index;
    238         pte_t t;
     235        pte_t *t;
    239236        as_t *as = AS;
    240237
     
    256253        }
    257254
    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) {
    262257                /*
    263258                 * The mapping was found in the software page hash table.
    264259                 * Insert it into DTLB.
    265260                 */
    266                 t.a = true;
    267                 dtlb_pte_copy(&t, index, true);
     261                t->a = true;
     262                dtlb_pte_copy(t, index, true);
    268263#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
    272266        } else {
    273267                /*
     
    289283        uintptr_t page_16k;
    290284        size_t index;
    291         pte_t t;
     285        pte_t *t;
    292286        as_t *as = AS;
    293287
     
    299293                as = AS_KERNEL;
    300294
    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)) {
    305297                /*
    306298                 * The mapping was found in the software page hash table and is
     
    308300                 * into DTLB.
    309301                 */
    310                 t.a = true;
    311                 t.d = true;
     302                t->a = true;
     303                t->d = true;
    312304                dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_SECONDARY,
    313305                    page_16k + index * MMU_PAGE_SIZE);
    314                 dtlb_pte_copy(&t, index, false);
     306                dtlb_pte_copy(t, index, false);
    315307#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
    319310        } else {
    320311                /*
Note: See TracChangeset for help on using the changeset viewer.