]> Cypherpunks repositories - gostls13.git/commitdiff
internal/cpu: unify HWCap/HWCap2 comments
authorTobias Klauser <tklauser@distanz.ch>
Mon, 13 Apr 2020 10:11:23 +0000 (12:11 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Mon, 13 Apr 2020 10:26:24 +0000 (10:26 +0000)
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>
src/internal/cpu/cpu_arm.go
src/internal/cpu/cpu_arm64.go
src/internal/cpu/cpu_mips64x.go
src/internal/cpu/cpu_ppc64x.go

index 772b67147c8d3a06cc08111fd8359470056f4239..b624526860ea541b96b6dd43d61effa4b4539b62 100644 (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
 
index 0b3ee8e069f33a634e1925bdc648cee7df98b75d..efdb3b9e33aea7956581336805a1b34435513350 100644 (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
 
index 9b0a824ee89348b2751c2239fc2016acca5e4548..0c4794a70acf33af1a95587d323be88b3a49dd34 100644 (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.
index 880c4e1d01806ac753b288eee022eab226cad1a5..2487879c4696f389ad282a9b80054a660c6495c1 100644 (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