aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris
diff options
context:
space:
mode:
authorLinus Torvalds2012-12-12 14:22:13 -0600
committerLinus Torvalds2012-12-12 14:22:13 -0600
commit9977d9b379cb77e0f67bd6f4563618106e58e11d (patch)
tree0191accfddf578edb52c69c933d64521e3dce297 /arch/cris
parentcf4af01221579a4e895f43dbfc47598fbfc5a731 (diff)
parent541880d9a2c7871f6370071d55aa6662d329c51e (diff)
downloadam43-linux-kernel-9977d9b379cb77e0f67bd6f4563618106e58e11d.tar.gz
am43-linux-kernel-9977d9b379cb77e0f67bd6f4563618106e58e11d.tar.xz
am43-linux-kernel-9977d9b379cb77e0f67bd6f4563618106e58e11d.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
Pull big execve/kernel_thread/fork unification series from Al Viro: "All architectures are converted to new model. Quite a bit of that stuff is actually shared with architecture trees; in such cases it's literally shared branch pulled by both, not a cherry-pick. A lot of ugliness and black magic is gone (-3KLoC total in this one): - kernel_thread()/kernel_execve()/sys_execve() redesign. We don't do syscalls from kernel anymore for either kernel_thread() or kernel_execve(): kernel_thread() is essentially clone(2) with callback run before we return to userland, the callbacks either never return or do successful do_execve() before returning. kernel_execve() is a wrapper for do_execve() - it doesn't need to do transition to user mode anymore. As a result kernel_thread() and kernel_execve() are arch-independent now - they live in kernel/fork.c and fs/exec.c resp. sys_execve() is also in fs/exec.c and it's completely architecture-independent. - daemonize() is gone, along with its parts in fs/*.c - struct pt_regs * is no longer passed to do_fork/copy_process/ copy_thread/do_execve/search_binary_handler/->load_binary/do_coredump. - sys_fork()/sys_vfork()/sys_clone() unified; some architectures still need wrappers (ones with callee-saved registers not saved in pt_regs on syscall entry), but the main part of those suckers is in kernel/fork.c now." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (113 commits) do_coredump(): get rid of pt_regs argument print_fatal_signal(): get rid of pt_regs argument ptrace_signal(): get rid of unused arguments get rid of ptrace_signal_deliver() arguments new helper: signal_pt_regs() unify default ptrace_signal_deliver flagday: kill pt_regs argument of do_fork() death to idle_regs() don't pass regs to copy_process() flagday: don't pass regs to copy_thread() bfin: switch to generic vfork, get rid of pointless wrappers xtensa: switch to generic clone() openrisc: switch to use of generic fork and clone unicore32: switch to generic clone(2) score: switch to generic fork/vfork/clone c6x: sanitize copy_thread(), get rid of clone(2) wrapper, switch to generic clone() take sys_fork/sys_vfork/sys_clone prototypes to linux/syscalls.h mn10300: switch to generic fork/vfork/clone h8300: switch to generic fork/vfork/clone tile: switch to generic clone() ... Conflicts: arch/microblaze/include/asm/Kbuild
Diffstat (limited to 'arch/cris')
-rw-r--r--arch/cris/Kconfig3
-rw-r--r--arch/cris/arch-v10/kernel/entry.S17
-rw-r--r--arch/cris/arch-v10/kernel/process.c121
-rw-r--r--arch/cris/arch-v32/kernel/entry.S22
-rw-r--r--arch/cris/arch-v32/kernel/process.c118
-rw-r--r--arch/cris/include/asm/processor.h2
-rw-r--r--arch/cris/include/asm/signal.h6
-rw-r--r--arch/cris/include/asm/unistd.h4
-rw-r--r--arch/cris/kernel/crisksyms.c1
9 files changed, 67 insertions, 227 deletions
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index a67244473a3..0cac6a49f23 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -49,6 +49,9 @@ config CRIS
49 select GENERIC_SMP_IDLE_THREAD if ETRAX_ARCH_V32 49 select GENERIC_SMP_IDLE_THREAD if ETRAX_ARCH_V32
50 select GENERIC_CMOS_UPDATE 50 select GENERIC_CMOS_UPDATE
51 select MODULES_USE_ELF_RELA 51 select MODULES_USE_ELF_RELA
52 select GENERIC_KERNEL_THREAD
53 select GENERIC_KERNEL_EXECVE
54 select CLONE_BACKWARDS2
52 55
53config HZ 56config HZ
54 int 57 int
diff --git a/arch/cris/arch-v10/kernel/entry.S b/arch/cris/arch-v10/kernel/entry.S
index 592fbe9dfb6..897bba67bf7 100644
--- a/arch/cris/arch-v10/kernel/entry.S
+++ b/arch/cris/arch-v10/kernel/entry.S
@@ -35,6 +35,7 @@
35 .globl system_call 35 .globl system_call
36 .globl ret_from_intr 36 .globl ret_from_intr
37 .globl ret_from_fork 37 .globl ret_from_fork
38 .globl ret_from_kernel_thread
38 .globl resume 39 .globl resume
39 .globl multiple_interrupt 40 .globl multiple_interrupt
40 .globl hwbreakpoint 41 .globl hwbreakpoint
@@ -81,7 +82,14 @@ ret_from_fork:
81 jsr schedule_tail 82 jsr schedule_tail
82 ba ret_from_sys_call 83 ba ret_from_sys_call
83 nop 84 nop
84 85
86ret_from_kernel_thread:
87 jsr schedule_tail
88 move.d $r2, $r10 ; argument is here
89 jsr $r1 ; call the payload
90 moveq 0, $r9 ; no syscall restarts, TYVM...
91 ba ret_from_sys_call
92
85ret_from_intr: 93ret_from_intr:
86 ;; check for resched if preemptive kernel or if we're going back to user-mode 94 ;; check for resched if preemptive kernel or if we're going back to user-mode
87 ;; this test matches the user_regs(regs) macro 95 ;; this test matches the user_regs(regs) macro
@@ -586,13 +594,6 @@ _ugdb_handle_breakpoint:
586 ba do_sigtrap ; SIGTRAP the offending process. 594 ba do_sigtrap ; SIGTRAP the offending process.
587 pop $dccr ; Restore dccr in delay slot. 595 pop $dccr ; Restore dccr in delay slot.
588 596
589 .global kernel_execve
590kernel_execve:
591 move.d __NR_execve, $r9
592 break 13
593 ret
594 nop
595
596 .data 597 .data
597 598
598hw_bp_trigs: 599hw_bp_trigs:
diff --git a/arch/cris/arch-v10/kernel/process.c b/arch/cris/arch-v10/kernel/process.c
index 15ac7150371..b1018750cff 100644
--- a/arch/cris/arch-v10/kernel/process.c
+++ b/arch/cris/arch-v10/kernel/process.c
@@ -17,6 +17,7 @@
17#include <arch/svinto.h> 17#include <arch/svinto.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <arch/system.h> 19#include <arch/system.h>
20#include <linux/ptrace.h>
20 21
21#ifdef CONFIG_ETRAX_GPIO 22#ifdef CONFIG_ETRAX_GPIO
22void etrax_gpio_wake_up_check(void); /* drivers/gpio.c */ 23void etrax_gpio_wake_up_check(void); /* drivers/gpio.c */
@@ -81,31 +82,6 @@ unsigned long thread_saved_pc(struct task_struct *t)
81 return task_pt_regs(t)->irp; 82 return task_pt_regs(t)->irp;
82} 83}
83 84
84static void kernel_thread_helper(void* dummy, int (*fn)(void *), void * arg)
85{
86 fn(arg);
87 do_exit(-1); /* Should never be called, return bad exit value */
88}
89
90/*
91 * Create a kernel thread
92 */
93int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
94{
95 struct pt_regs regs;
96
97 memset(&regs, 0, sizeof(regs));
98
99 /* Don't use r10 since that is set to 0 in copy_thread */
100 regs.r11 = (unsigned long)fn;
101 regs.r12 = (unsigned long)arg;
102 regs.irp = (unsigned long)kernel_thread_helper;
103 regs.dccr = 1 << I_DCCR_BITNR;
104
105 /* Ok, create the new process.. */
106 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
107}
108
109/* setup the child's kernel stack with a pt_regs and switch_stack on it. 85/* setup the child's kernel stack with a pt_regs and switch_stack on it.
110 * it will be un-nested during _resume and _ret_from_sys_call when the 86 * it will be un-nested during _resume and _ret_from_sys_call when the
111 * new thread is scheduled. 87 * new thread is scheduled.
@@ -115,29 +91,34 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
115 * 91 *
116 */ 92 */
117asmlinkage void ret_from_fork(void); 93asmlinkage void ret_from_fork(void);
94asmlinkage void ret_from_kernel_thread(void);
118 95
119int copy_thread(unsigned long clone_flags, unsigned long usp, 96int copy_thread(unsigned long clone_flags, unsigned long usp,
120 unsigned long unused, 97 unsigned long arg, struct task_struct *p)
121 struct task_struct *p, struct pt_regs *regs)
122{ 98{
123 struct pt_regs * childregs; 99 struct pt_regs *childregs = task_pt_regs(p);
124 struct switch_stack *swstack; 100 struct switch_stack *swstack = ((struct switch_stack *)childregs) - 1;
125 101
126 /* put the pt_regs structure at the end of the new kernel stack page and fix it up 102 /* put the pt_regs structure at the end of the new kernel stack page and fix it up
127 * remember that the task_struct doubles as the kernel stack for the task 103 * remember that the task_struct doubles as the kernel stack for the task
128 */ 104 */
129 105
130 childregs = task_pt_regs(p); 106 if (unlikely(p->flags & PF_KTHREAD)) {
131 107 memset(swstack, 0,
132 *childregs = *regs; /* struct copy of pt_regs */ 108 sizeof(struct switch_stack) + sizeof(struct pt_regs));
133 109 swstack->r1 = usp;
134 p->set_child_tid = p->clear_child_tid = NULL; 110 swstack->r2 = arg;
111 childregs->dccr = 1 << I_DCCR_BITNR;
112 swstack->return_ip = (unsigned long) ret_from_kernel_thread;
113 p->thread.ksp = (unsigned long) swstack;
114 p->thread.usp = 0;
115 return 0;
116 }
117 *childregs = *current_pt_regs(); /* struct copy of pt_regs */
135 118
136 childregs->r10 = 0; /* child returns 0 after a fork/clone */ 119 childregs->r10 = 0; /* child returns 0 after a fork/clone */
137
138 /* put the switch stack right below the pt_regs */
139 120
140 swstack = ((struct switch_stack *)childregs) - 1; 121 /* put the switch stack right below the pt_regs */
141 122
142 swstack->r9 = 0; /* parameter to ret_from_sys_call, 0 == dont restart the syscall */ 123 swstack->r9 = 0; /* parameter to ret_from_sys_call, 0 == dont restart the syscall */
143 124
@@ -147,7 +128,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
147 128
148 /* fix the user-mode stackpointer */ 129 /* fix the user-mode stackpointer */
149 130
150 p->thread.usp = usp; 131 p->thread.usp = usp ?: rdusp();
151 132
152 /* and the kernel-mode one */ 133 /* and the kernel-mode one */
153 134
@@ -161,70 +142,6 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
161 return 0; 142 return 0;
162} 143}
163 144
164/*
165 * Be aware of the "magic" 7th argument in the four system-calls below.
166 * They need the latest stackframe, which is put as the 7th argument by
167 * entry.S. The previous arguments are dummies or actually used, but need
168 * to be defined to reach the 7th argument.
169 *
170 * N.B.: Another method to get the stackframe is to use current_regs(). But
171 * it returns the latest stack-frame stacked when going from _user mode_ and
172 * some of these (at least sys_clone) are called from kernel-mode sometimes
173 * (for example during kernel_thread, above) and thus cannot use it. Thus,
174 * to be sure not to get any surprises, we use the method for the other calls
175 * as well.
176 */
177
178asmlinkage int sys_fork(long r10, long r11, long r12, long r13, long mof, long srp,
179 struct pt_regs *regs)
180{
181 return do_fork(SIGCHLD, rdusp(), regs, 0, NULL, NULL);
182}
183
184/* if newusp is 0, we just grab the old usp */
185/* FIXME: Is parent_tid/child_tid really third/fourth argument? Update lib? */
186asmlinkage int sys_clone(unsigned long newusp, unsigned long flags,
187 int* parent_tid, int* child_tid, long mof, long srp,
188 struct pt_regs *regs)
189{
190 if (!newusp)
191 newusp = rdusp();
192 return do_fork(flags, newusp, regs, 0, parent_tid, child_tid);
193}
194
195/* vfork is a system call in i386 because of register-pressure - maybe
196 * we can remove it and handle it in libc but we put it here until then.
197 */
198
199asmlinkage int sys_vfork(long r10, long r11, long r12, long r13, long mof, long srp,
200 struct pt_regs *regs)
201{
202 return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0, NULL, NULL);
203}
204
205/*
206 * sys_execve() executes a new program.
207 */
208asmlinkage int sys_execve(const char *fname,
209 const char *const *argv,
210 const char *const *envp,
211 long r13, long mof, long srp,
212 struct pt_regs *regs)
213{
214 int error;
215 struct filename *filename;
216
217 filename = getname(fname);
218 error = PTR_ERR(filename);
219
220 if (IS_ERR(filename))
221 goto out;
222 error = do_execve(filename->name, argv, envp, regs);
223 putname(filename);
224 out:
225 return error;
226}
227
228unsigned long get_wchan(struct task_struct *p) 145unsigned long get_wchan(struct task_struct *p)
229{ 146{
230#if 0 147#if 0
diff --git a/arch/cris/arch-v32/kernel/entry.S b/arch/cris/arch-v32/kernel/entry.S
index c3ea4694fba..faa644111fe 100644
--- a/arch/cris/arch-v32/kernel/entry.S
+++ b/arch/cris/arch-v32/kernel/entry.S
@@ -31,6 +31,7 @@
31 .globl system_call 31 .globl system_call
32 .globl ret_from_intr 32 .globl ret_from_intr
33 .globl ret_from_fork 33 .globl ret_from_fork
34 .globl ret_from_kernel_thread
34 .globl resume 35 .globl resume
35 .globl multiple_interrupt 36 .globl multiple_interrupt
36 .globl nmi_interrupt 37 .globl nmi_interrupt
@@ -84,6 +85,18 @@ ret_from_fork:
84 nop 85 nop
85 .size ret_from_fork, . - ret_from_fork 86 .size ret_from_fork, . - ret_from_fork
86 87
88 .type ret_from_kernel_thread,@function
89ret_from_kernel_thread:
90 jsr schedule_tail
91 nop
92 move.d $r2, $r10
93 jsr $r1
94 nop
95 moveq 0, $r9 ; no syscall restarts, TYVM...
96 ba ret_from_sys_call
97 nop
98 .size ret_from_kernel_thread, . - ret_from_kernel_thread
99
87 .type ret_from_intr,@function 100 .type ret_from_intr,@function
88ret_from_intr: 101ret_from_intr:
89 ;; Check for resched if preemptive kernel, or if we're going back to 102 ;; Check for resched if preemptive kernel, or if we're going back to
@@ -531,15 +544,6 @@ _ugdb_handle_exception:
531 ba do_sigtrap ; SIGTRAP the offending process. 544 ba do_sigtrap ; SIGTRAP the offending process.
532 move.d [$sp+], $r0 ; Restore R0 in delay slot. 545 move.d [$sp+], $r0 ; Restore R0 in delay slot.
533 546
534 .global kernel_execve
535 .type kernel_execve,@function
536kernel_execve:
537 move.d __NR_execve, $r9
538 break 13
539 ret
540 nop
541 .size kernel_execve, . - kernel_execve
542
543 .data 547 .data
544 548
545 .section .rodata,"a" 549 .section .rodata,"a"
diff --git a/arch/cris/arch-v32/kernel/process.c b/arch/cris/arch-v32/kernel/process.c
index 4e999224635..2b23ef0e445 100644
--- a/arch/cris/arch-v32/kernel/process.c
+++ b/arch/cris/arch-v32/kernel/process.c
@@ -16,6 +16,7 @@
16#include <hwregs/reg_map.h> 16#include <hwregs/reg_map.h>
17#include <hwregs/timer_defs.h> 17#include <hwregs/timer_defs.h>
18#include <hwregs/intr_vect_defs.h> 18#include <hwregs/intr_vect_defs.h>
19#include <linux/ptrace.h>
19 20
20extern void stop_watchdog(void); 21extern void stop_watchdog(void);
21 22
@@ -94,31 +95,6 @@ unsigned long thread_saved_pc(struct task_struct *t)
94 return task_pt_regs(t)->erp; 95 return task_pt_regs(t)->erp;
95} 96}
96 97
97static void
98kernel_thread_helper(void* dummy, int (*fn)(void *), void * arg)
99{
100 fn(arg);
101 do_exit(-1); /* Should never be called, return bad exit value. */
102}
103
104/* Create a kernel thread. */
105int
106kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
107{
108 struct pt_regs regs;
109
110 memset(&regs, 0, sizeof(regs));
111
112 /* Don't use r10 since that is set to 0 in copy_thread. */
113 regs.r11 = (unsigned long) fn;
114 regs.r12 = (unsigned long) arg;
115 regs.erp = (unsigned long) kernel_thread_helper;
116 regs.ccs = 1 << (I_CCS_BITNR + CCS_SHIFT);
117
118 /* Create the new process. */
119 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
120}
121
122/* 98/*
123 * Setup the child's kernel stack with a pt_regs and call switch_stack() on it. 99 * Setup the child's kernel stack with a pt_regs and call switch_stack() on it.
124 * It will be unnested during _resume and _ret_from_sys_call when the new thread 100 * It will be unnested during _resume and _ret_from_sys_call when the new thread
@@ -129,34 +105,42 @@ kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
129 */ 105 */
130 106
131extern asmlinkage void ret_from_fork(void); 107extern asmlinkage void ret_from_fork(void);
108extern asmlinkage void ret_from_kernel_thread(void);
132 109
133int 110int
134copy_thread(unsigned long clone_flags, unsigned long usp, 111copy_thread(unsigned long clone_flags, unsigned long usp,
135 unsigned long unused, 112 unsigned long arg, struct task_struct *p)
136 struct task_struct *p, struct pt_regs *regs)
137{ 113{
138 struct pt_regs *childregs; 114 struct pt_regs *childregs = task_pt_regs(p);
139 struct switch_stack *swstack; 115 struct switch_stack *swstack = ((struct switch_stack *) childregs) - 1;
140 116
141 /* 117 /*
142 * Put the pt_regs structure at the end of the new kernel stack page and 118 * Put the pt_regs structure at the end of the new kernel stack page and
143 * fix it up. Note: the task_struct doubles as the kernel stack for the 119 * fix it up. Note: the task_struct doubles as the kernel stack for the
144 * task. 120 * task.
145 */ 121 */
146 childregs = task_pt_regs(p); 122 if (unlikely(p->flags & PF_KTHREAD)) {
147 *childregs = *regs; /* Struct copy of pt_regs. */ 123 memset(swstack, 0,
148 p->set_child_tid = p->clear_child_tid = NULL; 124 sizeof(struct switch_stack) + sizeof(struct pt_regs));
125 swstack->r1 = usp;
126 swstack->r2 = arg;
127 childregs->ccs = 1 << (I_CCS_BITNR + CCS_SHIFT);
128 swstack->return_ip = (unsigned long) ret_from_kernel_thread;
129 p->thread.ksp = (unsigned long) swstack;
130 p->thread.usp = 0;
131 return 0;
132 }
133 *childregs = *current_pt_regs(); /* Struct copy of pt_regs. */
149 childregs->r10 = 0; /* Child returns 0 after a fork/clone. */ 134 childregs->r10 = 0; /* Child returns 0 after a fork/clone. */
150 135
151 /* Set a new TLS ? 136 /* Set a new TLS ?
152 * The TLS is in $mof because it is the 5th argument to sys_clone. 137 * The TLS is in $mof because it is the 5th argument to sys_clone.
153 */ 138 */
154 if (p->mm && (clone_flags & CLONE_SETTLS)) { 139 if (p->mm && (clone_flags & CLONE_SETTLS)) {
155 task_thread_info(p)->tls = regs->mof; 140 task_thread_info(p)->tls = childregs->mof;
156 } 141 }
157 142
158 /* Put the switch stack right below the pt_regs. */ 143 /* Put the switch stack right below the pt_regs. */
159 swstack = ((struct switch_stack *) childregs) - 1;
160 144
161 /* Parameter to ret_from_sys_call. 0 is don't restart the syscall. */ 145 /* Parameter to ret_from_sys_call. 0 is don't restart the syscall. */
162 swstack->r9 = 0; 146 swstack->r9 = 0;
@@ -168,76 +152,12 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
168 swstack->return_ip = (unsigned long) ret_from_fork; 152 swstack->return_ip = (unsigned long) ret_from_fork;
169 153
170 /* Fix the user-mode and kernel-mode stackpointer. */ 154 /* Fix the user-mode and kernel-mode stackpointer. */
171 p->thread.usp = usp; 155 p->thread.usp = usp ?: rdusp();
172 p->thread.ksp = (unsigned long) swstack; 156 p->thread.ksp = (unsigned long) swstack;
173 157
174 return 0; 158 return 0;
175} 159}
176 160
177/*
178 * Be aware of the "magic" 7th argument in the four system-calls below.
179 * They need the latest stackframe, which is put as the 7th argument by
180 * entry.S. The previous arguments are dummies or actually used, but need
181 * to be defined to reach the 7th argument.
182 *
183 * N.B.: Another method to get the stackframe is to use current_regs(). But
184 * it returns the latest stack-frame stacked when going from _user mode_ and
185 * some of these (at least sys_clone) are called from kernel-mode sometimes
186 * (for example during kernel_thread, above) and thus cannot use it. Thus,
187 * to be sure not to get any surprises, we use the method for the other calls
188 * as well.
189 */
190asmlinkage int
191sys_fork(long r10, long r11, long r12, long r13, long mof, long srp,
192 struct pt_regs *regs)
193{
194 return do_fork(SIGCHLD, rdusp(), regs, 0, NULL, NULL);
195}
196
197/* FIXME: Is parent_tid/child_tid really third/fourth argument? Update lib? */
198asmlinkage int
199sys_clone(unsigned long newusp, unsigned long flags, int *parent_tid, int *child_tid,
200 unsigned long tls, long srp, struct pt_regs *regs)
201{
202 if (!newusp)
203 newusp = rdusp();
204
205 return do_fork(flags, newusp, regs, 0, parent_tid, child_tid);
206}
207
208/*
209 * vfork is a system call in i386 because of register-pressure - maybe
210 * we can remove it and handle it in libc but we put it here until then.
211 */
212asmlinkage int
213sys_vfork(long r10, long r11, long r12, long r13, long mof, long srp,
214 struct pt_regs *regs)
215{
216 return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0, NULL, NULL);
217}
218
219/* sys_execve() executes a new program. */
220asmlinkage int
221sys_execve(const char *fname,
222 const char *const *argv,
223 const char *const *envp, long r13, long mof, long srp,
224 struct pt_regs *regs)
225{
226 int error;
227 struct filename *filename;
228
229 filename = getname(fname);
230 error = PTR_ERR(filename);
231
232 if (IS_ERR(filename))
233 goto out;
234
235 error = do_execve(filename->name, argv, envp, regs);
236 putname(filename);
237 out:
238 return error;
239}
240
241unsigned long 161unsigned long
242get_wchan(struct task_struct *p) 162get_wchan(struct task_struct *p)
243{ 163{
diff --git a/arch/cris/include/asm/processor.h b/arch/cris/include/asm/processor.h
index ef4e1bc3efc..675823f70c0 100644
--- a/arch/cris/include/asm/processor.h
+++ b/arch/cris/include/asm/processor.h
@@ -49,8 +49,6 @@ struct task_struct;
49#define task_pt_regs(task) user_regs(task_thread_info(task)) 49#define task_pt_regs(task) user_regs(task_thread_info(task))
50#define current_regs() task_pt_regs(current) 50#define current_regs() task_pt_regs(current)
51 51
52extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
53
54unsigned long get_wchan(struct task_struct *p); 52unsigned long get_wchan(struct task_struct *p);
55 53
56#define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp) 54#define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp)
diff --git a/arch/cris/include/asm/signal.h b/arch/cris/include/asm/signal.h
index ea6af9aad76..72dbbf59dfa 100644
--- a/arch/cris/include/asm/signal.h
+++ b/arch/cris/include/asm/signal.h
@@ -152,12 +152,6 @@ typedef struct sigaltstack {
152 152
153#ifdef __KERNEL__ 153#ifdef __KERNEL__
154#include <asm/sigcontext.h> 154#include <asm/sigcontext.h>
155
156/* here we could define asm-optimized sigaddset, sigdelset etc. operations.
157 * if we don't, generic ones are used from linux/signal.h
158 */
159#define ptrace_signal_deliver(regs, cookie) do { } while (0)
160
161#endif /* __KERNEL__ */ 155#endif /* __KERNEL__ */
162 156
163#endif 157#endif
diff --git a/arch/cris/include/asm/unistd.h b/arch/cris/include/asm/unistd.h
index 51873a446f8..f27b542e0eb 100644
--- a/arch/cris/include/asm/unistd.h
+++ b/arch/cris/include/asm/unistd.h
@@ -371,6 +371,10 @@
371#define __ARCH_WANT_SYS_SIGPROCMASK 371#define __ARCH_WANT_SYS_SIGPROCMASK
372#define __ARCH_WANT_SYS_RT_SIGACTION 372#define __ARCH_WANT_SYS_RT_SIGACTION
373#define __ARCH_WANT_SYS_RT_SIGSUSPEND 373#define __ARCH_WANT_SYS_RT_SIGSUSPEND
374#define __ARCH_WANT_SYS_EXECVE
375#define __ARCH_WANT_SYS_FORK
376#define __ARCH_WANT_SYS_VFORK
377#define __ARCH_WANT_SYS_CLONE
374 378
375/* 379/*
376 * "Conditional" syscalls 380 * "Conditional" syscalls
diff --git a/arch/cris/kernel/crisksyms.c b/arch/cris/kernel/crisksyms.c
index 7ac000f6a88..5868cee20eb 100644
--- a/arch/cris/kernel/crisksyms.c
+++ b/arch/cris/kernel/crisksyms.c
@@ -30,7 +30,6 @@ extern void __negdi2(void);
30extern void iounmap(volatile void * __iomem); 30extern void iounmap(volatile void * __iomem);
31 31
32/* Platform dependent support */ 32/* Platform dependent support */
33EXPORT_SYMBOL(kernel_thread);
34EXPORT_SYMBOL(get_cmos_time); 33EXPORT_SYMBOL(get_cmos_time);
35EXPORT_SYMBOL(loops_per_usec); 34EXPORT_SYMBOL(loops_per_usec);
36 35