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
Kirill Smelkov
linux
Commits
f199c752
Commit
f199c752
authored
Feb 21, 2004
by
Keith M. Wesolowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC32]: Remove use of PF_USEDFPU
parent
54105201
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
arch/sparc/kernel/process.c
arch/sparc/kernel/process.c
+8
-8
arch/sparc/kernel/traps.c
arch/sparc/kernel/traps.c
+3
-3
No files found.
arch/sparc/kernel/process.c
View file @
f199c752
...
@@ -346,7 +346,7 @@ void exit_thread(void)
...
@@ -346,7 +346,7 @@ void exit_thread(void)
#ifndef CONFIG_SMP
#ifndef CONFIG_SMP
if
(
last_task_used_math
==
current
)
{
if
(
last_task_used_math
==
current
)
{
#else
#else
if
(
current
->
flags
&
P
F_USEDFPU
)
{
if
(
current
_thread_info
()
->
flags
&
_TI
F_USEDFPU
)
{
#endif
#endif
/* Keep process from leaving FPU in a bogon state. */
/* Keep process from leaving FPU in a bogon state. */
put_psr
(
get_psr
()
|
PSR_EF
);
put_psr
(
get_psr
()
|
PSR_EF
);
...
@@ -355,7 +355,7 @@ void exit_thread(void)
...
@@ -355,7 +355,7 @@ void exit_thread(void)
#ifndef CONFIG_SMP
#ifndef CONFIG_SMP
last_task_used_math
=
NULL
;
last_task_used_math
=
NULL
;
#else
#else
current
->
flags
&=
~
P
F_USEDFPU
;
current
_thread_info
()
->
flags
&=
~
_TI
F_USEDFPU
;
#endif
#endif
}
}
}
}
...
@@ -369,7 +369,7 @@ void flush_thread(void)
...
@@ -369,7 +369,7 @@ void flush_thread(void)
#ifndef CONFIG_SMP
#ifndef CONFIG_SMP
if
(
last_task_used_math
==
current
)
{
if
(
last_task_used_math
==
current
)
{
#else
#else
if
(
current
->
flags
&
P
F_USEDFPU
)
{
if
(
current
_thread_info
()
->
flags
&
_TI
F_USEDFPU
)
{
#endif
#endif
/* Clean the fpu. */
/* Clean the fpu. */
put_psr
(
get_psr
()
|
PSR_EF
);
put_psr
(
get_psr
()
|
PSR_EF
);
...
@@ -378,7 +378,7 @@ void flush_thread(void)
...
@@ -378,7 +378,7 @@ void flush_thread(void)
#ifndef CONFIG_SMP
#ifndef CONFIG_SMP
last_task_used_math
=
NULL
;
last_task_used_math
=
NULL
;
#else
#else
current
->
flags
&=
~
P
F_USEDFPU
;
current
_thread_info
()
->
flags
&=
~
_TI
F_USEDFPU
;
#endif
#endif
}
}
...
@@ -459,13 +459,13 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
...
@@ -459,13 +459,13 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
#ifndef CONFIG_SMP
#ifndef CONFIG_SMP
if
(
last_task_used_math
==
current
)
{
if
(
last_task_used_math
==
current
)
{
#else
#else
if
(
current
->
flags
&
P
F_USEDFPU
)
{
if
(
current
_thread_info
()
->
flags
&
_TI
F_USEDFPU
)
{
#endif
#endif
put_psr
(
get_psr
()
|
PSR_EF
);
put_psr
(
get_psr
()
|
PSR_EF
);
fpsave
(
&
p
->
thread
.
float_regs
[
0
],
&
p
->
thread
.
fsr
,
fpsave
(
&
p
->
thread
.
float_regs
[
0
],
&
p
->
thread
.
fsr
,
&
p
->
thread
.
fpqueue
[
0
],
&
p
->
thread
.
fpqdepth
);
&
p
->
thread
.
fpqueue
[
0
],
&
p
->
thread
.
fpqdepth
);
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
current
->
flags
&=
~
P
F_USEDFPU
;
current
_thread_info
()
->
flags
&=
~
_TI
F_USEDFPU
;
#endif
#endif
}
}
...
@@ -597,13 +597,13 @@ int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs)
...
@@ -597,13 +597,13 @@ int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs)
return
1
;
return
1
;
}
}
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
if
(
current
->
flags
&
P
F_USEDFPU
)
{
if
(
current
_thread_info
()
->
flags
&
_TI
F_USEDFPU
)
{
put_psr
(
get_psr
()
|
PSR_EF
);
put_psr
(
get_psr
()
|
PSR_EF
);
fpsave
(
&
current
->
thread
.
float_regs
[
0
],
&
current
->
thread
.
fsr
,
fpsave
(
&
current
->
thread
.
float_regs
[
0
],
&
current
->
thread
.
fsr
,
&
current
->
thread
.
fpqueue
[
0
],
&
current
->
thread
.
fpqdepth
);
&
current
->
thread
.
fpqueue
[
0
],
&
current
->
thread
.
fpqdepth
);
if
(
regs
!=
NULL
)
{
if
(
regs
!=
NULL
)
{
regs
->
psr
&=
~
(
PSR_EF
);
regs
->
psr
&=
~
(
PSR_EF
);
current
->
flags
&=
~
(
P
F_USEDFPU
);
current
_thread_info
()
->
flags
&=
~
(
_TI
F_USEDFPU
);
}
}
}
}
#else
#else
...
...
arch/sparc/kernel/traps.c
View file @
f199c752
...
@@ -260,7 +260,7 @@ void do_fpd_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
...
@@ -260,7 +260,7 @@ void do_fpd_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
}
else
{
}
else
{
fpload
(
&
current
->
thread
.
float_regs
[
0
],
&
current
->
thread
.
fsr
);
fpload
(
&
current
->
thread
.
float_regs
[
0
],
&
current
->
thread
.
fsr
);
}
}
current
->
flags
|=
P
F_USEDFPU
;
current
_thread_info
()
->
flags
|=
_TI
F_USEDFPU
;
#endif
#endif
}
}
...
@@ -291,7 +291,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
...
@@ -291,7 +291,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
#ifndef CONFIG_SMP
#ifndef CONFIG_SMP
if
(
!
fpt
)
{
if
(
!
fpt
)
{
#else
#else
if
(
!
(
fpt
->
flags
&
P
F_USEDFPU
))
{
if
(
!
(
fpt
->
thread_info
->
flags
&
_TI
F_USEDFPU
))
{
#endif
#endif
fpsave
(
&
fake_regs
[
0
],
&
fake_fsr
,
&
fake_queue
[
0
],
&
fake_depth
);
fpsave
(
&
fake_regs
[
0
],
&
fake_fsr
,
&
fake_queue
[
0
],
&
fake_depth
);
regs
->
psr
&=
~
PSR_EF
;
regs
->
psr
&=
~
PSR_EF
;
...
@@ -334,7 +334,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
...
@@ -334,7 +334,7 @@ void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
/* nope, better SIGFPE the offending process... */
/* nope, better SIGFPE the offending process... */
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
fpt
->
flags
&=
~
P
F_USEDFPU
;
fpt
->
thread_info
->
flags
&=
~
_TI
F_USEDFPU
;
#endif
#endif
if
(
psr
&
PSR_PS
)
{
if
(
psr
&
PSR_PS
)
{
/* The first fsr store/load we tried trapped,
/* The first fsr store/load we tried trapped,
...
...
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