diff options
author | akpm@osdl.org <akpm@osdl.org> | 2006-01-09 23:51:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 11:01:25 -0500 |
commit | df2e71fb9115a8d4f721fb1464db09adc8332bc5 (patch) | |
tree | 460230de8257235dc57f9835582afb0875cbc057 /arch/m68knommu/kernel | |
parent | be4f1bb2627c2d963d09be1cd69f8820995a9112 (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/m68knommu/kernel')
-rw-r--r-- | arch/m68knommu/kernel/m68k_ksyms.c | 2 | ||||
-rw-r--r-- | arch/m68knommu/kernel/process.c | 46 |
2 files changed, 0 insertions, 48 deletions
diff --git a/arch/m68knommu/kernel/m68k_ksyms.c b/arch/m68knommu/kernel/m68k_ksyms.c index b2c62eeb3ba..eddb8d3e130 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 | ||
21 | extern void dump_thread(struct pt_regs *, struct user *); | ||
22 | extern int dump_fpu(struct pt_regs *, elf_fpregset_t *); | 21 | extern 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 *); | |||
26 | EXPORT_SYMBOL(__ioremap); | 25 | EXPORT_SYMBOL(__ioremap); |
27 | EXPORT_SYMBOL(iounmap); | 26 | EXPORT_SYMBOL(iounmap); |
28 | EXPORT_SYMBOL(dump_fpu); | 27 | EXPORT_SYMBOL(dump_fpu); |
29 | EXPORT_SYMBOL(dump_thread); | ||
30 | EXPORT_SYMBOL(strnlen); | 28 | EXPORT_SYMBOL(strnlen); |
31 | EXPORT_SYMBOL(strrchr); | 29 | EXPORT_SYMBOL(strrchr); |
32 | EXPORT_SYMBOL(strstr); | 30 | EXPORT_SYMBOL(strstr); |
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c index 82e7ec88880..8b3cf57ba70 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 | */ | ||
281 | void 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 | */ |
327 | void dump(struct pt_regs *fp) | 281 | void dump(struct pt_regs *fp) |