The dump_thread() is not used in anywhere. It is removed.
The m68kfp struct is removed from asm/user.h. It doesn't apply for
nios2.
Signed-off-by: Thomas Chou <[EMAIL PROTECTED]>
---
linux-2.6.x/arch/nios2nommu/kernel/nios2_ksyms.c | 2 -
linux-2.6.x/arch/nios2nommu/kernel/process.c | 54 ----------------------
linux-2.6.x/include/asm-nios2nommu/user.h | 45 +++---------------
3 files changed, 8 insertions(+), 93 deletions(-)
diff --git a/linux-2.6.x/arch/nios2nommu/kernel/nios2_ksyms.c
b/linux-2.6.x/arch/nios2nommu/kernel/nios2_ksyms.c
index 6198463..972be54 100644
--- a/linux-2.6.x/arch/nios2nommu/kernel/nios2_ksyms.c
+++ b/linux-2.6.x/arch/nios2nommu/kernel/nios2_ksyms.c
@@ -44,12 +44,10 @@
#include <asm/hardirq.h>
#include <asm/current.h>
-extern void dump_thread(struct pt_regs *, struct user *);
/* platform dependent support */
EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(iounmap);
-EXPORT_SYMBOL(dump_thread);
EXPORT_SYMBOL(kernel_thread);
diff --git a/linux-2.6.x/arch/nios2nommu/kernel/process.c
b/linux-2.6.x/arch/nios2nommu/kernel/process.c
index 6360af2..ac9af8a 100644
--- a/linux-2.6.x/arch/nios2nommu/kernel/process.c
+++ b/linux-2.6.x/arch/nios2nommu/kernel/process.c
@@ -340,60 +340,6 @@ int copy_thread(int nr, unsigned long clone_flags,
}
/*
- * fill in the user structure for a core dump..
- */
-void dump_thread(struct pt_regs * regs, struct user * dump)
-{
- struct switch_stack *sw;
-
- /* changed the size calculations - should hopefully work better. lbt */
- dump->magic = CMAGIC;
- dump->start_code = 0;
- dump->start_stack = regs->sp & ~(PAGE_SIZE - 1);
- dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
- dump->u_dsize = ((unsigned long) (current->mm->brk +
- (PAGE_SIZE-1))) >> PAGE_SHIFT;
- dump->u_dsize -= dump->u_tsize;
- dump->u_ssize = 0;
-
- if (dump->start_stack < TASK_SIZE)
- dump->u_ssize = ((unsigned long) (TASK_SIZE -
dump->start_stack)) >> PAGE_SHIFT;
-
- dump->u_ar0 = (struct user_regs_struct *)((int)&dump->regs - (int)dump);
- sw = ((struct switch_stack *)regs) - 1;
- dump->regs.r1 = regs->r1;
- dump->regs.r2 = regs->r2;
- dump->regs.r3 = regs->r3;
- dump->regs.r4 = regs->r4;
- dump->regs.r5 = regs->r5;
- dump->regs.r6 = regs->r6;
- dump->regs.r7 = regs->r7;
- dump->regs.r8 = regs->r8;
- dump->regs.r9 = regs->r9;
- dump->regs.r10 = regs->r10;
- dump->regs.r11 = regs->r11;
- dump->regs.r12 = regs->r12;
- dump->regs.r13 = regs->r13;
- dump->regs.r14 = regs->r14;
- dump->regs.r15 = regs->r15;
- dump->regs.r16 = sw->r16;
- dump->regs.r17 = sw->r17;
- dump->regs.r18 = sw->r18;
- dump->regs.r19 = sw->r19;
- dump->regs.r20 = sw->r20;
- dump->regs.r21 = sw->r21;
- dump->regs.r22 = sw->r22;
- dump->regs.r23 = sw->r23;
- dump->regs.ra = sw->ra;
- dump->regs.fp = sw->fp;
- dump->regs.gp = sw->gp;
- dump->regs.sp = regs->sp;
- dump->regs.orig_r2 = regs->orig_r2;
- dump->regs.estatus = regs->estatus;
- dump->regs.ea = regs->ea;
-}
-
-/*
* Generic dumping code. Used for panic and debug.
*/
void dump(struct pt_regs *fp)
diff --git a/linux-2.6.x/include/asm-nios2nommu/user.h
b/linux-2.6.x/include/asm-nios2nommu/user.h
index 3cdc2ba..ec2a17c 100644
--- a/linux-2.6.x/include/asm-nios2nommu/user.h
+++ b/linux-2.6.x/include/asm-nios2nommu/user.h
@@ -1,30 +1,6 @@
#ifndef _NIOS2NOMMU_USER_H
#define _NIOS2NOMMU_USER_H
-/*--------------------------------------------------------------------
- *
- * include/asm-nios2nommu/user.h
- *
- * Derived from M68knommu
- *
- * Copyright (C) 2004 Microtronix Datacom Ltd
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- *
- * Jan/20/2004 dgt NiosII
- *
- ---------------------------------------------------------------------*/
-
-
#include <asm/page.h>
/* Core file format: The core file is written in such a way that gdb
@@ -54,12 +30,12 @@
The minimum core file size is 3 pages, or 12288 bytes.
*/
-struct user_m68kfp_struct {
- unsigned long fpregs[8*3]; /* fp0-fp7 registers */
- unsigned long fpcntl[3]; /* fp control regs */
+struct user_nios2fp_struct {
};
-/* This is needs more work, probably should look like gdb useage */
+/* This is the old layout of "struct pt_regs" as of Linux 1.x, and
+ is still the layout used by user (the new pt_regs doesn't have
+ all registers). */
struct user_regs_struct {
long r1,r2,r3,r4,r5,r6,r7,r8;
long r9,r10,r11,r12,r13,r14,r15;
@@ -74,7 +50,7 @@ struct user_regs_struct {
long ea;
};
-
+
/* When the kernel dumps core, it starts by dumping the user struct -
this will be used by gdb to figure out where the data and stack segments
are within the file, and what virtual addresses to use. */
@@ -82,10 +58,7 @@ struct user{
/* We start with the registers, to mimic the way that "memory" is returned
from the ptrace(3,...) function. */
struct user_regs_struct regs; /* Where the registers are actually
stored */
-/* ptrace does not yet supply these. Someday.... */
- int u_fpvalid; /* True if math co-processor being used. */
- /* for this mess. Not yet used. */
- struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */
+
/* The rest of this junk is to help gdb figure out what goes where */
unsigned long int u_tsize; /* Text segment size (pages). */
unsigned long int u_dsize; /* Data segment size (pages). */
@@ -95,12 +68,10 @@ struct user{
This is actually the bottom of the stack,
the top of the stack is always found in the
esp register. */
- long int signal; /* Signal that caused the core dump. */
+ long int signal; /* Signal that caused the core dump. */
int reserved; /* No longer used */
- struct user_regs_struct *u_ar0;
- /* Used by gdb to help find the values for */
+ unsigned long u_ar0; /* Used by gdb to help find the values for */
/* the registers. */
- struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */
unsigned long magic; /* To uniquely identify a core file */
char u_comm[32]; /* User command that was responsible */
};
--
1.5.3.3
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev