public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: akpm@osdl.org
Cc: paulus@samba.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ppc64: add ioprio syscalls
Date: Wed, 6 Jul 2005 07:02:04 +1000	[thread overview]
Message-ID: <20050705210204.GH12786@krispykreme> (raw)
In-Reply-To: <20050705205804.GG12786@krispykreme>


- 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

  reply	other threads:[~2005-07-05 21:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Anton Blanchard [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050705210204.GH12786@krispykreme \
    --to=anton@samba.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox