mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -tip] x86: signal.c cleanup
@ 2009-03-25 18:43 Jaswinder Singh Rajput
  0 siblings, 0 replies; only message in thread
From: Jaswinder Singh Rajput @ 2009-03-25 18:43 UTC (permalink / raw)
  To: Ingo Molnar, x86 maintainers, LKML, Andi Kleen

From: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Date: Thu, 26 Mar 2009 00:11:46 +0530
Subject: [PATCH] x86: signal.c cleanup

Impact: cleanup

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 arch/x86/kernel/signal.c |   46 +++++++++++++++++++---------------------------
 1 files changed, 19 insertions(+), 27 deletions(-)

diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index 62f2164..249b7bc 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -7,35 +7,30 @@
  *  2000-2002   x86-64 support by Andi Kleen
  */
 #include <linux/perf_counter.h>
-#include <linux/sched.h>
-#include <linux/mm.h>
-#include <linux/smp.h>
+#include <linux/personality.h>
+#include <linux/tracehook.h>
+#include <linux/uaccess.h>
 #include <linux/kernel.h>
+#include <linux/ptrace.h>
 #include <linux/signal.h>
+#include <linux/stddef.h>
+#include <linux/unistd.h>
 #include <linux/errno.h>
+#include <linux/sched.h>
 #include <linux/wait.h>
-#include <linux/ptrace.h>
-#include <linux/tracehook.h>
-#include <linux/unistd.h>
-#include <linux/stddef.h>
-#include <linux/personality.h>
-#include <linux/uaccess.h>
+#include <linux/smp.h>
+#include <linux/mm.h>
 
+#include <asm/ia32_unistd.h>
 #include <asm/processor.h>
+#include <asm/sigframe.h>
+#include <asm/syscalls.h>
 #include <asm/ucontext.h>
+#include <asm/syscall.h>
+#include <asm/proto.h>
 #include <asm/i387.h>
 #include <asm/vdso.h>
-
-#ifdef CONFIG_X86_64
-#include <asm/proto.h>
-#include <asm/ia32_unistd.h>
 #include <asm/mce.h>
-#endif /* CONFIG_X86_64 */
-
-#include <asm/syscall.h>
-#include <asm/syscalls.h>
-
-#include <asm/sigframe.h>
 
 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
 
@@ -100,17 +95,14 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
 		COPY(r13);
 		COPY(r14);
 		COPY(r15);
-#endif /* CONFIG_X86_64 */
-
-#ifdef CONFIG_X86_32
-		COPY_SEG_CPL3(cs);
-		COPY_SEG_CPL3(ss);
-#else /* !CONFIG_X86_32 */
 		/* Kernel saves and restores only the CS segment register on signals,
 		 * which is the bare minimum needed to allow mixed 32/64-bit code.
 		 * App's signal handler can save/restore other segments if needed. */
 		COPY_SEG_CPL3(cs);
-#endif /* CONFIG_X86_32 */
+#else
+		COPY_SEG_CPL3(cs);
+		COPY_SEG_CPL3(ss);
+#endif
 
 		get_user_ex(tmpflags, &sc->flags);
 		regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
@@ -887,7 +879,7 @@ void signal_fault(struct pt_regs *regs, void __user *frame, char *where)
 	struct task_struct *me = current;
 
 	if (show_unhandled_signals && printk_ratelimit()) {
-		printk("%s"
+		printk(KERN_INFO "%s"
 		       "%s[%d] bad frame in %s frame:%p ip:%lx sp:%lx orax:%lx",
 		       task_pid_nr(current) > 1 ? KERN_INFO : KERN_EMERG,
 		       me->comm, me->pid, where, frame,
-- 
1.6.0.6




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-25 18:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-25 18:43 [PATCH -tip] x86: signal.c cleanup Jaswinder Singh Rajput

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®