Skip to content

Commit df2e71f

Browse files
akpm@osdl.orgLinus Torvalds
authored andcommitted
[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>
1 parent be4f1bb commit df2e71f

28 files changed

Lines changed: 5 additions & 250 deletions

File tree

‎arch/alpha/kernel/alpha_ksyms.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
#include <asm/unistd.h>
4141

4242
extern struct hwrpb_struct *hwrpb;
43-
extern void dump_thread(struct pt_regs *, struct user *);
4443
extern spinlock_t rtc_lock;
4544

4645
/* these are C runtime functions with special calling conventions: */

‎arch/alpha/mm/init.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/* 2.3.x zone allocator, 1999 Andrea Arcangeli <andrea@suse.de> */
88

99
#include <linux/config.h>
10+
#include <linux/pagemap.h>
1011
#include <linux/signal.h>
1112
#include <linux/sched.h>
1213
#include <linux/kernel.h>

‎arch/arm26/kernel/armksyms.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include <asm/checksum.h>
3636
#include <asm/mach-types.h>
3737

38-
extern void dump_thread(struct pt_regs *, struct user *);
3938
extern int dump_fpu(struct pt_regs *, struct user_fp_struct *);
4039
extern void inswb(unsigned int port, void *to, int len);
4140
extern void outswb(unsigned int port, const void *to, int len);

‎arch/cris/kernel/crisksyms.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include <asm/pgtable.h>
2222
#include <asm/fasttimer.h>
2323

24-
extern void dump_thread(struct pt_regs *, struct user *);
2524
extern unsigned long get_cmos_time(void);
2625
extern void __Udiv(void);
2726
extern void __Umod(void);
@@ -33,7 +32,6 @@ extern void __lshrdi3(void);
3332
extern void iounmap(volatile void * __iomem);
3433

3534
/* Platform dependent support */
36-
EXPORT_SYMBOL(dump_thread);
3735
EXPORT_SYMBOL(kernel_thread);
3836
EXPORT_SYMBOL(get_cmos_time);
3937
EXPORT_SYMBOL(loops_per_usec);

‎arch/cris/kernel/process.c‎

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -257,34 +257,6 @@ void flush_thread(void)
257257
{
258258
}
259259

260-
/*
261-
* fill in the user structure for a core dump..
262-
*/
263-
void 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-
288260
/* Fill in the fpu structure for a core dump. */
289261
int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
290262
{

‎arch/frv/kernel/frv_ksyms.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include <asm/hardirq.h>
1919
#include <asm/cacheflush.h>
2020

21-
extern void dump_thread(struct pt_regs *, struct user *);
2221
extern long __memcpy_user(void *dst, const void *src, size_t count);
2322
extern long __memset_user(void *dst, const void *src, size_t count);
2423

@@ -27,7 +26,6 @@ extern long __memset_user(void *dst, const void *src, size_t count);
2726
EXPORT_SYMBOL(__ioremap);
2827
EXPORT_SYMBOL(iounmap);
2928

30-
EXPORT_SYMBOL(dump_thread);
3129
EXPORT_SYMBOL(strnlen);
3230
EXPORT_SYMBOL(strrchr);
3331
EXPORT_SYMBOL(strstr);

‎arch/frv/kernel/process.c‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -243,28 +243,6 @@ int copy_thread(int nr, unsigned long clone_flags,
243243
return 0;
244244
} /* end copy_thread() */
245245

246-
/*
247-
* fill in the user structure for a core dump..
248-
*/
249-
void 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-
268246
/*
269247
* sys_execve() executes a new program.
270248
*/

‎arch/h8300/kernel/h8300_ksyms.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@
2222
//asmlinkage long long __lshrdi3 (long long, int);
2323
extern char h8300_debug_device[];
2424

25-
extern void dump_thread(struct pt_regs *, struct user *);
26-
2725
/* platform dependent support */
2826

29-
EXPORT_SYMBOL(dump_thread);
3027
EXPORT_SYMBOL(strnlen);
3128
EXPORT_SYMBOL(strrchr);
3229
EXPORT_SYMBOL(strstr);

‎arch/h8300/kernel/process.c‎

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -207,34 +207,6 @@ int copy_thread(int nr, unsigned long clone_flags,
207207
return 0;
208208
}
209209

210-
/*
211-
* fill in the user structure for a core dump..
212-
*/
213-
void 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-
238210
/*
239211
* sys_execve() executes a new program.
240212
*/

‎arch/m32r/kernel/m32r_ksyms.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,13 @@
1818
#include <asm/irq.h>
1919
#include <asm/tlbflush.h>
2020

21-
extern void dump_thread(struct pt_regs *, struct user *);
22-
2321
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
2422
extern struct drive_info_struct drive_info;
2523
EXPORT_SYMBOL(drive_info);
2624
#endif
2725

2826
/* platform dependent support */
2927
EXPORT_SYMBOL(boot_cpu_data);
30-
EXPORT_SYMBOL(dump_thread);
3128
EXPORT_SYMBOL(dump_fpu);
3229
EXPORT_SYMBOL(__ioremap);
3330
EXPORT_SYMBOL(iounmap);

0 commit comments

Comments
 (0)