From patchwork Fri Apr 11 07:38:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herbert Xu X-Patchwork-Id: 880364 Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8314E293479 for ; Fri, 11 Apr 2025 07:38:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=144.6.53.87 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744357133; cv=none; b=lrLwuaFo4Hh2NjSZoQMUSnUCHYLha6MlzTPHNniY+rpXdGkiGO6Bi3pEcyJISQoeAYW0HnqsW5pGTycoa8zl7bHcRKvTVhbeAxxI0VOpV3TzjrUYLWLHZKgzck3+JxckYVcezzK9CY4brcHVNqFQOf6AJJ4ToCk7Y9YUKjCbi5U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744357133; c=relaxed/simple; bh=nBHpRMyGWIVMgsR00Ds/HbzB64vqXAQtfnxT5SVRrrk=; h=Date:Message-Id:In-Reply-To:References:From:Subject:To; b=cbHAXhBMDe6feJcPOIHX+YKhKAlmE3zCDCeGeV8ds9+QSRHbq/ZUl2DEkPS+JUZGqTQ9NjIS/sa+0FA3C8bm0emUdmGGJBydfygfL4ovaoOjHjXJB29L4HRA38BPwR2Vorb9lSR/gnY9Qfx/mFEzntLSnvReSTPzJ2leaN1S/cU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au; spf=pass smtp.mailfrom=gondor.apana.org.au; dkim=pass (2048-bit key) header.d=hmeau.com header.i=@hmeau.com header.b=GycDtRzg; arc=none smtp.client-ip=144.6.53.87 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=hmeau.com header.i=@hmeau.com header.b="GycDtRzg" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hmeau.com; s=formenos; h=To:Subject:From:References:In-Reply-To:Message-Id:Date:Sender: Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=vfP8/dGbktqQo+ZQgy52TP9sSOelEMQ7yktovnNSv2o=; b=GycDtRzgYpUne4tpDvVRqucAK3 76A7MhmdyO0hJlTW1PqR5PkecIevCyrDuUTbzdmasSnkgRiRMtjaUL895HNSyK1Ga5zbAZz/bb2pB aZ2h/HyIRL5W1nhc5/09hB1fShdjdDAUHzm4dWvVOmGeJrWYgXOERRxepZdSwsgiVgL88Tq1WDxu1 kOqvPR7vj1RxdJLDAKx/6N2nRyDtfsoEHZ29f6eqVPsoRGhvqMAli3QiFwF+Wh1QWBnRSE22TZh0R aLt7RbmExhUG9OBozkc7VyehoKninQApgjKrw5A+WR+vGbw5C+q43m6ligQwVjRW2XVKuz3c8Jzo8 x3cfMbyA==; Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.96 #2 (Debian)) id 1u38yL-00Elp8-1d; Fri, 11 Apr 2025 15:38:46 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Fri, 11 Apr 2025 15:38:45 +0800 Date: Fri, 11 Apr 2025 15:38:45 +0800 Message-Id: <5aee9b968a894282393f6b8ccac1583830b5ddd5.1744356724.git.herbert@gondor.apana.org.au> In-Reply-To: References: From: Herbert Xu Subject: [PATCH 2/4] arm: Make simd.h more resilient To: Linux Crypto Mailing List Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Add missing header inclusions and protect against double inclusion. Signed-off-by: Herbert Xu --- arch/arm/include/asm/simd.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/simd.h b/arch/arm/include/asm/simd.h index 82191dbd7e78..d37559762180 100644 --- a/arch/arm/include/asm/simd.h +++ b/arch/arm/include/asm/simd.h @@ -1,8 +1,14 @@ /* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_SIMD_H +#define _ASM_SIMD_H -#include +#include +#include +#include static __must_check inline bool may_use_simd(void) { return IS_ENABLED(CONFIG_KERNEL_MODE_NEON) && !in_hardirq(); } + +#endif /* _ASM_SIMD_H */ From patchwork Fri Apr 11 07:38:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herbert Xu X-Patchwork-Id: 880363 Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC5ED293479 for ; Fri, 11 Apr 2025 07:38:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=144.6.53.87 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744357136; cv=none; b=YKuj5qIP2k6eKXEbXe0GApkcDjdHTDQ34dcgWrdkXa/oPuD9ZuSjfOEcg1TcqIa0iQlrB92dBypD/g/WYZgxoyLBfrzqUBrjxC8MwYKObrd4zq8jkM93/KzPJ75hdv32mIvtQQTvJ65PV7S8eaokzT85vRINXurkIcfBEHhETAM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744357136; c=relaxed/simple; bh=oK7kQtES5jCLWD5OsCQJpKxBvLQUmA9fhCbRdSsVXCE=; h=Date:Message-Id:In-Reply-To:References:From:Subject:To; b=cStcmb7gHzVDmRd+j6RO/FbXpoRGcvwDxZUMHv1a/ZsYgu226Cel//CCHGUhuSj9xdVneZgSYf4QV3BH32QZL8Y6V6Rr20JErgNfeHf3uJZOJGobLd8hy6zMeCdFrnmuBS8oxLWk3kPrcvNEfra8WSd9ypFcaRpp2mzZFat7qsw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au; spf=pass smtp.mailfrom=gondor.apana.org.au; dkim=pass (2048-bit key) header.d=hmeau.com header.i=@hmeau.com header.b=ShhfuHbU; arc=none smtp.client-ip=144.6.53.87 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=hmeau.com header.i=@hmeau.com header.b="ShhfuHbU" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hmeau.com; s=formenos; h=To:Subject:From:References:In-Reply-To:Message-Id:Date:Sender: Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=IWMfSqCPHZcF5cG0myN0JM1HrJburuNplKT9o3/xpyQ=; b=ShhfuHbUE/KnJ/6Md110WWk4he 0lBz8BrfXUadmA9x+dvQPsUsqorGvR8NCDQncLIb1vf0AHiQ6ZG/4umMwL5SB1mQhxWnQW0ynCi8I CHrTPDzk/QaiQTqyt3+1vM+gxmVZL6M3fTXIbWUa5cqJPqroEgsZvYp6iCElgSv8CWqhCRTrnN1p+ ma5ZYoThieGUCP1JQPeAN9R9ZK8cQk9G1otLBcnCXFyzHLtVluzgxJkGnKPYxW4tlMID2L6FdJJoP Cnhtq6WKn8t1kHK+wEzRdb3AOr5tTtdrPLI6QTJCnlVvsx5hvL9u51OUqyX34IsOOFIhWuzSrdfNe acgc/KGQ==; Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.96 #2 (Debian)) id 1u38yQ-00ElpU-0I; Fri, 11 Apr 2025 15:38:51 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Fri, 11 Apr 2025 15:38:50 +0800 Date: Fri, 11 Apr 2025 15:38:50 +0800 Message-Id: In-Reply-To: References: From: Herbert Xu Subject: [PATCH 4/4] crypto: simd - Include asm/simd.h in internal/simd.h To: Linux Crypto Mailing List Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Now that the asm/simd.h files have been made safe against double inclusion, include it directly in internal/simd.h. Signed-off-by: Herbert Xu --- include/crypto/internal/simd.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/crypto/internal/simd.h b/include/crypto/internal/simd.h index be97b97a75dd..f56049bd1660 100644 --- a/include/crypto/internal/simd.h +++ b/include/crypto/internal/simd.h @@ -6,6 +6,7 @@ #ifndef _CRYPTO_INTERNAL_SIMD_H #define _CRYPTO_INTERNAL_SIMD_H +#include #include #include @@ -46,9 +47,6 @@ void simd_unregister_aeads(struct aead_alg *algs, int count, * self-tests, in order to test the no-SIMD fallback code. This override is * currently limited to configurations where the extra self-tests are enabled, * because it might be a bit too invasive to be part of the regular self-tests. - * - * This is a macro so that , which some architectures don't have, - * doesn't have to be included directly here. */ #ifdef CONFIG_CRYPTO_MANAGER_EXTRA_TESTS DECLARE_PER_CPU(bool, crypto_simd_disabled_for_test);