Changeset a0d74fd in mainline for arch/sparc64/src/proc/scheduler.c


Ignore:
Timestamp:
2006-03-01T11:07:04Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9ad03fe
Parents:
2c49fbbe
Message:

ia64 work.
Provide PA2KA(identity) mapping for kernel data references via Alternate Data TLB Fault handler.
Add before_thread_runs_arch() that maps kstack, if necessary.
Add easy to use dtlb_mapping_insert() for comfortable insertion of kernel data mappings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/sparc64/src/proc/scheduler.c

    r2c49fbbe ra0d74fd  
    3131#include <arch.h>
    3232#include <arch/mm/tlb.h>
     33#include <arch/mm/page.h>
    3334#include <config.h>
    3435#include <align.h>
     
    3940        __address base;
    4041       
    41         base = ALIGN_DOWN(config.base, 4*1024*1024);
     42        base = ALIGN_DOWN(config.base, 1<<KERNEL_PAGE_WIDTH);
    4243
    43         if ((__address) THREAD->kstack < base || (__address) THREAD->kstack > base + 4*1024*1024) {
     44        if ((__address) THREAD->kstack < base || (__address) THREAD->kstack > base + (1<<KERNEL_PAGE_WIDTH)) {
    4445                /*
    4546                 * Kernel stack of this thread is not locked in DTLB.
     
    4849                 */
    4950                 dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, (__address) THREAD->kstack);
    50                  dtlb_insert_mapping((__address) THREAD->kstack, (__address) THREAD->kstack, PAGESIZE_8K, true, true);
     51                 dtlb_insert_mapping((__address) THREAD->kstack, KA2PA(THREAD->kstack), PAGESIZE_8K, true, true);
    5152        }       
    5253}
     
    5758        __address base;
    5859
    59         base = ALIGN_DOWN(config.base, 4*1024*1024);
     60        base = ALIGN_DOWN(config.base, 1<<KERNEL_PAGE_WIDTH);
    6061
    61         if ((__address) THREAD->kstack < base || (__address) THREAD->kstack > base + 4*1024*1024) {
     62        if ((__address) THREAD->kstack < base || (__address) THREAD->kstack > base + (1<<KERNEL_PAGE_WIDTH)) {
    6263                /*
    6364                 * Kernel stack of this thread is locked in DTLB.
Note: See TracChangeset for help on using the changeset viewer.