[PATCH 09/11] microblaze: Move start_thread to process.c

From: monstr
Date: Thu Apr 16 2009 - 06:05:45 EST


From: Michal Simek <monstr@xxxxxxxxx>

This change is due to upcomming MMU merge

Signed-off-by: Michal Simek <monstr@xxxxxxxxx>
---
arch/microblaze/include/asm/processor.h | 13 +++----------
arch/microblaze/kernel/process.c | 9 +++++++++
2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/arch/microblaze/include/asm/processor.h b/arch/microblaze/include/asm/processor.h
index cea42a3..89aa395 100644
--- a/arch/microblaze/include/asm/processor.h
+++ b/arch/microblaze/include/asm/processor.h
@@ -29,6 +29,9 @@ extern const struct seq_operations cpuinfo_op;
#define task_pt_regs(tsk) \
(((struct pt_regs *)(THREAD_SIZE + task_stack_page(tsk))) - 1)

+/* Do necessary setup to start up a newly executed thread. */
+void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp);
+
/*
* User space process size: memory size
*
@@ -58,16 +61,6 @@ struct task_struct;
struct thread_struct { };
# define INIT_THREAD { }

-/* Do necessary setup to start up a newly executed thread. */
-static inline void start_thread(struct pt_regs *regs,
- unsigned long pc,
- unsigned long usp)
-{
- regs->pc = pc;
- regs->r1 = usp;
- regs->pt_mode = 0;
-}
-
/* Free all resources held by a thread. */
static inline void release_thread(struct task_struct *dead_task)
{
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c
index 40cc148..dd15de9 100644
--- a/arch/microblaze/kernel/process.c
+++ b/arch/microblaze/kernel/process.c
@@ -182,3 +182,12 @@ unsigned long get_wchan(struct task_struct *p)
/* TBD (used by procfs) */
return 0;
}
+
+/* Set up a thread for executing a new program */
+void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp)
+{
+ set_fs(USER_DS);
+ regs->pc = pc;
+ regs->r1 = usp;
+ regs->pt_mode = 0;
+}
--
1.5.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/