Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
e0cc3a42
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e0cc3a42
编写于
4月 28, 2014
作者:
R
Ralf Baechle
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MIPS: math-emu: Inline fpu_emulator_init_fpu()
Signed-off-by:
N
Ralf Baechle
<
ralf@linux-mips.org
>
上级
3f7cac41
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
46 deletion
+21
-46
arch/mips/include/asm/fpu.h
arch/mips/include/asm/fpu.h
+4
-3
arch/mips/include/asm/fpu_emulator.h
arch/mips/include/asm/fpu_emulator.h
+16
-0
arch/mips/math-emu/Makefile
arch/mips/math-emu/Makefile
+1
-1
arch/mips/math-emu/kernel_linkage.c
arch/mips/math-emu/kernel_linkage.c
+0
-42
未找到文件。
arch/mips/include/asm/fpu.h
浏览文件 @
e0cc3a42
...
...
@@ -17,6 +17,7 @@
#include <asm/mipsregs.h>
#include <asm/cpu.h>
#include <asm/cpu-features.h>
#include <asm/fpu_emulator.h>
#include <asm/hazards.h>
#include <asm/processor.h>
#include <asm/current.h>
...
...
@@ -28,7 +29,6 @@
struct
sigcontext
;
struct
sigcontext32
;
extern
void
fpu_emulator_init_fpu
(
void
);
extern
void
_init_fpu
(
void
);
extern
void
_save_fp
(
struct
task_struct
*
);
extern
void
_restore_fp
(
struct
task_struct
*
);
...
...
@@ -156,15 +156,16 @@ static inline int init_fpu(void)
int
ret
=
0
;
preempt_disable
();
if
(
cpu_has_fpu
)
{
ret
=
__own_fpu
();
if
(
!
ret
)
_init_fpu
();
}
else
{
}
else
fpu_emulator_init_fpu
();
}
preempt_enable
();
return
ret
;
}
...
...
arch/mips/include/asm/fpu_emulator.h
浏览文件 @
e0cc3a42
...
...
@@ -23,9 +23,12 @@
#ifndef _ASM_FPU_EMULATOR_H
#define _ASM_FPU_EMULATOR_H
#include <linux/sched.h>
#include <asm/break.h>
#include <asm/thread_info.h>
#include <asm/inst.h>
#include <asm/local.h>
#include <asm/processor.h>
#ifdef CONFIG_DEBUG_FS
...
...
@@ -71,4 +74,17 @@ int mm_isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn,
*/
#define BREAK_MATH (0x0000000d | (BRK_MEMU << 16))
#define SIGNALLING_NAN 0x7ff800007ff80000LL
static
inline
void
fpu_emulator_init_fpu
(
void
)
{
struct
task_struct
*
t
=
current
;
int
i
;
t
->
thread
.
fpu
.
fcr31
=
0
;
for
(
i
=
0
;
i
<
32
;
i
++
)
set_fpr64
(
&
t
->
thread
.
fpu
.
fpr
[
i
],
0
,
SIGNALLING_NAN
);
}
#endif
/* _ASM_FPU_EMULATOR_H */
arch/mips/math-emu/Makefile
浏览文件 @
e0cc3a42
...
...
@@ -6,7 +6,7 @@ obj-y += cp1emu.o ieee754dp.o ieee754sp.o ieee754.o dp_div.o dp_mul.o \
dp_sub.o dp_add.o dp_fsp.o dp_cmp.o dp_simple.o dp_tint.o
\
dp_fint.o dp_tlong.o dp_flong.o sp_div.o sp_mul.o sp_sub.o
\
sp_add.o sp_fdp.o sp_cmp.o sp_simple.o sp_tint.o sp_fint.o
\
sp_tlong.o sp_flong.o
kernel_linkage.o
dsemul.o
sp_tlong.o sp_flong.o dsemul.o
lib-y
+=
ieee754d.o dp_sqrt.o sp_sqrt.o
...
...
arch/mips/math-emu/kernel_linkage.c
已删除
100644 → 0
浏览文件 @
3f7cac41
/*
* Kevin D. Kissell, kevink@mips and Carsten Langgaard, carstenl@mips.com
* Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
*
* This program is free software; you can distribute it and/or modify it
* under the terms of the GNU General Public License (Version 2) as
* published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Routines corresponding to Linux kernel FP context
* manipulation primitives for the Algorithmics MIPS
* FPU Emulator
*/
#include <linux/printk.h>
#include <asm/current.h>
#include <asm/fpu.h>
#include <asm/fpu_emulator.h>
#define SIGNALLING_NAN 0x7ff800007ff80000LL
void
fpu_emulator_init_fpu
(
void
)
{
static
int
first
=
1
;
int
i
;
if
(
first
)
{
first
=
0
;
printk
(
"Algorithmics/MIPS FPU Emulator v1.5
\n
"
);
}
current
->
thread
.
fpu
.
fcr31
=
0
;
for
(
i
=
0
;
i
<
32
;
i
++
)
set_fpr64
(
&
current
->
thread
.
fpu
.
fpr
[
i
],
0
,
SIGNALLING_NAN
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录