summaryrefslogtreecommitdiff
path: root/sys/arch/octeon
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2017-06-11 03:03:06 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2017-06-11 03:03:06 +0000
commitd24bd24e29b87f1e7789d18ea7e03a781c4aa605 (patch)
treec46a066105ee6128d0cff8d629d2b7d5d6b86937 /sys/arch/octeon
parent4424331b9432c43f46dad08149f7fd8fdf130c94 (diff)
Add a memory barrier to ensure that stores become visible
in a proper order.
Diffstat (limited to 'sys/arch/octeon')
-rw-r--r--sys/arch/octeon/octeon/machdep.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/octeon/octeon/machdep.c b/sys/arch/octeon/octeon/machdep.c
index 98db3860c0c..cddcd12c159 100644
--- a/sys/arch/octeon/octeon/machdep.c
+++ b/sys/arch/octeon/octeon/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.88 2017/04/30 16:45:45 mpi Exp $ */
+/* $OpenBSD: machdep.c,v 1.89 2017/06/11 03:03:05 visa Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
@@ -851,8 +851,11 @@ hw_cpu_boot_secondary(struct cpu_info *ci)
if (kstack == 0)
panic("unable to allocate idle stack\n");
ci->ci_curprocpaddr = (void *)kstack;
+
cpu_spinup_a0 = (uint64_t)ci;
cpu_spinup_sp = (uint64_t)(kstack + USPACE);
+ mips_sync();
+
cpu_spinup_mask = (uint32_t)ci->ci_cpuid;
while (!cpuset_isset(&cpus_running, ci))