Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75d8a553 authored by Eric Biggers's avatar Eric Biggers Committed by Herbert Xu
Browse files

crypto: x86/glue_helper - rename glue_skwalk_fpu_begin()



There are no users of the original glue_fpu_begin() anymore, so rename
glue_skwalk_fpu_begin() to glue_fpu_begin() so that it matches
glue_fpu_end() again.

Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 0d87d0f4
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -50,7 +50,7 @@ static int cast5_setkey_skcipher(struct crypto_skcipher *tfm, const u8 *key,
static inline bool cast5_fpu_begin(bool fpu_enabled, struct skcipher_walk *walk,
static inline bool cast5_fpu_begin(bool fpu_enabled, struct skcipher_walk *walk,
				   unsigned int nbytes)
				   unsigned int nbytes)
{
{
	return glue_skwalk_fpu_begin(CAST5_BLOCK_SIZE, CAST5_PARALLEL_BLOCKS,
	return glue_fpu_begin(CAST5_BLOCK_SIZE, CAST5_PARALLEL_BLOCKS,
			      walk, fpu_enabled, nbytes);
			      walk, fpu_enabled, nbytes);
}
}


+9 −12
Original line number Original line Diff line number Diff line
@@ -50,8 +50,7 @@ int glue_ecb_req_128bit(const struct common_glue_ctx *gctx,
		unsigned int func_bytes;
		unsigned int func_bytes;
		unsigned int i;
		unsigned int i;


		fpu_enabled = glue_skwalk_fpu_begin(bsize,
		fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit,
						    gctx->fpu_blocks_limit,
					     &walk, fpu_enabled, nbytes);
					     &walk, fpu_enabled, nbytes);
		for (i = 0; i < gctx->num_funcs; i++) {
		for (i = 0; i < gctx->num_funcs; i++) {
			func_bytes = bsize * gctx->funcs[i].num_blocks;
			func_bytes = bsize * gctx->funcs[i].num_blocks;
@@ -129,8 +128,7 @@ int glue_cbc_decrypt_req_128bit(const struct common_glue_ctx *gctx,
		unsigned int i;
		unsigned int i;
		u128 last_iv;
		u128 last_iv;


		fpu_enabled = glue_skwalk_fpu_begin(bsize,
		fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit,
						    gctx->fpu_blocks_limit,
					     &walk, fpu_enabled, nbytes);
					     &walk, fpu_enabled, nbytes);
		/* Start of the last block. */
		/* Start of the last block. */
		src += nbytes / bsize - 1;
		src += nbytes / bsize - 1;
@@ -190,8 +188,7 @@ int glue_ctr_req_128bit(const struct common_glue_ctx *gctx,
		unsigned int i;
		unsigned int i;
		le128 ctrblk;
		le128 ctrblk;


		fpu_enabled = glue_skwalk_fpu_begin(bsize,
		fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit,
						    gctx->fpu_blocks_limit,
					     &walk, fpu_enabled, nbytes);
					     &walk, fpu_enabled, nbytes);


		be128_to_le128(&ctrblk, (be128 *)walk.iv);
		be128_to_le128(&ctrblk, (be128 *)walk.iv);
@@ -291,7 +288,7 @@ int glue_xts_req_128bit(const struct common_glue_ctx *gctx,
		return err;
		return err;


	/* set minimum length to bsize, for tweak_fn */
	/* set minimum length to bsize, for tweak_fn */
	fpu_enabled = glue_skwalk_fpu_begin(bsize, gctx->fpu_blocks_limit,
	fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit,
				     &walk, fpu_enabled,
				     &walk, fpu_enabled,
				     nbytes < bsize ? bsize : nbytes);
				     nbytes < bsize ? bsize : nbytes);


+3 −4
Original line number Original line Diff line number Diff line
@@ -44,8 +44,7 @@ struct common_glue_ctx {
	struct common_glue_func_entry funcs[];
	struct common_glue_func_entry funcs[];
};
};


static inline bool glue_skwalk_fpu_begin(unsigned int bsize,
static inline bool glue_fpu_begin(unsigned int bsize, int fpu_blocks_limit,
					 int fpu_blocks_limit,
				  struct skcipher_walk *walk,
				  struct skcipher_walk *walk,
				  bool fpu_enabled, unsigned int nbytes)
				  bool fpu_enabled, unsigned int nbytes)
{
{