aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorakpm@osdl.org <akpm@osdl.org>2006-01-09 23:51:37 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 11:01:25 -0500
commitdf2e71fb9115a8d4f721fb1464db09adc8332bc5 (patch)
tree460230de8257235dc57f9835582afb0875cbc057 /arch
parentbe4f1bb2627c2d963d09be1cd69f8820995a9112 (diff)
[PATCH] dump_thread() cleanup
) From: Adrian Bunk <bunk@stusta.de> - create one common dump_thread() prototype in kernel.h - dump_thread() is only used in fs/binfmt_aout.c and can therefore be removed on all architectures where CONFIG_BINFMT_AOUT is not available Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/alpha_ksyms.c1
-rw-r--r--arch/alpha/mm/init.c1
-rw-r--r--arch/arm26/kernel/armksyms.c1
-rw-r--r--arch/cris/kernel/crisksyms.c2
-rw-r--r--arch/cris/kernel/process.c28
-rw-r--r--arch/frv/kernel/frv_ksyms.c2
-rw-r--r--arch/frv/kernel/process.c22
-rw-r--r--arch/h8300/kernel/h8300_ksyms.c3
-rw-r--r--arch/h8300/kernel/process.c28
-rw-r--r--arch/m32r/kernel/m32r_ksyms.c3
-rw-r--r--arch/m32r/kernel/process.c8
-rw-r--r--arch/m68k/kernel/m68k_ksyms.c2
-rw-r--r--arch/m68knommu/kernel/m68k_ksyms.c2
-rw-r--r--arch/m68knommu/kernel/process.c46
-rw-r--r--arch/s390/kernel/process.c21
-rw-r--r--arch/sh/kernel/process.c20
-rw-r--r--arch/sh/kernel/sh_ksyms.c2
-rw-r--r--arch/sh64/kernel/process.c20
-rw-r--r--arch/sh64/kernel/sh_ksyms.c2
-rw-r--r--arch/sparc/kernel/sparc_ksyms.c2
-rw-r--r--arch/sparc64/kernel/binfmt_aout32.c2
-rw-r--r--arch/sparc64/kernel/sparc64_ksyms.c2
-rw-r--r--arch/v850/kernel/process.c24
-rw-r--r--arch/v850/kernel/v850_ksyms.c2
24 files changed, 1 insertions, 245 deletions
diff --git a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c
index f3e98f837784..1898ea79d0e2 100644
--- a/arch/alpha/kernel/alpha_ksyms.c
+++ b/arch/alpha/kernel/alpha_ksyms.c
@@ -40,7 +40,6 @@
40#include <asm/unistd.h> 40#include <asm/unistd.h>
41 41
42extern struct hwrpb_struct *hwrpb; 42extern struct hwrpb_struct *hwrpb;
43extern void dump_thread(struct pt_regs *, struct user *);
44extern spinlock_t rtc_lock; 43extern spinlock_t rtc_lock;
45 44
46/* these are C runtime functions with special calling conventions: */ 45/* these are C runtime functions with special calling conventions: */
diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c
index 90752f6d8867..486d7945583d 100644
--- a/arch/alpha/mm/init.c
+++ b/arch/alpha/mm/init.c
@@ -7,6 +7,7 @@
7/* 2.3.x zone allocator, 1999 Andrea Arcangeli <andrea@suse.de> */ 7/* 2.3.x zone allocator, 1999 Andrea Arcangeli <andrea@suse.de> */
8 8
9#include <linux/config.h> 9#include <linux/config.h>
10#include <linux/pagemap.h>
10#include <linux/signal.h> 11#include <linux/signal.h>
11#include <linux/sched.h> 12#include <linux/sched.h>
12#include <linux/kernel.h> 13#include <linux/kernel.h>
diff --git a/arch/arm26/kernel/armksyms.c b/arch/arm26/kernel/armksyms.c
index 35514b398e2e..811a6376c624 100644
--- a/arch/arm26/kernel/armksyms.c
+++ b/arch/arm26/kernel/armksyms.c
@@ -35,7 +35,6 @@
35#include <asm/checksum.h> 35#include <asm/checksum.h>
36#include <asm/mach-types.h> 36#include <asm/mach-types.h>
37 37
38extern void dump_thread(struct pt_regs *, struct user *);
39extern int dump_fpu(struct pt_regs *, struct user_fp_struct *); 38extern int dump_fpu(struct pt_regs *, struct user_fp_struct *);
40extern void inswb(unsigned int port, void *to, int len); 39extern void inswb(unsigned int port, void *to, int len);
41extern void outswb(unsigned int port, const void *to, int len); 40extern void outswb(unsigned int port, const void *to, int len);
diff --git a/arch/cris/kernel/crisksyms.c b/arch/cris/kernel/crisksyms.c
index 85833d704ebb..de39725da920 100644
--- a/arch/cris/kernel/crisksyms.c
+++ b/arch/cris/kernel/crisksyms.c
@@ -21,7 +21,6 @@
21#include <asm/pgtable.h> 21#include <asm/pgtable.h>
22#include <asm/fasttimer.h> 22#include <asm/fasttimer.h>
23 23
24extern void dump_thread(struct pt_regs *, struct user *);
25extern unsigned long get_cmos_time(void); 24extern unsigned long get_cmos_time(void);
26extern void __Udiv(void); 25extern void __Udiv(void);
27extern void __Umod(void); 26extern void __Umod(void);
@@ -33,7 +32,6 @@ extern void __lshrdi3(void);
33extern void iounmap(volatile void * __iomem); 32extern void iounmap(volatile void * __iomem);
34 33
35/* Platform dependent support */ 34/* Platform dependent support */
36EXPORT_SYMBOL(dump_thread);
37EXPORT_SYMBOL(kernel_thread); 35EXPORT_SYMBOL(kernel_thread);
38EXPORT_SYMBOL(get_cmos_time); 36EXPORT_SYMBOL(get_cmos_time);
39EXPORT_SYMBOL(loops_per_usec); 37EXPORT_SYMBOL(loops_per_usec);
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c
index 7c80afb10460..4ab3e87115b6 100644
--- a/arch/cris/kernel/process.c
+++ b/arch/cris/kernel/process.c
@@ -257,34 +257,6 @@ void flush_thread(void)
257{ 257{
258} 258}
259 259
260/*
261 * fill in the user structure for a core dump..
262 */
263void dump_thread(struct pt_regs * regs, struct user * dump)
264{
265#if 0
266 int i;
267
268 /* changed the size calculations - should hopefully work better. lbt */
269 dump->magic = CMAGIC;
270 dump->start_code = 0;
271 dump->start_stack = regs->esp & ~(PAGE_SIZE - 1);
272 dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
273 dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) >> PAGE_SHIFT;
274 dump->u_dsize -= dump->u_tsize;
275 dump->u_ssize = 0;
276 for (i = 0; i < 8; i++)
277 dump->u_debugreg[i] = current->debugreg[i];
278
279 if (dump->start_stack < TASK_SIZE)
280 dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
281
282 dump->regs = *regs;
283
284 dump->u_fpvalid = dump_fpu (regs, &dump->i387);
285#endif
286}
287
288/* Fill in the fpu structure for a core dump. */ 260/* Fill in the fpu structure for a core dump. */
289int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu) 261int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
290{ 262{
diff --git a/arch/frv/kernel/frv_ksyms.c b/arch/frv/kernel/frv_ksyms.c
index 5f118c89d091..0f1c6cbc4f50 100644
--- a/arch/frv/kernel/frv_ksyms.c
+++ b/arch/frv/kernel/frv_ksyms.c
@@ -18,7 +18,6 @@
18#include <asm/hardirq.h> 18#include <asm/hardirq.h>
19#include <asm/cacheflush.h> 19#include <asm/cacheflush.h>
20 20
21extern void dump_thread(struct pt_regs *, struct user *);
22extern long __memcpy_user(void *dst, const void *src, size_t count); 21extern long __memcpy_user(void *dst, const void *src, size_t count);
23extern long __memset_user(void *dst, const void *src, size_t count); 22extern long __memset_user(void *dst, const void *src, size_t count);
24 23
@@ -27,7 +26,6 @@ extern long __memset_user(void *dst, const void *src, size_t count);
27EXPORT_SYMBOL(__ioremap); 26EXPORT_SYMBOL(__ioremap);
28EXPORT_SYMBOL(iounmap); 27EXPORT_SYMBOL(iounmap);
29 28
30EXPORT_SYMBOL(dump_thread);
31EXPORT_SYMBOL(strnlen); 29EXPORT_SYMBOL(strnlen);
32EXPORT_SYMBOL(strrchr); 30EXPORT_SYMBOL(strrchr);
33EXPORT_SYMBOL(strstr); 31EXPORT_SYMBOL(strstr);
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c
index 54a452136f00..c4488379ac3b 100644
--- a/arch/frv/kernel/process.c
+++ b/arch/frv/kernel/process.c
@@ -244,28 +244,6 @@ int copy_thread(int nr, unsigned long clone_flags,
244} /* end copy_thread() */ 244} /* end copy_thread() */
245 245
246/* 246/*
247 * fill in the user structure for a core dump..
248 */
249void dump_thread(struct pt_regs *regs, struct user *dump)
250{
251#if 0
252 /* changed the size calculations - should hopefully work better. lbt */
253 dump->magic = CMAGIC;
254 dump->start_code = 0;
255 dump->start_stack = user_stack(regs) & ~(PAGE_SIZE - 1);
256 dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
257 dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) >> PAGE_SHIFT;
258 dump->u_dsize -= dump->u_tsize;
259 dump->u_ssize = 0;
260
261 if (dump->start_stack < TASK_SIZE)
262 dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
263
264 dump->regs = *(struct user_context *) regs;
265#endif
266}
267
268/*
269 * sys_execve() executes a new program. 247 * sys_execve() executes a new program.
270 */ 248 */
271asmlinkage int sys_execve(char *name, char **argv, char **envp) 249asmlinkage int sys_execve(char *name, char **argv, char **envp)
diff --git a/arch/h8300/kernel/h8300_ksyms.c b/arch/h8300/kernel/h8300_ksyms.c
index 5a630233112f..3e0d80ea4464 100644
--- a/arch/h8300/kernel/h8300_ksyms.c
+++ b/arch/h8300/kernel/h8300_ksyms.c
@@ -22,11 +22,8 @@
22//asmlinkage long long __lshrdi3 (long long, int); 22//asmlinkage long long __lshrdi3 (long long, int);
23extern char h8300_debug_device[]; 23extern char h8300_debug_device[];
24 24
25extern void dump_thread(struct pt_regs *, struct user *);
26
27/* platform dependent support */ 25/* platform dependent support */
28 26
29EXPORT_SYMBOL(dump_thread);
30EXPORT_SYMBOL(strnlen); 27EXPORT_SYMBOL(strnlen);
31EXPORT_SYMBOL(strrchr); 28EXPORT_SYMBOL(strrchr);
32EXPORT_SYMBOL(strstr); 29EXPORT_SYMBOL(strstr);
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c
index fe21adf3e75e..585ed5efd0f7 100644
--- a/arch/h8300/kernel/process.c
+++ b/arch/h8300/kernel/process.c
@@ -208,34 +208,6 @@ int copy_thread(int nr, unsigned long clone_flags,
208} 208}
209 209
210/* 210/*
211 * fill in the user structure for a core dump..
212 */
213void dump_thread(struct pt_regs * regs, struct user * dump)
214{
215/* changed the size calculations - should hopefully work better. lbt */
216 dump->magic = CMAGIC;
217 dump->start_code = 0;
218 dump->start_stack = rdusp() & ~(PAGE_SIZE - 1);
219 dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
220 dump->u_dsize = ((unsigned long) (current->mm->brk +
221 (PAGE_SIZE-1))) >> PAGE_SHIFT;
222 dump->u_dsize -= dump->u_tsize;
223 dump->u_ssize = 0;
224
225 dump->u_ar0 = (struct user_regs_struct *)(((int)(&dump->regs)) -((int)(dump)));
226 dump->regs.er0 = regs->er0;
227 dump->regs.er1 = regs->er1;
228 dump->regs.er2 = regs->er2;
229 dump->regs.er3 = regs->er3;
230 dump->regs.er4 = regs->er4;
231 dump->regs.er5 = regs->er5;
232 dump->regs.er6 = regs->er6;
233 dump->regs.orig_er0 = regs->orig_er0;
234 dump->regs.ccr = regs->ccr;
235 dump->regs.pc = regs->pc;
236}
237
238/*
239 * sys_execve() executes a new program. 211 * sys_execve() executes a new program.
240 */ 212 */
241asmlinkage int sys_execve(char *name, char **argv, char **envp,int dummy,...) 213asmlinkage int sys_execve(char *name, char **argv, char **envp,int dummy,...)
diff --git a/arch/m32r/kernel/m32r_ksyms.c b/arch/m32r/kernel/m32r_ksyms.c
index e5ec134d81d9..dbc8a392105f 100644
--- a/arch/m32r/kernel/m32r_ksyms.c
+++ b/arch/m32r/kernel/m32r_ksyms.c
@@ -18,8 +18,6 @@
18#include <asm/irq.h> 18#include <asm/irq.h>
19#include <asm/tlbflush.h> 19#include <asm/tlbflush.h>
20 20
21extern void dump_thread(struct pt_regs *, struct user *);
22
23#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE) 21#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
24extern struct drive_info_struct drive_info; 22extern struct drive_info_struct drive_info;
25EXPORT_SYMBOL(drive_info); 23EXPORT_SYMBOL(drive_info);
@@ -27,7 +25,6 @@ EXPORT_SYMBOL(drive_info);
27 25
28/* platform dependent support */ 26/* platform dependent support */
29EXPORT_SYMBOL(boot_cpu_data); 27EXPORT_SYMBOL(boot_cpu_data);
30EXPORT_SYMBOL(dump_thread);
31EXPORT_SYMBOL(dump_fpu); 28EXPORT_SYMBOL(dump_fpu);
32EXPORT_SYMBOL(__ioremap); 29EXPORT_SYMBOL(__ioremap);
33EXPORT_SYMBOL(iounmap); 30EXPORT_SYMBOL(iounmap);
diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c
index 3bf55d92933f..2a1f250349b7 100644
--- a/arch/m32r/kernel/process.c
+++ b/arch/m32r/kernel/process.c
@@ -261,14 +261,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long spu,
261} 261}
262 262
263/* 263/*
264 * fill in the user structure for a core dump..
265 */
266void dump_thread(struct pt_regs * regs, struct user * dump)
267{
268 /* M32R_FIXME */
269}
270
271/*
272 * Capture the user space registers if the task is not running (in user space) 264 * Capture the user space registers if the task is not running (in user space)
273 */ 265 */
274int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) 266int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
diff --git a/arch/m68k/kernel/m68k_ksyms.c b/arch/m68k/kernel/m68k_ksyms.c
index 73e2f5e168dd..3d7f2000b714 100644
--- a/arch/m68k/kernel/m68k_ksyms.c
+++ b/arch/m68k/kernel/m68k_ksyms.c
@@ -23,8 +23,6 @@ asmlinkage long long __lshrdi3 (long long, int);
23asmlinkage long long __muldi3 (long long, long long); 23asmlinkage long long __muldi3 (long long, long long);
24extern char m68k_debug_device[]; 24extern char m68k_debug_device[];
25 25
26extern void dump_thread(struct pt_regs *, struct user *);
27
28/* platform dependent support */ 26/* platform dependent support */
29 27
30EXPORT_SYMBOL(m68k_machtype); 28EXPORT_SYMBOL(m68k_machtype);
diff --git a/arch/m68knommu/kernel/m68k_ksyms.c b/arch/m68knommu/kernel/m68k_ksyms.c
index b2c62eeb3bab..eddb8d3e130a 100644
--- a/arch/m68knommu/kernel/m68k_ksyms.c
+++ b/arch/m68knommu/kernel/m68k_ksyms.c
@@ -18,7 +18,6 @@
18#include <asm/checksum.h> 18#include <asm/checksum.h>
19#include <asm/current.h> 19#include <asm/current.h>
20 20
21extern void dump_thread(struct pt_regs *, struct user *);
22extern int dump_fpu(struct pt_regs *, elf_fpregset_t *); 21extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
23 22
24/* platform dependent support */ 23/* platform dependent support */
@@ -26,7 +25,6 @@ extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
26EXPORT_SYMBOL(__ioremap); 25EXPORT_SYMBOL(__ioremap);
27EXPORT_SYMBOL(iounmap); 26EXPORT_SYMBOL(iounmap);
28EXPORT_SYMBOL(dump_fpu); 27EXPORT_SYMBOL(dump_fpu);
29EXPORT_SYMBOL(dump_thread);
30EXPORT_SYMBOL(strnlen); 28EXPORT_SYMBOL(strnlen);
31EXPORT_SYMBOL(strrchr); 29EXPORT_SYMBOL(strrchr);
32EXPORT_SYMBOL(strstr); 30EXPORT_SYMBOL(strstr);
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c
index 82e7ec888806..8b3cf57ba706 100644
--- a/arch/m68knommu/kernel/process.c
+++ b/arch/m68knommu/kernel/process.c
@@ -276,52 +276,6 @@ int dump_fpu(struct pt_regs *regs, struct user_m68kfp_struct *fpu)
276} 276}
277 277
278/* 278/*
279 * fill in the user structure for a core dump..
280 */
281void dump_thread(struct pt_regs * regs, struct user * dump)
282{
283 struct switch_stack *sw;
284
285 /* changed the size calculations - should hopefully work better. lbt */
286 dump->magic = CMAGIC;
287 dump->start_code = 0;
288 dump->start_stack = rdusp() & ~(PAGE_SIZE - 1);
289 dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
290 dump->u_dsize = ((unsigned long) (current->mm->brk +
291 (PAGE_SIZE-1))) >> PAGE_SHIFT;
292 dump->u_dsize -= dump->u_tsize;
293 dump->u_ssize = 0;
294
295 if (dump->start_stack < TASK_SIZE)
296 dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
297
298 dump->u_ar0 = (struct user_regs_struct *)((int)&dump->regs - (int)dump);
299 sw = ((struct switch_stack *)regs) - 1;
300 dump->regs.d1 = regs->d1;
301 dump->regs.d2 = regs->d2;
302 dump->regs.d3 = regs->d3;
303 dump->regs.d4 = regs->d4;
304 dump->regs.d5 = regs->d5;
305 dump->regs.d6 = sw->d6;
306 dump->regs.d7 = sw->d7;
307 dump->regs.a0 = regs->a0;
308 dump->regs.a1 = regs->a1;
309 dump->regs.a2 = regs->a2;
310 dump->regs.a3 = sw->a3;
311 dump->regs.a4 = sw->a4;
312 dump->regs.a5 = sw->a5;
313 dump->regs.a6 = sw->a6;
314 dump->regs.d0 = regs->d0;
315 dump->regs.orig_d0 = regs->orig_d0;
316 dump->regs.stkadj = regs->stkadj;
317 dump->regs.sr = regs->sr;
318 dump->regs.pc = regs->pc;
319 dump->regs.fmtvec = (regs->format << 12) | regs->vector;
320 /* dump floating point stuff */
321 dump->u_fpvalid = dump_fpu (regs, &dump->m68kfp);
322}
323
324/*
325 * Generic dumping code. Used for panic and debug. 279 * Generic dumping code. Used for panic and debug.
326 */ 280 */
327void dump(struct pt_regs *fp) 281void dump(struct pt_regs *fp)
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index a942bf2d58e9..7dd58f8ac6b5 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -352,27 +352,6 @@ int dump_fpu (struct pt_regs * regs, s390_fp_regs *fpregs)
352 return 1; 352 return 1;
353} 353}
354 354
355/*
356 * fill in the user structure for a core dump..
357 */
358void dump_thread(struct pt_regs * regs, struct user * dump)
359{
360
361/* changed the size calculations - should hopefully work better. lbt */
362 dump->magic = CMAGIC;
363 dump->start_code = 0;
364 dump->start_stack = regs->gprs[15] & ~(PAGE_SIZE - 1);
365 dump->u_tsize = current->mm->end_code >> PAGE_SHIFT;
366 dump->u_dsize = (current->mm->brk + PAGE_SIZE - 1) >> PAGE_SHIFT;
367 dump->u_dsize -= dump->u_tsize;
368 dump->u_ssize = 0;
369 if (dump->start_stack < TASK_SIZE)
370 dump->u_ssize = (TASK_SIZE - dump->start_stack) >> PAGE_SHIFT;
371 memcpy(&dump->regs, regs, sizeof(s390_regs));
372 dump_fpu (regs, &dump->regs.fp_regs);
373 dump->regs.per_info = current->thread.per_info;
374}
375
376unsigned long get_wchan(struct task_struct *p) 355unsigned long get_wchan(struct task_struct *p)
377{ 356{
378 struct stack_frame *sf, *low, *high; 357 struct stack_frame *sf, *low, *high;
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
index fd4f240b833d..8a2bea34ddd2 100644
--- a/arch/sh/kernel/process.c
+++ b/arch/sh/kernel/process.c
@@ -305,26 +305,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
305 return 0; 305 return 0;
306} 306}
307 307
308/*
309 * fill in the user structure for a core dump..
310 */
311void dump_thread(struct pt_regs * regs, struct user * dump)
312{
313 dump->magic = CMAGIC;
314 dump->start_code = current->mm->start_code;
315 dump->start_data = current->mm->start_data;
316 dump->start_stack = regs->regs[15] & ~(PAGE_SIZE - 1);
317 dump->u_tsize = (current->mm->end_code - dump->start_code) >> PAGE_SHIFT;
318 dump->u_dsize = (current->mm->brk + (PAGE_SIZE-1) - dump->start_data) >> PAGE_SHIFT;
319 dump->u_ssize = (current->mm->start_stack - dump->start_stack +
320 PAGE_SIZE - 1) >> PAGE_SHIFT;
321 /* Debug registers will come here. */
322
323 dump->regs = *regs;
324
325 dump->u_fpvalid = dump_fpu(regs, &dump->fpu);
326}
327
328/* Tracing by user break controller. */ 308/* Tracing by user break controller. */
329static void 309static void
330ubc_set_tracing(int asid, unsigned long pc) 310ubc_set_tracing(int asid, unsigned long pc)
diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c
index 6954fd62470a..1cf94a618be3 100644
--- a/arch/sh/kernel/sh_ksyms.c
+++ b/arch/sh/kernel/sh_ksyms.c
@@ -21,14 +21,12 @@
21#include <asm/cacheflush.h> 21#include <asm/cacheflush.h>
22#include <asm/checksum.h> 22#include <asm/checksum.h>
23 23
24extern void dump_thread(struct pt_regs *, struct user *);
25extern int dump_fpu(struct pt_regs *, elf_fpregset_t *); 24extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
26extern struct hw_interrupt_type no_irq_type; 25extern struct hw_interrupt_type no_irq_type;
27 26
28EXPORT_SYMBOL(sh_mv); 27EXPORT_SYMBOL(sh_mv);
29 28
30/* platform dependent support */ 29/* platform dependent support */
31EXPORT_SYMBOL(dump_thread);
32EXPORT_SYMBOL(dump_fpu); 30EXPORT_SYMBOL(dump_fpu);
33EXPORT_SYMBOL(iounmap); 31EXPORT_SYMBOL(iounmap);
34EXPORT_SYMBOL(enable_irq); 32EXPORT_SYMBOL(enable_irq);
diff --git a/arch/sh64/kernel/process.c b/arch/sh64/kernel/process.c
index b95d04141855..419b5a710441 100644
--- a/arch/sh64/kernel/process.c
+++ b/arch/sh64/kernel/process.c
@@ -775,26 +775,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
775 return 0; 775 return 0;
776} 776}
777 777
778/*
779 * fill in the user structure for a core dump..
780 */
781void dump_thread(struct pt_regs * regs, struct user * dump)
782{
783 dump->magic = CMAGIC;
784 dump->start_code = current->mm->start_code;
785 dump->start_data = current->mm->start_data;
786 dump->start_stack = regs->regs[15] & ~(PAGE_SIZE - 1);
787 dump->u_tsize = (current->mm->end_code - dump->start_code) >> PAGE_SHIFT;
788 dump->u_dsize = (current->mm->brk + (PAGE_SIZE-1) - dump->start_data) >> PAGE_SHIFT;
789 dump->u_ssize = (current->mm->start_stack - dump->start_stack +
790 PAGE_SIZE - 1) >> PAGE_SHIFT;
791 /* Debug registers will come here. */
792
793 dump->regs = *regs;
794
795 dump->u_fpvalid = dump_fpu(regs, &dump->fpu);
796}
797
798asmlinkage int sys_fork(unsigned long r2, unsigned long r3, 778asmlinkage int sys_fork(unsigned long r2, unsigned long r3,
799 unsigned long r4, unsigned long r5, 779 unsigned long r4, unsigned long r5,
800 unsigned long r6, unsigned long r7, 780 unsigned long r6, unsigned long r7,
diff --git a/arch/sh64/kernel/sh_ksyms.c b/arch/sh64/kernel/sh_ksyms.c
index 0b5497d70bd3..472b450e61be 100644
--- a/arch/sh64/kernel/sh_ksyms.c
+++ b/arch/sh64/kernel/sh_ksyms.c
@@ -29,7 +29,6 @@
29#include <asm/delay.h> 29#include <asm/delay.h>
30#include <asm/irq.h> 30#include <asm/irq.h>
31 31
32extern void dump_thread(struct pt_regs *, struct user *);
33extern int dump_fpu(struct pt_regs *, elf_fpregset_t *); 32extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
34 33
35#if 0 34#if 0
@@ -41,7 +40,6 @@ EXPORT_SYMBOL(drive_info);
41#endif 40#endif
42 41
43/* platform dependent support */ 42/* platform dependent support */
44EXPORT_SYMBOL(dump_thread);
45EXPORT_SYMBOL(dump_fpu); 43EXPORT_SYMBOL(dump_fpu);
46EXPORT_SYMBOL(iounmap); 44EXPORT_SYMBOL(iounmap);
47EXPORT_SYMBOL(enable_irq); 45EXPORT_SYMBOL(enable_irq);
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
index 1c8fd0fd9305..0b0d492c953b 100644
--- a/arch/sparc/kernel/sparc_ksyms.c
+++ b/arch/sparc/kernel/sparc_ksyms.c
@@ -82,8 +82,6 @@ extern int __lshrdi3(int, int);
82extern int __muldi3(int, int); 82extern int __muldi3(int, int);
83extern int __divdi3(int, int); 83extern int __divdi3(int, int);
84 84
85extern void dump_thread(struct pt_regs *, struct user *);
86
87/* Private functions with odd calling conventions. */ 85/* Private functions with odd calling conventions. */
88extern void ___atomic24_add(void); 86extern void ___atomic24_add(void);
89extern void ___atomic24_sub(void); 87extern void ___atomic24_sub(void);
diff --git a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c
index edf52d06b280..202a80c24b6f 100644
--- a/arch/sparc64/kernel/binfmt_aout32.c
+++ b/arch/sparc64/kernel/binfmt_aout32.c
@@ -36,8 +36,6 @@ static int load_aout32_binary(struct linux_binprm *, struct pt_regs * regs);
36static int load_aout32_library(struct file*); 36static int load_aout32_library(struct file*);
37static int aout32_core_dump(long signr, struct pt_regs * regs, struct file *file); 37static int aout32_core_dump(long signr, struct pt_regs * regs, struct file *file);
38 38
39extern void dump_thread(struct pt_regs *, struct user *);
40
41static struct linux_binfmt aout32_format = { 39static struct linux_binfmt aout32_format = {
42 NULL, THIS_MODULE, load_aout32_binary, load_aout32_library, aout32_core_dump, 40 NULL, THIS_MODULE, load_aout32_binary, load_aout32_library, aout32_core_dump,
43 PAGE_SIZE 41 PAGE_SIZE
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
index fb7a5370dbfc..d177d7e5c9d3 100644
--- a/arch/sparc64/kernel/sparc64_ksyms.c
+++ b/arch/sparc64/kernel/sparc64_ksyms.c
@@ -94,7 +94,6 @@ extern void (*prom_palette)(int);
94 94
95extern int __ashrdi3(int, int); 95extern int __ashrdi3(int, int);
96 96
97extern void dump_thread(struct pt_regs *, struct user *);
98extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs); 97extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs);
99 98
100extern unsigned long phys_base; 99extern unsigned long phys_base;
@@ -241,7 +240,6 @@ EXPORT_SYMBOL(io_remap_pfn_range);
241EXPORT_SYMBOL(_sigpause_common); 240EXPORT_SYMBOL(_sigpause_common);
242EXPORT_SYMBOL(verify_compat_iovec); 241EXPORT_SYMBOL(verify_compat_iovec);
243 242
244EXPORT_SYMBOL(dump_thread);
245EXPORT_SYMBOL(dump_fpu); 243EXPORT_SYMBOL(dump_fpu);
246EXPORT_SYMBOL(pte_alloc_one_kernel); 244EXPORT_SYMBOL(pte_alloc_one_kernel);
247#ifndef CONFIG_SMP 245#ifndef CONFIG_SMP
diff --git a/arch/v850/kernel/process.c b/arch/v850/kernel/process.c
index 39cf247cdae4..062ffa0a9998 100644
--- a/arch/v850/kernel/process.c
+++ b/arch/v850/kernel/process.c
@@ -164,30 +164,6 @@ int copy_thread (int nr, unsigned long clone_flags,
164} 164}
165 165
166/* 166/*
167 * fill in the user structure for a core dump..
168 */
169void dump_thread (struct pt_regs *regs, struct user *dump)
170{
171#if 0 /* Later. XXX */
172 dump->magic = CMAGIC;
173 dump->start_code = 0;
174 dump->start_stack = regs->gpr[GPR_SP];
175 dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
176 dump->u_dsize = ((unsigned long) (current->mm->brk +
177 (PAGE_SIZE-1))) >> PAGE_SHIFT;
178 dump->u_dsize -= dump->u_tsize;
179 dump->u_ssize = 0;
180
181 if (dump->start_stack < TASK_SIZE)
182 dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
183
184 dump->u_ar0 = (struct user_regs_struct *)((int)&dump->regs - (int)dump);
185 dump->regs = *regs;
186 dump->u_fpvalid = 0;
187#endif
188}
189
190/*
191 * sys_execve() executes a new program. 167 * sys_execve() executes a new program.
192 */ 168 */
193int sys_execve (char *name, char **argv, char **envp, struct pt_regs *regs) 169int sys_execve (char *name, char **argv, char **envp, struct pt_regs *regs)
diff --git a/arch/v850/kernel/v850_ksyms.c b/arch/v850/kernel/v850_ksyms.c
index 0ca64900dd91..8ffc29c1c89d 100644
--- a/arch/v850/kernel/v850_ksyms.c
+++ b/arch/v850/kernel/v850_ksyms.c
@@ -21,8 +21,6 @@ extern void *trap_table;
21EXPORT_SYMBOL (trap_table); 21EXPORT_SYMBOL (trap_table);
22 22
23/* platform dependent support */ 23/* platform dependent support */
24extern void dump_thread (struct pt_regs *, struct user *);
25EXPORT_SYMBOL (dump_thread);
26EXPORT_SYMBOL (kernel_thread); 24EXPORT_SYMBOL (kernel_thread);
27EXPORT_SYMBOL (enable_irq); 25EXPORT_SYMBOL (enable_irq);
28EXPORT_SYMBOL (disable_irq); 26EXPORT_SYMBOL (disable_irq);