Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux-vs
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
linux-arm
linux-vs
Commits
a53bb24e
Commit
a53bb24e
authored
13 years ago
by
Al Viro
Browse files
Options
Downloads
Patches
Plain Diff
xtensa: add handling of TIF_NOTIFY_RESUME
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
83140191
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
arch/xtensa/include/asm/thread_info.h
+1
-0
1 addition, 0 deletions
arch/xtensa/include/asm/thread_info.h
arch/xtensa/kernel/entry.S
+3
-2
3 additions, 2 deletions
arch/xtensa/kernel/entry.S
arch/xtensa/kernel/signal.c
+16
-4
16 additions, 4 deletions
arch/xtensa/kernel/signal.c
with
20 additions
and
6 deletions
arch/xtensa/include/asm/thread_info.h
+
1
−
0
View file @
a53bb24e
...
...
@@ -131,6 +131,7 @@ static inline struct thread_info *current_thread_info(void)
#define TIF_IRET 4
/* return with iret */
#define TIF_MEMDIE 5
/* is terminating due to OOM killer */
#define TIF_RESTORE_SIGMASK 6
/* restore signal mask in do_signal() */
#define TIF_NOTIFY_RESUME 7
/* callback before returning to user */
#define TIF_POLLING_NRFLAG 16
/* true if poll_idle() is polling TIF_NEED_RESCHED */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
...
...
This diff is collapsed.
Click to expand it.
arch/xtensa/kernel/entry.S
+
3
−
2
View file @
a53bb24e
...
...
@@ -409,14 +409,15 @@ common_exception_return:
l32i
a4
,
a2
,
TI_FLAGS
_bbsi
.
l
a4
,
TIF_NEED_RESCHED
,
3
f
_bbsi
.
l
a4
,
TIF_NOTIFY_RESUME
,
2
f
_bbci
.
l
a4
,
TIF_SIGPENDING
,
4
f
l32i
a4
,
a1
,
PT_DEPC
2
:
l32i
a4
,
a1
,
PT_DEPC
bgeui
a4
,
VALID_DOUBLE_EXCEPTION_ADDRESS
,
4
f
/
*
Call
do_signal
()
*/
movi
a4
,
do_
signal
#
int
do_signal
(
struct
pt_regs
*
,
sigset_t
*
)
movi
a4
,
do_
notify_resume
#
int
do_notify_resume
(
struct
pt_regs
*)
mov
a6
,
a1
callx4
a4
j
1
b
...
...
This diff is collapsed.
Click to expand it.
arch/xtensa/kernel/signal.c
+
16
−
4
View file @
a53bb24e
...
...
@@ -20,6 +20,7 @@
#include
<linux/ptrace.h>
#include
<linux/personality.h>
#include
<linux/freezer.h>
#include
<linux/tracehook.h>
#include
<asm/ucontext.h>
#include
<asm/uaccess.h>
...
...
@@ -446,16 +447,13 @@ asmlinkage long xtensa_sigaltstack(const stack_t __user *uss,
* the kernel can handle, and then we build all the user-level signal handling
* stack-frames in one go after that.
*/
void
do_signal
(
struct
pt_regs
*
regs
)
static
void
do_signal
(
struct
pt_regs
*
regs
)
{
siginfo_t
info
;
int
signr
;
struct
k_sigaction
ka
;
sigset_t
oldset
;
if
(
!
user_mode
(
regs
))
return
;
if
(
try_to_freeze
())
goto
no_signal
;
...
...
@@ -542,3 +540,17 @@ void do_signal(struct pt_regs *regs)
return
;
}
void
do_notify_resume
(
struct
pt_regs
*
regs
)
{
if
(
!
user_mode
(
regs
))
return
;
if
(
test_thread_flag
(
TIF_SIGPENDING
))
do_signal
(
regs
);
if
(
test_and_clear_thread_flag
(
TIF_NOTIFY_RESUME
))
{
tracehook_notify_resume
(
regs
);
if
(
current
->
replacement_session_keyring
)
key_replace_session_keyring
();
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment