diff options
author | Pavel Kiryukhin <vksavl@gmail.com> | 2007-06-05 05:42:20 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-06-26 13:57:33 -0400 |
commit | a76f3a417a431eaf673323459357d8e684b52c49 (patch) | |
tree | fb5c7bf9b1f50f191b77a5df0931644f90e96066 /arch/mips | |
parent | c8eae71dc81af15809d87d7aabb94810cea9577d (diff) |
[MIPS] use compat_siginfo in rt_sigframe_n32
Signed-off-by: Pavel Kiryukhin <vksavl@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/kernel/signal32.c | 62 | ||||
-rw-r--r-- | arch/mips/kernel/signal_n32.c | 6 |
2 files changed, 3 insertions, 65 deletions
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index 003f8152b9ed..486b8e5f52d0 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c | |||
@@ -36,68 +36,6 @@ | |||
36 | 36 | ||
37 | #include "signal-common.h" | 37 | #include "signal-common.h" |
38 | 38 | ||
39 | #define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3) | ||
40 | |||
41 | typedef struct compat_siginfo { | ||
42 | int si_signo; | ||
43 | int si_code; | ||
44 | int si_errno; | ||
45 | |||
46 | union { | ||
47 | int _pad[SI_PAD_SIZE32]; | ||
48 | |||
49 | /* kill() */ | ||
50 | struct { | ||
51 | compat_pid_t _pid; /* sender's pid */ | ||
52 | compat_uid_t _uid; /* sender's uid */ | ||
53 | } _kill; | ||
54 | |||
55 | /* SIGCHLD */ | ||
56 | struct { | ||
57 | compat_pid_t _pid; /* which child */ | ||
58 | compat_uid_t _uid; /* sender's uid */ | ||
59 | int _status; /* exit code */ | ||
60 | compat_clock_t _utime; | ||
61 | compat_clock_t _stime; | ||
62 | } _sigchld; | ||
63 | |||
64 | /* IRIX SIGCHLD */ | ||
65 | struct { | ||
66 | compat_pid_t _pid; /* which child */ | ||
67 | compat_clock_t _utime; | ||
68 | int _status; /* exit code */ | ||
69 | compat_clock_t _stime; | ||
70 | } _irix_sigchld; | ||
71 | |||
72 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ | ||
73 | struct { | ||
74 | s32 _addr; /* faulting insn/memory ref. */ | ||
75 | } _sigfault; | ||
76 | |||
77 | /* SIGPOLL, SIGXFSZ (To do ...) */ | ||
78 | struct { | ||
79 | int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ | ||
80 | int _fd; | ||
81 | } _sigpoll; | ||
82 | |||
83 | /* POSIX.1b timers */ | ||
84 | struct { | ||
85 | timer_t _tid; /* timer id */ | ||
86 | int _overrun; /* overrun count */ | ||
87 | compat_sigval_t _sigval;/* same as below */ | ||
88 | int _sys_private; /* not to be passed to user */ | ||
89 | } _timer; | ||
90 | |||
91 | /* POSIX.1b signals */ | ||
92 | struct { | ||
93 | compat_pid_t _pid; /* sender's pid */ | ||
94 | compat_uid_t _uid; /* sender's uid */ | ||
95 | compat_sigval_t _sigval; | ||
96 | } _rt; | ||
97 | |||
98 | } _sifields; | ||
99 | } compat_siginfo_t; | ||
100 | |||
101 | /* | 39 | /* |
102 | * Including <asm/unistd.h> would give use the 64-bit syscall numbers ... | 40 | * Including <asm/unistd.h> would give use the 64-bit syscall numbers ... |
103 | */ | 41 | */ |
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index 4cf9ff24d1f7..eb7e05926ebe 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c | |||
@@ -72,7 +72,7 @@ struct ucontextn32 { | |||
72 | struct rt_sigframe_n32 { | 72 | struct rt_sigframe_n32 { |
73 | u32 rs_ass[4]; /* argument save space for o32 */ | 73 | u32 rs_ass[4]; /* argument save space for o32 */ |
74 | u32 rs_code[2]; /* signal trampoline */ | 74 | u32 rs_code[2]; /* signal trampoline */ |
75 | struct siginfo rs_info; | 75 | struct compat_siginfo rs_info; |
76 | struct ucontextn32 rs_uc; | 76 | struct ucontextn32 rs_uc; |
77 | }; | 77 | }; |
78 | 78 | ||
@@ -81,7 +81,7 @@ struct rt_sigframe_n32 { | |||
81 | struct rt_sigframe_n32 { | 81 | struct rt_sigframe_n32 { |
82 | u32 rs_ass[4]; /* argument save space for o32 */ | 82 | u32 rs_ass[4]; /* argument save space for o32 */ |
83 | u32 rs_pad[2]; | 83 | u32 rs_pad[2]; |
84 | struct siginfo rs_info; | 84 | struct compat_siginfo rs_info; |
85 | struct ucontextn32 rs_uc; | 85 | struct ucontextn32 rs_uc; |
86 | u32 rs_code[8] ____cacheline_aligned; /* signal trampoline */ | 86 | u32 rs_code[8] ____cacheline_aligned; /* signal trampoline */ |
87 | }; | 87 | }; |
@@ -187,7 +187,7 @@ static int setup_rt_frame_n32(struct k_sigaction * ka, | |||
187 | install_sigtramp(frame->rs_code, __NR_N32_rt_sigreturn); | 187 | install_sigtramp(frame->rs_code, __NR_N32_rt_sigreturn); |
188 | 188 | ||
189 | /* Create siginfo. */ | 189 | /* Create siginfo. */ |
190 | err |= copy_siginfo_to_user(&frame->rs_info, info); | 190 | err |= copy_siginfo_to_user32(&frame->rs_info, info); |
191 | 191 | ||
192 | /* Create the ucontext. */ | 192 | /* Create the ucontext. */ |
193 | err |= __put_user(0, &frame->rs_uc.uc_flags); | 193 | err |= __put_user(0, &frame->rs_uc.uc_flags); |