Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/arm32 Ensure that r5 contains curlwp before DO_...



details:   https://anonhg.NetBSD.org/src/rev/cab72a44d2e0
branches:  trunk
changeset: 978440:cab72a44d2e0
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Nov 21 19:44:52 2020 +0000

description:
Ensure that r5 contains curlwp before DO_AST_AND_RESTORE_ALIGNMENT_FAULTS
in lwp_trampoline as required by the move to make ASTs operate per-LWP
rather than per-CPU.

Thanks to martin@ for bisecting the amap corruption he was seeing and
testing this fix.

diffstat:

 sys/arch/arm/arm32/cpuswitch.S |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r ea5e5aa70089 -r cab72a44d2e0 sys/arch/arm/arm32/cpuswitch.S
--- a/sys/arch/arm/arm32/cpuswitch.S    Sat Nov 21 19:40:19 2020 +0000
+++ b/sys/arch/arm/arm32/cpuswitch.S    Sat Nov 21 19:44:52 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpuswitch.S,v 1.103 2020/08/15 13:33:54 skrll Exp $    */
+/*     $NetBSD: cpuswitch.S,v 1.104 2020/11/21 19:44:52 skrll Exp $    */
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -87,7 +87,7 @@
 #include <arm/asm.h>
 #include <arm/locore.h>
 
-       RCSID("$NetBSD: cpuswitch.S,v 1.103 2020/08/15 13:33:54 skrll Exp $")
+       RCSID("$NetBSD: cpuswitch.S,v 1.104 2020/11/21 19:44:52 skrll Exp $")
 
 /* LINTSTUB: include <sys/param.h> */
 
@@ -324,7 +324,8 @@
        GET_CPSR(r0)
        CPSID_I(r0, r0)                 /* Kill irq's */
 
-       GET_CURCPU(r4)                  /* for DO_AST */
+       /* for DO_AST */
+       GET_CURX(r4, r5)                /* r4 = curcpu, r5 = curlwp */
        DO_AST_AND_RESTORE_ALIGNMENT_FAULTS
        PULLFRAME
 



Home | Main Index | Thread Index | Old Index