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>
+++ /dev/null
-// 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() {}
func osinit() {
numCPUStartup = getCPUCount()
physHugePageSize = getHugePageSize()
- osArchInit()
vgetrandomInit()
}
}
}
-func osArchInit() {}
-
//go:nosplit
func cputicks() int64 {
// nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
}
}
-func osArchInit() {}
-
//go:nosplit
func cputicks() int64 {
// nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
cpu.HWCap = uint(val)
}
}
-
-func osArchInit() {}
}
}
-func osArchInit() {}
-
//go:nosplit
func cputicks() int64 {
// nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
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.
cpu.HWCap2 = uint(val)
}
}
-
-func osArchInit() {}
"unsafe"
)
-func osArchInit() {}
-
type riscvHWProbePairs = struct {
key int64
value uint64
}
}
-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
+++ /dev/null
-// 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() {}