Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gsplhtlxg
clone-Linux
提交
256b22ca
C
clone-Linux
项目概览
gsplhtlxg
/
clone-Linux
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
clone-Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
256b22ca
编写于
11月 10, 2007
作者:
P
Paul Mundt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sh: Have SH-5 provide an {en,dis}able_fpu() impl.
Signed-off-by:
N
Paul Mundt
<
lethal@linux-sh.org
>
上级
27a511c6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
21 addition
and
10 deletion
+21
-10
arch/sh/kernel/ptrace_64.c
arch/sh/kernel/ptrace_64.c
+4
-4
arch/sh/kernel/traps_64.c
arch/sh/kernel/traps_64.c
+4
-4
include/asm-sh/processor_64.h
include/asm-sh/processor_64.h
+13
-2
未找到文件。
arch/sh/kernel/ptrace_64.c
浏览文件 @
256b22ca
...
...
@@ -74,9 +74,9 @@ get_fpu_long(struct task_struct *task, unsigned long addr)
}
if
(
last_task_used_math
==
task
)
{
grab
_fpu
();
enable
_fpu
();
fpsave
(
&
task
->
thread
.
fpu
.
hard
);
releas
e_fpu
();
disabl
e_fpu
();
last_task_used_math
=
0
;
regs
->
sr
|=
SR_FD
;
}
...
...
@@ -110,9 +110,9 @@ put_fpu_long(struct task_struct *task, unsigned long addr, unsigned long data)
fpinit
(
&
task
->
thread
.
fpu
.
hard
);
set_stopped_child_used_math
(
task
);
}
else
if
(
last_task_used_math
==
task
)
{
grab
_fpu
();
enable
_fpu
();
fpsave
(
&
task
->
thread
.
fpu
.
hard
);
releas
e_fpu
();
disabl
e_fpu
();
last_task_used_math
=
0
;
regs
->
sr
|=
SR_FD
;
}
...
...
arch/sh/kernel/traps_64.c
浏览文件 @
256b22ca
...
...
@@ -617,9 +617,9 @@ static int misaligned_fpu_load(struct pt_regs *regs,
context switch the registers into memory so they can be
indexed by register number. */
if
(
last_task_used_math
==
current
)
{
grab
_fpu
();
enable
_fpu
();
fpsave
(
&
current
->
thread
.
fpu
.
hard
);
releas
e_fpu
();
disabl
e_fpu
();
last_task_used_math
=
NULL
;
regs
->
sr
|=
SR_FD
;
}
...
...
@@ -690,9 +690,9 @@ static int misaligned_fpu_store(struct pt_regs *regs,
context switch the registers into memory so they can be
indexed by register number. */
if
(
last_task_used_math
==
current
)
{
grab
_fpu
();
enable
_fpu
();
fpsave
(
&
current
->
thread
.
fpu
.
hard
);
releas
e_fpu
();
disabl
e_fpu
();
last_task_used_math
=
NULL
;
regs
->
sr
|=
SR_FD
;
}
...
...
include/asm-sh/processor_64.h
浏览文件 @
256b22ca
...
...
@@ -18,6 +18,7 @@
#include <asm/page.h>
#include <asm/types.h>
#include <asm/cache.h>
#include <asm/ptrace.h>
#include <asm/cpu/registers.h>
/*
...
...
@@ -218,7 +219,7 @@ extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
* FPU lazy state save handling.
*/
static
inline
void
releas
e_fpu
(
void
)
static
inline
void
disabl
e_fpu
(
void
)
{
unsigned
long
long
__dummy
;
...
...
@@ -230,7 +231,7 @@ static inline void release_fpu(void)
:
"r"
(
SR_FD
));
}
static
inline
void
grab
_fpu
(
void
)
static
inline
void
enable
_fpu
(
void
)
{
unsigned
long
long
__dummy
;
...
...
@@ -242,6 +243,16 @@ static inline void grab_fpu(void)
:
"r"
(
~
SR_FD
));
}
static
inline
void
release_fpu
(
struct
pt_regs
*
regs
)
{
regs
->
sr
|=
SR_FD
;
}
static
inline
void
grab_fpu
(
struct
pt_regs
*
regs
)
{
regs
->
sr
&=
~
SR_FD
;
}
/* Round to nearest, no exceptions on inexact, overflow, underflow,
zero-divide, invalid. Configure option for whether to flush denorms to
zero, or except if a denorm is encountered. */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录