diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-02-12 19:50:57 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-02-13 17:40:50 -0500 |
commit | dd02f06aa96ab4590da12704366450a2d4753d3c (patch) | |
tree | bf53a96c006e28ed1c7c8c263ca7367edd5a35c0 /arch/mips/kernel/signal32.c | |
parent | af3d10d52d38d2c56a8bca9943c07b00031fc718 (diff) |
[MIPS] signal: Fix warnings in o32 compat code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/signal32.c')
-rw-r--r-- | arch/mips/kernel/signal32.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index 183fc7e55f34..1b9262d3fd23 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c | |||
@@ -139,8 +139,20 @@ struct ucontext32 { | |||
139 | sigset_t32 uc_sigmask; /* mask last for extensibility */ | 139 | sigset_t32 uc_sigmask; /* mask last for extensibility */ |
140 | }; | 140 | }; |
141 | 141 | ||
142 | /* | ||
143 | * Horribly complicated - with the bloody RM9000 workarounds enabled | ||
144 | * the signal trampolines is moving to the end of the structure so we can | ||
145 | * increase the alignment without breaking software compatibility. | ||
146 | */ | ||
142 | #if ICACHE_REFILLS_WORKAROUND_WAR == 0 | 147 | #if ICACHE_REFILLS_WORKAROUND_WAR == 0 |
143 | 148 | ||
149 | struct sigframe32 { | ||
150 | u32 sf_ass[4]; /* argument save space for o32 */ | ||
151 | u32 sf_code[2]; /* signal trampoline */ | ||
152 | struct sigcontext32 sf_sc; | ||
153 | sigset_t sf_mask; | ||
154 | }; | ||
155 | |||
144 | struct rt_sigframe32 { | 156 | struct rt_sigframe32 { |
145 | u32 rs_ass[4]; /* argument save space for o32 */ | 157 | u32 rs_ass[4]; /* argument save space for o32 */ |
146 | u32 rs_code[2]; /* signal trampoline */ | 158 | u32 rs_code[2]; /* signal trampoline */ |
@@ -150,6 +162,14 @@ struct rt_sigframe32 { | |||
150 | 162 | ||
151 | #else /* ICACHE_REFILLS_WORKAROUND_WAR */ | 163 | #else /* ICACHE_REFILLS_WORKAROUND_WAR */ |
152 | 164 | ||
165 | struct sigframe32 { | ||
166 | u32 sf_ass[4]; /* argument save space for o32 */ | ||
167 | u32 sf_pad[2]; | ||
168 | struct sigcontext32 sf_sc; /* hw context */ | ||
169 | sigset_t sf_mask; | ||
170 | u32 sf_code[8] ____cacheline_aligned; /* signal trampoline */ | ||
171 | }; | ||
172 | |||
153 | struct rt_sigframe32 { | 173 | struct rt_sigframe32 { |
154 | u32 rs_ass[4]; /* argument save space for o32 */ | 174 | u32 rs_ass[4]; /* argument save space for o32 */ |
155 | u32 rs_pad[2]; | 175 | u32 rs_pad[2]; |
@@ -493,10 +513,10 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) | |||
493 | 513 | ||
494 | asmlinkage void sys32_sigreturn(nabi_no_regargs struct pt_regs regs) | 514 | asmlinkage void sys32_sigreturn(nabi_no_regargs struct pt_regs regs) |
495 | { | 515 | { |
496 | struct sigframe __user *frame; | 516 | struct sigframe32 __user *frame; |
497 | sigset_t blocked; | 517 | sigset_t blocked; |
498 | 518 | ||
499 | frame = (struct sigframe __user *) regs.regs[29]; | 519 | frame = (struct sigframe32 __user *) regs.regs[29]; |
500 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 520 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
501 | goto badframe; | 521 | goto badframe; |
502 | if (__copy_from_user(&blocked, &frame->sf_mask, sizeof(blocked))) | 522 | if (__copy_from_user(&blocked, &frame->sf_mask, sizeof(blocked))) |
@@ -581,7 +601,7 @@ badframe: | |||
581 | int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs, | 601 | int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs, |
582 | int signr, sigset_t *set) | 602 | int signr, sigset_t *set) |
583 | { | 603 | { |
584 | struct sigframe __user *frame; | 604 | struct sigframe32 __user *frame; |
585 | int err = 0; | 605 | int err = 0; |
586 | 606 | ||
587 | frame = get_sigframe(ka, regs, sizeof(*frame)); | 607 | frame = get_sigframe(ka, regs, sizeof(*frame)); |