From e8ee6e81252850255cffc982e9867d48207ed659 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Wed, 6 Apr 2022 14:18:09 -0700 Subject: [PATCH] Remove unused ring0.RestoreKernelFPState. PiperOrigin-RevId: 439933401 --- pkg/ring0/kernel_amd64.go | 18 ------------------ pkg/ring0/kernel_arm64.go | 6 ------ 2 files changed, 24 deletions(-) diff --git a/pkg/ring0/kernel_amd64.go b/pkg/ring0/kernel_amd64.go index e2e9f88c0..0f90d3a2d 100644 --- a/pkg/ring0/kernel_amd64.go +++ b/pkg/ring0/kernel_amd64.go @@ -338,21 +338,3 @@ func SetCPUIDFaulting(on bool) bool { func ReadCR2() uintptr { return readCR2() } - -// kernelMXCSR is the value of the mxcsr register in the Sentry. -// -// The MXCSR control configuration is initialized once and never changed. Look -// at src/cmd/compile/abi-internal.md in the golang sources for more details. -var kernelMXCSR uint32 - -// RestoreKernelFPState restores the Sentry floating point state. -// -//go:nosplit -func RestoreKernelFPState() { - // Restore the MXCSR control configuration. - ldmxcsr(&kernelMXCSR) -} - -func init() { - stmxcsr(&kernelMXCSR) -} diff --git a/pkg/ring0/kernel_arm64.go b/pkg/ring0/kernel_arm64.go index 79f85ff50..889150589 100644 --- a/pkg/ring0/kernel_arm64.go +++ b/pkg/ring0/kernel_arm64.go @@ -90,9 +90,3 @@ func (c *CPU) SwitchToUser(switchOpts SwitchOpts) (vector Vector) { return } - -// RestoreKernelFPState restores the Sentry floating point state. -// -//go:nosplit -func RestoreKernelFPState() { -}