summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/signal_64.c
diff options
context:
space:
mode:
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>2008-09-25 04:13:11 +0200
committerIngo Molnar <mingo@elte.hu>2008-09-25 10:11:41 +0200
commit455edbc423db282bb64dec2d7c8968498ea8e619 (patch)
tree8d059f1a94128d17e56caa610738767b0251ba8a /arch/x86/kernel/signal_64.c
parentx86: signal_64.c: introduce helper function signr_convert() (diff)
downloadlinux-455edbc423db282bb64dec2d7c8968498ea8e619.tar.xz
linux-455edbc423db282bb64dec2d7c8968498ea8e619.zip
x86: signal: introduce helper macro is_ia32
Introduce new macro is_ia32 for unification of setup_rt_frame(). No effect in binary, compiler will optimize. Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/signal_64.c')
-rw-r--r--arch/x86/kernel/signal_64.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c
index c5d80024a8f3..53f86d95985b 100644
--- a/arch/x86/kernel/signal_64.c
+++ b/arch/x86/kernel/signal_64.c
@@ -286,6 +286,12 @@ static int signr_convert(int sig)
return sig;
}
+#ifdef CONFIG_IA32_EMULATION
+#define is_ia32 test_thread_flag(TIF_IA32)
+#else
+#define is_ia32 0
+#endif
+
static int
setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
sigset_t *set, struct pt_regs *regs)
@@ -293,15 +299,14 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
int usig = signr_convert(sig);
int ret;
-#ifdef CONFIG_IA32_EMULATION
- if (test_thread_flag(TIF_IA32)) {
+ /* Set up the stack frame */
+ if (is_ia32) {
if (ka->sa.sa_flags & SA_SIGINFO)
ret = ia32_setup_rt_frame(usig, ka, info, set, regs);
else
ret = ia32_setup_frame(usig, ka, set, regs);
} else
-#endif
- ret = __setup_rt_frame(sig, ka, info, set, regs);
+ ret = __setup_rt_frame(sig, ka, info, set, regs);
if (ret) {
force_sigsegv(sig, current);