fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / include / asm-h8300 / processor.h
index 3149410..99b664a 100644 (file)
  */
 #define current_text_addr() ({ __label__ _l; _l: &&_l;})
 
-#include <linux/config.h>
+#include <linux/compiler.h>
 #include <asm/segment.h>
 #include <asm/fpu.h>
 #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;
 }
@@ -45,11 +45,6 @@ extern inline void wrusp(unsigned long usp) {
  */
 #define TASK_UNMAPPED_BASE     0
 
-/*
- * Bus types
- */
-#define MCA_bus 0
-
 struct thread_struct {
        unsigned long  ksp;             /* kernel stack pointer */
        unsigned long  usp;             /* user stack pointer */
@@ -61,9 +56,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 +79,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 +90,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)
@@ -127,6 +130,6 @@ unsigned long get_wchan(struct task_struct *p);
        eip; })
 #define        KSTK_ESP(tsk)   ((tsk) == current ? rdusp() : (tsk)->thread.usp)
 
-#define cpu_relax()    do { } while (0)
+#define cpu_relax()    barrier()
 
 #endif