Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidKernelMSM
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidKernelMSM
Commits
cf52c468
Commit
cf52c468
authored
Aug 30, 2009
by
Chen Liqin
Browse files
Options
Downloads
Patches
Plain Diff
score: add old syscall support
parent
324f40fb
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
arch/score/include/asm/unistd.h
+5
-0
5 additions, 0 deletions
arch/score/include/asm/unistd.h
arch/score/kernel/entry.S
+13
-0
13 additions, 0 deletions
arch/score/kernel/entry.S
arch/score/kernel/sys_score.c
+22
-2
22 additions, 2 deletions
arch/score/kernel/sys_score.c
with
40 additions
and
2 deletions
arch/score/include/asm/unistd.h
+
5
−
0
View file @
cf52c468
...
...
@@ -3,6 +3,11 @@
#define __ARCH_HAVE_MMU
#define __ARCH_WANT_SYSCALL_NO_AT
#define __ARCH_WANT_SYSCALL_NO_FLAGS
#define __ARCH_WANT_SYSCALL_OFF_T
#define __ARCH_WANT_SYSCALL_DEPRECATED
#include
<asm-generic/unistd.h>
#endif
/* _ASM_SCORE_UNISTD_H */
This diff is collapsed.
Click to expand it.
arch/score/kernel/entry.S
+
13
−
0
View file @
cf52c468
...
...
@@ -499,3 +499,16 @@ ENTRY(sys_sigaltstack)
mv
r4
,
r0
la
r8
,
score_sigaltstack
br
r8
#ifdef __ARCH_WANT_SYSCALL_DEPRECATED
ENTRY
(
sys_fork
)
mv
r4
,
r0
la
r8
,
score_fork
br
r8
ENTRY
(
sys_vfork
)
mv
r4
,
r0
la
r8
,
score_vfork
br
r8
#endif /* __ARCH_WANT_SYSCALL_DEPRECATED */
This diff is collapsed.
Click to expand it.
arch/score/kernel/sys_score.c
+
22
−
2
View file @
cf52c468
...
...
@@ -25,6 +25,7 @@
#include
<linux/file.h>
#include
<linux/fs.h>
#include
<linux/mm.h>
#include
<linux/mman.h>
#include
<linux/module.h>
#include
<linux/unistd.h>
...
...
@@ -49,8 +50,7 @@ sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
}
down_write
(
&
current
->
mm
->
mmap_sem
);
error
=
do_mmap_pgoff
(
file
,
addr
,
len
,
prot
,
flags
,
pgoff
>>
(
PAGE_SHIFT
-
12
));
error
=
do_mmap_pgoff
(
file
,
addr
,
len
,
prot
,
flags
,
pgoff
);
up_write
(
&
current
->
mm
->
mmap_sem
);
if
(
file
)
...
...
@@ -59,6 +59,19 @@ sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot,
return
error
;
}
asmlinkage
long
sys_mmap
(
unsigned
long
addr
,
unsigned
long
len
,
unsigned
long
prot
,
unsigned
long
flags
,
unsigned
long
fd
,
off_t
pgoff
)
{
return
sys_mmap2
(
addr
,
len
,
prot
,
flags
,
fd
,
pgoff
>>
PAGE_SHIFT
);
}
asmlinkage
long
score_fork
(
struct
pt_regs
*
regs
)
{
return
do_fork
(
SIGCHLD
,
regs
->
regs
[
0
],
regs
,
0
,
NULL
,
NULL
);
}
/*
* Clone a task - this clones the calling program thread.
* This is called indirectly via a small wrapper
...
...
@@ -81,6 +94,13 @@ score_clone(struct pt_regs *regs)
parent_tidptr
,
child_tidptr
);
}
asmlinkage
long
score_vfork
(
struct
pt_regs
*
regs
)
{
return
do_fork
(
CLONE_VFORK
|
CLONE_VM
|
SIGCHLD
,
regs
->
regs
[
0
],
regs
,
0
,
NULL
,
NULL
);
}
/*
* sys_execve() executes a new program.
* This is called indirectly via a small wrapper
...
...
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