Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/cortex Reload tpidr_el1 into x3 and re-test new...



details:   https://anonhg.NetBSD.org/src/rev/5eb5ac1dea5c
branches:  trunk
changeset: 990625:5eb5ac1dea5c
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Oct 31 15:32:14 2021 +0000

description:
Reload tpidr_el1 into x3 and re-test newipl vs cpl on restart.

diffstat:

 sys/arch/arm/cortex/gic_splfuncs_armv8.S |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (45 lines):

diff -r b22ee94f3225 -r 5eb5ac1dea5c sys/arch/arm/cortex/gic_splfuncs_armv8.S
--- a/sys/arch/arm/cortex/gic_splfuncs_armv8.S  Sun Oct 31 12:34:48 2021 +0000
+++ b/sys/arch/arm/cortex/gic_splfuncs_armv8.S  Sun Oct 31 15:32:14 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gic_splfuncs_armv8.S,v 1.2 2021/10/30 20:23:12 jmcneill Exp $ */
+/* $NetBSD: gic_splfuncs_armv8.S,v 1.3 2021/10/31 15:32:14 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2021 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
 #include <machine/asm.h>
 #include "assym.h"
 
-RCSID("$NetBSD: gic_splfuncs_armv8.S,v 1.2 2021/10/30 20:23:12 jmcneill Exp $")
+RCSID("$NetBSD: gic_splfuncs_armv8.S,v 1.3 2021/10/31 15:32:14 jmcneill Exp $")
 
 #ifdef __HAVE_PREEMPTION
 #define        DISABLE_PREEMPTION                      \
@@ -84,12 +84,12 @@
        DISABLE_PREEMPTION
        ldr     x1, [x3, #L_CPU]                /* get curcpu */
 
+.Lagain:
        /* If newipl >= cpl, just return */
        ldr     w2, [x1, #CI_CPL]
        cmp     w0, w2
        b.hs    .Ldone
 
-.Lagain:
        /* Slow path if ci_intr_depth != 0 */
        ldr     w2, [x1, #CI_INTR_DEPTH]
        cbnz    w2, .Lslow
@@ -120,9 +120,9 @@
        ret
 
 .Lrestart:
-       /* Reload w0 and x1 */
-       mrs     x1, tpidr_el1                   /* get curlwp */
-       ldr     x1, [x1, #L_CPU]                /* get curcpu */
+       /* Reload registers */
+       mrs     x3, tpidr_el1                   /* get curlwp */
+       ldr     x1, [x3, #L_CPU]                /* get curcpu */
        ldr     w0, [x1, #CI_SPLX_SAVEDIPL]     /* get newipl */
        b       .Lagain
        



Home | Main Index | Thread Index | Old Index