Changeset 762a824 in mainline for arch/ppc32/src/proc/scheduler.c


Ignore:
Timestamp:
2006-05-01T14:44:37Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
16dad032
Parents:
0f27b4c
Message:

ppc32: proper exception handling from user-space
code cleanup

File:
1 edited

Legend:

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

    r0f27b4c r762a824  
    2828
    2929#include <arch/mm/page.h>
     30#include <arch/boot/boot.h>
    3031#include <proc/scheduler.h>
    3132#include <proc/thread.h>
    3233#include <arch.h>
    33 
    34 __address supervisor_sp;
    35 __address supervisor_sp_physical;
    3634
    3735/** Perform ppc32 specific tasks needed before the new task is run. */
     
    4341void before_thread_runs_arch(void)
    4442{
    45         supervisor_sp = (__address) &THREAD->kstack[THREAD_STACK_SIZE - SP_DELTA];
    46         supervisor_sp_physical = KA2PA(supervisor_sp_physical);
     43        asm volatile (
     44                "mtsprg0 %0\n"
     45                :
     46                : "r" (KA2PA(&THREAD->kstack[THREAD_STACK_SIZE - SP_DELTA]))
     47        );
    4748}
    4849
Note: See TracChangeset for help on using the changeset viewer.