aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2021-05-27 16:26:10 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2021-05-28 18:38:32 +0000
commitc56de177d28295b4b07ad0b17e4faf4f11c9e4f2 (patch)
tree6d067b74c955cf4f2ead46f01c2511f2d0a9f70b
parent5e912f5fec025766521f535d1237330ede7f18e2 (diff)
downloadsrc-c56de177d28295b4b07ad0b17e4faf4f11c9e4f2.tar.gz
src-c56de177d28295b4b07ad0b17e4faf4f11c9e4f2.zip
x86: initialize initial FPU state earlier
Make it under SI_SUB_CPU sysinit, instead of much later SI_SUB_DRIVERS. The SI_SUB_DRIVERS survived from times when FPU used real ISA attachment, now it is only pnp stub claiming id. PR: 255997 Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30512
-rw-r--r--sys/amd64/amd64/fpu.c2
-rw-r--r--sys/i386/i386/npx.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c
index b9723266ea37..20e3dd34405d 100644
--- a/sys/amd64/amd64/fpu.c
+++ b/sys/amd64/amd64/fpu.c
@@ -495,7 +495,7 @@ fpuinitstate(void *arg __unused)
intr_restore(saveintr);
}
/* EFIRT needs this to be initialized before we can enter our EFI environment */
-SYSINIT(fpuinitstate, SI_SUB_DRIVERS, SI_ORDER_FIRST, fpuinitstate, NULL);
+SYSINIT(fpuinitstate, SI_SUB_CPU, SI_ORDER_ANY, fpuinitstate, NULL);
/*
* Free coprocessor (if we have it).
diff --git a/sys/i386/i386/npx.c b/sys/i386/i386/npx.c
index 34fd2e957169..4767d8896de9 100644
--- a/sys/i386/i386/npx.c
+++ b/sys/i386/i386/npx.c
@@ -551,7 +551,7 @@ npxinitstate(void *arg __unused)
start_emulating();
intr_restore(saveintr);
}
-SYSINIT(npxinitstate, SI_SUB_DRIVERS, SI_ORDER_ANY, npxinitstate, NULL);
+SYSINIT(npxinitstate, SI_SUB_CPU, SI_ORDER_ANY, npxinitstate, NULL);
/*
* Free coprocessor (if we have it).