From 916ecbc731874bc33f116b0f62c60fc1d64d3841 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 13 Apr 2020 12:11:23 +0200 Subject: [PATCH] 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 --- src/internal/cpu/cpu_arm.go | 5 ++--- src/internal/cpu/cpu_arm64.go | 4 ++-- src/internal/cpu/cpu_mips64x.go | 4 ++-- src/internal/cpu/cpu_ppc64x.go | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/internal/cpu/cpu_arm.go b/src/internal/cpu/cpu_arm.go index 772b67147c..b624526860 100644 --- a/src/internal/cpu/cpu_arm.go +++ b/src/internal/cpu/cpu_arm.go @@ -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 diff --git a/src/internal/cpu/cpu_arm64.go b/src/internal/cpu/cpu_arm64.go index 0b3ee8e069..efdb3b9e33 100644 --- a/src/internal/cpu/cpu_arm64.go +++ b/src/internal/cpu/cpu_arm64.go @@ -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 diff --git a/src/internal/cpu/cpu_mips64x.go b/src/internal/cpu/cpu_mips64x.go index 9b0a824ee8..0c4794a70a 100644 --- a/src/internal/cpu/cpu_mips64x.go +++ b/src/internal/cpu/cpu_mips64x.go @@ -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. diff --git a/src/internal/cpu/cpu_ppc64x.go b/src/internal/cpu/cpu_ppc64x.go index 880c4e1d01..2487879c46 100644 --- a/src/internal/cpu/cpu_ppc64x.go +++ b/src/internal/cpu/cpu_ppc64x.go @@ -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 -- 2.50.0