mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: ralf@gnu.org
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: [PATCH][COMPAT] compat_{old_}sigset_t mips64 part
Date: Wed, 15 Jan 2003 17:46:02 +1100	[thread overview]
Message-ID: <20030115174602.014aac4d.sfr@canb.auug.org.au> (raw)
In-Reply-To: <20030115173415.33e172c2.sfr@canb.auug.org.au>

Hi Ralf,

Here is the mips64 part of the patch.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff -ruN 2.5.58-32bit.4/arch/mips64/kernel/signal32.c 2.5.58-32bit.5/arch/mips64/kernel/signal32.c
--- 2.5.58-32bit.4/arch/mips64/kernel/signal32.c	2003-01-02 15:13:45.000000000 +1100
+++ 2.5.58-32bit.5/arch/mips64/kernel/signal32.c	2003-01-15 16:12:21.000000000 +1100
@@ -39,20 +39,13 @@
 
 /* 32-bit compatibility types */
 
-#define _NSIG32_BPW	32
-#define _NSIG32_WORDS	(_NSIG / _NSIG32_BPW)
-
-typedef struct {
-	unsigned int sig[_NSIG32_WORDS];
-} sigset32_t;
-
 typedef unsigned int __sighandler32_t;
 typedef void (*vfptr_t)(void);
 
 struct sigaction32 {
 	unsigned int		sa_flags;
 	__sighandler32_t	sa_handler;
-	sigset32_t		sa_mask;
+	compat_sigset_t		sa_mask;
 	unsigned int		sa_restorer;
 	int			sa_resv[1];     /* reserved */
 };
@@ -98,7 +91,7 @@
 extern void __get_sigset_unknown_nsig(void);
 
 static inline int
-put_sigset(const sigset_t *kbuf, sigset32_t *ubuf)
+put_sigset(const sigset_t *kbuf, compat_sigset_t *ubuf)
 {
 	int err = 0;
 
@@ -120,7 +113,7 @@
 }
 
 static inline int
-get_sigset(sigset_t *kbuf, const sigset32_t *ubuf)
+get_sigset(sigset_t *kbuf, const compat_sigset_t *ubuf)
 {
 	int err = 0;
 	unsigned long sig[4];
@@ -150,11 +143,11 @@
 asmlinkage inline int
 sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
 {
-	sigset32_t *uset;
+	compat_sigset_t *uset;
 	sigset_t newset, saveset;
 
 	save_static(&regs);
-	uset = (sigset32_t *) regs.regs[4];
+	uset = (compat_sigset_t *) regs.regs[4];
 	if (get_sigset(&newset, uset))
 		return -EFAULT;
 	sigdelsetmask(&newset, ~_BLOCKABLE);
@@ -178,17 +171,17 @@
 asmlinkage int
 sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
 {
-	sigset32_t *uset;
+	compat_sigset_t *uset;
 	sigset_t newset, saveset;
         size_t sigsetsize;
 
 	save_static(&regs);
 	/* XXX Don't preclude handling different sized sigset_t's.  */
 	sigsetsize = regs.regs[5];
-	if (sigsetsize != sizeof(sigset32_t))
+	if (sigsetsize != sizeof(compat_sigset_t))
 		return -EINVAL;
 
-	uset = (sigset32_t *) regs.regs[4];
+	uset = (compat_sigset_t *) regs.regs[4];
 	if (get_sigset(&newset, uset))
 		return -EFAULT;
 	sigdelsetmask(&newset, ~_BLOCKABLE);
@@ -704,8 +697,8 @@
 extern asmlinkage int sys_sigprocmask(int how, old_sigset_t *set,
 						old_sigset_t *oset);
 
-asmlinkage int sys32_sigprocmask(int how, old_sigset_t32 *set, 
-				 old_sigset_t32 *oset)
+asmlinkage int sys32_sigprocmask(int how, compat_old_sigset_t *set, 
+				 compat_old_sigset_t *oset)
 {
 	old_sigset_t s;
 	int ret;
@@ -723,7 +716,7 @@
 
 asmlinkage long sys_sigpending(old_sigset_t *set);
 
-asmlinkage int sys32_sigpending(old_sigset_t32 *set)
+asmlinkage int sys32_sigpending(compat_old_sigset_t *set)
 {
 	old_sigset_t pending;
 	int ret;
@@ -789,7 +782,7 @@
 asmlinkage long sys_rt_sigprocmask(int how, sigset_t *set, sigset_t *oset,
 				   size_t sigsetsize);
 
-asmlinkage int sys32_rt_sigprocmask(int how, sigset32_t *set, sigset32_t *oset,
+asmlinkage int sys32_rt_sigprocmask(int how, compat_sigset_t *set, compat_sigset_t *oset,
 				    unsigned int sigsetsize)
 {
 	sigset_t old_set, new_set;
@@ -812,7 +805,7 @@
 
 asmlinkage long sys_rt_sigpending(sigset_t *set, size_t sigsetsize);
 
-asmlinkage int sys32_rt_sigpending(sigset32_t *uset, unsigned int sigsetsize)
+asmlinkage int sys32_rt_sigpending(compat_sigset_t *uset, unsigned int sigsetsize)
 {
 	int ret;
 	sigset_t set;
diff -ruN 2.5.58-32bit.4/include/asm-mips64/compat.h 2.5.58-32bit.5/include/asm-mips64/compat.h
--- 2.5.58-32bit.4/include/asm-mips64/compat.h	2003-01-13 11:07:06.000000000 +1100
+++ 2.5.58-32bit.5/include/asm-mips64/compat.h	2003-01-15 16:34:58.000000000 +1100
@@ -80,4 +80,11 @@
 	int		f_spare[6];
 };
 
+typedef u32		compat_old_sigset_t;
+
+#define _COMPAT_NSIG		128
+#define _COMPAT_NSIG_BPW	32
+
+typedef u32		compat_sigset_word;
+
 #endif /* _ASM_MIPS64_COMPAT_H */
diff -ruN 2.5.58-32bit.4/include/asm-mips64/signal.h 2.5.58-32bit.5/include/asm-mips64/signal.h
--- 2.5.58-32bit.4/include/asm-mips64/signal.h	2001-09-10 03:43:02.000000000 +1000
+++ 2.5.58-32bit.5/include/asm-mips64/signal.h	2003-01-15 14:59:25.000000000 +1100
@@ -20,7 +20,6 @@
 } sigset_t;
 
 typedef unsigned long old_sigset_t;		/* at least 32 bits */
-typedef unsigned int old_sigset_t32;
 
 #define SIGHUP		 1	/* Hangup (POSIX).  */
 #define SIGINT		 2	/* Interrupt (ANSI).  */

  parent reply	other threads:[~2003-01-15  6:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-15  6:34 [PATCH][COMPAT] compat_{old_}sigset_t generic part Stephen Rothwell
2003-01-15  6:36 ` [PATCH][COMPAT] compat_{old_}sigset_t ppc64 Stephen Rothwell
2003-01-15  6:39 ` [PATCH][COMPAT] compat_{old_}sigset_t sparc64 Stephen Rothwell
2003-01-15  6:40 ` PATCH][COMPAT] compat_{old_}sigset_t x86_64 part Stephen Rothwell
2003-01-15  6:42 ` [PATCH][COMPAT] compat_{old_}sigset_t ia64 part Stephen Rothwell
2003-01-15  6:44 ` [PATCH][COMPAT] compat_{old_}sigset_t s390x part Stephen Rothwell
2003-01-15  6:46 ` Stephen Rothwell [this message]
2003-01-15  6:47 ` [PATCH][COMPAT] compat_{old_}sigset_t parisc part Stephen Rothwell

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=20030115174602.014aac4d.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ralf@gnu.org \
    --cc=torvalds@transmeta.com \
    /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

all inboxes | Powered by JetHome®