From 524c1c7ff3083d17b801d137409e8c5586c18b57 Mon Sep 17 00:00:00 2001 From: jhb Date: Tue, 13 Oct 2020 17:26:12 +0000 Subject: [PATCH] Add a for i386 that includes . arm64 has a similar wrapper. This permits defining as the standard header for fpu_kern_*. Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D26753 --- share/man/man9/fpu_kern.9 | 3 ++- sys/crypto/aesni/aesni.c | 4 ---- sys/crypto/aesni/aesni.h | 4 ---- sys/crypto/blake2/blake2_cryptodev.c | 4 ---- sys/crypto/via/padlock.h | 4 ---- sys/i386/include/fpu.h | 6 ++++++ 6 files changed, 8 insertions(+), 17 deletions(-) create mode 100644 sys/i386/include/fpu.h diff --git a/share/man/man9/fpu_kern.9 b/share/man/man9/fpu_kern.9 index 8fcf82605af..9b0da289ef4 100644 --- a/share/man/man9/fpu_kern.9 +++ b/share/man/man9/fpu_kern.9 @@ -23,13 +23,14 @@ .\" .\" $FreeBSD$ .\" -.Dd March 7, 2018 +.Dd October 13, 2020 .Dt FPU_KERN 9 .Os .Sh NAME .Nm fpu_kern .Nd "facility to use the FPU in the kernel" .Sh SYNOPSIS +.In machine/fpu.h .Ft struct fpu_kern_ctx * .Fn fpu_kern_alloc_ctx "u_int flags" .Ft void diff --git a/sys/crypto/aesni/aesni.c b/sys/crypto/aesni/aesni.c index 3a5a9e0fb1f..b0fba99b02e 100644 --- a/sys/crypto/aesni/aesni.c +++ b/sys/crypto/aesni/aesni.c @@ -60,11 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include -#if defined(__i386__) -#include -#elif defined(__amd64__) #include -#endif static struct mtx_padalign *ctx_mtx; static struct fpu_kern_ctx **ctx_fpu; diff --git a/sys/crypto/aesni/aesni.h b/sys/crypto/aesni/aesni.h index 548f61f1bc2..ef1a6635f6a 100644 --- a/sys/crypto/aesni/aesni.h +++ b/sys/crypto/aesni/aesni.h @@ -40,10 +40,6 @@ #include #include #include -#endif -#if defined(__i386__) -#include -#elif defined(__amd64__) #include #endif diff --git a/sys/crypto/blake2/blake2_cryptodev.c b/sys/crypto/blake2/blake2_cryptodev.c index fcb3ec56059..50828b0334d 100644 --- a/sys/crypto/blake2/blake2_cryptodev.c +++ b/sys/crypto/blake2/blake2_cryptodev.c @@ -43,11 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include -#if defined(__amd64__) #include -#elif defined(__i386__) -#include -#endif struct blake2_session { size_t mlen; diff --git a/sys/crypto/via/padlock.h b/sys/crypto/via/padlock.h index 9e0d28abf3b..a22e88ba6ee 100644 --- a/sys/crypto/via/padlock.h +++ b/sys/crypto/via/padlock.h @@ -32,11 +32,7 @@ #include #include -#if defined(__i386__) -#include -#elif defined(__amd64__) #include -#endif union padlock_cw { uint64_t raw; diff --git a/sys/i386/include/fpu.h b/sys/i386/include/fpu.h new file mode 100644 index 00000000000..5d1bd89da94 --- /dev/null +++ b/sys/i386/include/fpu.h @@ -0,0 +1,6 @@ +/*- + * This file is in the public domain. + * + * $FreeBSD$ + */ +#include -- 2.45.0