Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/aarch64/aarch64 use ldp if possible
details: https://anonhg.NetBSD.org/src/rev/5269ad119252
branches: trunk
changeset: 972078:5269ad119252
user: ryo <ryo%NetBSD.org@localhost>
date: Fri May 15 09:08:10 2020 +0000
description:
use ldp if possible
diffstat:
sys/arch/aarch64/aarch64/cpuswitch.S | 20 ++++++++++++++++++--
sys/arch/aarch64/aarch64/vectors.S | 6 +++++-
2 files changed, 23 insertions(+), 3 deletions(-)
diffs (92 lines):
diff -r 1c7e29e84ddc -r 5269ad119252 sys/arch/aarch64/aarch64/cpuswitch.S
--- a/sys/arch/aarch64/aarch64/cpuswitch.S Fri May 15 07:51:49 2020 +0000
+++ b/sys/arch/aarch64/aarch64/cpuswitch.S Fri May 15 09:08:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpuswitch.S,v 1.18 2020/04/13 06:02:03 maxv Exp $ */
+/* $NetBSD: cpuswitch.S,v 1.19 2020/05/15 09:08:10 ryo Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include "opt_ddb.h"
#include "opt_kasan.h"
-RCSID("$NetBSD: cpuswitch.S,v 1.18 2020/04/13 06:02:03 maxv Exp $")
+RCSID("$NetBSD: cpuswitch.S,v 1.19 2020/05/15 09:08:10 ryo Exp $")
ARMV8_DEFINE_OPTIONS
@@ -85,8 +85,12 @@
adrl x4, _C_LABEL(aarch64_pac_enabled)
ldr w4, [x4]
cbz w4, 1f
+#if L_MD_IA_KERN_LO + 8 == L_MD_IA_KERN_HI
+ ldp x5, x6, [x1, #L_MD_IA_KERN_LO]
+#else
ldr x5, [x1, #L_MD_IA_KERN_LO]
ldr x6, [x1, #L_MD_IA_KERN_HI]
+#endif
msr APIAKeyLo_EL1, x5
msr APIAKeyHi_EL1, x6
1:
@@ -152,8 +156,12 @@
adrl x4, _C_LABEL(aarch64_pac_enabled)
ldr w4, [x4]
cbz w4, 1f
+#if L_MD_IA_KERN_LO + 8 == L_MD_IA_KERN_HI
+ ldp x5, x6, [x0, #L_MD_IA_KERN_LO]
+#else
ldr x5, [x0, #L_MD_IA_KERN_LO]
ldr x6, [x0, #L_MD_IA_KERN_HI]
+#endif
msr APIAKeyLo_EL1, x5
msr APIAKeyHi_EL1, x6
1:
@@ -191,8 +199,12 @@
adrl x4, _C_LABEL(aarch64_pac_enabled)
ldr w4, [x4]
cbz w4, 1f
+#if L_MD_IA_KERN_LO + 8 == L_MD_IA_KERN_HI
+ ldp x5, x6, [x19, #L_MD_IA_KERN_LO]
+#else
ldr x5, [x19, #L_MD_IA_KERN_LO]
ldr x6, [x19, #L_MD_IA_KERN_HI]
+#endif
msr APIAKeyLo_EL1, x5
msr APIAKeyHi_EL1, x6
1:
@@ -373,8 +385,12 @@
adrl x4, _C_LABEL(aarch64_pac_enabled)
ldr w4, [x4]
cbz w4, 1f
+#if L_MD_IA_USER_LO + 8 == L_MD_IA_USER_HI
+ ldp x5, x6, [x9, #L_MD_IA_USER_LO]
+#else
ldr x5, [x9, #L_MD_IA_USER_LO]
ldr x6, [x9, #L_MD_IA_USER_HI]
+#endif
msr APIAKeyLo_EL1, x5
msr APIAKeyHi_EL1, x6
1:
diff -r 1c7e29e84ddc -r 5269ad119252 sys/arch/aarch64/aarch64/vectors.S
--- a/sys/arch/aarch64/aarch64/vectors.S Fri May 15 07:51:49 2020 +0000
+++ b/sys/arch/aarch64/aarch64/vectors.S Fri May 15 09:08:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vectors.S,v 1.15 2020/04/16 08:59:16 skrll Exp $ */
+/* $NetBSD: vectors.S,v 1.16 2020/05/15 09:08:10 ryo Exp $ */
#include <aarch64/asm.h>
#include "assym.h"
@@ -91,8 +91,12 @@
adrl x4, _C_LABEL(aarch64_pac_enabled)
ldr w4, [x4]
cbz w4, 1f
+#if L_MD_IA_KERN_LO + 8 == L_MD_IA_KERN_HI
+ ldp x5, x6, [x1, #L_MD_IA_KERN_LO]
+#else
ldr x5, [x1, #L_MD_IA_KERN_LO]
ldr x6, [x1, #L_MD_IA_KERN_HI]
+#endif
msr APIAKeyLo_EL1, x5
msr APIAKeyHi_EL1, x6
1:
Home |
Main Index |
Thread Index |
Old Index