summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2021-03-17 12:03:41 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2021-03-17 12:03:41 +0000
commite7b565c7812be932cedd03caafe1d3002500625b (patch)
tree3110896e0f1b3334eb83742449851993032c20dd
parent9baef26ee07e83be2716a16d8b1e1c04e5fb4793 (diff)
Add missing memory clobbers to "data" barriers.
-rw-r--r--sys/arch/arm64/arm64/cpu.c14
-rw-r--r--sys/arch/arm64/arm64/machdep.c4
-rw-r--r--sys/arch/arm64/arm64/pmap.c4
3 files changed, 11 insertions, 11 deletions
diff --git a/sys/arch/arm64/arm64/cpu.c b/sys/arch/arm64/arm64/cpu.c
index ed9498e0acf..568946cf446 100644
--- a/sys/arch/arm64/arm64/cpu.c
+++ b/sys/arch/arm64/arm64/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.52 2021/03/16 10:57:47 kettenis Exp $ */
+/* $OpenBSD: cpu.c,v 1.53 2021/03/17 12:03:40 kettenis Exp $ */
/*
* Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
@@ -545,7 +545,7 @@ cpu_attach(struct device *parent, struct device *dev, void *aux)
sched_init_cpu(ci);
if (cpu_hatch_secondary(ci, spinup_method, spinup_data)) {
atomic_setbits_int(&ci->ci_flags, CPUF_IDENTIFY);
- __asm volatile("dsb sy; sev");
+ __asm volatile("dsb sy; sev" ::: "memory");
while ((ci->ci_flags & CPUF_IDENTIFIED) == 0 &&
--timeout)
@@ -643,7 +643,7 @@ cpu_hatch_spin_table(struct cpu_info *ci, uint64_t start, uint64_t data)
pmap_kenter_cache(start_pg, pa, PROT_READ|PROT_WRITE, PMAP_CACHE_CI);
*startvec = start;
- __asm volatile("dsb sy; sev");
+ __asm volatile("dsb sy; sev" ::: "memory");
pmap_kremove(start_pg, PAGE_SIZE);
}
@@ -695,7 +695,7 @@ void
cpu_boot_secondary(struct cpu_info *ci)
{
atomic_setbits_int(&ci->ci_flags, CPUF_GO);
- __asm volatile("dsb sy; sev");
+ __asm volatile("dsb sy; sev" ::: "memory");
while ((ci->ci_flags & CPUF_RUNNING) == 0)
__asm volatile("wfe");
@@ -709,14 +709,14 @@ cpu_start_secondary(struct cpu_info *ci)
int s;
ci->ci_flags |= CPUF_PRESENT;
- __asm volatile("dsb sy");
+ __asm volatile("dsb sy" ::: "memory");
while ((ci->ci_flags & CPUF_IDENTIFY) == 0)
__asm volatile("wfe");
cpu_identify(ci);
atomic_setbits_int(&ci->ci_flags, CPUF_IDENTIFIED);
- __asm volatile("dsb sy");
+ __asm volatile("dsb sy" ::: "memory");
while ((ci->ci_flags & CPUF_GO) == 0)
__asm volatile("wfe");
@@ -749,7 +749,7 @@ cpu_start_secondary(struct cpu_info *ci)
nanouptime(&ci->ci_schedstate.spc_runtime);
atomic_setbits_int(&ci->ci_flags, CPUF_RUNNING);
- __asm volatile("dsb sy; sev");
+ __asm volatile("dsb sy; sev" ::: "memory");
spllower(IPL_NONE);
diff --git a/sys/arch/arm64/arm64/machdep.c b/sys/arch/arm64/arm64/machdep.c
index ddd026346ed..11607572fe4 100644
--- a/sys/arch/arm64/arm64/machdep.c
+++ b/sys/arch/arm64/arm64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.60 2021/03/13 10:09:40 kettenis Exp $ */
+/* $OpenBSD: machdep.c,v 1.61 2021/03/17 12:03:40 kettenis Exp $ */
/*
* Copyright (c) 2014 Patrick Wildt <patrick@blueri.se>
*
@@ -205,7 +205,7 @@ void
cpu_idle_cycle(void)
{
enable_irq_daif();
- __asm volatile("dsb sy");
+ __asm volatile("dsb sy" ::: "memory");
__asm volatile("wfi");
}
diff --git a/sys/arch/arm64/arm64/pmap.c b/sys/arch/arm64/arm64/pmap.c
index 054425d3914..f3a6706321b 100644
--- a/sys/arch/arm64/arm64/pmap.c
+++ b/sys/arch/arm64/arm64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.75 2021/03/16 10:57:47 kettenis Exp $ */
+/* $OpenBSD: pmap.c,v 1.76 2021/03/17 12:03:40 kettenis Exp $ */
/*
* Copyright (c) 2008-2009,2014-2016 Dale Rahn <drahn@dalerahn.com>
*
@@ -2372,7 +2372,7 @@ pmap_map_early(paddr_t spa, psize_t len)
ATTR_IDX(PTE_ATTR_WB) | ATTR_SH(SH_INNER) |
ATTR_nG | ATTR_UXN | ATTR_AF | ATTR_AP(0);
}
- __asm volatile("dsb sy");
+ __asm volatile("dsb sy" ::: "memory");
__asm volatile("isb");
}