Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
ac4691fa
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看板
提交
ac4691fa
编写于
3月 28, 2017
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
hexagon: switch to RAW_COPY_USER
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
d597580d
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
15 addition
and
17 deletion
+15
-17
arch/hexagon/Kconfig
arch/hexagon/Kconfig
+1
-0
arch/hexagon/include/asm/uaccess.h
arch/hexagon/include/asm/uaccess.h
+10
-13
arch/hexagon/kernel/hexagon_ksyms.c
arch/hexagon/kernel/hexagon_ksyms.c
+2
-2
arch/hexagon/mm/copy_from_user.S
arch/hexagon/mm/copy_from_user.S
+1
-1
arch/hexagon/mm/copy_to_user.S
arch/hexagon/mm/copy_to_user.S
+1
-1
未找到文件。
arch/hexagon/Kconfig
浏览文件 @
ac4691fa
...
...
@@ -26,6 +26,7 @@ config HEXAGON
select GENERIC_CLOCKEVENTS_BROADCAST
select MODULES_USE_ELF_RELA
select GENERIC_CPU_DEVICES
select ARCH_HAS_RAW_COPY_USER
---help---
Qualcomm Hexagon is a processor architecture designed for high
performance and low power across a wide variety of applications.
...
...
arch/hexagon/include/asm/uaccess.h
浏览文件 @
ac4691fa
...
...
@@ -65,19 +65,12 @@
*/
/* Assembly somewhat optimized copy routines */
unsigned
long
__copy_from_user_hexagon
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
raw_copy_from_user
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
n
);
unsigned
long
__copy_to_user_hexagon
(
void
__user
*
to
,
const
void
*
from
,
unsigned
long
raw_copy_to_user
(
void
__user
*
to
,
const
void
*
from
,
unsigned
long
n
);
#define __copy_from_user(to, from, n) __copy_from_user_hexagon(to, from, n)
#define __copy_to_user(to, from, n) __copy_to_user_hexagon(to, from, n)
/*
* XXX todo: some additonal performance gain is possible by
* implementing __copy_to/from_user_inatomic, which is much
* like __copy_to/from_user, but performs slightly less checking.
*/
#define INLINE_COPY_FROM_USER
#define INLINE_COPY_TO_USER
__kernel_size_t
__clear_user_hexagon
(
void
__user
*
dest
,
unsigned
long
count
);
#define __clear_user(a, s) __clear_user_hexagon((a), (s))
...
...
@@ -104,10 +97,14 @@ static inline long hexagon_strncpy_from_user(char *dst, const char __user *src,
return
-
EFAULT
;
if
(
res
>
n
)
{
copy_from_user
(
dst
,
src
,
n
);
long
left
=
raw_copy_from_user
(
dst
,
src
,
n
);
if
(
unlikely
(
left
))
memset
(
dst
+
(
n
-
left
),
0
,
left
);
return
n
;
}
else
{
copy_from_user
(
dst
,
src
,
res
);
long
left
=
raw_copy_from_user
(
dst
,
src
,
res
);
if
(
unlikely
(
left
))
memset
(
dst
+
(
res
-
left
),
0
,
left
);
return
res
-
1
;
}
}
...
...
arch/hexagon/kernel/hexagon_ksyms.c
浏览文件 @
ac4691fa
...
...
@@ -25,8 +25,8 @@
/* Additional functions */
EXPORT_SYMBOL
(
__clear_user_hexagon
);
EXPORT_SYMBOL
(
__copy_from_user_hexagon
);
EXPORT_SYMBOL
(
__copy_to_user_hexagon
);
EXPORT_SYMBOL
(
raw_copy_from_user
);
EXPORT_SYMBOL
(
raw_copy_to_user
);
EXPORT_SYMBOL
(
__iounmap
);
EXPORT_SYMBOL
(
__strnlen_user
);
EXPORT_SYMBOL
(
__vmgetie
);
...
...
arch/hexagon/mm/copy_from_user.S
浏览文件 @
ac4691fa
...
...
@@ -44,7 +44,7 @@
#define bytes r2
#define loopcount r5
#define FUNCNAME
__copy_from_user_hexagon
#define FUNCNAME
raw_copy_from_user
#include "copy_user_template.S"
/
*
LOAD
FAULTS
from
COPY_FROM_USER
*/
...
...
arch/hexagon/mm/copy_to_user.S
浏览文件 @
ac4691fa
...
...
@@ -43,7 +43,7 @@
#define bytes r2
#define loopcount r5
#define FUNCNAME
__copy_to_user_hexagon
#define FUNCNAME
raw_copy_to_user
#include "copy_user_template.S"
/
*
STORE
FAULTS
from
COPY_TO_USER
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录