Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
8e398f63
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看板
提交
8e398f63
编写于
12月 10, 2013
作者:
G
Geert Uytterhoeven
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
m68k: Convert arch/m68k/mm/fault.c to pr_*()
Signed-off-by:
N
Geert Uytterhoeven
<
geert@linux-m68k.org
>
上级
4e25c0e9
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
15 deletion
+8
-15
arch/m68k/mm/fault.c
arch/m68k/mm/fault.c
+8
-15
未找到文件。
arch/m68k/mm/fault.c
浏览文件 @
8e398f63
...
@@ -25,9 +25,8 @@ int send_fault_sig(struct pt_regs *regs)
...
@@ -25,9 +25,8 @@ int send_fault_sig(struct pt_regs *regs)
siginfo
.
si_signo
=
current
->
thread
.
signo
;
siginfo
.
si_signo
=
current
->
thread
.
signo
;
siginfo
.
si_code
=
current
->
thread
.
code
;
siginfo
.
si_code
=
current
->
thread
.
code
;
siginfo
.
si_addr
=
(
void
*
)
current
->
thread
.
faddr
;
siginfo
.
si_addr
=
(
void
*
)
current
->
thread
.
faddr
;
#ifdef DEBUG
pr_debug
(
"send_fault_sig: %p,%d,%d
\n
"
,
siginfo
.
si_addr
,
printk
(
"send_fault_sig: %p,%d,%d
\n
"
,
siginfo
.
si_addr
,
siginfo
.
si_signo
,
siginfo
.
si_code
);
siginfo
.
si_signo
,
siginfo
.
si_code
);
#endif
if
(
user_mode
(
regs
))
{
if
(
user_mode
(
regs
))
{
force_sig_info
(
siginfo
.
si_signo
,
force_sig_info
(
siginfo
.
si_signo
,
...
@@ -45,10 +44,10 @@ int send_fault_sig(struct pt_regs *regs)
...
@@ -45,10 +44,10 @@ int send_fault_sig(struct pt_regs *regs)
* terminate things with extreme prejudice.
* terminate things with extreme prejudice.
*/
*/
if
((
unsigned
long
)
siginfo
.
si_addr
<
PAGE_SIZE
)
if
((
unsigned
long
)
siginfo
.
si_addr
<
PAGE_SIZE
)
pr
intk
(
KERN_ALERT
"Unable to handle kernel NULL pointer dereference"
);
pr
_alert
(
"Unable to handle kernel NULL pointer dereference"
);
else
else
pr
intk
(
KERN_ALERT
"Unable to handle kernel access"
);
pr
_alert
(
"Unable to handle kernel access"
);
pr
intk
(
" at virtual address %p
\n
"
,
siginfo
.
si_addr
);
pr
_cont
(
" at virtual address %p
\n
"
,
siginfo
.
si_addr
);
die_if_kernel
(
"Oops"
,
regs
,
0
/*error_code*/
);
die_if_kernel
(
"Oops"
,
regs
,
0
/*error_code*/
);
do_exit
(
SIGKILL
);
do_exit
(
SIGKILL
);
}
}
...
@@ -75,10 +74,8 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
...
@@ -75,10 +74,8 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
int
fault
;
int
fault
;
unsigned
int
flags
=
FAULT_FLAG_ALLOW_RETRY
|
FAULT_FLAG_KILLABLE
;
unsigned
int
flags
=
FAULT_FLAG_ALLOW_RETRY
|
FAULT_FLAG_KILLABLE
;
#ifdef DEBUG
pr_debug
(
"do page fault:
\n
regs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld, %p
\n
"
,
printk
(
"do page fault:
\n
regs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld, %p
\n
"
,
regs
->
sr
,
regs
->
pc
,
address
,
error_code
,
mm
?
mm
->
pgd
:
NULL
);
regs
->
sr
,
regs
->
pc
,
address
,
error_code
,
mm
?
mm
->
pgd
:
NULL
);
#endif
/*
/*
* If we're in an interrupt or have no user
* If we're in an interrupt or have no user
...
@@ -117,9 +114,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
...
@@ -117,9 +114,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
* we can handle it..
* we can handle it..
*/
*/
good_area:
good_area:
#ifdef DEBUG
pr_debug
(
"do_page_fault: good_area
\n
"
);
printk
(
"do_page_fault: good_area
\n
"
);
#endif
switch
(
error_code
&
3
)
{
switch
(
error_code
&
3
)
{
default:
/* 3: write, present */
default:
/* 3: write, present */
/* fall through */
/* fall through */
...
@@ -142,9 +137,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
...
@@ -142,9 +137,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
*/
*/
fault
=
handle_mm_fault
(
mm
,
vma
,
address
,
flags
);
fault
=
handle_mm_fault
(
mm
,
vma
,
address
,
flags
);
#ifdef DEBUG
pr_debug
(
"handle_mm_fault returns %d
\n
"
,
fault
);
printk
(
"handle_mm_fault returns %d
\n
"
,
fault
);
#endif
if
((
fault
&
VM_FAULT_RETRY
)
&&
fatal_signal_pending
(
current
))
if
((
fault
&
VM_FAULT_RETRY
)
&&
fatal_signal_pending
(
current
))
return
0
;
return
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录