]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove obsolete osArchInit function
authoraimuz <mr.imuz@gmail.com>
Wed, 3 Sep 2025 14:15:06 +0000 (14:15 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 4 Sep 2025 14:30:42 +0000 (07:30 -0700)
The osArchInit function was introduced as a workaround for a Linux kernel bug
that corrupted vector registers on x86 CPUs during signal delivery.
The bug was introduced in Linux 5.2 and fixed in 5.3.15, 5.4.2, and all 5.5 and later kernels.
The fix was also back-ported by major distros.

Change-Id: I59990a7df104843955301c5cb8a547614eba145b
GitHub-Last-Rev: 8425af458bfaad0d64d21ff3f3e0049d186f44ed
GitHub-Pull-Request: golang/go#75246
Reviewed-on: https://go-review.googlesource.com/c/go/+/700555
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>

src/runtime/os_freebsd_riscv64.go [deleted file]
src/runtime/os_linux.go
src/runtime/os_linux_arm.go
src/runtime/os_linux_arm64.go
src/runtime/os_linux_loong64.go
src/runtime/os_linux_mips64x.go
src/runtime/os_linux_mipsx.go
src/runtime/os_linux_ppc64x.go
src/runtime/os_linux_riscv64.go
src/runtime/os_linux_s390x.go
src/runtime/os_linux_x86.go [deleted file]

diff --git a/src/runtime/os_freebsd_riscv64.go b/src/runtime/os_freebsd_riscv64.go
deleted file mode 100644 (file)
index 0f2ed50..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright 2022 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runtime
-
-func osArchInit() {}
index 0ec5e43007353dce9ec45635546a4e4b6d7afc5e..c9d25a5be8dca4855d2d896a02d730c9bbc87a68 100644 (file)
@@ -356,7 +356,6 @@ func getHugePageSize() uintptr {
 func osinit() {
        numCPUStartup = getCPUCount()
        physHugePageSize = getHugePageSize()
-       osArchInit()
        vgetrandomInit()
 }
 
index 5e1274ebab0fdf1ef4c89030ea10d6edeced55a0..46b2dc467cbb7a2f118d3bef912f06f3ca5060f1 100644 (file)
@@ -48,8 +48,6 @@ func archauxv(tag, val uintptr) {
        }
 }
 
-func osArchInit() {}
-
 //go:nosplit
 func cputicks() int64 {
        // nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
index 62cead1d221c17cf1e983f899189b7fe6f7d8c99..ccfb92f8ebdacd35bd071ff74ec9ab14b2f65cc6 100644 (file)
@@ -15,8 +15,6 @@ func archauxv(tag, val uintptr) {
        }
 }
 
-func osArchInit() {}
-
 //go:nosplit
 func cputicks() int64 {
        // nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
index 03926feb8c5fc2c5fed211861ffeaddd12adc463..179ae08e54b37b99a1638aeb29a9fda9c6151256 100644 (file)
@@ -14,5 +14,3 @@ func archauxv(tag, val uintptr) {
                cpu.HWCap = uint(val)
        }
 }
-
-func osArchInit() {}
index 770cc27ba78915762859ff45d80d9dc8c9816c1c..778db11221c9bcb09ecd6a8cab3b7bf855463142 100644 (file)
@@ -15,8 +15,6 @@ func archauxv(tag, val uintptr) {
        }
 }
 
-func osArchInit() {}
-
 //go:nosplit
 func cputicks() int64 {
        // nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
index 3807e6d05103c83609c96b1e101288167c26a68a..ef5d0b867edab41c7191cded7ebe89b960806909 100644 (file)
@@ -9,8 +9,6 @@ package runtime
 func archauxv(tag, val uintptr) {
 }
 
-func osArchInit() {}
-
 //go:nosplit
 func cputicks() int64 {
        // nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
index 25d7ccc0356c1659ec7e464f88bee6c8d6d3d9a2..9abc9ec3d229b3f6841df5fd0d435a1f144cd12d 100644 (file)
@@ -19,5 +19,3 @@ func archauxv(tag, val uintptr) {
                cpu.HWCap2 = uint(val)
        }
 }
-
-func osArchInit() {}
index 65fa601a29962e0c78ecdc1976fbeed8a25d69ec..f4f528c736fe3b2a68ba77bbbda2a9fe6c4db8c4 100644 (file)
@@ -9,8 +9,6 @@ import (
        "unsafe"
 )
 
-func osArchInit() {}
-
 type riscvHWProbePairs = struct {
        key   int64
        value uint64
index 0a1d95975edd673e9e8b32e8e999c13b104ad5d5..c5c095593c1f65ad92292709432534dc27645f49 100644 (file)
@@ -17,8 +17,6 @@ func archauxv(tag, val uintptr) {
        }
 }
 
-func osArchInit() {}
-
 func checkS390xCPU() {
        // Check if the present z-system has the hardware capability to carryout
        // floating point operations. Check if hwcap reflects CPU capability for the
diff --git a/src/runtime/os_linux_x86.go b/src/runtime/os_linux_x86.go
deleted file mode 100644 (file)
index c88f61f..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build linux && (386 || amd64)
-
-package runtime
-
-func osArchInit() {}