Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
600ee240
Commit
600ee240
authored
Nov 19, 2007
by
Paul Mundt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sh: Move over and enable FPU support for
SH-5
.
Signed-off-by:
Paul Mundt
<
lethal@linux-sh.org
>
parent
061854fd
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
8 deletions
+10
-8
arch/sh/Kconfig.sh64
arch/sh/Kconfig.sh64
+1
-0
arch/sh/kernel/cpu/sh5/Makefile
arch/sh/kernel/cpu/sh5/Makefile
+1
-0
arch/sh/kernel/cpu/sh5/fpu.c
arch/sh/kernel/cpu/sh5/fpu.c
+2
-2
arch/sh/kernel/process_64.c
arch/sh/kernel/process_64.c
+4
-4
arch/sh/kernel/signal_64.c
arch/sh/kernel/signal_64.c
+2
-2
No files found.
arch/sh/Kconfig.sh64
View file @
600ee240
...
@@ -83,6 +83,7 @@ choice
...
@@ -83,6 +83,7 @@ choice
config CPU_SH5
config CPU_SH5
bool "SH-5"
bool "SH-5"
select CPU_HAS_FPU
endchoice
endchoice
...
...
arch/sh/kernel/cpu/sh5/Makefile
View file @
600ee240
obj-y
:=
entry.o switchto.o
obj-y
:=
entry.o switchto.o
obj-$(CONFIG_KALLSYMS)
+=
unwind.o
obj-$(CONFIG_KALLSYMS)
+=
unwind.o
obj-$(CONFIG_SH_FPU)
+=
fpu.o
arch/sh
64/kernel
/fpu.c
→
arch/sh
/kernel/cpu/sh5
/fpu.c
View file @
600ee240
...
@@ -152,7 +152,7 @@ do_fpu_state_restore(unsigned long ex, struct pt_regs *regs)
...
@@ -152,7 +152,7 @@ do_fpu_state_restore(unsigned long ex, struct pt_regs *regs)
if
(
last_task_used_math
==
current
)
if
(
last_task_used_math
==
current
)
return
;
return
;
grab
_fpu
();
enable
_fpu
();
if
(
last_task_used_math
!=
NULL
)
{
if
(
last_task_used_math
!=
NULL
)
{
/* Other processes fpu state, save away */
/* Other processes fpu state, save away */
fpsave
(
&
last_task_used_math
->
thread
.
fpu
.
hard
);
fpsave
(
&
last_task_used_math
->
thread
.
fpu
.
hard
);
...
@@ -165,6 +165,6 @@ do_fpu_state_restore(unsigned long ex, struct pt_regs *regs)
...
@@ -165,6 +165,6 @@ do_fpu_state_restore(unsigned long ex, struct pt_regs *regs)
fpload
(
&
init_fpuregs
.
hard
);
fpload
(
&
init_fpuregs
.
hard
);
set_used_math
();
set_used_math
();
}
}
releas
e_fpu
();
disabl
e_fpu
();
}
}
arch/sh/kernel/process_64.c
View file @
600ee240
...
@@ -469,9 +469,9 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
...
@@ -469,9 +469,9 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
fpvalid
=
!!
tsk_used_math
(
tsk
);
fpvalid
=
!!
tsk_used_math
(
tsk
);
if
(
fpvalid
)
{
if
(
fpvalid
)
{
if
(
current
==
last_task_used_math
)
{
if
(
current
==
last_task_used_math
)
{
grab
_fpu
();
enable
_fpu
();
fpsave
(
&
tsk
->
thread
.
fpu
.
hard
);
fpsave
(
&
tsk
->
thread
.
fpu
.
hard
);
releas
e_fpu
();
disabl
e_fpu
();
last_task_used_math
=
0
;
last_task_used_math
=
0
;
regs
->
sr
|=
SR_FD
;
regs
->
sr
|=
SR_FD
;
}
}
...
@@ -496,9 +496,9 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
...
@@ -496,9 +496,9 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
#ifdef CONFIG_SH_FPU
#ifdef CONFIG_SH_FPU
if
(
last_task_used_math
==
current
)
{
if
(
last_task_used_math
==
current
)
{
grab
_fpu
();
enable
_fpu
();
fpsave
(
&
current
->
thread
.
fpu
.
hard
);
fpsave
(
&
current
->
thread
.
fpu
.
hard
);
releas
e_fpu
();
disabl
e_fpu
();
last_task_used_math
=
NULL
;
last_task_used_math
=
NULL
;
regs
->
sr
|=
SR_FD
;
regs
->
sr
|=
SR_FD
;
}
}
...
...
arch/sh/kernel/signal_64.c
View file @
600ee240
...
@@ -211,9 +211,9 @@ setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc)
...
@@ -211,9 +211,9 @@ setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc)
return
err
;
return
err
;
if
(
current
==
last_task_used_math
)
{
if
(
current
==
last_task_used_math
)
{
grab
_fpu
();
enable
_fpu
();
fpsave
(
&
current
->
thread
.
fpu
.
hard
);
fpsave
(
&
current
->
thread
.
fpu
.
hard
);
releas
e_fpu
();
disabl
e_fpu
();
last_task_used_math
=
NULL
;
last_task_used_math
=
NULL
;
regs
->
sr
|=
SR_FD
;
regs
->
sr
|=
SR_FD
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment