diff options
-rw-r--r-- | arch/um/include/asm/processor-generic.h | 2 | ||||
-rw-r--r-- | arch/um/kernel/process.c | 17 | ||||
-rw-r--r-- | arch/x86/um/Kconfig | 1 |
3 files changed, 4 insertions, 16 deletions
diff --git a/arch/um/include/asm/processor-generic.h b/arch/um/include/asm/processor-generic.h index 33a6a2423bd2..5d9ab0c4f488 100644 --- a/arch/um/include/asm/processor-generic.h +++ b/arch/um/include/asm/processor-generic.h | |||
@@ -63,8 +63,6 @@ static inline void release_thread(struct task_struct *task) | |||
63 | { | 63 | { |
64 | } | 64 | } |
65 | 65 | ||
66 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | ||
67 | |||
68 | extern unsigned long thread_saved_pc(struct task_struct *t); | 66 | extern unsigned long thread_saved_pc(struct task_struct *t); |
69 | 67 | ||
70 | static inline void mm_copy_segments(struct mm_struct *from_mm, | 68 | static inline void mm_copy_segments(struct mm_struct *from_mm, |
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index c5f5afa50745..a1b50add48a2 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c | |||
@@ -69,18 +69,6 @@ unsigned long alloc_stack(int order, int atomic) | |||
69 | return page; | 69 | return page; |
70 | } | 70 | } |
71 | 71 | ||
72 | int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | ||
73 | { | ||
74 | int pid; | ||
75 | |||
76 | current->thread.request.u.thread.proc = fn; | ||
77 | current->thread.request.u.thread.arg = arg; | ||
78 | pid = do_fork(CLONE_VM | CLONE_UNTRACED | flags, 0, | ||
79 | ¤t->thread.regs, 0, NULL, NULL); | ||
80 | return pid; | ||
81 | } | ||
82 | EXPORT_SYMBOL(kernel_thread); | ||
83 | |||
84 | static inline void set_current(struct task_struct *task) | 72 | static inline void set_current(struct task_struct *task) |
85 | { | 73 | { |
86 | cpu_tasks[task_thread_info(task)->cpu] = ((struct cpu_task) | 74 | cpu_tasks[task_thread_info(task)->cpu] = ((struct cpu_task) |
@@ -177,7 +165,7 @@ void fork_handler(void) | |||
177 | } | 165 | } |
178 | 166 | ||
179 | int copy_thread(unsigned long clone_flags, unsigned long sp, | 167 | int copy_thread(unsigned long clone_flags, unsigned long sp, |
180 | unsigned long stack_top, struct task_struct * p, | 168 | unsigned long arg, struct task_struct * p, |
181 | struct pt_regs *regs) | 169 | struct pt_regs *regs) |
182 | { | 170 | { |
183 | void (*handler)(void); | 171 | void (*handler)(void); |
@@ -198,7 +186,8 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, | |||
198 | arch_copy_thread(¤t->thread.arch, &p->thread.arch); | 186 | arch_copy_thread(¤t->thread.arch, &p->thread.arch); |
199 | } else { | 187 | } else { |
200 | get_safe_registers(p->thread.regs.regs.gp, p->thread.regs.regs.fp); | 188 | get_safe_registers(p->thread.regs.regs.gp, p->thread.regs.regs.fp); |
201 | p->thread.request.u.thread = current->thread.request.u.thread; | 189 | p->thread.request.u.thread.proc = (int (*)(void *))sp; |
190 | p->thread.request.u.thread.arg = (void *)arg; | ||
202 | handler = new_thread_handler; | 191 | handler = new_thread_handler; |
203 | } | 192 | } |
204 | 193 | ||
diff --git a/arch/x86/um/Kconfig b/arch/x86/um/Kconfig index 9926e11a772d..da85b6fc8e8e 100644 --- a/arch/x86/um/Kconfig +++ b/arch/x86/um/Kconfig | |||
@@ -13,6 +13,7 @@ endmenu | |||
13 | config UML_X86 | 13 | config UML_X86 |
14 | def_bool y | 14 | def_bool y |
15 | select GENERIC_FIND_FIRST_BIT | 15 | select GENERIC_FIND_FIRST_BIT |
16 | select GENERIC_KERNEL_THREAD | ||
16 | 17 | ||
17 | config 64BIT | 18 | config 64BIT |
18 | bool "64-bit kernel" if SUBARCH = "x86" | 19 | bool "64-bit kernel" if SUBARCH = "x86" |