8 Commits

Author SHA1 Message Date
cuishuang
2dfefb6832 all: execute gofmt
Change-Id: I55aef760145df773be30d567c9e989f46a3e79dc
Reviewed-on: https://go-review.googlesource.com/c/sys/+/618898
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2024-10-11 18:38:43 +00:00
Hernan Martinez
7bb0bf703b cpu: add Int8 matrix multiplication instructions CPU feature flag for ARM64
References:
5bbd9b2498/arch/arm64/include/uapi/asm/hwcap.h (L75C9-L75C31)

https://developer.arm.com/documentation/ddi0601/2024-03/AArch64-Registers/ID-AA64ISAR1-EL1--AArch64-Instruction-Set-Attribute-Register-1

Change-Id: Ic4e1cf2c23097c7e8695453b6d0b335756d474bc
Reviewed-on: https://go-review.googlesource.com/c/sys/+/595678
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2024-07-17 17:57:00 +00:00
Roland Shoemaker
0c18c88c71 cpu: add DIT option and hwcap DIT support
Follow-up to https://go.dev/cl/597377, add a option for DIT so it can be
set via GODEBUG, and add hwcap support for Linux.

Change-Id: Ib094b520edea9c099d37f121b09d02b31644a433
Reviewed-on: https://go-review.googlesource.com/c/sys/+/598719
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-07-17 01:04:09 +00:00
Michal Hruby
7758090324 cpu: add support for sve2 detection
Fixes golang/go#66952

Change-Id: Idaf2ce3b09baf33cf29079677a83a51ea9c4b255
GitHub-Last-Rev: eac00886d1
GitHub-Pull-Request: golang/sys#193
Reviewed-on: https://go-review.googlesource.com/c/sys/+/580655
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2024-05-03 16:45:19 +00:00
Brad Fitzpatrick
2204b6615f cpu: parse /proc/cpuinfo on linux/arm64 on old kernels when needed
Updates tailscale/tailscale#5793
Fixes golang/go#57336

Change-Id: I4f8128bebcc58f265d447ecaaad2473aafa9131c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/458315
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Auto-Submit: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-20 02:54:02 +00:00
Tobias Klauser
85b82a3add cpu: support reading arm64 CPU feature registers
This allows to detect ARM64 CPU features on non-Linux systems. On Linux,
this is used in case /proc/self/auxv cannot be read.

Change-Id: I67d55e989f2beda0c05a97ca5e55781840a8e01c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/209478
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-12-04 07:21:56 +00:00
Michael Munday
153ac47618 cpu: unexport HWCap and HWCap2
These are an implementation detail and should not have been
exported. This only affects Linux on platforms other than 386 and
amd64.

Fixes golang/go#30255.

Change-Id: Ib23b42a7309fd6093b6b9d8b6628de222a3928be
Reviewed-on: https://go-review.googlesource.com/c/163004
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2019-02-19 09:28:55 +00:00
Tobias Klauser
e77772198c cpu: fix build for GOARCH=arm64 on GOOS!=linux
The current implementation for arm64 only supports linux (through HWCaps
read from /proc/self/auxv) and fails to build e.g. on darwin/arm64.

Fixes golang/go#30237

Change-Id: I9f32a285760795441a829b0a81b2d5aff04e2dc4
Reviewed-on: https://go-review.googlesource.com/c/162797
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-02-14 21:44:11 +00:00