public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] x86: signal: cosmetic unification of signr_convert()
@ 2008-10-30  1:44 Hiroshi Shimamoto
  2008-10-30  1:46 ` [PATCH 2/3] x86: signal: cosmetic unification of macros for setup_rt_frame() Hiroshi Shimamoto
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hiroshi Shimamoto @ 2008-10-30  1:44 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: linux-kernel

From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>

Make signr_convert() same.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
---
 arch/x86/kernel/signal_32.c |    2 ++
 arch/x86/kernel/signal_64.c |    6 ++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c
index 85a0d37..abf0df7 100644
--- a/arch/x86/kernel/signal_32.c
+++ b/arch/x86/kernel/signal_32.c
@@ -503,10 +503,12 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
  */
 static int signr_convert(int sig)
 {
+#ifdef CONFIG_X86_32
 	struct thread_info *info = current_thread_info();
 
 	if (info->exec_domain && info->exec_domain->signal_invmap && sig < 32)
 		return info->exec_domain->signal_invmap[sig];
+#endif /* CONFIG_X86_32 */
 	return sig;
 }
 
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c
index 3d0deb3..a4b46e6 100644
--- a/arch/x86/kernel/signal_64.c
+++ b/arch/x86/kernel/signal_64.c
@@ -295,6 +295,12 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
  */
 static int signr_convert(int sig)
 {
+#ifdef CONFIG_X86_32
+	struct thread_info *info = current_thread_info();
+
+	if (info->exec_domain && info->exec_domain->signal_invmap && sig < 32)
+		return info->exec_domain->signal_invmap[sig];
+#endif /* CONFIG_X86_32 */
 	return sig;
 }
 
-- 
1.5.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] x86: signal: cosmetic unification of macros for setup_rt_frame()
  2008-10-30  1:44 [PATCH 1/3] x86: signal: cosmetic unification of signr_convert() Hiroshi Shimamoto
@ 2008-10-30  1:46 ` Hiroshi Shimamoto
  2008-10-30  1:46 ` [PATCH 3/3] x86: signal: cosmetic unification of NR_restart_syscall Hiroshi Shimamoto
  2008-10-30 10:44 ` [PATCH 1/3] x86: signal: cosmetic unification of signr_convert() Ingo Molnar
  2 siblings, 0 replies; 4+ messages in thread
From: Hiroshi Shimamoto @ 2008-10-30  1:46 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: linux-kernel

From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>

Add #ifdef directive for unification.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
---
 arch/x86/kernel/signal_32.c |   12 ++++++++++++
 arch/x86/kernel/signal_64.c |   14 ++++++++++++--
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c
index abf0df7..6f3b9a9 100644
--- a/arch/x86/kernel/signal_32.c
+++ b/arch/x86/kernel/signal_32.c
@@ -512,10 +512,22 @@ static int signr_convert(int sig)
 	return sig;
 }
 
+#ifdef CONFIG_X86_32
+
 #define is_ia32	1
 #define ia32_setup_frame	__setup_frame
 #define ia32_setup_rt_frame	__setup_rt_frame
 
+#else /* !CONFIG_X86_32 */
+
+#ifdef CONFIG_IA32_EMULATION
+#define is_ia32	test_thread_flag(TIF_IA32)
+#else /* !CONFIG_IA32_EMULATION */
+#define is_ia32	0
+#endif /* CONFIG_IA32_EMULATION */
+
+#endif /* CONFIG_X86_32 */
+
 static int
 setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
 	       sigset_t *set, struct pt_regs *regs)
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c
index a4b46e6..49df79e 100644
--- a/arch/x86/kernel/signal_64.c
+++ b/arch/x86/kernel/signal_64.c
@@ -304,11 +304,21 @@ static int signr_convert(int sig)
 	return sig;
 }
 
+#ifdef CONFIG_X86_32
+
+#define is_ia32	1
+#define ia32_setup_frame	__setup_frame
+#define ia32_setup_rt_frame	__setup_rt_frame
+
+#else /* !CONFIG_X86_32 */
+
 #ifdef CONFIG_IA32_EMULATION
 #define is_ia32	test_thread_flag(TIF_IA32)
-#else
+#else /* !CONFIG_IA32_EMULATION */
 #define is_ia32	0
-#endif
+#endif /* CONFIG_IA32_EMULATION */
+
+#endif /* CONFIG_X86_32 */
 
 static int
 setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
-- 
1.5.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] x86: signal: cosmetic unification of NR_restart_syscall
  2008-10-30  1:44 [PATCH 1/3] x86: signal: cosmetic unification of signr_convert() Hiroshi Shimamoto
  2008-10-30  1:46 ` [PATCH 2/3] x86: signal: cosmetic unification of macros for setup_rt_frame() Hiroshi Shimamoto
@ 2008-10-30  1:46 ` Hiroshi Shimamoto
  2008-10-30 10:44 ` [PATCH 1/3] x86: signal: cosmetic unification of signr_convert() Ingo Molnar
  2 siblings, 0 replies; 4+ messages in thread
From: Hiroshi Shimamoto @ 2008-10-30  1:46 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin; +Cc: linux-kernel

From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>

Add #ifdef directive to unify NR_restart_syscall.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
---
 arch/x86/kernel/signal_32.c |    6 ++++++
 arch/x86/kernel/signal_64.c |    5 +++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c
index 6f3b9a9..a0efc1b 100644
--- a/arch/x86/kernel/signal_32.c
+++ b/arch/x86/kernel/signal_32.c
@@ -628,7 +628,13 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
 	return 0;
 }
 
+#ifdef CONFIG_X86_32
 #define NR_restart_syscall	__NR_restart_syscall
+#else /* !CONFIG_X86_32 */
+#define NR_restart_syscall	\
+	test_thread_flag(TIF_IA32) ? __NR_ia32_restart_syscall : __NR_restart_syscall
+#endif /* CONFIG_X86_32 */
+
 /*
  * Note that 'init' is a special process: it doesn't get signals it doesn't
  * want to handle. Thus you cannot kill init even with a SIGKILL even by
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c
index 49df79e..83990db 100644
--- a/arch/x86/kernel/signal_64.c
+++ b/arch/x86/kernel/signal_64.c
@@ -420,8 +420,13 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
 	return 0;
 }
 
+#ifdef CONFIG_X86_32
+#define NR_restart_syscall	__NR_restart_syscall
+#else /* !CONFIG_X86_32 */
 #define NR_restart_syscall	\
 	test_thread_flag(TIF_IA32) ? __NR_ia32_restart_syscall : __NR_restart_syscall
+#endif /* CONFIG_X86_32 */
+
 /*
  * Note that 'init' is a special process: it doesn't get signals it doesn't
  * want to handle. Thus you cannot kill init even with a SIGKILL even by
-- 
1.5.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] x86: signal: cosmetic unification of signr_convert()
  2008-10-30  1:44 [PATCH 1/3] x86: signal: cosmetic unification of signr_convert() Hiroshi Shimamoto
  2008-10-30  1:46 ` [PATCH 2/3] x86: signal: cosmetic unification of macros for setup_rt_frame() Hiroshi Shimamoto
  2008-10-30  1:46 ` [PATCH 3/3] x86: signal: cosmetic unification of NR_restart_syscall Hiroshi Shimamoto
@ 2008-10-30 10:44 ` Ingo Molnar
  2 siblings, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2008-10-30 10:44 UTC (permalink / raw)
  To: Hiroshi Shimamoto; +Cc: Thomas Gleixner, H. Peter Anvin, linux-kernel


* Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> wrote:

> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> 
> Make signr_convert() same.
> 
> Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> ---
>  arch/x86/kernel/signal_32.c |    2 ++
>  arch/x86/kernel/signal_64.c |    6 ++++++
>  2 files changed, 8 insertions(+), 0 deletions(-)

applied your patches to tip/x86/signal:

 5791775: x86: signal: cosmetic unification of NR_restart_syscall
 cabf503: x86: signal: cosmetic unification of macros for setup_rt_frame()
 96bf84b: x86: signal: cosmetic unification of signr_convert()

thanks!

	Ingo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-30 10:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-30  1:44 [PATCH 1/3] x86: signal: cosmetic unification of signr_convert() Hiroshi Shimamoto
2008-10-30  1:46 ` [PATCH 2/3] x86: signal: cosmetic unification of macros for setup_rt_frame() Hiroshi Shimamoto
2008-10-30  1:46 ` [PATCH 3/3] x86: signal: cosmetic unification of NR_restart_syscall Hiroshi Shimamoto
2008-10-30 10:44 ` [PATCH 1/3] x86: signal: cosmetic unification of signr_convert() Ingo Molnar

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