Author: skra
Date: Fri Nov  6 23:17:00 2015
New Revision: 290472
URL: https://svnweb.freebsd.org/changeset/base/290472
Log:
  Set correct code for signal in abort_align() routine.
  Remove superfluous printf() and both unnecessary and obsolete comments.
  
  Approved by:  kib (mentor)

Modified:
  head/sys/arm/arm/trap-v6.c

Modified: head/sys/arm/arm/trap-v6.c
==============================================================================
--- head/sys/arm/arm/trap-v6.c  Fri Nov  6 23:07:43 2015        (r290471)
+++ head/sys/arm/arm/trap-v6.c  Fri Nov  6 23:17:00 2015        (r290472)
@@ -620,26 +620,17 @@ abort_align(struct trapframe *tf, u_int 
        u_int usermode;
 
        usermode = TRAPF_USERMODE(tf);
-
-       /*
-        * Alignment faults are always fatal if they occur in any but user mode.
-        *
-        * XXX The old trap code handles pcb fault even for alignment traps.
-        * Unfortunately, we don't known why and if is this need.
-        */
        if (!usermode) {
                if (td->td_intr_nesting_level == 0 && td != NULL &&
                    td->td_pcb->pcb_onfault != NULL) {
-                       printf("%s: Got alignment fault with pcb_onfault set"
-                           ", please report this issue\n", __func__);
-                       tf->tf_r0 = EFAULT;;
+                       tf->tf_r0 = EFAULT;
                        tf->tf_pc = (int)td->td_pcb->pcb_onfault;
                        return (0);
                }
                abort_fatal(tf, idx, fsr, far, prefetch, td, ksig);
        }
        /* Deliver a bus error signal to the process */
-       ksig->code = 0;
+       ksig->code = BUS_ADRALN;
        ksig->sig = SIGBUS;
        ksig->addr = far;
        return (1);
_______________________________________________
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