[PATCH 2/2] MIPS: kernel: signal: Drop unused arguments for traditional signal handlers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Traditional signal handlers (ie !SA_SIGINFO) only need only argument
holding the signal number so we drop the additional arguments and fix
the related comments. We also update the comments for the SA_SIGINFO
case where the second argument is a pointer to a siginfo_t structure.

Signed-off-by: Markos Chandras <markos.chandras@xxxxxxxxxx>
---
 arch/mips/kernel/signal.c     | 6 +-----
 arch/mips/kernel/signal32.c   | 6 +-----
 arch/mips/kernel/signal_n32.c | 2 +-
 3 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index be3ac5f7cbbb..3a125331bf8b 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -683,15 +683,11 @@ static int setup_frame(void *sig_return, struct ksignal *ksig,
 	 * Arguments to signal handler:
 	 *
 	 *   a0 = signal number
-	 *   a1 = 0 (should be cause)
-	 *   a2 = pointer to struct sigcontext
 	 *
 	 * $25 and c0_epc point to the signal handler, $29 points to the
 	 * struct sigframe.
 	 */
 	regs->regs[ 4] = ksig->sig;
-	regs->regs[ 5] = 0;
-	regs->regs[ 6] = (unsigned long) &frame->sf_sc;
 	regs->regs[29] = (unsigned long) frame;
 	regs->regs[31] = (unsigned long) sig_return;
 	regs->cp0_epc = regs->regs[25] = (unsigned long) ksig->ka.sa.sa_handler;
@@ -730,7 +726,7 @@ static int setup_rt_frame(void *sig_return, struct ksignal *ksig,
 	 * Arguments to signal handler:
 	 *
 	 *   a0 = signal number
-	 *   a1 = 0 (should be cause)
+	 *   a1 = pointer to siginfo_t
 	 *   a2 = pointer to ucontext
 	 *
 	 * $25 and c0_epc point to the signal handler, $29 points to
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
index 3059f36bfc89..6f6f79435edf 100644
--- a/arch/mips/kernel/signal32.c
+++ b/arch/mips/kernel/signal32.c
@@ -336,15 +336,11 @@ static int setup_frame_32(void *sig_return, struct ksignal *ksig,
 	 * Arguments to signal handler:
 	 *
 	 *   a0 = signal number
-	 *   a1 = 0 (should be cause)
-	 *   a2 = pointer to struct sigcontext
 	 *
 	 * $25 and c0_epc point to the signal handler, $29 points to the
 	 * struct sigframe.
 	 */
 	regs->regs[ 4] = ksig->sig;
-	regs->regs[ 5] = 0;
-	regs->regs[ 6] = (unsigned long) &frame->sf_sc;
 	regs->regs[29] = (unsigned long) frame;
 	regs->regs[31] = (unsigned long) sig_return;
 	regs->cp0_epc = regs->regs[25] = (unsigned long) ksig->ka.sa.sa_handler;
@@ -383,7 +379,7 @@ static int setup_rt_frame_32(void *sig_return, struct ksignal *ksig,
 	 * Arguments to signal handler:
 	 *
 	 *   a0 = signal number
-	 *   a1 = 0 (should be cause)
+	 *   a1 = pointer to siginfo_t
 	 *   a2 = pointer to ucontext
 	 *
 	 * $25 and c0_epc point to the signal handler, $29 points to
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c
index 0d017fdcaf07..04c4a2a7df13 100644
--- a/arch/mips/kernel/signal_n32.c
+++ b/arch/mips/kernel/signal_n32.c
@@ -129,7 +129,7 @@ static int setup_rt_frame_n32(void *sig_return, struct ksignal *ksig,
 	 * Arguments to signal handler:
 	 *
 	 *   a0 = signal number
-	 *   a1 = 0 (should be cause)
+	 *   a1 = pointer to siginfo_t
 	 *   a2 = pointer to ucontext
 	 *
 	 * $25 and c0_epc point to the signal handler, $29 points to
-- 
2.5.0





[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux