From d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Mon, 11 Dec 2023 02:45:28 +0000 Subject: [PATCH] add boot partition size --- kernel/arch/powerpc/crypto/crct10dif-vpmsum_glue.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/kernel/arch/powerpc/crypto/crct10dif-vpmsum_glue.c b/kernel/arch/powerpc/crypto/crct10dif-vpmsum_glue.c index 02ea277..1dc8b69 100644 --- a/kernel/arch/powerpc/crypto/crct10dif-vpmsum_glue.c +++ b/kernel/arch/powerpc/crypto/crct10dif-vpmsum_glue.c @@ -1,22 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Calculate a CRC T10-DIF with vpmsum acceleration * * Copyright 2017, Daniel Axtens, IBM Corporation. * [based on crc32c-vpmsum_glue.c] - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. */ #include <linux/crc-t10dif.h> #include <crypto/internal/hash.h> +#include <crypto/internal/simd.h> #include <linux/init.h> #include <linux/module.h> #include <linux/string.h> #include <linux/kernel.h> #include <linux/cpufeature.h> +#include <asm/simd.h> #include <asm/switch_to.h> #define VMX_ALIGN 16 @@ -32,7 +30,7 @@ unsigned int tail; u32 crc = crci; - if (len < (VECTOR_BREAKPOINT + VMX_ALIGN) || in_interrupt()) + if (len < (VECTOR_BREAKPOINT + VMX_ALIGN) || !crypto_simd_usable()) return crc_t10dif_generic(crc, p, len); if ((unsigned long)p & VMX_ALIGN_MASK) { -- Gitblit v1.6.2