fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / include / asm-v850 / processor.h
index b28582e..979e346 100644 (file)
 #ifndef __V850_PROCESSOR_H__
 #define __V850_PROCESSOR_H__
 
-#include <linux/config.h>
 #ifndef __ASSEMBLY__ /* <linux/thread_info.h> is not asm-safe.  */
 #include <linux/thread_info.h>
 #endif
 
+#include <linux/compiler.h>
 #include <asm/ptrace.h>
 #include <asm/entry.h>
 
  */
 #define current_text_addr()    ({ __label__ _l; _l: &&_l;})
 
-
-/*
- * Bus types
- */
-#define MCA_bus 0
-#define MCA_bus__is_a_macro /* for versions in ksyms.c */
-
 /* If you change this, you must change the associated assembly-languages
    constants defined below, THREAD_*.  */
 struct thread_struct {
@@ -66,7 +59,7 @@ struct thread_struct {
 
 
 /* Do necessary setup to start up a newly executed thread.  */
-extern inline void start_thread (struct pt_regs *regs,
+static inline void start_thread (struct pt_regs *regs,
                                 unsigned long pc, unsigned long usp)
 {
        regs->pc = pc;
@@ -75,7 +68,7 @@ extern inline void start_thread (struct pt_regs *regs,
 }
 
 /* Free all resources held by a thread. */
-extern inline void release_thread (struct task_struct *dead_task)
+static inline void release_thread (struct task_struct *dead_task)
 {
 }
 
@@ -105,16 +98,16 @@ unsigned long get_wchan (struct task_struct *p);
 
 
 /* Return some info about the user process TASK.  */
-#define task_tos(task) ((unsigned long)(task)->thread_info + THREAD_SIZE)
-#define task_regs(task) ((struct pt_regs *)task_tos (task) - 1)
-#define task_sp(task)  (task_regs (task)->gpr[GPR_SP])
-#define task_pc(task)  (task_regs (task)->pc)
+#define task_tos(task) ((unsigned long)task_stack_page(task) + THREAD_SIZE)
+#define task_pt_regs(task) ((struct pt_regs *)task_tos (task) - 1)
+#define task_sp(task)  (task_pt_regs (task)->gpr[GPR_SP])
+#define task_pc(task)  (task_pt_regs (task)->pc)
 /* Grotty old names for some.  */
 #define KSTK_EIP(task) task_pc (task)
 #define KSTK_ESP(task) task_sp (task)
 
 
-#define cpu_relax()    ((void)0)
+#define cpu_relax()    barrier()
 
 
 #else /* __ASSEMBLY__ */