summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2015-11-15 17:10:54 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2015-11-15 17:10:54 +0000
commitfc4744c6e540ad6034931f1bbbf0ef864fe5a54f (patch)
tree956e5e47ece0db73e249b094dd8dfdc41d882998 /sys/arch
parent7d661a9cd50f7d1eab17cd592e66318fbb188b08 (diff)
Make sure every mtmsr instruction disabling external interrupts is immediately
followed by an isync. ok mpi@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/macppc/macppc/locore.S5
-rw-r--r--sys/arch/socppc/socppc/locore.S5
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/macppc/macppc/locore.S b/sys/arch/macppc/macppc/locore.S
index 931e2ce8348..e7a47119d7d 100644
--- a/sys/arch/macppc/macppc/locore.S
+++ b/sys/arch/macppc/macppc/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.50 2015/07/29 18:52:44 miod Exp $ */
+/* $OpenBSD: locore.S,v 1.51 2015/11/15 17:10:53 miod Exp $ */
/* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */
/*
@@ -175,6 +175,7 @@ switch_exited:
mfmsr %r30
andi. %r30,%r30,~PSL_EE@l
mtmsr %r30
+ isync
stw %r4,CI_CURPROC(%r5) /* record new process */
@@ -223,6 +224,7 @@ _ENTRY(_C_LABEL(cpu_idle_enter))
mfmsr %r3
andi. %r3,%r3,~PSL_EE@l
mtmsr %r3
+ isync
1:
blr
@@ -890,6 +892,7 @@ trapexit:
mfmsr %r3
andi. %r3,%r3,~PSL_EE@l
mtmsr %r3
+ isync
/* Test AST pending: */
lwz %r5,FRAME_SRR1+8(%r1)
mtcr %r5
diff --git a/sys/arch/socppc/socppc/locore.S b/sys/arch/socppc/socppc/locore.S
index ae0bf5964e2..6eac80e12fb 100644
--- a/sys/arch/socppc/socppc/locore.S
+++ b/sys/arch/socppc/socppc/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.17 2015/07/29 18:52:44 miod Exp $ */
+/* $OpenBSD: locore.S,v 1.18 2015/11/15 17:10:53 miod Exp $ */
/* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */
/*
@@ -194,6 +194,7 @@ switch_exited:
mfmsr %r30
andi. %r30,%r30,~PSL_EE@l
mtmsr %r30
+ isync
stw %r4,CI_CURPROC(%r5) /* record new process */
@@ -242,6 +243,7 @@ _ENTRY(_C_LABEL(cpu_idle_enter))
mfmsr %r3
andi. %r3,%r3,~PSL_EE@l
mtmsr %r3
+ isync
1:
blr
@@ -909,6 +911,7 @@ trapexit:
mfmsr %r3
andi. %r3,%r3,~PSL_EE@l
mtmsr %r3
+ isync
/* Test AST pending: */
lwz %r5,FRAME_SRR1+8(%r1)
mtcr %r5