]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sh: Move start_thread() out of line.
authorPaul Mundt <lethal@linux-sh.org>
Tue, 12 Jan 2010 09:52:00 +0000 (18:52 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 12 Jan 2010 09:52:00 +0000 (18:52 +0900)
start_thread() will become a bit heavier with the xstate freeing to be
added in, so move it out-of-line in preparation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/include/asm/processor_32.h
arch/sh/kernel/process_32.c

index 1f3d6fab660c9bf1ecebb76e3bd3a60f8445dbe4..50b8c9c3fa4cfdacca0c1f7f423dfeff70f3fcef 100644 (file)
@@ -119,19 +119,10 @@ extern int ubc_usercnt;
        .sp = sizeof(init_stack) + (long) &init_stack,          \
 }
 
-/*
- * Do necessary setup to start up a newly executed thread.
- */
-#define start_thread(_regs, new_pc, new_sp)     \
-       set_fs(USER_DS);                         \
-       _regs->pr = 0;                           \
-       _regs->sr = SR_FD;      /* User mode. */ \
-       _regs->pc = new_pc;                      \
-       _regs->regs[15] = new_sp
-
 /* Forward declaration, a strange C thing */
 struct task_struct;
-struct mm_struct;
+
+extern void start_thread(struct pt_regs *regs, unsigned long new_pc, unsigned long new_sp);
 
 /* Free all resources held by a thread. */
 extern void release_thread(struct task_struct *);
index d8af889366a44c21b225cc53c24a1f45df2f9f46..c4361402ec5eb74fa61ad03ca149280eea0133cd 100644 (file)
@@ -147,6 +147,18 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
 }
 EXPORT_SYMBOL(kernel_thread);
 
+void start_thread(struct pt_regs *regs, unsigned long new_pc,
+                 unsigned long new_sp)
+{
+       set_fs(USER_DS);
+
+       regs->pr = 0;
+       regs->sr = SR_FD;
+       regs->pc = new_pc;
+       regs->regs[15] = new_sp;
+}
+EXPORT_SYMBOL(start_thread);
+
 /*
  * Free current thread data structures etc..
  */