Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
d33e6fe3
Commit
d33e6fe3
authored
Dec 17, 2014
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MIPS: FRE: Use set/clear_c0_config5 instead of open coded sequences.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
b0c34f61
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
arch/mips/include/asm/fpu.h
arch/mips/include/asm/fpu.h
+3
-5
No files found.
arch/mips/include/asm/fpu.h
View file @
d33e6fe3
...
@@ -64,7 +64,7 @@ static inline int __enable_fpu(enum fpu_mode mode)
...
@@ -64,7 +64,7 @@ static inline int __enable_fpu(enum fpu_mode mode)
return
SIGFPE
;
return
SIGFPE
;
/* set FRE */
/* set FRE */
write_c0_config5
(
read_c0_config5
()
|
MIPS_CONF5_FRE
);
set_c0_config5
(
MIPS_CONF5_FRE
);
goto
fr_common
;
goto
fr_common
;
case
FPU_64BIT
:
case
FPU_64BIT
:
...
@@ -76,7 +76,7 @@ static inline int __enable_fpu(enum fpu_mode mode)
...
@@ -76,7 +76,7 @@ static inline int __enable_fpu(enum fpu_mode mode)
case
FPU_32BIT
:
case
FPU_32BIT
:
if
(
cpu_has_fre
)
{
if
(
cpu_has_fre
)
{
/* clear FRE */
/* clear FRE */
write_c0_config5
(
read_c0_config5
()
&
~
MIPS_CONF5_FRE
);
clear_c0_config5
(
MIPS_CONF5_FRE
);
}
}
fr_common:
fr_common:
/* set CU1 & change FR appropriately */
/* set CU1 & change FR appropriately */
...
@@ -196,15 +196,13 @@ static inline int init_fpu(void)
...
@@ -196,15 +196,13 @@ static inline int init_fpu(void)
return
0
;
return
0
;
}
}
config5
=
read_c0_config5
();
/*
/*
* Ensure FRE is clear whilst running _init_fpu, since
* Ensure FRE is clear whilst running _init_fpu, since
* single precision FP instructions are used. If FRE
* single precision FP instructions are used. If FRE
* was set then we'll just end up initialising all 32
* was set then we'll just end up initialising all 32
* 64b registers.
* 64b registers.
*/
*/
write_c0_config5
(
config5
&
~
MIPS_CONF5_FRE
);
config5
=
clear_c0_config5
(
MIPS_CONF5_FRE
);
enable_fpu_hazard
();
enable_fpu_hazard
();
_init_fpu
();
_init_fpu
();
...
...
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