Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77739
b: refs/heads/master
c: 600ee24
h: refs/heads/master
i:
  77737: 73f11e3
  77735: 3ad81d0
v: v3
  • Loading branch information
Paul Mundt committed Jan 28, 2008
1 parent f19b131 commit 359932e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 061854fd155116ab1f40c39a75e2c641827fd246
refs/heads/master: 600ee240d15e535d51e6c2b2f8475f0aa42885ea
1 change: 1 addition & 0 deletions trunk/arch/sh/Kconfig.sh64
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ choice

config CPU_SH5
bool "SH-5"
select CPU_HAS_FPU

endchoice

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/sh/kernel/cpu/sh5/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
obj-y := entry.o switchto.o

obj-$(CONFIG_KALLSYMS) += unwind.o
obj-$(CONFIG_SH_FPU) += fpu.o
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ do_fpu_state_restore(unsigned long ex, struct pt_regs *regs)
if (last_task_used_math == current)
return;

grab_fpu();
enable_fpu();
if (last_task_used_math != NULL) {
/* Other processes fpu state, save away */
fpsave(&last_task_used_math->thread.fpu.hard);
Expand All @@ -165,6 +165,6 @@ do_fpu_state_restore(unsigned long ex, struct pt_regs *regs)
fpload(&init_fpuregs.hard);
set_used_math();
}
release_fpu();
disable_fpu();
}

8 changes: 4 additions & 4 deletions trunk/arch/sh/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,9 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
fpvalid = !!tsk_used_math(tsk);
if (fpvalid) {
if (current == last_task_used_math) {
grab_fpu();
enable_fpu();
fpsave(&tsk->thread.fpu.hard);
release_fpu();
disable_fpu();
last_task_used_math = 0;
regs->sr |= SR_FD;
}
Expand All @@ -496,9 +496,9 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,

#ifdef CONFIG_SH_FPU
if(last_task_used_math == current) {
grab_fpu();
enable_fpu();
fpsave(&current->thread.fpu.hard);
release_fpu();
disable_fpu();
last_task_used_math = NULL;
regs->sr |= SR_FD;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/sh/kernel/signal_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc)
return err;

if (current == last_task_used_math) {
grab_fpu();
enable_fpu();
fpsave(&current->thread.fpu.hard);
release_fpu();
disable_fpu();
last_task_used_math = NULL;
regs->sr |= SR_FD;
}
Expand Down

0 comments on commit 359932e

Please sign in to comment.