From 60edd2fc8d9ff885d3df8a79fa76b8bf817b34ea Mon Sep 17 00:00:00 2001 From: Tashfin Shakeer Rhythm Date: Wed, 22 Feb 2023 19:09:38 +0600 Subject: [PATCH] lz4: Use ARM64 v8 ASM to accelerate lz4 decompression Signed-off-by: Tashfin Shakeer Rhythm Signed-off-by: Helium-Studio <67852324+Helium-Studio@users.noreply.github.com> --- lib/lz4/lz4.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/lz4/lz4.c b/lib/lz4/lz4.c index 666360bd3cb9..2412628ba6d6 100644 --- a/lib/lz4/lz4.c +++ b/lib/lz4/lz4.c @@ -3239,8 +3239,13 @@ int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode, if (lz4sd->prefixSize == 0) { /* The first call, no dictionary yet. */ assert(lz4sd->extDictSize == 0); +#if defined(CONFIG_ARM64) && defined(CONFIG_KERNEL_MODE_NEON) + result = LZ4_arm64_decompress_safe(source, dest, compressedSize, + maxOutputSize, false); +#else result = LZ4_decompress_safe(source, dest, compressedSize, maxOutputSize); +#endif if (result <= 0) return result; lz4sd->prefixSize = (size_t)result;