aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/fpu.c3
-rw-r--r--sys/i386/i386/npx.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c
index 9feb14214217..b554394a17bb 100644
--- a/sys/amd64/amd64/fpu.c
+++ b/sys/amd64/amd64/fpu.c
@@ -372,8 +372,7 @@ fpuinitstate(void *arg __unused)
fpu_save_area_zone = uma_zcreate("FPU_save_area",
cpu_max_ext_state_size, NULL, NULL, NULL, NULL,
XSAVE_AREA_ALIGN - 1, 0);
- fpu_initialstate = malloc(cpu_max_ext_state_size, M_DEVBUF,
- M_WAITOK | M_ZERO);
+ fpu_initialstate = uma_zalloc(fpu_save_area_zone, M_WAITOK | M_ZERO);
if (use_xsave) {
max_ext_n = flsl(xsave_mask);
xsave_area_desc = malloc(max_ext_n * sizeof(struct
diff --git a/sys/i386/i386/npx.c b/sys/i386/i386/npx.c
index 794eab31c27e..348f34d1e4f3 100644
--- a/sys/i386/i386/npx.c
+++ b/sys/i386/i386/npx.c
@@ -483,8 +483,7 @@ npxinitstate(void *arg __unused)
fpu_save_area_zone = uma_zcreate("FPU_save_area",
cpu_max_ext_state_size, NULL, NULL, NULL, NULL,
XSAVE_AREA_ALIGN - 1, 0);
- npx_initialstate = malloc(cpu_max_ext_state_size, M_DEVBUF,
- M_WAITOK | M_ZERO);
+ npx_initialstate = uma_zalloc(fpu_save_area_zone, M_WAITOK | M_ZERO);
if (use_xsave) {
if (xsave_mask >> 32 != 0)
max_ext_n = fls(xsave_mask >> 32) + 32;