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 even if "no options MULTIPROCESSOR"...



details:   https://anonhg.NetBSD.org/src/rev/54ef5ae07499
branches:  trunk
changeset: 965297:54ef5ae07499
user:      ryo <ryo%NetBSD.org@localhost>
date:      Thu Sep 12 06:12:56 2019 +0000

description:
even if "no options MULTIPROCESSOR" requires isb after tlbi op. since it should be harmless, dsb is also added.
fixed a problem that rockpro64 doesn't boot without MULTIPROCESSOR.

diffstat:

 sys/arch/aarch64/aarch64/cpufunc_asm_armv8.S |  22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)

diffs (50 lines):

diff -r d300c976e2fb -r 54ef5ae07499 sys/arch/aarch64/aarch64/cpufunc_asm_armv8.S
--- a/sys/arch/aarch64/aarch64/cpufunc_asm_armv8.S      Thu Sep 12 00:56:05 2019 +0000
+++ b/sys/arch/aarch64/aarch64/cpufunc_asm_armv8.S      Thu Sep 12 06:12:56 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpufunc_asm_armv8.S,v 1.3 2018/12/21 08:01:01 ryo Exp $        */
+/*     $NetBSD: cpufunc_asm_armv8.S,v 1.4 2019/09/12 06:12:56 ryo Exp $        */
 
 /*-
  * Copyright (c) 2014 Robin Randhawa
@@ -243,16 +243,14 @@
        /* x8 = bit 63[ASID]48, 47[RES0]44, 43[VA(55:12)]0 */
        lsl     x8, x0, #48
        bfxil   x8, x1, #12, #44
+       dsb     ishst
 #ifdef MULTIPROCESSOR
-       /* need dsb and isb for inner shareable? */
-       dsb     ishst
        tlbi    vae1is, x8
+#else
+       tlbi    vae1, x8
+#endif
        dsb     ish
        isb
-#else
-       /* no need dsb and isb for single entry */
-       tlbi    vae1, x8
-#endif
        ret
 END(aarch64_tlbi_by_asid_va)
 
@@ -261,15 +259,13 @@
        /* x8 = bit 63[ASID]48, 47[RES0]44, 43[VA(55:12)]0 */
        lsl     x8, x0, #48
        bfxil   x8, x1, #12, #44
+       dsb     ishst
 #ifdef MULTIPROCESSOR
-       /* need dsb and isb for inner shareable? */
-       dsb     ishst
        tlbi    vale1is, x8
+#else
+       tlbi    vale1, x8
+#endif
        dsb     ish
        isb
-#else
-       /* no need dsb and isb for single entry */
-       tlbi    vale1, x8
-#endif
        ret
 END(aarch64_tlbi_by_asid_va_ll)



Home | Main Index | Thread Index | Old Index