Source-Changes-HG archive

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

[src/trunk]: src Don't futz with tpidr_el0 in {set,long}jmp as it breaks TLS ...



details:   https://anonhg.NetBSD.org/src/rev/c2aca2e35914
branches:  trunk
changeset: 971950:c2aca2e35914
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun May 10 14:05:59 2020 +0000

description:
Don't futz with tpidr_el0 in {set,long}jmp as it breaks TLS as seen in
qemu

diffstat:

 lib/libc/arch/aarch64/gen/_setjmp.S |  8 +-------
 lib/libc/arch/aarch64/gen/setjmp.S  |  8 +-------
 lib/libc/arch/aarch64/genassym.cf   |  3 +--
 sys/arch/aarch64/include/setjmp.h   |  3 +--
 4 files changed, 4 insertions(+), 18 deletions(-)

diffs (92 lines):

diff -r 85c281df59ae -r c2aca2e35914 lib/libc/arch/aarch64/gen/_setjmp.S
--- a/lib/libc/arch/aarch64/gen/_setjmp.S       Sun May 10 13:03:40 2020 +0000
+++ b/lib/libc/arch/aarch64/gen/_setjmp.S       Sun May 10 14:05:59 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: _setjmp.S,v 1.3 2017/11/28 13:09:05 ryo Exp $ */
+/* $NetBSD: _setjmp.S,v 1.4 2020/05/10 14:05:59 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -63,9 +63,6 @@
        stp     x27, x28, [x0, #_JB_X27]
        stp     x29, x30, [x0, #_JB_X29]
 
-       mrs     x5, tpidr_el0
-       str     x5, [x0, #_JB_TPIDR]
-
        stp     d8,  d9,  [x0, #_JB_D8]
        stp     d10, d11, [x0, #_JB_D10]
        stp     d12, d13, [x0, #_JB_D12]
@@ -93,9 +90,6 @@
        ldp     x25, x26, [x0, #_JB_X25]
        ldp     x27, x28, [x0, #_JB_X27]
 
-       ldr     x2, [x0, #_JB_TPIDR]
-       msr     tpidr_el0, x2
-
        ldp     d8,  d9,  [x0, #_JB_D8]
        ldp     d10, d11, [x0, #_JB_D10]
        ldp     d12, d13, [x0, #_JB_D12]
diff -r 85c281df59ae -r c2aca2e35914 lib/libc/arch/aarch64/gen/setjmp.S
--- a/lib/libc/arch/aarch64/gen/setjmp.S        Sun May 10 13:03:40 2020 +0000
+++ b/lib/libc/arch/aarch64/gen/setjmp.S        Sun May 10 14:05:59 2020 +0000
@@ -1,4 +1,4 @@
-/*.$NetBSD: setjmp.S,v 1.2 2017/11/28 13:09:05 ryo Exp $.*/
+/*.$NetBSD: setjmp.S,v 1.3 2020/05/10 14:05:59 skrll Exp $.*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -61,9 +61,6 @@
        stp     x27, x28, [x0, #_JB_X27]
        stp     x29, x30, [x0, #_JB_X29]
 
-       mrs     x5, tpidr_el0
-       str     x5, [x0, #_JB_TPIDR]
-
        stp     d8,  d9,  [x0, #_JB_D8]
        stp     d10, d11, [x0, #_JB_D10]
        stp     d12, d13, [x0, #_JB_D12]
@@ -100,9 +97,6 @@
        ldp     x25, x26, [x0, #_JB_X25]
        ldp     x27, x28, [x0, #_JB_X27]
 
-       ldr     x2, [x0, #_JB_TPIDR]
-       msr     tpidr_el0, x2
-
        ldp     d8,  d9,  [x0, #_JB_D8]
        ldp     d10, d11, [x0, #_JB_D10]
        ldp     d12, d13, [x0, #_JB_D12]
diff -r 85c281df59ae -r c2aca2e35914 lib/libc/arch/aarch64/genassym.cf
--- a/lib/libc/arch/aarch64/genassym.cf Sun May 10 13:03:40 2020 +0000
+++ b/lib/libc/arch/aarch64/genassym.cf Sun May 10 14:05:59 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.1 2014/08/10 05:47:36 matt Exp $
+# $NetBSD: genassym.cf,v 1.2 2020/05/10 14:05:59 skrll Exp $
 
 #-
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -53,7 +53,6 @@
 define _JB_X28         sizeof(_BSD_JBSLOT_T_ [_JB_X29])
 define _JB_X29         sizeof(_BSD_JBSLOT_T_ [_JB_X29])
 define _JB_X30         sizeof(_BSD_JBSLOT_T_ [_JB_X30])
-define _JB_TPIDR       sizeof(_BSD_JBSLOT_T_ [_JB_TPIDR])
 define _JB_D8          sizeof(_BSD_JBSLOT_T_ [_JB_D8])
 define _JB_D9          sizeof(_BSD_JBSLOT_T_ [_JB_D9])
 define _JB_D10         sizeof(_BSD_JBSLOT_T_ [_JB_D10])
diff -r 85c281df59ae -r c2aca2e35914 sys/arch/aarch64/include/setjmp.h
--- a/sys/arch/aarch64/include/setjmp.h Sun May 10 13:03:40 2020 +0000
+++ b/sys/arch/aarch64/include/setjmp.h Sun May 10 14:05:59 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setjmp.h,v 1.1 2014/08/10 05:47:38 matt Exp $ */
+/* $NetBSD: setjmp.h,v 1.2 2020/05/10 14:05:59 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -50,7 +50,6 @@
 #define _JB_X28                11
 #define _JB_X29                12
 #define _JB_X30                13
-#define _JB_TPIDR      14
 #define _JB_D8         16
 #define _JB_D9         17
 #define _JB_D10                18



Home | Main Index | Thread Index | Old Index