* [PATCH] move ioprio syscalls into syscalls.h
@ 2005-07-05 20:56 Anton Blanchard
2005-07-05 20:58 ` [PATCH] ppc64: sys_ppc32.c cleanups Anton Blanchard
2005-07-06 6:02 ` [PATCH] move ioprio syscalls into syscalls.h Jens Axboe
0 siblings, 2 replies; 5+ messages in thread
From: Anton Blanchard @ 2005-07-05 20:56 UTC (permalink / raw)
To: akpm; +Cc: axboe, linux-kernel
- Make ioprio syscalls return long, like set/getpriority syscalls.
- Move function prototypes into syscalls.h so we can pick them up in the
32/64bit compat code.
Signed-off-by: Anton Blanchard <anton@samba.org>
Index: foobar2/fs/ioprio.c
===================================================================
--- foobar2.orig/fs/ioprio.c 2005-07-04 01:09:20.311694190 +1000
+++ foobar2/fs/ioprio.c 2005-07-04 01:14:30.620438688 +1000
@@ -43,7 +43,7 @@
return 0;
}
-asmlinkage int sys_ioprio_set(int which, int who, int ioprio)
+asmlinkage long sys_ioprio_set(int which, int who, int ioprio)
{
int class = IOPRIO_PRIO_CLASS(ioprio);
int data = IOPRIO_PRIO_DATA(ioprio);
@@ -115,7 +115,7 @@
return ret;
}
-asmlinkage int sys_ioprio_get(int which, int who)
+asmlinkage long sys_ioprio_get(int which, int who)
{
struct task_struct *g, *p;
struct user_struct *user;
Index: foobar2/include/linux/syscalls.h
===================================================================
--- foobar2.orig/include/linux/syscalls.h 2005-07-04 01:09:20.311694190 +1000
+++ foobar2/include/linux/syscalls.h 2005-07-04 01:14:43.583415901 +1000
@@ -506,4 +506,7 @@
asmlinkage long sys_keyctl(int cmd, unsigned long arg2, unsigned long arg3,
unsigned long arg4, unsigned long arg5);
+asmlinkage long sys_ioprio_set(int which, int who, int ioprio);
+asmlinkage long sys_ioprio_get(int which, int who);
+
#endif
Index: foobar2/include/linux/ioprio.h
===================================================================
--- foobar2.orig/include/linux/ioprio.h 2005-07-02 15:56:13.000000000 +1000
+++ foobar2/include/linux/ioprio.h 2005-07-04 01:16:44.216312182 +1000
@@ -34,9 +34,6 @@
*/
#define IOPRIO_BE_NR (8)
-asmlinkage int sys_ioprio_set(int, int, int);
-asmlinkage int sys_ioprio_get(int, int);
-
enum {
IOPRIO_WHO_PROCESS = 1,
IOPRIO_WHO_PGRP,
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH] ppc64: sys_ppc32.c cleanups
2005-07-05 20:56 [PATCH] move ioprio syscalls into syscalls.h Anton Blanchard
@ 2005-07-05 20:58 ` Anton Blanchard
2005-07-05 21:02 ` [PATCH] ppc64: add ioprio syscalls Anton Blanchard
2005-07-06 6:02 ` [PATCH] move ioprio syscalls into syscalls.h Jens Axboe
1 sibling, 1 reply; 5+ messages in thread
From: Anton Blanchard @ 2005-07-05 20:58 UTC (permalink / raw)
To: akpm; +Cc: paulus, linux-kernel
Remove some unnecessary includes, an out of date comment and a prototype
for sys_timer_create (which is now in syscalls.h)
Signed-off-by: Anton Blanchard <anton@samba.org>
Index: foobar2/arch/ppc64/kernel/sys_ppc32.c
===================================================================
--- foobar2.orig/arch/ppc64/kernel/sys_ppc32.c 2005-07-04 01:09:20.310694267 +1000
+++ foobar2/arch/ppc64/kernel/sys_ppc32.c 2005-07-04 01:14:30.618438841 +1000
@@ -30,47 +30,26 @@
#include <linux/sem.h>
#include <linux/msg.h>
#include <linux/shm.h>
-#include <linux/slab.h>
-#include <linux/uio.h>
-#include <linux/aio.h>
-#include <linux/nfs_fs.h>
-#include <linux/module.h>
-#include <linux/sunrpc/svc.h>
-#include <linux/nfsd/nfsd.h>
-#include <linux/nfsd/cache.h>
-#include <linux/nfsd/xdr.h>
-#include <linux/nfsd/syscall.h>
#include <linux/poll.h>
#include <linux/personality.h>
#include <linux/stat.h>
-#include <linux/filter.h>
-#include <linux/highmem.h>
-#include <linux/highuid.h>
#include <linux/mman.h>
-#include <linux/ipv6.h>
#include <linux/in.h>
-#include <linux/icmpv6.h>
#include <linux/syscalls.h>
#include <linux/unistd.h>
#include <linux/sysctl.h>
#include <linux/binfmts.h>
-#include <linux/dnotify.h>
#include <linux/security.h>
#include <linux/compat.h>
#include <linux/ptrace.h>
-#include <linux/aio_abi.h>
#include <linux/elf.h>
-#include <net/scm.h>
-#include <net/sock.h>
-
#include <asm/ptrace.h>
#include <asm/types.h>
#include <asm/ipc.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
#include <asm/semaphore.h>
-#include <asm/ppcdebug.h>
#include <asm/time.h>
#include <asm/mmu_context.h>
#include <asm/systemcfg.h>
@@ -350,8 +329,6 @@
return ret;
}
-
-/* These are here just in case some old sparc32 binary calls it. */
asmlinkage long sys32_pause(void)
{
current->state = TASK_INTERRUPTIBLE;
@@ -360,8 +337,6 @@
return -ERESTARTNOHAND;
}
-
-
static inline long get_ts32(struct timespec *o, struct compat_timeval __user *i)
{
long usec;
@@ -1273,8 +1255,6 @@
(u64)len_high << 32 | len_low, advice);
}
-extern asmlinkage long sys_timer_create(clockid_t, sigevent_t __user *, timer_t __user *);
-
long ppc32_timer_create(clockid_t clock,
struct compat_sigevent __user *ev32,
timer_t __user *timer_id)
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH] ppc64: add ioprio syscalls
2005-07-05 20:58 ` [PATCH] ppc64: sys_ppc32.c cleanups Anton Blanchard
@ 2005-07-05 21:02 ` Anton Blanchard
2005-07-05 21:04 ` [PATCH] ppc64: remove duplicate syscall reservation Anton Blanchard
0 siblings, 1 reply; 5+ messages in thread
From: Anton Blanchard @ 2005-07-05 21:02 UTC (permalink / raw)
To: akpm; +Cc: paulus, linux-kernel
- Clean up sys32_getpriority comment.
- Add ioprio syscalls, and sign extend 32bit versions.
Signed-off-by: Anton Blanchard <anton@samba.org>
Index: linux-2.6.git-work/arch/ppc64/kernel/sys_ppc32.c
===================================================================
--- linux-2.6.git-work.orig/arch/ppc64/kernel/sys_ppc32.c 2005-07-06 01:16:21.000000000 +1000
+++ linux-2.6.git-work/arch/ppc64/kernel/sys_ppc32.c 2005-07-06 01:16:35.000000000 +1000
@@ -822,16 +822,6 @@
}
-/* Note: it is necessary to treat which and who as unsigned ints,
- * with the corresponding cast to a signed int to insure that the
- * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
- * and the register representation of a signed int (msr in 64-bit mode) is performed.
- */
-asmlinkage long sys32_getpriority(u32 which, u32 who)
-{
- return sys_getpriority((int)which, (int)who);
-}
-
/* Note: it is necessary to treat pid as an unsigned int,
* with the corresponding cast to a signed int to insure that the
@@ -1023,6 +1013,11 @@
return sys_setpgid((int)pid, (int)pgid);
}
+long sys32_getpriority(u32 which, u32 who)
+{
+ /* sign extend which and who */
+ return sys_getpriority((int)which, (int)who);
+}
long sys32_setpriority(u32 which, u32 who, u32 niceval)
{
@@ -1030,6 +1025,18 @@
return sys_setpriority((int)which, (int)who, (int)niceval);
}
+long sys32_ioprio_get(u32 which, u32 who)
+{
+ /* sign extend which and who */
+ return sys_ioprio_get((int)which, (int)who);
+}
+
+long sys32_ioprio_set(u32 which, u32 who, u32 ioprio)
+{
+ /* sign extend which, who and ioprio */
+ return sys_ioprio_set((int)which, (int)who, (int)ioprio);
+}
+
/* Note: it is necessary to treat newmask as an unsigned int,
* with the corresponding cast to a signed int to insure that the
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
Index: linux-2.6.git-work/include/asm-ppc64/unistd.h
===================================================================
--- linux-2.6.git-work.orig/include/asm-ppc64/unistd.h 2005-07-06 01:16:17.000000000 +1000
+++ linux-2.6.git-work/include/asm-ppc64/unistd.h 2005-07-06 01:16:35.000000000 +1000
@@ -283,8 +283,10 @@
#define __NR_request_key 270
#define __NR_keyctl 271
#define __NR_waitid 272
+#define __NR_ioprio_set 273
+#define __NR_ioprio_get 274
-#define __NR_syscalls 273
+#define __NR_syscalls 275
#ifdef __KERNEL__
#define NR_syscalls __NR_syscalls
#endif
Index: linux-2.6.git-work/arch/ppc64/kernel/misc.S
===================================================================
--- linux-2.6.git-work.orig/arch/ppc64/kernel/misc.S 2005-07-06 01:04:40.000000000 +1000
+++ linux-2.6.git-work/arch/ppc64/kernel/misc.S 2005-07-06 01:16:35.000000000 +1000
@@ -1124,9 +1124,11 @@
.llong .compat_sys_mq_getsetattr
.llong .compat_sys_kexec_load
.llong .sys32_add_key
- .llong .sys32_request_key
+ .llong .sys32_request_key /* 270 */
.llong .compat_sys_keyctl
.llong .compat_sys_waitid
+ .llong .sys32_ioprio_set
+ .llong .sys32_ioprio_get
.balign 8
_GLOBAL(sys_call_table)
@@ -1403,3 +1405,5 @@
.llong .sys_request_key /* 270 */
.llong .sys_keyctl
.llong .sys_waitid
+ .llong .sys_ioprio_set
+ .llong .sys_ioprio_get
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH] ppc64: remove duplicate syscall reservation
2005-07-05 21:02 ` [PATCH] ppc64: add ioprio syscalls Anton Blanchard
@ 2005-07-05 21:04 ` Anton Blanchard
0 siblings, 0 replies; 5+ messages in thread
From: Anton Blanchard @ 2005-07-05 21:04 UTC (permalink / raw)
To: akpm; +Cc: paulus, linux-kernel
We already have a prototype for sys_remap_file_pages (239) so there is no
need to reserve it twice.
Signed-off-by: Anton Blanchard <anton@samba.org>
Index: linux-2.6.git-work/include/asm-ppc/unistd.h
===================================================================
--- linux-2.6.git-work.orig/include/asm-ppc/unistd.h 2005-07-02 08:20:44.000000000 +1000
+++ linux-2.6.git-work/include/asm-ppc/unistd.h 2005-07-23 23:48:50.000000000 +1000
@@ -262,7 +262,7 @@
#define __NR_rtas 255
#define __NR_sys_debug_setcontext 256
/* Number 257 is reserved for vserver */
-/* Number 258 is reserved for new sys_remap_file_pages */
+/* 258 currently unused */
/* Number 259 is reserved for new sys_mbind */
/* Number 260 is reserved for new sys_get_mempolicy */
/* Number 261 is reserved for new sys_set_mempolicy */
Index: linux-2.6.git-work/include/asm-ppc64/unistd.h
===================================================================
--- linux-2.6.git-work.orig/include/asm-ppc64/unistd.h 2005-07-02 08:20:47.000000000 +1000
+++ linux-2.6.git-work/include/asm-ppc64/unistd.h 2005-07-23 23:51:56.000000000 +1000
@@ -268,7 +268,7 @@
#define __NR_rtas 255
/* Number 256 is reserved for sys_debug_setcontext */
/* Number 257 is reserved for vserver */
-/* Number 258 is reserved for new sys_remap_file_pages */
+/* 258 currently unused */
#define __NR_mbind 259
#define __NR_get_mempolicy 260
#define __NR_set_mempolicy 261
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] move ioprio syscalls into syscalls.h
2005-07-05 20:56 [PATCH] move ioprio syscalls into syscalls.h Anton Blanchard
2005-07-05 20:58 ` [PATCH] ppc64: sys_ppc32.c cleanups Anton Blanchard
@ 2005-07-06 6:02 ` Jens Axboe
1 sibling, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2005-07-06 6:02 UTC (permalink / raw)
To: Anton Blanchard; +Cc: akpm, linux-kernel
On Wed, Jul 06 2005, Anton Blanchard wrote:
>
> - Make ioprio syscalls return long, like set/getpriority syscalls.
> - Move function prototypes into syscalls.h so we can pick them up in the
> 32/64bit compat code.
>
> Signed-off-by: Anton Blanchard <anton@samba.org>
Thanks Anton.
Signed-off-by: Jens Axboe <axboe@suse.de>
>
> Index: foobar2/fs/ioprio.c
> ===================================================================
> --- foobar2.orig/fs/ioprio.c 2005-07-04 01:09:20.311694190 +1000
> +++ foobar2/fs/ioprio.c 2005-07-04 01:14:30.620438688 +1000
> @@ -43,7 +43,7 @@
> return 0;
> }
>
> -asmlinkage int sys_ioprio_set(int which, int who, int ioprio)
> +asmlinkage long sys_ioprio_set(int which, int who, int ioprio)
> {
> int class = IOPRIO_PRIO_CLASS(ioprio);
> int data = IOPRIO_PRIO_DATA(ioprio);
> @@ -115,7 +115,7 @@
> return ret;
> }
>
> -asmlinkage int sys_ioprio_get(int which, int who)
> +asmlinkage long sys_ioprio_get(int which, int who)
> {
> struct task_struct *g, *p;
> struct user_struct *user;
> Index: foobar2/include/linux/syscalls.h
> ===================================================================
> --- foobar2.orig/include/linux/syscalls.h 2005-07-04 01:09:20.311694190 +1000
> +++ foobar2/include/linux/syscalls.h 2005-07-04 01:14:43.583415901 +1000
> @@ -506,4 +506,7 @@
> asmlinkage long sys_keyctl(int cmd, unsigned long arg2, unsigned long arg3,
> unsigned long arg4, unsigned long arg5);
>
> +asmlinkage long sys_ioprio_set(int which, int who, int ioprio);
> +asmlinkage long sys_ioprio_get(int which, int who);
> +
> #endif
> Index: foobar2/include/linux/ioprio.h
> ===================================================================
> --- foobar2.orig/include/linux/ioprio.h 2005-07-02 15:56:13.000000000 +1000
> +++ foobar2/include/linux/ioprio.h 2005-07-04 01:16:44.216312182 +1000
> @@ -34,9 +34,6 @@
> */
> #define IOPRIO_BE_NR (8)
>
> -asmlinkage int sys_ioprio_set(int, int, int);
> -asmlinkage int sys_ioprio_get(int, int);
> -
> enum {
> IOPRIO_WHO_PROCESS = 1,
> IOPRIO_WHO_PGRP,
>
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-07-06 7:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-05 20:56 [PATCH] move ioprio syscalls into syscalls.h Anton Blanchard
2005-07-05 20:58 ` [PATCH] ppc64: sys_ppc32.c cleanups Anton Blanchard
2005-07-05 21:02 ` [PATCH] ppc64: add ioprio syscalls Anton Blanchard
2005-07-05 21:04 ` [PATCH] ppc64: remove duplicate syscall reservation Anton Blanchard
2005-07-06 6:02 ` [PATCH] move ioprio syscalls into syscalls.h Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox