Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
1a4fded6
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1a4fded6
编写于
3月 20, 2017
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mips: get rid of tail-zeroing in primitives
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
ab0aca27
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
3 addition
and
96 deletion
+3
-96
arch/mips/cavium-octeon/octeon-memcpy.S
arch/mips/cavium-octeon/octeon-memcpy.S
+1
-30
arch/mips/include/asm/uaccess.h
arch/mips/include/asm/uaccess.h
+2
-17
arch/mips/lib/memcpy.S
arch/mips/lib/memcpy.S
+0
-49
未找到文件。
arch/mips/cavium-octeon/octeon-memcpy.S
浏览文件 @
1a4fded6
...
...
@@ -139,15 +139,6 @@
.
set
noreorder
.
set
noat
/*
*
t7
is
used
as
a
flag
to
note
inatomic
mode
.
*/
LEAF
(
__copy_user_inatomic
)
EXPORT_SYMBOL
(
__copy_user_inatomic
)
b
__copy_user_common
li
t7
,
1
END
(
__copy_user_inatomic
)
/*
*
A
combined
memcpy
/
__copy_user
*
__copy_user
sets
len
to
0
for
success
; else to an upper bound of
...
...
@@ -161,8 +152,6 @@ EXPORT_SYMBOL(memcpy)
__memcpy
:
FEXPORT
(
__copy_user
)
EXPORT_SYMBOL
(
__copy_user
)
li
t7
,
0
/*
not
inatomic
*/
__copy_user_common
:
/
*
*
Note
:
dst
&
src
may
be
unaligned
,
len
may
be
0
*
Temps
...
...
@@ -414,25 +403,7 @@ l_exc:
LOAD
t0
,
TI_TASK
(
$
28
)
LOAD
t0
,
THREAD_BUADDR
(
t0
)
#
t0
is
just
past
last
good
address
SUB
len
,
AT
,
t0
#
len
number
of
uncopied
bytes
bnez
t7
,
2
f
/*
Skip
the
zeroing
out
part
if
inatomic
*/
/
*
*
Here
's where we rely on src and dst being incremented in tandem,
*
See
(
3
)
above
.
*
dst
+=
(
fault
addr
-
src
)
to
put
dst
at
first
byte
to
clear
*/
ADD
dst
,
t0
#
compute
start
address
in
a1
SUB
dst
,
src
/
*
*
Clear
len
bytes
starting
at
dst
.
Can
't call __bzero because it
*
might
modify
len
.
An
inefficient
loop
for
these
rare
times
...
*/
beqz
len
,
done
SUB
src
,
len
,
1
1
:
sb
zero
,
0
(
dst
)
ADD
dst
,
dst
,
1
bnez
src
,
1
b
SUB
src
,
src
,
1
2
:
jr
ra
jr
ra
nop
...
...
arch/mips/include/asm/uaccess.h
浏览文件 @
1a4fded6
...
...
@@ -841,9 +841,6 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n);
#define __invoke_copy_from_kernel(to, from, n) \
__invoke_copy_from(__copy_user, to, from, n)
#define __invoke_copy_from_kernel_inatomic(to, from, n) \
__invoke_copy_from(__copy_user_inatomic, to, from, n)
#define __invoke_copy_to_kernel(to, from, n) \
__invoke_copy_to(__copy_user, to, from, n)
...
...
@@ -854,9 +851,6 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n);
#define __invoke_copy_from_user(to, from, n) \
__invoke_copy_from(__copy_user, to, from, n)
#define __invoke_copy_from_user_inatomic(to, from, n) \
__invoke_copy_from(__copy_user_inatomic, to, from, n)
#define __invoke_copy_to_user(to, from, n) \
__invoke_copy_to(__copy_user, to, from, n)
...
...
@@ -867,8 +861,6 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n);
/* EVA specific functions */
extern
size_t
__copy_user_inatomic_eva
(
void
*
__to
,
const
void
*
__from
,
size_t
__n
);
extern
size_t
__copy_from_user_eva
(
void
*
__to
,
const
void
*
__from
,
size_t
__n
);
extern
size_t
__copy_to_user_eva
(
void
*
__to
,
const
void
*
__from
,
...
...
@@ -882,9 +874,6 @@ extern size_t __copy_in_user_eva(void *__to, const void *__from, size_t __n);
#define __invoke_copy_from_user(to, from, n) \
__invoke_copy_from(__copy_from_user_eva, to, from, n)
#define __invoke_copy_from_user_inatomic(to, from, n) \
__invoke_copy_from(__copy_user_inatomic_eva, to, from, n)
#define __invoke_copy_to_user(to, from, n) \
__invoke_copy_to(__copy_to_user_eva, to, from, n)
...
...
@@ -930,8 +919,6 @@ extern size_t __copy_in_user_eva(void *__to, const void *__from, size_t __n);
__cu_len; \
})
extern
size_t
__copy_user_inatomic
(
void
*
__to
,
const
void
*
__from
,
size_t
__n
);
#define __copy_to_user_inatomic(to, from, n) \
({ \
void __user *__cu_to; \
...
...
@@ -966,12 +953,10 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n);
check_object_size(__cu_to, __cu_len, false); \
\
if (eva_kernel_access()) \
__cu_len = __invoke_copy_from_kernel_inatomic(__cu_to, \
__cu_from,\
__cu_len = __invoke_copy_from_kernel(__cu_to, __cu_from,\
__cu_len);\
else \
__cu_len = __invoke_copy_from_user_inatomic(__cu_to, \
__cu_from, \
__cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \
__cu_len); \
__cu_len; \
})
...
...
arch/mips/lib/memcpy.S
浏览文件 @
1a4fded6
...
...
@@ -562,39 +562,9 @@
LOADK
t0
,
THREAD_BUADDR
(
t0
)
#
t0
is
just
past
last
good
address
nop
SUB
len
,
AT
,
t0
#
len
number
of
uncopied
bytes
bnez
t6
,
.
Ldone
\
@
/*
Skip
the
zeroing
part
if
inatomic
*/
/
*
*
Here
's where we rely on src and dst being incremented in tandem,
*
See
(
3
)
above
.
*
dst
+=
(
fault
addr
-
src
)
to
put
dst
at
first
byte
to
clear
*/
ADD
dst
,
t0
#
compute
start
address
in
a1
SUB
dst
,
src
/
*
*
Clear
len
bytes
starting
at
dst
.
Can
't call __bzero because it
*
might
modify
len
.
An
inefficient
loop
for
these
rare
times
...
*/
.
set
reorder
/*
DADDI_WAR
*/
SUB
src
,
len
,
1
beqz
len
,
.
Ldone
\
@
.
set
noreorder
1
:
sb
zero
,
0
(
dst
)
ADD
dst
,
dst
,
1
#ifndef CONFIG_CPU_DADDI_WORKAROUNDS
bnez
src
,
1
b
SUB
src
,
src
,
1
#else
.
set
push
.
set
noat
li
v1
,
1
bnez
src
,
1
b
SUB
src
,
src
,
v1
.
set
pop
#endif
jr
ra
nop
#define SEXC(n) \
.
set
reorder
; /* DADDI_WAR */ \
.
Ls_exc_p
#
#
n
##
u
\
@
:
\
...
...
@@ -672,15 +642,6 @@ LEAF(__rmemcpy) /* a0=dst a1=src a2=len */
move
a2
,
zero
END
(
__rmemcpy
)
/*
*
t6
is
used
as
a
flag
to
note
inatomic
mode
.
*/
LEAF
(
__copy_user_inatomic
)
EXPORT_SYMBOL
(
__copy_user_inatomic
)
b
__copy_user_common
li
t6
,
1
END
(
__copy_user_inatomic
)
/*
*
A
combined
memcpy
/
__copy_user
*
__copy_user
sets
len
to
0
for
success
; else to an upper bound of
...
...
@@ -694,8 +655,6 @@ EXPORT_SYMBOL(memcpy)
.
L__memcpy
:
FEXPORT
(
__copy_user
)
EXPORT_SYMBOL
(
__copy_user
)
li
t6
,
0
/*
not
inatomic
*/
__copy_user_common
:
/
*
Legacy
Mode
,
user
<->
user
*/
__BUILD_COPY_USER
LEGACY_MODE
USEROP
USEROP
...
...
@@ -708,20 +667,12 @@ __copy_user_common:
*
space
*/
LEAF
(
__copy_user_inatomic_eva
)
EXPORT_SYMBOL
(
__copy_user_inatomic_eva
)
b
__copy_from_user_common
li
t6
,
1
END
(
__copy_user_inatomic_eva
)
/*
*
__copy_from_user
(
EVA
)
*/
LEAF
(
__copy_from_user_eva
)
EXPORT_SYMBOL
(
__copy_from_user_eva
)
li
t6
,
0
/*
not
inatomic
*/
__copy_from_user_common
:
__BUILD_COPY_USER
EVA_MODE
USEROP
KERNELOP
END
(
__copy_from_user_eva
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录