Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/arch/powerpc/powerpc Pull up following revision(s) (r...



details:   https://anonhg.NetBSD.org/src/rev/f7a3be4a7294
branches:  netbsd-6
changeset: 774086:f7a3be4a7294
user:      riz <riz%NetBSD.org@localhost>
date:      Wed May 09 20:09:15 2012 +0000

description:
Pull up following revision(s) (requested by matt in ticket #239):
        sys/arch/powerpc/powerpc/vm_machdep.c: revision 1.96
When a stack is specified, make sure the stack has enough for a previous
callframe in which the LR can be stored.  (atf test t_clone:clone_basic
now passes).

diffstat:

 sys/arch/powerpc/powerpc/vm_machdep.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r c9db1d25e874 -r f7a3be4a7294 sys/arch/powerpc/powerpc/vm_machdep.c
--- a/sys/arch/powerpc/powerpc/vm_machdep.c     Wed May 09 20:06:36 2012 +0000
+++ b/sys/arch/powerpc/powerpc/vm_machdep.c     Wed May 09 20:09:15 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm_machdep.c,v 1.94 2012/02/13 13:44:14 phx Exp $      */
+/*     $NetBSD: vm_machdep.c,v 1.94.2.1 2012/05/09 20:09:15 riz Exp $  */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.94 2012/02/13 13:44:14 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.94.2.1 2012/05/09 20:09:15 riz Exp $");
 
 #include "opt_altivec.h"
 #include "opt_multiprocessor.h"
@@ -108,10 +108,13 @@
        *l2->l_md.md_utf = *l1->l_md.md_utf;
 
        /*
-        * If specified, give the child a different stack.
+        * If specified, give the child a different stack.  Make sure to
+        * reserve enough at the top to store the previous LR.
         */
        if (stack != NULL) {
-               l2->l_md.md_utf->tf_fixreg[1] = (register_t)stack + stacksize;
+               l2->l_md.md_utf->tf_fixreg[1] = 
+                   ((register_t)stack + stacksize - STACK_ALIGNBYTES)
+                       & ~STACK_ALIGNBYTES;
        }
 
        /*



Home | Main Index | Thread Index | Old Index