Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 0e78394 in mainline


Ignore:
Timestamp:
2011-12-11T17:32:19Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
464a52f
Parents:
1f5714e
Message:

sparc64: Make sure to use AS_KERNEL when handling kernel non-identity.

File:
1 edited

Legend:

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

    r1f5714e r0e78394  
    247247        size_t index;
    248248        pte_t *t;
     249        as_t *as = AS;
    249250
    250251        page_8k = (uint64_t) tag.vpn << MMU_PAGE_WIDTH;
     
    258259                            "Dereferencing NULL pointer.");
    259260                } else if (page_8k >= end_of_identity) {
    260                         /* Kernel non-identity, fall through. */
     261                        /* Kernel non-identity. */
     262                        as = AS_KERNEL;
    261263                } else {
    262264                        do_fast_data_access_mmu_miss_fault(istate, tag,
     
    265267        }
    266268
    267         t = page_mapping_find(AS, page_16k, true);
     269        t = page_mapping_find(as, page_16k, true);
    268270        if (t) {
    269271                /*
     
    280282                 * Forward the page fault to the address space page fault
    281283                 * handler.
    282                  */             
     284                 */
    283285                if (as_page_fault(page_16k, PF_ACCESS_READ, istate) ==
    284286                    AS_PF_FAULT) {
     
    302304        size_t index;
    303305        pte_t *t;
     306        as_t *as = AS;
    304307
    305308        page_16k = ALIGN_DOWN((uint64_t) tag.vpn << MMU_PAGE_WIDTH, PAGE_SIZE);
    306309        index = tag.vpn % MMU_PAGES_PER_PAGE;   /* 16K-page emulation */
    307310
    308         t = page_mapping_find(AS, page_16k, true);
     311        if (tag.context == ASID_KERNEL)
     312                as = AS_KERNEL;
     313
     314        t = page_mapping_find(as, page_16k, true);
    309315        if (t && PTE_WRITABLE(t)) {
    310316                /*
Note: See TracChangeset for help on using the changeset viewer.