From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org,
linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org,
sparclinux@vger.kernel.org, x86@kernel.org,
Ard Biesheuvel <ardb@kernel.org>,
"Jason A . Donenfeld" <Jason@zx2c4.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH v2 11/17] mips: cavium-octeon: move octeon-crypto.h into asm directory
Date: Sun, 15 Jun 2025 18:40:13 -0700 [thread overview]
Message-ID: <20250616014019.415791-12-ebiggers@kernel.org> (raw)
In-Reply-To: <20250616014019.415791-1-ebiggers@kernel.org>
From: Eric Biggers <ebiggers@google.com>
Since arch/mips/cavium-octeon/crypto/octeon-crypto.h is now needed
outside of its directory, move it to
arch/mips/include/asm/octeon/crypto.h so that it can be included as
<asm/octeon/crypto.h>.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
arch/mips/cavium-octeon/crypto/octeon-crypto.c | 3 +--
arch/mips/cavium-octeon/crypto/octeon-md5.c | 3 +--
arch/mips/cavium-octeon/crypto/octeon-sha1.c | 3 +--
arch/mips/cavium-octeon/crypto/octeon-sha256.c | 3 +--
arch/mips/cavium-octeon/crypto/octeon-sha512.c | 3 +--
.../crypto/octeon-crypto.h => include/asm/octeon/crypto.h} | 0
6 files changed, 5 insertions(+), 10 deletions(-)
rename arch/mips/{cavium-octeon/crypto/octeon-crypto.h => include/asm/octeon/crypto.h} (100%)
diff --git a/arch/mips/cavium-octeon/crypto/octeon-crypto.c b/arch/mips/cavium-octeon/crypto/octeon-crypto.c
index cfb4a146cf178..0ff8559391f5b 100644
--- a/arch/mips/cavium-octeon/crypto/octeon-crypto.c
+++ b/arch/mips/cavium-octeon/crypto/octeon-crypto.c
@@ -5,16 +5,15 @@
*
* Copyright (C) 2004-2012 Cavium Networks
*/
#include <asm/cop2.h>
+#include <asm/octeon/crypto.h>
#include <linux/export.h>
#include <linux/interrupt.h>
#include <linux/sched/task_stack.h>
-#include "octeon-crypto.h"
-
/**
* Enable access to Octeon's COP2 crypto hardware for kernel use. Wrap any
* crypto operations in calls to octeon_crypto_enable/disable in order to make
* sure the state of COP2 isn't corrupted if userspace is also performing
* hardware crypto operations. Allocate the state parameter on the stack.
diff --git a/arch/mips/cavium-octeon/crypto/octeon-md5.c b/arch/mips/cavium-octeon/crypto/octeon-md5.c
index fbc84eb7fedf5..a8ce831e2cebd 100644
--- a/arch/mips/cavium-octeon/crypto/octeon-md5.c
+++ b/arch/mips/cavium-octeon/crypto/octeon-md5.c
@@ -17,20 +17,19 @@
* 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 <asm/octeon/crypto.h>
#include <asm/octeon/octeon.h>
#include <crypto/internal/hash.h>
#include <crypto/md5.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/string.h>
#include <linux/unaligned.h>
-#include "octeon-crypto.h"
-
struct octeon_md5_state {
__le32 hash[MD5_HASH_WORDS];
u64 byte_count;
};
diff --git a/arch/mips/cavium-octeon/crypto/octeon-sha1.c b/arch/mips/cavium-octeon/crypto/octeon-sha1.c
index e70f21a473daf..e4a369a7764fb 100644
--- a/arch/mips/cavium-octeon/crypto/octeon-sha1.c
+++ b/arch/mips/cavium-octeon/crypto/octeon-sha1.c
@@ -11,20 +11,19 @@
* Copyright (c) Alan Smithee.
* Copyright (c) Andrew McDonald <andrew@mcdonald.org.uk>
* Copyright (c) Jean-Francois Dive <jef@linuxbe.org>
*/
+#include <asm/octeon/crypto.h>
#include <asm/octeon/octeon.h>
#include <crypto/internal/hash.h>
#include <crypto/sha1.h>
#include <crypto/sha1_base.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
-#include "octeon-crypto.h"
-
/*
* We pass everything as 64-bit. OCTEON can handle misaligned data.
*/
static void octeon_sha1_store_hash(struct sha1_state *sctx)
diff --git a/arch/mips/cavium-octeon/crypto/octeon-sha256.c b/arch/mips/cavium-octeon/crypto/octeon-sha256.c
index f93faaf1f4af6..c20038239cb6b 100644
--- a/arch/mips/cavium-octeon/crypto/octeon-sha256.c
+++ b/arch/mips/cavium-octeon/crypto/octeon-sha256.c
@@ -10,17 +10,16 @@
* Copyright (c) Andrew McDonald <andrew@mcdonald.org.uk>
* Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
* SHA224 Support Copyright 2007 Intel Corporation <jonathan.lynch@intel.com>
*/
+#include <asm/octeon/crypto.h>
#include <asm/octeon/octeon.h>
#include <crypto/internal/sha2.h>
#include <linux/kernel.h>
#include <linux/module.h>
-#include "octeon-crypto.h"
-
/*
* We pass everything as 64-bit. OCTEON can handle misaligned data.
*/
void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
diff --git a/arch/mips/cavium-octeon/crypto/octeon-sha512.c b/arch/mips/cavium-octeon/crypto/octeon-sha512.c
index 215311053db3c..53de74f642db0 100644
--- a/arch/mips/cavium-octeon/crypto/octeon-sha512.c
+++ b/arch/mips/cavium-octeon/crypto/octeon-sha512.c
@@ -11,19 +11,18 @@
* Copyright (c) Jean-Luc Cooke <jlcooke@certainkey.com>
* Copyright (c) Andrew McDonald <andrew@mcdonald.org.uk>
* Copyright (c) 2003 Kyle McMartin <kyle@debian.org>
*/
+#include <asm/octeon/crypto.h>
#include <asm/octeon/octeon.h>
#include <crypto/internal/hash.h>
#include <crypto/sha2.h>
#include <crypto/sha512_base.h>
#include <linux/kernel.h>
#include <linux/module.h>
-#include "octeon-crypto.h"
-
/*
* We pass everything as 64-bit. OCTEON can handle misaligned data.
*/
static void octeon_sha512_store_hash(struct sha512_state *sctx)
diff --git a/arch/mips/cavium-octeon/crypto/octeon-crypto.h b/arch/mips/include/asm/octeon/crypto.h
similarity index 100%
rename from arch/mips/cavium-octeon/crypto/octeon-crypto.h
rename to arch/mips/include/asm/octeon/crypto.h
--
2.49.0
next prev parent reply other threads:[~2025-06-16 1:41 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-16 1:40 [PATCH v2 00/17] SHA-512 library functions Eric Biggers
2025-06-16 1:40 ` [PATCH v2 01/17] crypto: sha512 - rename conflicting symbols Eric Biggers
2025-06-16 1:40 ` [PATCH v2 02/17] lib/crypto/sha512: add support for SHA-384 and SHA-512 Eric Biggers
2025-06-16 1:40 ` [PATCH v2 03/17] lib/crypto/sha512: add HMAC-SHA384 and HMAC-SHA512 support Eric Biggers
2025-06-16 1:40 ` [PATCH v2 04/17] lib/crypto/sha512: add KUnit tests for SHA-384 and SHA-512 Eric Biggers
2025-06-16 1:40 ` [PATCH v2 05/17] lib/crypto/sha256: add KUnit tests for SHA-224 and SHA-256 Eric Biggers
2025-06-16 1:40 ` [PATCH v2 06/17] crypto: riscv/sha512 - stop depending on sha512_generic_block_fn Eric Biggers
2025-06-16 1:40 ` [PATCH v2 07/17] crypto: sha512 - replace sha512_generic with wrapper around SHA-512 library Eric Biggers
2025-06-16 1:40 ` [PATCH v2 08/17] crypto: sha512 - use same state format as legacy drivers Eric Biggers
2025-06-16 1:40 ` [PATCH v2 09/17] lib/crypto/sha512: migrate arm-optimized SHA-512 code to library Eric Biggers
2025-06-16 1:40 ` [PATCH v2 10/17] lib/crypto/sha512: migrate arm64-optimized " Eric Biggers
2025-06-16 1:40 ` Eric Biggers [this message]
2025-06-16 1:40 ` [PATCH v2 12/17] lib/crypto/sha512: migrate mips-optimized " Eric Biggers
2025-06-16 1:40 ` [PATCH v2 13/17] lib/crypto/sha512: migrate riscv-optimized " Eric Biggers
2025-06-16 1:40 ` [PATCH v2 14/17] lib/crypto/sha512: migrate s390-optimized " Eric Biggers
2025-06-16 1:40 ` [PATCH v2 15/17] lib/crypto/sha512: migrate sparc-optimized " Eric Biggers
2025-06-16 1:40 ` [PATCH v2 16/17] lib/crypto/sha512: migrate x86-optimized " Eric Biggers
2025-06-16 1:40 ` [PATCH v2 17/17] crypto: sha512 - remove sha512_base.h Eric Biggers
2025-06-17 6:05 ` [PATCH v2 00/17] SHA-512 library functions Eric Biggers
2025-06-17 18:29 ` Linus Torvalds
2025-06-17 19:22 ` Eric Biggers
2025-06-17 19:43 ` Linus Torvalds
2025-06-17 19:58 ` Eric Biggers
2025-06-17 20:08 ` Linus Torvalds
2025-06-17 20:37 ` Eric Biggers
2025-06-17 21:10 ` Linus Torvalds
2025-06-20 21:27 ` Eric Biggers
2025-06-20 21:42 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250616014019.415791-12-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--cc=Jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=sparclinux@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox