Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
fbe4ef29
Commit
fbe4ef29
authored
Dec 09, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: Add sys_restart_syscall, from ppc32
parent
d9ef85c0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
25 deletions
+44
-25
arch/ppc64/kernel/misc.S
arch/ppc64/kernel/misc.S
+2
-2
arch/ppc64/kernel/signal.c
arch/ppc64/kernel/signal.c
+18
-8
arch/ppc64/kernel/signal32.c
arch/ppc64/kernel/signal32.c
+18
-8
include/asm-ppc64/errno.h
include/asm-ppc64/errno.h
+1
-7
include/asm-ppc64/thread_info.h
include/asm-ppc64/thread_info.h
+4
-0
include/asm-ppc64/unistd.h
include/asm-ppc64/unistd.h
+1
-0
No files found.
arch/ppc64/kernel/misc.S
View file @
fbe4ef29
...
...
@@ -508,7 +508,7 @@ _GLOBAL(kernel_thread)
/*
Why
isn
't this a) automatic, b) written in '
C
'? */
.
balign
8
_GLOBAL
(
sys_call_table32
)
.
llong
.
sys_
ni_syscall
/*
0
-
old
setup
syscall
*/
.
llong
.
sys_
restart_syscall
/*
0
*/
.
llong
.
sys_exit
.
llong
.
sys_fork
.
llong
.
sys_read
...
...
@@ -756,7 +756,7 @@ _GLOBAL(sys_call_table32)
.
balign
8
_GLOBAL
(
sys_call_table
)
.
llong
.
sys_
ni_syscall
/*
0
-
old
setup
syscall
*/
.
llong
.
sys_
restart_syscall
/*
0
*/
.
llong
.
sys_exit
.
llong
.
sys_fork
.
llong
.
sys_read
...
...
arch/ppc64/kernel/signal.c
View file @
fbe4ef29
...
...
@@ -450,9 +450,14 @@ static void handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
if
(
regs
->
trap
==
0x0C00
/* System Call! */
&&
((
int
)
regs
->
result
==
-
ERESTARTNOHAND
||
(
int
)
regs
->
result
==
-
ERESTART_RESTARTBLOCK
||
((
int
)
regs
->
result
==
-
ERESTARTSYS
&&
!
(
ka
->
sa
.
sa_flags
&
SA_RESTART
))))
!
(
ka
->
sa
.
sa_flags
&
SA_RESTART
))))
{
if
((
int
)
regs
->
result
==
-
ERESTART_RESTARTBLOCK
)
current_thread_info
()
->
restart_block
.
fn
=
do_no_restart_syscall
;
regs
->
result
=
-
EINTR
;
}
/* Set up Signal Frame */
if
(
ka
->
sa
.
sa_flags
&
SA_SIGINFO
)
{
...
...
@@ -560,13 +565,18 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
handle_signal
(
signr
,
&
info
,
oldset
,
regs
,
&
newsp
,
frame
);
}
if
(
regs
->
trap
==
0x0C00
/* System Call! */
&&
((
int
)
regs
->
result
==
-
ERESTARTNOHAND
||
(
int
)
regs
->
result
==
-
ERESTARTSYS
||
(
int
)
regs
->
result
==
-
ERESTARTNOINTR
))
{
regs
->
gpr
[
3
]
=
regs
->
orig_gpr3
;
regs
->
nip
-=
4
;
/* Back up & retry system call */
regs
->
result
=
0
;
if
(
regs
->
trap
==
0x0C00
)
{
/* System Call! */
if
((
int
)
regs
->
result
==
-
ERESTARTNOHAND
||
(
int
)
regs
->
result
==
-
ERESTARTSYS
||
(
int
)
regs
->
result
==
-
ERESTARTNOINTR
)
{
regs
->
gpr
[
3
]
=
regs
->
orig_gpr3
;
regs
->
nip
-=
4
;
/* Back up & retry system call */
regs
->
result
=
0
;
}
else
if
((
int
)
regs
->
result
==
-
ERESTART_RESTARTBLOCK
)
{
regs
->
gpr
[
0
]
=
__NR_restart_syscall
;
regs
->
nip
-=
4
;
regs
->
result
=
0
;
}
}
if
(
newsp
==
frame
)
...
...
arch/ppc64/kernel/signal32.c
View file @
fbe4ef29
...
...
@@ -968,9 +968,14 @@ static void handle_signal32(unsigned long sig, siginfo_t *info,
if
(
regs
->
trap
==
0x0C00
/* System Call! */
&&
((
int
)
regs
->
result
==
-
ERESTARTNOHAND
||
(
int
)
regs
->
result
==
-
ERESTART_RESTARTBLOCK
||
((
int
)
regs
->
result
==
-
ERESTARTSYS
&&
!
(
ka
->
sa
.
sa_flags
&
SA_RESTART
))))
!
(
ka
->
sa
.
sa_flags
&
SA_RESTART
))))
{
if
((
int
)
regs
->
result
==
-
ERESTART_RESTARTBLOCK
)
current_thread_info
()
->
restart_block
.
fn
=
do_no_restart_syscall
;
regs
->
result
=
-
EINTR
;
}
/*
* Set up the signal frame
...
...
@@ -1132,13 +1137,18 @@ int do_signal32(sigset_t *oldset, struct pt_regs *regs)
handle_signal32
(
signr
,
&
info
,
oldset
,
regs
,
&
newsp
,
frame
);
}
if
(
regs
->
trap
==
0x0C00
/* System Call! */
&&
((
int
)
regs
->
result
==
-
ERESTARTNOHAND
||
(
int
)
regs
->
result
==
-
ERESTARTSYS
||
(
int
)
regs
->
result
==
-
ERESTARTNOINTR
))
{
regs
->
gpr
[
3
]
=
regs
->
orig_gpr3
;
regs
->
nip
-=
4
;
/* Back up & retry system call */
regs
->
result
=
0
;
if
(
regs
->
trap
==
0x0C00
)
{
/* System Call! */
if
((
int
)
regs
->
result
==
-
ERESTARTNOHAND
||
(
int
)
regs
->
result
==
-
ERESTARTSYS
||
(
int
)
regs
->
result
==
-
ERESTARTNOINTR
)
{
regs
->
gpr
[
3
]
=
regs
->
orig_gpr3
;
regs
->
nip
-=
4
;
/* Back up & retry system call */
regs
->
result
=
0
;
}
else
if
((
int
)
regs
->
result
==
-
ERESTART_RESTARTBLOCK
)
{
regs
->
gpr
[
0
]
=
__NR_restart_syscall
;
regs
->
nip
-=
4
;
regs
->
result
=
0
;
}
}
if
(
newsp
==
frame
)
...
...
include/asm-ppc64/errno.h
View file @
fbe4ef29
...
...
@@ -13,12 +13,6 @@
#undef EDEADLOCK
#define EDEADLOCK 58
/* File locking deadlock error */
/* Should never be seen by user programs */
#define ERESTARTSYS 512
#define ERESTARTNOINTR 513
#define ERESTARTNOHAND 514
/* restart if no handler.. */
#define ENOIOCTLCMD 515
/* No ioctl command */
#define _LAST_ERRNO 515
#define _LAST_ERRNO 516
#endif
include/asm-ppc64/thread_info.h
View file @
fbe4ef29
...
...
@@ -23,6 +23,7 @@ struct thread_info {
unsigned
long
flags
;
/* low level flags */
int
cpu
;
/* cpu we're on */
int
preempt_count
;
/* not used at present */
struct
restart_block
restart_block
;
};
/*
...
...
@@ -37,6 +38,9 @@ struct thread_info {
.flags = 0, \
.cpu = 0, \
.preempt_count = 1, \
.restart_block = { \
.fn = do_no_restart_syscall, \
}, \
}
#define init_thread_info (init_thread_union.thread_info)
...
...
include/asm-ppc64/unistd.h
View file @
fbe4ef29
...
...
@@ -10,6 +10,7 @@
* 2 of the License, or (at your option) any later version.
*/
#define __NR_restart_syscall 0
#define __NR_exit 1
#define __NR_fork 2
#define __NR_read 3
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment