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
f048bb4b
Commit
f048bb4b
authored
May 17, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: Add get/setaffinity syscalls, from sparc64
parent
4b62567f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
2 deletions
+63
-2
arch/ppc64/kernel/misc.S
arch/ppc64/kernel/misc.S
+10
-2
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+50
-0
include/asm-ppc64/unistd.h
include/asm-ppc64/unistd.h
+3
-0
No files found.
arch/ppc64/kernel/misc.S
View file @
f048bb4b
...
@@ -722,7 +722,11 @@ _GLOBAL(sys_call_table32)
...
@@ -722,7 +722,11 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys_lremovexattr
.
llong
.
sys_lremovexattr
.
llong
.
sys_fremovexattr
/*
220
*/
.
llong
.
sys_fremovexattr
/*
220
*/
.
llong
.
sys_futex
.
llong
.
sys_futex
.
rept
NR_syscalls
-
221
.
llong
.
sys_ni_syscall
/*
reserved
for
tux
*/
.
llong
.
sys32_sched_setaffinity
.
llong
.
sys32_sched_getaffinity
.
rept
NR_syscalls
-
224
.
llong
.
sys_ni_syscall
.
llong
.
sys_ni_syscall
.
endr
.
endr
#endif
#endif
...
@@ -951,6 +955,10 @@ _GLOBAL(sys_call_table)
...
@@ -951,6 +955,10 @@ _GLOBAL(sys_call_table)
.
llong
.
sys_lremovexattr
.
llong
.
sys_lremovexattr
.
llong
.
sys_fremovexattr
/*
220
*/
.
llong
.
sys_fremovexattr
/*
220
*/
.
llong
.
sys_futex
.
llong
.
sys_futex
.
rept
NR_syscalls
-
221
.
llong
.
sys_ni_syscall
/*
reserved
for
tux
*/
.
llong
.
sys_sched_setaffinity
.
llong
.
sys_sched_getaffinity
.
rept
NR_syscalls
-
224
.
llong
.
sys_ni_syscall
.
llong
.
sys_ni_syscall
.
endr
.
endr
arch/ppc64/kernel/sys_ppc32.c
View file @
f048bb4b
...
@@ -4671,3 +4671,53 @@ asmlinkage long sys32_time(__kernel_time_t32* tloc)
...
@@ -4671,3 +4671,53 @@ asmlinkage long sys32_time(__kernel_time_t32* tloc)
return
secs
;
return
secs
;
}
}
extern
asmlinkage
int
sys_sched_setaffinity
(
pid_t
pid
,
unsigned
int
len
,
unsigned
long
*
user_mask_ptr
);
asmlinkage
int
sys32_sched_setaffinity
(
__kernel_pid_t32
pid
,
unsigned
int
len
,
u32
*
user_mask_ptr
)
{
unsigned
long
kernel_mask
;
mm_segment_t
old_fs
;
int
ret
;
if
(
get_user
(
kernel_mask
,
user_mask_ptr
))
return
-
EFAULT
;
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
ret
=
sys_sched_setaffinity
(
pid
,
/* XXX Nice api... */
sizeof
(
kernel_mask
),
&
kernel_mask
);
set_fs
(
old_fs
);
return
ret
;
}
extern
asmlinkage
int
sys_sched_getaffinity
(
pid_t
pid
,
unsigned
int
len
,
unsigned
long
*
user_mask_ptr
);
asmlinkage
int
sys32_sched_getaffinity
(
__kernel_pid_t32
pid
,
unsigned
int
len
,
u32
*
user_mask_ptr
)
{
unsigned
long
kernel_mask
;
mm_segment_t
old_fs
;
int
ret
;
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
ret
=
sys_sched_getaffinity
(
pid
,
/* XXX Nice api... */
sizeof
(
kernel_mask
),
&
kernel_mask
);
set_fs
(
old_fs
);
if
(
ret
==
0
)
{
if
(
put_user
(
kernel_mask
,
user_mask_ptr
))
ret
=
-
EFAULT
;
}
return
ret
;
}
include/asm-ppc64/unistd.h
View file @
f048bb4b
...
@@ -230,6 +230,9 @@
...
@@ -230,6 +230,9 @@
#define __NR_lremovexattr 219
#define __NR_lremovexattr 219
#define __NR_fremovexattr 220
#define __NR_fremovexattr 220
#define __NR_futex 221
#define __NR_futex 221
#define __NR_tux 222
#define __NR_sched_setaffinity 223
#define __NR_sched_getaffinity 224
#if 0
#if 0
/* Remind paulus to add these into ppc32 */
/* Remind paulus to add these into ppc32 */
...
...
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