[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 3 Mar 2014 01:00:40 +0100
From: Richard Weinberger <richard@....at>
To: linux-kernel@...r.kernel.org
Cc: linux-arch@...r.kernel.org, viro@...iv.linux.org.uk,
vgupta@...opsys.com, catalin.marinas@....com, will.deacon@....com,
hskinnemoen@...il.com, egtvedt@...fundet.no, vapier@...too.org,
msalter@...hat.com, a-jacquiot@...com, starvik@...s.com,
jesper.nilsson@...s.com, dhowells@...hat.com, rkuo@...eaurora.org,
tony.luck@...el.com, fenghua.yu@...el.com, takata@...ux-m32r.org,
geert@...ux-m68k.org, james.hogan@...tec.com, monstr@...str.eu,
yasutake.koichi@...panasonic.com, ralf@...ux-mips.org,
jonas@...thpole.se, jejb@...isc-linux.org, deller@....de,
benh@...nel.crashing.org, paulus@...ba.org, schwidefsky@...ibm.com,
heiko.carstens@...ibm.com, liqin.linux@...il.com,
lennox.wu@...il.com, cmetcalf@...era.com, gxt@...c.pku.edu.cn,
linux-xtensa@...ux-xtensa.org, akpm@...ux-foundation.org,
oleg@...hat.com, tj@...nel.org, hch@...radead.org,
Richard Weinberger <richard@....at>
Subject: [PATCH 40/44] tile: Use translate_signal()
Use the common helper instead of it's own open coded variant.
Signed-off-by: Richard Weinberger <richard@....at>
---
arch/tile/kernel/compat_signal.c | 12 ++----------
arch/tile/kernel/signal.c | 12 ++----------
2 files changed, 4 insertions(+), 20 deletions(-)
diff --git a/arch/tile/kernel/compat_signal.c b/arch/tile/kernel/compat_signal.c
index 8c5abf2..b14e5e9 100644
--- a/arch/tile/kernel/compat_signal.c
+++ b/arch/tile/kernel/compat_signal.c
@@ -21,7 +21,6 @@
#include <linux/wait.h>
#include <linux/unistd.h>
#include <linux/stddef.h>
-#include <linux/personality.h>
#include <linux/suspend.h>
#include <linux/ptrace.h>
#include <linux/elf.h>
@@ -195,20 +194,13 @@ int compat_setup_rt_frame(struct ksignal *ksig, sigset_t *set,
{
unsigned long restorer;
struct compat_rt_sigframe __user *frame;
- int err = 0, sig = ksig->sig;
- int usig;
+ int err = 0;
frame = compat_get_sigframe(&ksig->ka, regs, sizeof(*frame));
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
goto err;
- usig = current_thread_info()->exec_domain
- && current_thread_info()->exec_domain->signal_invmap
- && sig < 32
- ? current_thread_info()->exec_domain->signal_invmap[sig]
- : sig;
-
/* Always write at least the signal number for the stack backtracer. */
if (ksig->ka.sa.sa_flags & SA_SIGINFO) {
/* At sigreturn time, restore the callee-save registers too. */
@@ -243,7 +235,7 @@ int compat_setup_rt_frame(struct ksignal *ksig, sigset_t *set,
regs->ex1 = PL_ICS_EX1(USER_PL, 1); /* set crit sec in handler */
regs->sp = ptr_to_compat_reg(frame);
regs->lr = restorer;
- regs->regs[0] = (unsigned long) usig;
+ regs->regs[0] = (unsigned long) translate_signal(ksig->sig);
regs->regs[1] = ptr_to_compat_reg(&frame->info);
regs->regs[2] = ptr_to_compat_reg(&frame->uc);
regs->flags |= PT_FLAGS_CALLER_SAVES;
diff --git a/arch/tile/kernel/signal.c b/arch/tile/kernel/signal.c
index 27aba86..5837ccf 100644
--- a/arch/tile/kernel/signal.c
+++ b/arch/tile/kernel/signal.c
@@ -22,7 +22,6 @@
#include <linux/wait.h>
#include <linux/unistd.h>
#include <linux/stddef.h>
-#include <linux/personality.h>
#include <linux/suspend.h>
#include <linux/ptrace.h>
#include <linux/elf.h>
@@ -158,20 +157,13 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
{
unsigned long restorer;
struct rt_sigframe __user *frame;
- int err = 0, sig = ksig->sig;
- int usig;
+ int err = 0;
frame = get_sigframe(&ksig->ka, regs, sizeof(*frame));
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
goto err;
- usig = current_thread_info()->exec_domain
- && current_thread_info()->exec_domain->signal_invmap
- && sig < 32
- ? current_thread_info()->exec_domain->signal_invmap[sig]
- : sig;
-
/* Always write at least the signal number for the stack backtracer. */
if (ksig->ka.sa.sa_flags & SA_SIGINFO) {
/* At sigreturn time, restore the callee-save registers too. */
@@ -206,7 +198,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
regs->ex1 = PL_ICS_EX1(USER_PL, 1); /* set crit sec in handler */
regs->sp = (unsigned long) frame;
regs->lr = restorer;
- regs->regs[0] = (unsigned long) usig;
+ regs->regs[0] = (unsigned long) translate_signal(ksig->sig);
regs->regs[1] = (unsigned long) &frame->info;
regs->regs[2] = (unsigned long) &frame->uc;
regs->flags |= PT_FLAGS_CALLER_SAVES;
--
1.8.4.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists