mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
crypto: arm64/crct10dif - Remove obsolete chunking logic
This is a partial revert of commit fc754c024a
, which moved the logic
into C code which ensures that kernel mode NEON code does not hog the
CPU for too long.
This is no longer needed now that kernel mode NEON no longer disables
preemption, so we can drop this.
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
19630cf572
commit
7048c21e6b
@ -37,18 +37,9 @@ static int crct10dif_update_pmull_p8(struct shash_desc *desc, const u8 *data,
|
|||||||
u16 *crc = shash_desc_ctx(desc);
|
u16 *crc = shash_desc_ctx(desc);
|
||||||
|
|
||||||
if (length >= CRC_T10DIF_PMULL_CHUNK_SIZE && crypto_simd_usable()) {
|
if (length >= CRC_T10DIF_PMULL_CHUNK_SIZE && crypto_simd_usable()) {
|
||||||
do {
|
kernel_neon_begin();
|
||||||
unsigned int chunk = length;
|
*crc = crc_t10dif_pmull_p8(*crc, data, length);
|
||||||
|
kernel_neon_end();
|
||||||
if (chunk > SZ_4K + CRC_T10DIF_PMULL_CHUNK_SIZE)
|
|
||||||
chunk = SZ_4K;
|
|
||||||
|
|
||||||
kernel_neon_begin();
|
|
||||||
*crc = crc_t10dif_pmull_p8(*crc, data, chunk);
|
|
||||||
kernel_neon_end();
|
|
||||||
data += chunk;
|
|
||||||
length -= chunk;
|
|
||||||
} while (length);
|
|
||||||
} else {
|
} else {
|
||||||
*crc = crc_t10dif_generic(*crc, data, length);
|
*crc = crc_t10dif_generic(*crc, data, length);
|
||||||
}
|
}
|
||||||
@ -62,18 +53,9 @@ static int crct10dif_update_pmull_p64(struct shash_desc *desc, const u8 *data,
|
|||||||
u16 *crc = shash_desc_ctx(desc);
|
u16 *crc = shash_desc_ctx(desc);
|
||||||
|
|
||||||
if (length >= CRC_T10DIF_PMULL_CHUNK_SIZE && crypto_simd_usable()) {
|
if (length >= CRC_T10DIF_PMULL_CHUNK_SIZE && crypto_simd_usable()) {
|
||||||
do {
|
kernel_neon_begin();
|
||||||
unsigned int chunk = length;
|
*crc = crc_t10dif_pmull_p64(*crc, data, length);
|
||||||
|
kernel_neon_end();
|
||||||
if (chunk > SZ_4K + CRC_T10DIF_PMULL_CHUNK_SIZE)
|
|
||||||
chunk = SZ_4K;
|
|
||||||
|
|
||||||
kernel_neon_begin();
|
|
||||||
*crc = crc_t10dif_pmull_p64(*crc, data, chunk);
|
|
||||||
kernel_neon_end();
|
|
||||||
data += chunk;
|
|
||||||
length -= chunk;
|
|
||||||
} while (length);
|
|
||||||
} else {
|
} else {
|
||||||
*crc = crc_t10dif_generic(*crc, data, length);
|
*crc = crc_t10dif_generic(*crc, data, length);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user