Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
5a157d5b
cloud-kernel
项目概览
openanolis
/
cloud-kernel
12 个月 前同步成功
通知
152
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5a157d5b
编写于
7月 27, 2008
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sparc: Create and use TIF_NOTIFY_RESUME.
Signed-off-by:
N
David S. Miller
<
davem@davemloft.net
>
上级
1c133b4b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
4 deletion
+22
-4
arch/sparc/include/asm/thread_info_32.h
arch/sparc/include/asm/thread_info_32.h
+6
-1
arch/sparc/kernel/rtrap.S
arch/sparc/kernel/rtrap.S
+3
-2
arch/sparc/kernel/signal.c
arch/sparc/kernel/signal.c
+13
-1
未找到文件。
arch/sparc/include/asm/thread_info_32.h
浏览文件 @
5a157d5b
...
@@ -130,7 +130,7 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *)
...
@@ -130,7 +130,7 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *)
* thread information flag bit numbers
* thread information flag bit numbers
*/
*/
#define TIF_SYSCALL_TRACE 0
/* syscall trace active */
#define TIF_SYSCALL_TRACE 0
/* syscall trace active */
/* flag bit 1 is available
*/
#define TIF_NOTIFY_RESUME 1
/* callback before returning to user
*/
#define TIF_SIGPENDING 2
/* signal pending */
#define TIF_SIGPENDING 2
/* signal pending */
#define TIF_NEED_RESCHED 3
/* rescheduling necessary */
#define TIF_NEED_RESCHED 3
/* rescheduling necessary */
#define TIF_RESTORE_SIGMASK 4
/* restore signal mask in do_signal() */
#define TIF_RESTORE_SIGMASK 4
/* restore signal mask in do_signal() */
...
@@ -142,12 +142,17 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *)
...
@@ -142,12 +142,17 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *)
/* as above, but as bit values */
/* as above, but as bit values */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
#define _TIF_USEDFPU (1<<TIF_USEDFPU)
#define _TIF_USEDFPU (1<<TIF_USEDFPU)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | \
_TIF_SIGPENDING | \
_TIF_RESTORE_SIGMASK)
#endif
/* __KERNEL__ */
#endif
/* __KERNEL__ */
#endif
/* _ASM_THREAD_INFO_H */
#endif
/* _ASM_THREAD_INFO_H */
arch/sparc/kernel/rtrap.S
浏览文件 @
5a157d5b
...
@@ -69,12 +69,13 @@ ret_trap_lockless_ipi:
...
@@ -69,12 +69,13 @@ ret_trap_lockless_ipi:
ld
[%
curptr
+
TI_FLAGS
],
%
g2
ld
[%
curptr
+
TI_FLAGS
],
%
g2
signal_p
:
signal_p
:
andcc
%
g2
,
(
_TIF_SIGPENDING
|
_TIF_RESTORE_SIGMASK
)
,
%
g0
andcc
%
g2
,
_TIF_DO_NOTIFY_RESUME_MASK
,
%
g0
bz
,
a
ret_trap_continue
bz
,
a
ret_trap_continue
ld
[%
sp
+
STACKFRAME_SZ
+
PT_PSR
],
%
t_psr
ld
[%
sp
+
STACKFRAME_SZ
+
PT_PSR
],
%
t_psr
mov
%
g2
,
%
o2
mov
%
l5
,
%
o1
mov
%
l5
,
%
o1
call
do_
signal
call
do_
notify_resume
add
%
sp
,
STACKFRAME_SZ
,
%
o0
!
pt_regs
ptr
add
%
sp
,
STACKFRAME_SZ
,
%
o0
!
pt_regs
ptr
/
*
Fall
through
.
*/
/
*
Fall
through
.
*/
...
...
arch/sparc/kernel/signal.c
浏览文件 @
5a157d5b
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
#include <linux/smp.h>
#include <linux/smp.h>
#include <linux/binfmts.h>
/* do_coredum */
#include <linux/binfmts.h>
/* do_coredum */
#include <linux/bitops.h>
#include <linux/bitops.h>
#include <linux/tracehook.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
...
@@ -513,7 +514,7 @@ static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
...
@@ -513,7 +514,7 @@ static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
* want to handle. Thus you cannot kill init even with a SIGKILL even by
* want to handle. Thus you cannot kill init even with a SIGKILL even by
* mistake.
* mistake.
*/
*/
asmlinkage
void
do_signal
(
struct
pt_regs
*
regs
,
unsigned
long
orig_i0
)
static
void
do_signal
(
struct
pt_regs
*
regs
,
unsigned
long
orig_i0
)
{
{
struct
k_sigaction
ka
;
struct
k_sigaction
ka
;
int
restart_syscall
;
int
restart_syscall
;
...
@@ -579,6 +580,17 @@ asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0)
...
@@ -579,6 +580,17 @@ asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0)
}
}
}
}
void
do_notify_resume
(
struct
pt_regs
*
regs
,
unsigned
long
orig_i0
,
unsigned
long
thread_info_flags
)
{
if
(
thread_info_flags
&
(
_TIF_SIGPENDING
|
_TIF_RESTORE_SIGMASK
))
do_signal
(
regs
,
orig_i0
);
if
(
thread_info_flags
&
_TIF_NOTIFY_RESUME
)
{
clear_thread_flag
(
TIF_NOTIFY_RESUME
);
tracehook_notify_resume
(
regs
);
}
}
asmlinkage
int
asmlinkage
int
do_sys_sigstack
(
struct
sigstack
__user
*
ssptr
,
struct
sigstack
__user
*
ossptr
,
do_sys_sigstack
(
struct
sigstack
__user
*
ssptr
,
struct
sigstack
__user
*
ossptr
,
unsigned
long
sp
)
unsigned
long
sp
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录