diff options
author | Andrew Turner <andrew@FreeBSD.org> | 2024-05-03 16:17:25 +0000 |
---|---|---|
committer | Andrew Turner <andrew@FreeBSD.org> | 2024-05-10 09:29:24 +0000 |
commit | 797f1c7c3dea51f88fa4c365e75c354a93827ca0 (patch) | |
tree | f73941934b89c02eb8740eb623baa00398e746e8 /sys | |
parent | c78ebc69c2aa5454b4dc8fd7451b3b0d031205b8 (diff) | |
download | src-797f1c7c3dea51f88fa4c365e75c354a93827ca0.tar.gz src-797f1c7c3dea51f88fa4c365e75c354a93827ca0.zip |
arm64: Flush the spintable release address
Ensure the spintable release address is written back from the cache
to memory. The other CPUs reading this may not be reading it with the
cache enabled so ensure it is written to the point of coherency
before issuing the wakeup sev.
As cpu_dcache_wbinv_range includes the needed barrier remove it from
the inline asm before the sev instruction.
Reviewed by: jhibbits, kevans
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45083
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arm64/arm64/mp_machdep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c index bd13dde9cee0..e9b015443477 100644 --- a/sys/arm64/arm64/mp_machdep.c +++ b/sys/arm64/arm64/mp_machdep.c @@ -430,10 +430,10 @@ enable_cpu_spin(uint64_t cpu, vm_paddr_t entry, vm_paddr_t release_paddr) return (ENOMEM); *release_addr = entry; + cpu_dcache_wbinv_range(release_addr, sizeof(*release_addr)); pmap_unmapdev(release_addr, sizeof(*release_addr)); __asm __volatile( - "dsb sy \n" "sev \n" ::: "memory"); |