Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/booke Do not use curlwp twice. No functiona...



details:   https://anonhg.NetBSD.org/src/rev/03b5fe4b9f93
branches:  trunk
changeset: 935978:03b5fe4b9f93
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Jul 15 07:44:34 2020 +0000

description:
Do not use curlwp twice. No functional changes.

diffstat:

 sys/arch/powerpc/booke/trap.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (34 lines):

diff -r 99601ba57805 -r 03b5fe4b9f93 sys/arch/powerpc/booke/trap.c
--- a/sys/arch/powerpc/booke/trap.c     Wed Jul 15 07:37:25 2020 +0000
+++ b/sys/arch/powerpc/booke/trap.c     Wed Jul 15 07:44:34 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.32 2020/07/07 00:49:09 rin Exp $    */
+/*     $NetBSD: trap.c,v 1.33 2020/07/15 07:44:34 rin Exp $    */
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.32 2020/07/07 00:49:09 rin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.33 2020/07/15 07:44:34 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altivec.h"
@@ -477,10 +477,12 @@
        }
 
        if (tf->tf_esr & ESR_PIL) {
-               struct pcb * const pcb = lwp_getpcb(curlwp);
-               if (__predict_false(!fpu_used_p(curlwp))) {
+               struct lwp * const l = curlwp;
+               struct pcb * const pcb = lwp_getpcb(l);
+
+               if (__predict_false(!fpu_used_p(l))) {
                        memset(&pcb->pcb_fpu, 0, sizeof(pcb->pcb_fpu));
-                       fpu_mark_used(curlwp);
+                       fpu_mark_used(l);
                }
                if (fpu_emulate(tf, &pcb->pcb_fpu, ksi)) {
                        if (ksi->ksi_signo == 0) {



Home | Main Index | Thread Index | Old Index