aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/os_linux_arm.go
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2021-11-04 17:21:13 -0400
committerMichael Pratt <mpratt@google.com>2022-08-17 20:02:39 +0000
commit876d477b0e3b27ae136a7e8dfceaf0ec72bddea6 (patch)
tree072086591c4b798b11ca78b95f91d4347f8e1ca7 /src/runtime/os_linux_arm.go
parentc7f870ebc41029e07e7ffd8ff2d96b91fd83cd40 (diff)
downloadgo-876d477b0e3b27ae136a7e8dfceaf0ec72bddea6.tar.xz
runtime: refactor ARM VDSO call setup to helper
We have a very complex process to make VDSO calls on ARM. Create a wrapper helper function which reduces duplication and allows for additional calls from other packages. vdsoCall has a few differences from the original code in walltime/nanotime: * It does not use R0-R3, as they are passed through as arguments to fn. * It does not save g if g.m.gsignal.stack.lo is zero. This may occur if it called at startup on g0 between assigning g0.m.gsignal and setting its stack. For #49182 Change-Id: I51aca514b4835b71142011341d2f09125334d30f Reviewed-on: https://go-review.googlesource.com/c/go/+/362795 Run-TryBot: Michael Pratt <mpratt@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/os_linux_arm.go')
-rw-r--r--src/runtime/os_linux_arm.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/runtime/os_linux_arm.go b/src/runtime/os_linux_arm.go
index b590da750f..bd3ab44a11 100644
--- a/src/runtime/os_linux_arm.go
+++ b/src/runtime/os_linux_arm.go
@@ -11,6 +11,8 @@ const (
_HWCAP_VFPv3 = 1 << 13 // introduced in 2.6.30
)
+func vdsoCall()
+
func checkgoarm() {
// On Android, /proc/self/auxv might be unreadable and hwcap won't
// reflect the CPU capabilities. Assume that every Android arm device