Ignore:
Timestamp:
2016-09-01T17:05:13Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
42d08592
Parents:
f126c87 (diff), fb63c06 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~jakub/helenos/pt

File:
1 edited

Legend:

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

    rf126c87 r2a2fbc8  
    197197{
    198198        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)) {
    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
     210                itsb_pte_copy(&t, index);
     211#endif
     212                page_mapping_update(AS, istate->tpc, true, &t);
    212213        } else {
    213214                /*
     
    233234        uintptr_t page_16k;
    234235        size_t index;
    235         pte_t *t;
     236        pte_t t;
    236237        as_t *as = AS;
    237238
     
    253254        }
    254255
    255         t = page_mapping_find(as, page_16k, true);
    256         if (t) {
     256        bool found = page_mapping_find(as, page_16k, true, &t);
     257        if (found) {
    257258                /*
    258259                 * The mapping was found in the software page hash table.
    259260                 * Insert it into DTLB.
    260261                 */
    261                 t->a = true;
    262                 dtlb_pte_copy(t, index, true);
     262                t.a = true;
     263                dtlb_pte_copy(&t, index, true);
    263264#ifdef CONFIG_TSB
    264                 dtsb_pte_copy(t, index, true);
    265 #endif
     265                dtsb_pte_copy(&t, index, true);
     266#endif
     267                page_mapping_update(as, page_16k, true, &t);
    266268        } else {
    267269                /*
     
    283285        uintptr_t page_16k;
    284286        size_t index;
    285         pte_t *t;
     287        pte_t t;
    286288        as_t *as = AS;
    287289
     
    293295                as = AS_KERNEL;
    294296
    295         t = page_mapping_find(as, page_16k, true);
    296         if (t && PTE_WRITABLE(t)) {
     297        bool found = page_mapping_find(as, page_16k, true, &t);
     298        if (found && PTE_WRITABLE(&t)) {
    297299                /*
    298300                 * The mapping was found in the software page hash table and is
     
    300302                 * into DTLB.
    301303                 */
    302                 t->a = true;
    303                 t->d = true;
     304                t.a = true;
     305                t.d = true;
    304306                dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_SECONDARY,
    305307                    page_16k + index * MMU_PAGE_SIZE);
    306                 dtlb_pte_copy(t, index, false);
     308                dtlb_pte_copy(&t, index, false);
    307309#ifdef CONFIG_TSB
    308                 dtsb_pte_copy(t, index, false);
    309 #endif
     310                dtsb_pte_copy(&t, index, false);
     311#endif
     312                page_mapping_update(as, page_16k, true, &t);
    310313        } else {
    311314                /*
Note: See TracChangeset for help on using the changeset viewer.