internal/cpu: unify HWCap/HWCap2 comments

HWCap and HWCap2 are no longer linknamed into package runtime. Also,
merge two sentences both starting with "These are..." and don't mention
any file name where archauxv is defined, as it become outdated if
support for a new $GOOS/$GOARCH combination is added. This is e.g.
already the case for arm64, where archauxv is also defined for
freebsd/arm64.

Change-Id: I9314a66633736b12e777869a832d8b79d442a6f8
Reviewed-on: https://go-review.googlesource.com/c/go/+/228057
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Tobias Klauser 2020-04-13 12:11:23 +02:00 committed by Tobias Klauser
parent 2545323c63
commit 916ecbc731
4 changed files with 8 additions and 9 deletions

View File

@ -7,9 +7,8 @@ package cpu
const CacheLinePadSize = 32
// arm doesn't have a 'cpuid' equivalent, so we rely on HWCAP/HWCAP2.
// These are linknamed in runtime/os_(linux|freebsd)_arm.go and are
// initialized by archauxv().
// These should not be changed after they are initialized.
// These are initialized by archauxv() and should not be changed after they are
// initialized.
var HWCap uint
var HWCap2 uint

View File

@ -7,8 +7,8 @@ package cpu
const CacheLinePadSize = 64
// arm64 doesn't have a 'cpuid' equivalent, so we rely on HWCAP/HWCAP2.
// These are initialized by archauxv in runtime/os_linux_arm64.go.
// These should not be changed after they are initialized.
// These are initialized by archauxv and should not be changed after they are
// initialized.
var HWCap uint
var HWCap2 uint

View File

@ -8,8 +8,8 @@ package cpu
const CacheLinePadSize = 32
// These are initialized by archauxv in runtime/os_linux_mips64x.go.
// These should not be changed after they are initialized.
// This is initialized by archauxv and should not be changed after it is
// initialized.
var HWCap uint
// HWCAP bits. These are exposed by the Linux kernel 5.4.

View File

@ -9,8 +9,8 @@ package cpu
const CacheLinePadSize = 128
// ppc64x doesn't have a 'cpuid' equivalent, so we rely on HWCAP/HWCAP2.
// These are initialized by archauxv in runtime/os_linux_ppc64x.go.
// These should not be changed after they are initialized.
// These are initialized by archauxv and should not be changed after they are
// initialized.
// On aix/ppc64, these values are initialized early in the runtime in runtime/os_aix.go.
var HWCap uint
var HWCap2 uint