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 Add an isb() barrier after ICC_SGI1R_EL1...



details:   https://anonhg.NetBSD.org/src/rev/5b8e32821634
branches:  trunk
changeset: 945554:5b8e32821634
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Nov 01 12:13:21 2020 +0000

description:
Add an isb() barrier after ICC_SGI1R_EL1 write to prevent reordering with
subsequent wfi/wfe instructions. Haven't seen this in practice but I would
rather be safe here.

diffstat:

 sys/arch/arm/cortex/gicv3.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 48c0145929aa -r 5b8e32821634 sys/arch/arm/cortex/gicv3.c
--- a/sys/arch/arm/cortex/gicv3.c       Sun Nov 01 12:07:09 2020 +0000
+++ b/sys/arch/arm/cortex/gicv3.c       Sun Nov 01 12:13:21 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gicv3.c,v 1.29 2020/11/01 11:17:20 jmcneill Exp $ */
+/* $NetBSD: gicv3.c,v 1.30 2020/11/01 12:13:21 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
 #define        _INTR_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.29 2020/11/01 11:17:20 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.30 2020/11/01 12:13:21 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -435,6 +435,7 @@
                sgir |= ci->ci_gic_sgir;
        }
        icc_sgi1r_write(sgir);
+       isb();
 }
 
 static void



Home | Main Index | Thread Index | Old Index