aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2009-04-16 05:30:16 -0400
committerMichal Simek <monstr@monstr.eu>2009-04-23 10:09:18 -0400
commite1c4bd0897b6d03eff4b32197d6ab017f83fc836 (patch)
treef29010d7c51826a543d4820cef30a9e9b09c27e0 /arch/microblaze
parentdf4f3eb7c318e34899e9499bc5c9295690f7a106 (diff)
microblaze: Move start_thread to process.c
This change is due to upcomming MMU merge Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze')
-rw-r--r--arch/microblaze/include/asm/processor.h13
-rw-r--r--arch/microblaze/kernel/process.c9
2 files changed, 12 insertions, 10 deletions
diff --git a/arch/microblaze/include/asm/processor.h b/arch/microblaze/include/asm/processor.h
index cea42a36d161..89aa3956929b 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;
29#define task_pt_regs(tsk) \ 29#define task_pt_regs(tsk) \
30 (((struct pt_regs *)(THREAD_SIZE + task_stack_page(tsk))) - 1) 30 (((struct pt_regs *)(THREAD_SIZE + task_stack_page(tsk))) - 1)
31 31
32/* Do necessary setup to start up a newly executed thread. */
33void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp);
34
32/* 35/*
33 * User space process size: memory size 36 * User space process size: memory size
34 * 37 *
@@ -58,16 +61,6 @@ struct task_struct;
58struct thread_struct { }; 61struct thread_struct { };
59# define INIT_THREAD { } 62# define INIT_THREAD { }
60 63
61/* Do necessary setup to start up a newly executed thread. */
62static inline void start_thread(struct pt_regs *regs,
63 unsigned long pc,
64 unsigned long usp)
65{
66 regs->pc = pc;
67 regs->r1 = usp;
68 regs->pt_mode = 0;
69}
70
71/* Free all resources held by a thread. */ 64/* Free all resources held by a thread. */
72static inline void release_thread(struct task_struct *dead_task) 65static inline void release_thread(struct task_struct *dead_task)
73{ 66{
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c
index 40cc1480810e..dd15de9cde39 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)
182/* TBD (used by procfs) */ 182/* TBD (used by procfs) */
183 return 0; 183 return 0;
184} 184}
185
186/* Set up a thread for executing a new program */
187void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long usp)
188{
189 set_fs(USER_DS);
190 regs->pc = pc;
191 regs->r1 = usp;
192 regs->pt_mode = 0;
193}