diff options
author | Russ Cox <rsc@golang.org> | 2015-08-07 11:48:52 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2015-08-07 17:39:07 +0000 |
commit | 4a190813587369371186e5d98182d74db10234d3 (patch) | |
tree | 0d21472f479fa1f41286b95cc8328e51f736ed9d /src/runtime/asm_arm.s | |
parent | 0cd2999c3b7a853f48af1146db427365a09f8b38 (diff) | |
download | go-git-4a190813587369371186e5d98182d74db10234d3.tar.gz |
runtime: run on GOARM=5 and GOARM=6 uniprocessor freebsd/arm systems
Also, crash early on non-Linux SMP ARM systems when GOARM < 7;
without the proper synchronization, SMP cannot work.
Linux is okay because we call kernel-provided routines for
synchronization and barriers, and the kernel takes care of
providing the right routines for the current system.
On non-Linux systems we are left to fend for ourselves.
It is possible to use different synchronization on GOARM=6,
but it's too late to do that in the Go 1.5 cycle.
We don't believe there are any non-Linux SMP GOARM=6 systems anyway.
Fixes #12067.
Change-Id: I771a556e47893ed540ec2cd33d23c06720157ea3
Reviewed-on: https://go-review.googlesource.com/13363
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/asm_arm.s')
-rw-r--r-- | src/runtime/asm_arm.s | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/asm_arm.s b/src/runtime/asm_arm.s index 91dccdc381..9c32e42afd 100644 --- a/src/runtime/asm_arm.s +++ b/src/runtime/asm_arm.s @@ -752,6 +752,8 @@ TEXT runtime·atomicstoreuintptr(SB),NOSPLIT,$0-8 B runtime·atomicstore(SB) // armPublicationBarrier is a native store/store barrier for ARMv7+. +// On earlier ARM revisions, armPublicationBarrier is a no-op. +// This will not work on SMP ARMv6 machines, if any are in use. // To implement publiationBarrier in sys_$GOOS_arm.s using the native // instructions, use: // @@ -759,6 +761,9 @@ TEXT runtime·atomicstoreuintptr(SB),NOSPLIT,$0-8 // B runtime·armPublicationBarrier(SB) // TEXT runtime·armPublicationBarrier(SB),NOSPLIT,$-4-0 + MOVB runtime·goarm(SB), R11 + CMP $7, R11 + BLT 2(PC) WORD $0xf57ff05e // DMB ST RET |