diff options
author | Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> | 2008-07-14 18:34:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-18 07:54:08 -0400 |
commit | fbdb7da91b0382d4b148d8b43c2eb4bab642bb5b (patch) | |
tree | 0e10da9f1ca0f2f2ad0b21dce4bd9604700283db /arch/x86/ia32/ia32_signal.c | |
parent | cdbfc557c43ea1f1f9b7062300ecb1254969814b (diff) |
x86_64: ia32_signal.c: use macro instead of immediate
Make and use macro FIX_EFLAGS, instead of immediate value 0x40DD5 in
ia32_restore_sigcontext().
Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/ia32/ia32_signal.c')
-rw-r--r-- | arch/x86/ia32/ia32_signal.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c index cb3856a18c85..dc9b9b9803f6 100644 --- a/arch/x86/ia32/ia32_signal.c +++ b/arch/x86/ia32/ia32_signal.c | |||
@@ -36,6 +36,11 @@ | |||
36 | 36 | ||
37 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | 37 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) |
38 | 38 | ||
39 | #define FIX_EFLAGS (X86_EFLAGS_AC | X86_EFLAGS_OF | \ | ||
40 | X86_EFLAGS_DF | X86_EFLAGS_TF | X86_EFLAGS_SF | \ | ||
41 | X86_EFLAGS_ZF | X86_EFLAGS_AF | X86_EFLAGS_PF | \ | ||
42 | X86_EFLAGS_CF) | ||
43 | |||
39 | asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset); | 44 | asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset); |
40 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where); | 45 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where); |
41 | 46 | ||
@@ -248,7 +253,7 @@ static int ia32_restore_sigcontext(struct pt_regs *regs, | |||
248 | regs->ss |= 3; | 253 | regs->ss |= 3; |
249 | 254 | ||
250 | err |= __get_user(tmpflags, &sc->flags); | 255 | err |= __get_user(tmpflags, &sc->flags); |
251 | regs->flags = (regs->flags & ~0x40DD5) | (tmpflags & 0x40DD5); | 256 | regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS); |
252 | /* disable syscall checks */ | 257 | /* disable syscall checks */ |
253 | regs->orig_ax = -1; | 258 | regs->orig_ax = -1; |
254 | 259 | ||