Changeset cd373bb in mainline for arch/ia64/src/proc/scheduler.c


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

ia64 work.
Support switch from userspace register stack in heavyweight handler.

File:
1 edited

Legend:

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

    re1c68e0c rcd373bb  
    3232#include <arch/register.h>
    3333#include <arch/context.h>
     34#include <arch/stack.h>
    3435#include <arch/mm/tlb.h>
    3536#include <config.h>
    3637#include <align.h>
    3738
    38 /** Record kernel stack address in bank 0 r23 and make sure it is mapped in DTR. */
     39/** Prepare kernel stack pointers in bank 0 r22 and r23 and make sure the stack is mapped in DTR. */
    3940void before_thread_runs_arch(void)
    4041{
     
    5253       
    5354        /*
    54          * Record address of kernel stack to bank 0 r23
    55          * where it will be found after switch from userspace.
     55         * Record address of kernel backing store to bank 0 r22.
     56         * Record address of kernel stack to bank 0 r23.
     57         * These values will be found there after switch from userspace.
    5658         */
    5759        __asm__ volatile (
    5860                "bsw.0\n"
    59                 "mov r23 = %0\n"
     61                "mov r22 = %0\n"
     62                "mov r23 = %1\n"
    6063                "bsw.1\n"
    61                  : : "r" (&THREAD->kstack[THREAD_STACK_SIZE - SP_DELTA]));
     64                :
     65                : "r" (((__address) THREAD->kstack) + ALIGN_UP(sizeof(the_t), REGISTER_STACK_ALIGNMENT)),
     66                  "r" (&THREAD->kstack[THREAD_STACK_SIZE - SP_DELTA]));
    6267}
    6368
Note: See TracChangeset for help on using the changeset viewer.