Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
7b1f4020
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看板
提交
7b1f4020
编写于
10月 08, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
spufs: get rid of dump_emit() wrappers
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
9b56d543
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
20 addition
and
49 deletion
+20
-49
arch/powerpc/platforms/cell/spufs/coredump.c
arch/powerpc/platforms/cell/spufs/coredump.c
+20
-49
未找到文件。
arch/powerpc/platforms/cell/spufs/coredump.c
浏览文件 @
7b1f4020
...
...
@@ -50,33 +50,6 @@ static ssize_t do_coredump_read(int num, struct spu_context *ctx, void *buffer,
return
++
ret
;
/* count trailing NULL */
}
/*
* These are the only things you should do on a core-file: use only these
* functions to write out all the necessary info.
*/
static
int
spufs_dump_write
(
struct
coredump_params
*
cprm
,
const
void
*
addr
,
int
nr
)
{
if
(
!
dump_emit
(
cprm
,
addr
,
nr
))
return
-
EIO
;
return
0
;
}
static
int
spufs_dump_align
(
struct
coredump_params
*
cprm
,
char
*
buf
,
loff_t
new_off
)
{
int
rc
,
size
;
size
=
min
((
loff_t
)
PAGE_SIZE
,
new_off
-
cprm
->
written
);
memset
(
buf
,
0
,
size
);
rc
=
0
;
while
(
rc
==
0
&&
new_off
>
cprm
->
written
)
{
size
=
min
((
loff_t
)
PAGE_SIZE
,
new_off
-
cprm
->
written
);
rc
=
spufs_dump_write
(
cprm
,
buf
,
size
);
}
return
rc
;
}
static
int
spufs_ctx_note_size
(
struct
spu_context
*
ctx
,
int
dfd
)
{
int
i
,
sz
,
total
=
0
;
...
...
@@ -159,7 +132,7 @@ static int spufs_arch_write_note(struct spu_context *ctx, int i,
struct
coredump_params
*
cprm
,
int
dfd
)
{
loff_t
pos
=
0
;
int
sz
,
rc
,
nread
,
total
=
0
;
int
sz
,
rc
,
total
=
0
;
const
int
bufsz
=
PAGE_SIZE
;
char
*
name
;
char
fullname
[
80
],
*
buf
;
...
...
@@ -177,38 +150,36 @@ static int spufs_arch_write_note(struct spu_context *ctx, int i,
en
.
n_descsz
=
sz
;
en
.
n_type
=
NT_SPU
;
rc
=
spufs_dump_write
(
cprm
,
&
en
,
sizeof
(
en
));
if
(
rc
)
goto
out
;
if
(
!
dump_emit
(
cprm
,
&
en
,
sizeof
(
en
)))
goto
Eio
;
rc
=
spufs_dump_write
(
cprm
,
fullname
,
en
.
n_namesz
);
if
(
rc
)
goto
out
;
if
(
!
dump_emit
(
cprm
,
fullname
,
en
.
n_namesz
))
goto
Eio
;
rc
=
spufs_dump_align
(
cprm
,
buf
,
roundup
(
cprm
->
written
,
4
));
if
(
rc
)
goto
out
;
if
(
!
dump_skip
(
cprm
,
roundup
(
cprm
->
written
,
4
)
-
cprm
->
written
))
goto
Eio
;
do
{
nread
=
do_coredump_read
(
i
,
ctx
,
buf
,
bufsz
,
&
pos
);
if
(
nread
>
0
)
{
rc
=
spufs_dump_write
(
cprm
,
buf
,
nread
);
if
(
rc
)
goto
out
;
total
+=
nread
;
rc
=
do_coredump_read
(
i
,
ctx
,
buf
,
bufsz
,
&
pos
);
if
(
rc
>
0
)
{
if
(
!
dump_emit
(
cprm
,
buf
,
rc
))
goto
Eio
;
total
+=
rc
;
}
}
while
(
nread
==
bufsz
&&
total
<
sz
);
}
while
(
rc
==
bufsz
&&
total
<
sz
);
if
(
nread
<
0
)
{
rc
=
nread
;
if
(
rc
<
0
)
goto
out
;
}
rc
=
spufs_dump_align
(
cprm
,
buf
,
roundup
(
cprm
->
written
-
total
+
sz
,
4
));
if
(
!
dump_skip
(
cprm
,
roundup
(
cprm
->
written
-
total
+
sz
,
4
)
-
cprm
->
written
))
goto
Eio
;
out:
free_page
((
unsigned
long
)
buf
);
return
rc
;
Eio:
free_page
((
unsigned
long
)
buf
);
return
-
EIO
;
}
int
spufs_coredump_extra_notes_write
(
struct
coredump_params
*
cprm
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录