patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / include / asm-h8300 / processor.h
index 3149410..5990073 100644 (file)
 #include <asm/ptrace.h>
 #include <asm/current.h>
 
-extern inline unsigned long rdusp(void) {
+static inline unsigned long rdusp(void) {
        extern unsigned int     sw_usp;
        return(sw_usp);
 }
 
-extern inline void wrusp(unsigned long usp) {
+static inline void wrusp(unsigned long usp) {
        extern unsigned int     sw_usp;
        sw_usp = usp;
 }
@@ -61,9 +61,15 @@ struct thread_struct {
        } breakinfo;
 };
 
-#define INIT_THREAD  { \
-       sizeof(init_stack) + (unsigned long) init_stack, 0, \
-       PS_S,  0, {(unsigned short *)-1, 0}, \
+#define INIT_THREAD  {                                         \
+       .ksp  = sizeof(init_stack) + (unsigned long)init_stack, \
+       .usp  = 0,                                              \
+       .ccr  = PS_S,                                           \
+       .esp0 = 0,                                              \
+       .breakinfo = {                                          \
+               .addr = (unsigned short *)-1,                   \
+               .inst = 0                                       \
+       }                                                       \
 }
 
 /*
@@ -78,6 +84,7 @@ do {                                                          \
        set_fs(USER_DS);           /* reads from user space */  \
        (_regs)->pc = (_pc);                                    \
        (_regs)->ccr &= 0x00;      /* clear kernel flag */      \
+       (_regs)->er5 = current->mm->start_data; /* GOT base */  \
        wrusp((unsigned long)(_usp) - sizeof(unsigned long)*3); \
 } while(0)
 #endif
@@ -88,6 +95,7 @@ do {                                                          \
        (_regs)->pc = (_pc);                                    \
        (_regs)->ccr = 0x00;       /* clear kernel flag */      \
        (_regs)->exr = 0x78;       /* enable all interrupts */  \
+       (_regs)->er5 = current->mm->start_data; /* GOT base */  \
        /* 14 = space for retaddr(4), vector(4), er0(4) and ext(2) on stack */ \
        wrusp(((unsigned long)(_usp)) - 14);                    \
 } while(0)