Ignore:
File:
1 edited

Legend:

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

    r346b12a2 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)) {
     199        pte_t *t;
     200
     201        t = page_mapping_find(AS, istate->tpc, true);
     202        if (t && PTE_EXECUTABLE(t)) {
    203203                /*
    204204                 * The mapping was found in the software page hash table.
    205205                 * Insert it into ITLB.
    206206                 */
    207                 t.a = true;
    208                 itlb_pte_copy(&t, index);
     207                t->a = true;
     208                itlb_pte_copy(t, index);
    209209#ifdef CONFIG_TSB
    210                 itsb_pte_copy(&t, index);
    211 #endif
    212                 page_mapping_update(AS, istate->tpc, true, &t);
     210                itsb_pte_copy(t, index);
     211#endif
    213212        } else {
    214213                /*
     
    234233        uintptr_t page_16k;
    235234        size_t index;
    236         pte_t t;
     235        pte_t *t;
    237236        as_t *as = AS;
    238237
     
    254253        }
    255254
    256         bool found = page_mapping_find(as, page_16k, true, &t);
    257         if (found) {
     255        t = page_mapping_find(as, page_16k, true);
     256        if (t) {
    258257                /*
    259258                 * The mapping was found in the software page hash table.
    260259                 * Insert it into DTLB.
    261260                 */
    262                 t.a = true;
    263                 dtlb_pte_copy(&t, index, true);
     261                t->a = true;
     262                dtlb_pte_copy(t, index, true);
    264263#ifdef CONFIG_TSB
    265                 dtsb_pte_copy(&t, index, true);
    266 #endif
    267                 page_mapping_update(as, page_16k, true, &t);
     264                dtsb_pte_copy(t, index, true);
     265#endif
    268266        } else {
    269267                /*
     
    285283        uintptr_t page_16k;
    286284        size_t index;
    287         pte_t t;
     285        pte_t *t;
    288286        as_t *as = AS;
    289287
     
    295293                as = AS_KERNEL;
    296294
    297         bool found = page_mapping_find(as, page_16k, true, &t);
    298         if (found && PTE_WRITABLE(&t)) {
     295        t = page_mapping_find(as, page_16k, true);
     296        if (t && PTE_WRITABLE(t)) {
    299297                /*
    300298                 * The mapping was found in the software page hash table and is
     
    302300                 * into DTLB.
    303301                 */
    304                 t.a = true;
    305                 t.d = true;
     302                t->a = true;
     303                t->d = true;
    306304                dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_SECONDARY,
    307305                    page_16k + index * MMU_PAGE_SIZE);
    308                 dtlb_pte_copy(&t, index, false);
     306                dtlb_pte_copy(t, index, false);
    309307#ifdef CONFIG_TSB
    310                 dtsb_pte_copy(&t, index, false);
    311 #endif
    312                 page_mapping_update(as, page_16k, true, &t);
     308                dtsb_pte_copy(t, index, false);
     309#endif
    313310        } else {
    314311                /*
Note: See TracChangeset for help on using the changeset viewer.