patch-2.1.121 linux/arch/arm/kernel/process.c
Next file: linux/arch/arm/kernel/ptrace.c
Previous file: linux/arch/arm/kernel/leds-ebsa285.c
Back to the patch index
Back to the overall index
- Lines: 79
- Date:
Sun Sep 6 10:44:47 1998
- Orig file:
v2.1.120/linux/arch/arm/kernel/process.c
- Orig date:
Thu Aug 6 14:06:28 1998
diff -u --recursive --new-file v2.1.120/linux/arch/arm/kernel/process.c linux/arch/arm/kernel/process.c
@@ -38,9 +38,6 @@
#include <asm/system.h>
#include <asm/io.h>
-struct task_struct *last_task_used_math;
-
-extern void fpe_save(struct fp_soft_struct *);
extern char *processor_modes[];
asmlinkage void ret_from_sys_call(void) __asm__("ret_from_sys_call");
@@ -108,7 +105,6 @@
{
}
-
void show_regs(struct pt_regs * regs)
{
unsigned long flags;
@@ -158,18 +154,14 @@
*/
void exit_thread(void)
{
- if (last_task_used_math == current)
- last_task_used_math = NULL;
}
void flush_thread(void)
{
int i;
- for (i = 0; i < 8; i++)
- current->debugreg[i] = 0;
- if (last_task_used_math == current)
- last_task_used_math = NULL;
+ for (i = 0; i < NR_DEBUGS; i++)
+ current->tss.debug[i] = 0;
current->used_math = 0;
current->flags &= ~PF_USEDFPU;
}
@@ -189,13 +181,8 @@
childregs->ARM_r0 = 0;
save = ((struct context_save_struct *)(childregs)) - 1;
- copy_thread_css (save);
+ copy_thread_css(save);
p->tss.save = save;
- /*
- * Save current math state in p->tss.fpe_save if not already there.
- */
- if (last_task_used_math == current)
- fpe_save (&p->tss.fpstate.soft);
return 0;
}
@@ -207,12 +194,8 @@
{
int fpvalid = 0;
- if (current->used_math) {
- if (last_task_used_math == current)
- fpe_save (¤t->tss.fpstate.soft);
-
+ if (current->used_math)
memcpy (fp, ¤t->tss.fpstate.soft, sizeof (fp));
- }
return fpvalid;
}
@@ -232,8 +215,8 @@
dump->u_dsize = (current->mm->brk - current->mm->start_data + PAGE_SIZE - 1) >> PAGE_SHIFT;
dump->u_ssize = 0;
- for (i = 0; i < 8; i++)
- dump->u_debugreg[i] = current->debugreg[i];
+ for (i = 0; i < NR_DEBUGS; i++)
+ dump->u_debugreg[i] = current->tss.debug[i];
if (dump->start_stack < 0x04000000)
dump->u_ssize = (0x04000000 - dump->start_stack) >> PAGE_SHIFT;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov