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
nexedi
linux
Commits
285a7c9f
Commit
285a7c9f
authored
Dec 20, 2002
by
Miles Bader
Committed by
Linus Torvalds
Dec 20, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Add v850 support for `sys_restart_syscall'
parent
31c9fa59
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
25 deletions
+42
-25
arch/v850/kernel/entry.S
arch/v850/kernel/entry.S
+1
-1
arch/v850/kernel/signal.c
arch/v850/kernel/signal.c
+22
-13
include/asm-v850/current.h
include/asm-v850/current.h
+4
-1
include/asm-v850/processor.h
include/asm-v850/processor.h
+3
-1
include/asm-v850/thread_info.h
include/asm-v850/thread_info.h
+11
-9
include/asm-v850/unistd.h
include/asm-v850/unistd.h
+1
-0
No files found.
arch/v850/kernel/entry.S
View file @
285a7c9f
...
...
@@ -781,7 +781,7 @@ C_END(trap_table)
.
align
4
C_DATA
(
sys_call_table
):
.
long
CSYM
(
sys_
ni_syscall
)
//
0
-
old
"setup()"
system
call
.
long
CSYM
(
sys_
restart_syscall
)
//
0
.
long
CSYM
(
sys_exit
)
.
long
sys_fork_wrapper
.
long
CSYM
(
sys_read
)
...
...
arch/v850/kernel/signal.c
View file @
285a7c9f
...
...
@@ -439,6 +439,10 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
if
(
PT_REGS_SYSCALL
(
regs
))
{
/* If so, check system call restarting.. */
switch
(
regs
->
gpr
[
GPR_RVAL
])
{
case
-
ERESTART_RESTARTBLOCK
:
current_thread_info
()
->
restart_block
.
fn
=
do_no_restart_syscall
;
/* fall through */
case
-
ERESTARTNOHAND
:
regs
->
gpr
[
GPR_RVAL
]
=
-
EINTR
;
break
;
...
...
@@ -510,14 +514,19 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
/* Did we come from a system call? */
if
(
PT_REGS_SYSCALL
(
regs
))
{
int
rval
=
(
int
)
regs
->
gpr
[
GPR_RVAL
];
/* Restart the system call - no handlers present */
if
(
r
egs
->
gpr
[
GPR_RVAL
]
==
(
v850_reg_t
)
-
ERESTARTNOHAND
||
regs
->
gpr
[
GPR_RVAL
]
==
(
v850_reg_t
)
-
ERESTARTSYS
||
regs
->
gpr
[
GPR_RVAL
]
==
(
v850_reg_t
)
-
ERESTARTNOINTR
)
if
(
r
val
==
-
ERESTARTNOHAND
||
rval
==
-
ERESTARTSYS
||
rval
==
-
ERESTARTNOINTR
)
{
regs
->
gpr
[
12
]
=
PT_REGS_SYSCALL
(
regs
);
regs
->
pc
-=
4
;
/* Size of `trap 0' insn. */
}
else
if
(
rval
==
-
ERESTART_RESTARTBLOCK
)
{
regs
->
gpr
[
12
]
=
__NR_restart_syscall
;
regs
->
pc
-=
4
;
/* Size of `trap 0' insn. */
}
}
return
0
;
}
include/asm-v850/current.h
View file @
285a7c9f
...
...
@@ -14,8 +14,11 @@
#ifndef __V850_CURRENT_H__
#define __V850_CURRENT_H__
#ifndef __ASSEMBLY__
/* <linux/thread_info.h> is not asm-safe. */
#include <linux/thread_info.h>
#endif
#include <asm/macrology.h>
#include <asm/thread_info.h>
/* Register used to hold the current task pointer while in the kernel.
...
...
include/asm-v850/processor.h
View file @
285a7c9f
...
...
@@ -15,9 +15,11 @@
#define __V850_PROCESSOR_H__
#include <linux/config.h>
#ifndef __ASSEMBLY__
/* <linux/thread_info.h> is not asm-safe. */
#include <linux/thread_info.h>
#endif
#include <asm/ptrace.h>
#include <asm/thread_info.h>
#include <asm/entry.h>
/* Some code expects `segment' stuff to be defined here. */
...
...
include/asm-v850/thread_info.h
View file @
285a7c9f
...
...
@@ -31,6 +31,7 @@ struct thread_info {
unsigned
long
flags
;
/* low level flags */
int
cpu
;
/* cpu we're on */
int
preempt_count
;
struct
restart_block
restart_block
;
};
#define INIT_THREAD_INFO(tsk) \
...
...
@@ -39,7 +40,10 @@ struct thread_info {
.exec_domain = &default_exec_domain, \
.flags = 0, \
.cpu = 0, \
.preempt_count = 1 \
.preempt_count = 1, \
.restart_block = { \
.fn = do_no_restart_syscall, \
}, \
}
#define init_thread_info (init_thread_union.thread_info)
...
...
@@ -67,8 +71,6 @@ struct thread_info {
#define TI_FLAGS 8
#define TI_CPU 12
#define TI_PREEMPT 16
#define TI_SOFTIRQ 20
#define TI_HARDIRQ 24
#define PREEMPT_ACTIVE 0x4000000
...
...
include/asm-v850/unistd.h
View file @
285a7c9f
...
...
@@ -16,6 +16,7 @@
#include <asm/clinkage.h>
#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