Ignore:
File:
1 edited

Legend:

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

    r1dbc43f rb2fa1204  
    4646#include <arch.h>
    4747#include <print.h>
     48#include <log.h>
    4849#include <typedefs.h>
    4950#include <config.h>
     
    251252        uintptr_t va = DMISS_ADDRESS(page_and_ctx);
    252253        uint16_t ctx = DMISS_CONTEXT(page_and_ctx);
     254        as_t *as = AS;
    253255
    254256        if (ctx == ASID_KERNEL) {
     
    256258                        /* NULL access in kernel */
    257259                        panic("NULL pointer dereference.");
     260                } else if (va >= end_of_identity) {
     261                        /* Kernel non-identity */
     262                        as = AS_KERNEL;
     263                } else {
     264                        panic("Unexpected kernel page fault.");
    258265                }
    259                 panic("Unexpected kernel page fault.");
    260         }
    261 
    262         t = page_mapping_find(AS, va, true);
     266        }
     267
     268        t = page_mapping_find(as, va, true);
    263269        if (t) {
    264270                /*
     
    295301        uintptr_t va = DMISS_ADDRESS(page_and_ctx);
    296302        uint16_t ctx = DMISS_CONTEXT(page_and_ctx);
    297 
    298         t = page_mapping_find(AS, va, true);
     303        as_t *as = AS;
     304
     305        if (ctx == ASID_KERNEL)
     306                as = AS_KERNEL;
     307
     308        t = page_mapping_find(as, va, true);
    299309        if (t && PTE_WRITABLE(t)) {
    300310                /*
     
    326336void tlb_print(void)
    327337{
    328         printf("Operation not possible on Niagara.\n");
     338        log(LF_ARCH, LVL_WARN, "Operation not possible on Niagara.");
    329339}
    330340
Note: See TracChangeset for help on using the changeset viewer.