[PATCH 3/5] parisc: Fix signal code to depend on CONFIG_COMPAT instead of CONFIG_64BIT

Helge Deller <[email protected]>
Newsgroups org.kernel.vger.linux-parisc
Message-ID <[email protected]>
From: Helge Deller <[email protected]>

The signal handler code used CONFIG_64BIT to decide if compat handling
code should be compiled in. Fix it to use CONFIG_COMPAT instead.
This allows to disable CONFIG_COMPAT even when running a 64-bit kernel.

Signed-off-by: Helge Deller <[email protected]>
---
 arch/parisc/kernel/signal.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c
index e8d27def6c52..64a62006bb15 100644
--- a/arch/parisc/kernel/signal.c
+++ b/arch/parisc/kernel/signal.c
@@ -80,7 +80,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
 	sigset_t set;
 	unsigned long usp = (regs->gr[30] & ~(0x01UL));
 	unsigned long sigframe_size = PARISC_RT_SIGFRAME_SIZE;
-#ifdef CONFIG_64BIT
+#ifdef CONFIG_COMPAT
 	struct compat_rt_sigframe __user * compat_frame;
 	
 	if (is_compat_task())
@@ -96,7 +96,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
 
 	regs->orig_r28 = 1; /* no restarts for sigreturn */
 
-#ifdef CONFIG_64BIT
+#ifdef CONFIG_COMPAT
 	compat_frame = (struct compat_rt_sigframe __user *)frame;
 	
 	if (is_compat_task()) {
@@ -112,7 +112,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
 	set_current_blocked(&set);
 
 	/* Good thing we saved the old gr[30], eh? */
-#ifdef CONFIG_64BIT
+#ifdef CONFIG_COMPAT
 	if (is_compat_task()) {
 		DBG(1, "%s: compat_frame->uc.uc_mcontext 0x%p\n",
 				__func__, &compat_frame->uc.uc_mcontext);
@@ -218,13 +218,13 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs,
 	unsigned long haddr, sigframe_size;
 	unsigned long start;
 	int err = 0;
-#ifdef CONFIG_64BIT
+#ifdef CONFIG_COMPAT
 	struct compat_rt_sigframe __user * compat_frame;
 #endif
-	
+
 	usp = (regs->gr[30] & ~(0x01UL));
 	sigframe_size = PARISC_RT_SIGFRAME_SIZE;
-#ifdef CONFIG_64BIT
+#ifdef CONFIG_COMPAT
 	if (is_compat_task()) {
 		/* The gcc alloca implementation leaves garbage in the upper 32 bits of sp */
 		usp = (compat_uint_t)usp;
@@ -239,7 +239,7 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs,
 	if (start >= TASK_SIZE_MAX - sigframe_size)
 		return -EFAULT;
 	
-#ifdef CONFIG_64BIT
+#ifdef CONFIG_COMPAT
 
 	compat_frame = (struct compat_rt_sigframe __user *)frame;
 	
@@ -349,8 +349,8 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs,
 
 	regs->gr[2]  = rp;			/* userland return pointer */
 	regs->gr[26] = ksig->sig;               /* signal number */
-	
-#ifdef CONFIG_64BIT
+
+#ifdef CONFIG_COMPAT
 	if (is_compat_task()) {
 		regs->gr[25] = A(&compat_frame->info); /* siginfo pointer */
 		regs->gr[24] = A(&compat_frame->uc);   /* ucontext pointer */
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.