aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/os_linux.go
diff options
context:
space:
mode:
authorMichael Munday <munday@ca.ibm.com>2016-10-17 17:10:24 -0400
committerMichael Munday <munday@ca.ibm.com>2016-10-19 21:50:13 +0000
commitf1ad4863aae1fd5cd5d0e3e4e6cb6bfae62951a6 (patch)
treec9b8619f350882ba8445a8dde0f1d9007a641483 /src/runtime/os_linux.go
parent2be3ab441578413972d93fc1048decc422640b09 (diff)
downloadgo-f1ad4863aae1fd5cd5d0e3e4e6cb6bfae62951a6.tar.gz
go-f1ad4863aae1fd5cd5d0e3e4e6cb6bfae62951a6.zip
runtime: get s390x vector facility availability from AT_HWCAP
This is a more robust method for obtaining the availability of vx. Since this variable may be checked frequently I've also now padded it so that it will be in its own cache line. I've kept the other check (in hash/crc32) the same for now until I can figure out the best way to update it. Updates #15403. Change-Id: I74eed651afc6f6a9c5fa3b88fa6a2b0c9ecf5875 Reviewed-on: https://go-review.googlesource.com/31149 Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/os_linux.go')
-rw-r--r--src/runtime/os_linux.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/os_linux.go b/src/runtime/os_linux.go
index 1adabe1a42..4fae7aafcb 100644
--- a/src/runtime/os_linux.go
+++ b/src/runtime/os_linux.go
@@ -182,6 +182,7 @@ var failthreadcreate = []byte("runtime: failed to create new OS thread\n")
const (
_AT_NULL = 0 // End of vector
_AT_PAGESZ = 6 // System physical page size
+ _AT_HWCAP = 16 // hardware capability bit vector
_AT_RANDOM = 25 // introduced in 2.6.29
)