
From: Jeff Dike <jdike@addtoit.com>

x86_64 only delivers signals in the SA_INFO style, whether you ask
for it or not.  This patch adds a config option which says whether
the arch is SA_INFO-only or not, and ifdefs out the sigcontext
signal delivery if so.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/um/Kconfig_i386         |    4 ++++
 25-akpm/arch/um/Kconfig_x86_64       |    4 ++++
 25-akpm/arch/um/kernel/signal_kern.c |    8 +++++---
 3 files changed, 13 insertions(+), 3 deletions(-)

diff -puN arch/um/Kconfig_i386~uml-allow-arches-to-opt-out-of-sa_info-signals arch/um/Kconfig_i386
--- 25/arch/um/Kconfig_i386~uml-allow-arches-to-opt-out-of-sa_info-signals	2005-01-09 23:44:21.113953680 -0800
+++ 25-akpm/arch/um/Kconfig_i386	2005-01-09 23:44:21.120952616 -0800
@@ -14,3 +14,7 @@ config 3_LEVEL_PGTABLES
 	Three-level pagetables will let UML have more than 4G of physical
 	memory.  All the memory that can't be mapped directly will be treated
 	as high memory.
+
+config ARCH_HAS_SC_SIGNALS
+	bool
+	default y
diff -puN arch/um/Kconfig_x86_64~uml-allow-arches-to-opt-out-of-sa_info-signals arch/um/Kconfig_x86_64
--- 25/arch/um/Kconfig_x86_64~uml-allow-arches-to-opt-out-of-sa_info-signals	2005-01-09 23:44:21.114953528 -0800
+++ 25-akpm/arch/um/Kconfig_x86_64	2005-01-09 23:44:21.120952616 -0800
@@ -5,3 +5,7 @@ config 64_BIT
 config 3_LEVEL_PGTABLES
        bool
        default y
+
+config ARCH_HAS_SC_SIGNALS
+	bool
+	default n
diff -puN arch/um/kernel/signal_kern.c~uml-allow-arches-to-opt-out-of-sa_info-signals arch/um/kernel/signal_kern.c
--- 25/arch/um/kernel/signal_kern.c~uml-allow-arches-to-opt-out-of-sa_info-signals	2005-01-09 23:44:21.116953224 -0800
+++ 25-akpm/arch/um/kernel/signal_kern.c	2005-01-09 23:44:21.121952464 -0800
@@ -74,10 +74,12 @@ static int handle_signal(struct pt_regs 
 	if((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags(sp) == 0))
 		sp = current->sas_ss_sp + current->sas_ss_size;
 
-	if(ka->sa.sa_flags & SA_SIGINFO)
-		err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset);
-	else
+#ifdef CONFIG_ARCH_HAS_SC_SIGNALS
+	if(!(ka->sa.sa_flags & SA_SIGINFO))
 		err = setup_signal_stack_sc(sp, signr, ka, regs, oldset);
+	else
+#endif
+		err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset);
 
 	if(err){
 		spin_lock_irq(&current->sighand->siglock);
_
