From 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Fri, 10 May 2024 07:44:59 +0000 Subject: [PATCH] gmac get mac form eeprom --- kernel/drivers/crypto/vmx/ghash.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/kernel/drivers/crypto/vmx/ghash.c b/kernel/drivers/crypto/vmx/ghash.c index 2d1a8cd..14807ac 100644 --- a/kernel/drivers/crypto/vmx/ghash.c +++ b/kernel/drivers/crypto/vmx/ghash.c @@ -15,15 +15,14 @@ #include <linux/err.h> #include <linux/crypto.h> #include <linux/delay.h> -#include <linux/hardirq.h> +#include <asm/simd.h> #include <asm/switch_to.h> #include <crypto/aes.h> #include <crypto/ghash.h> #include <crypto/scatterwalk.h> #include <crypto/internal/hash.h> +#include <crypto/internal/simd.h> #include <crypto/b128ops.h> - -#define IN_INTERRUPT in_interrupt() void gcm_init_p8(u128 htable[16], const u64 Xi[2]); void gcm_gmult_p8(u64 Xi[2], const u128 htable[16]); @@ -76,7 +75,7 @@ static inline void __ghash_block(struct p8_ghash_ctx *ctx, struct p8_ghash_desc_ctx *dctx) { - if (!IN_INTERRUPT) { + if (crypto_simd_usable()) { preempt_disable(); pagefault_disable(); enable_kernel_vsx(); @@ -95,7 +94,7 @@ struct p8_ghash_desc_ctx *dctx, const u8 *src, unsigned int srclen) { - if (!IN_INTERRUPT) { + if (crypto_simd_usable()) { preempt_disable(); pagefault_disable(); enable_kernel_vsx(); -- Gitblit v1.6.2