Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jan 2020 18:02:02 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r356420 - head/sys/mips/mips
Message-ID:  <202001061802.006I22gn050703@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Mon Jan  6 18:02:02 2020
New Revision: 356420
URL: https://svnweb.freebsd.org/changeset/base/356420

Log:
  Simplify arguments to signal handlers on mips.
  
  - Use ksi_addr directly as si_addr in the siginfo instead of the
    'badvaddr' register.
  - Remove a duplicate assignment of si_code.
  - Use ksi_addr as the 4th argument to the old-style handler instead of
    'badvaddr'.
  
  Reviewed by:	brooks, kevans
  Sponsored by:	DARPA
  Differential Revision:	https://reviews.freebsd.org/D23013

Modified:
  head/sys/mips/mips/pm_machdep.c

Modified: head/sys/mips/mips/pm_machdep.c
==============================================================================
--- head/sys/mips/mips/pm_machdep.c	Mon Jan  6 17:36:28 2020	(r356419)
+++ head/sys/mips/mips/pm_machdep.c	Mon Jan  6 18:02:02 2020	(r356420)
@@ -147,12 +147,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask
 		/* fill siginfo structure */
 		sf.sf_si = ksi->ksi_info;
 		sf.sf_si.si_signo = sig;
-		sf.sf_si.si_code = ksi->ksi_code;
-		sf.sf_si.si_addr = (void*)(intptr_t)regs->badvaddr;
 	} else {
 		/* Old FreeBSD-style arguments. */
 		regs->a1 = ksi->ksi_code;
-		regs->a3 = regs->badvaddr;
+		regs->a3 = (uintptr_t)ksi->ksi_addr;
 		/* sf.sf_ahu.sf_handler = catcher; */
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001061802.006I22gn050703>