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 For booke, restore callee saved regis...



details:   https://anonhg.NetBSD.org/src/rev/f2fc8ae6b9e2
branches:  trunk
changeset: 973670:f2fc8ae6b9e2
user:      rin <rin%NetBSD.org@localhost>
date:      Tue Jul 07 00:37:46 2020 +0000

description:
For booke, restore callee saved registers when recovery for page fault
fails for kernel.

OOPS! How on the earth we had overlooked this error so far...

diffstat:

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

diffs (26 lines):

diff -r 7c67909e28f8 -r f2fc8ae6b9e2 sys/arch/powerpc/booke/trap.c
--- a/sys/arch/powerpc/booke/trap.c     Tue Jul 07 00:28:30 2020 +0000
+++ b/sys/arch/powerpc/booke/trap.c     Tue Jul 07 00:37:46 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.29 2020/07/06 10:13:02 rin Exp $    */
+/*     $NetBSD: trap.c,v 1.30 2020/07/07 00:37:46 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.29 2020/07/06 10:13:02 rin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.30 2020/07/07 00:37:46 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altivec.h"
@@ -690,6 +690,7 @@
        tf->tf_fixreg[1] = fb->fb_sp;
        tf->tf_fixreg[2] = fb->fb_r2;
        tf->tf_fixreg[3] = rv;
+       memcpy(&tf->tf_fixreg[13], fb->fb_fixreg, sizeof(fb->fb_fixreg));
        pcb->pcb_onfault = NULL;
        return true;
 }



Home | Main Index | Thread Index | Old Index