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; */
        }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to