Skip to content

ARM crc64 and XOR using NEON intrinsics

Ard Biesheuvel linux-arm-kernel linux-crypto linux-raid 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8ARM: Add a neon-intrinsics.h header like on arm64Documentation/arch/arm/kernel_mode_neon.rst arch/arm/include/asm/neon-intrinsics.h+63 -10 replies
2/8xor/arm: Replace vectorized implementation with arm64's intrinsicslib/raid/xor/Makefile lib/raid/xor/arm/xor-neon.c lib/raid/xor/arm/xor-neon.h +3 more+186 -372 replies
3/8xor/arm64: Use shared NEON intrinsics implementation from 32-bit ARMlib/raid/xor/Makefile lib/raid/xor/arm64/xor-eor3.c lib/raid/xor/arm64/xor-neon.c +1 more+154 -3153 replies
4/8lib/crc: Turn NEON intrinsics crc64 implementation into common codelib/crc/Makefile lib/crc/arm64/crc64-neon.h lib/crc/arm64/crc64.h +1 more+30 -271 reply
5/8lib/crc: arm: Enable arm64's NEON intrinsics implementation of crc64lib/crc/Kconfig lib/crc/Makefile lib/crc/arm/crc64-neon.h +1 more+75 -11 reply
6/8crypto: aegis128 - Use neon-intrinsics.h on ARM toocrypto/Makefile crypto/aegis128-neon-inner.c+5 -91 reply
7/8lib/raid6: Include asm/neon-intrinsics.h rather than arm_neon.hlib/raid6/neon.uc lib/raid6/recov_neon_inner.c+2 -26 replies
8/8ARM: Remove hacked-up asm/types.h headerarch/arm/include/uapi/asm/types.h+0 -412 replies

Reviews trailers per patch

7 of 8 patches have a Reviewed-by or Acked-by.

PatchJosh LawChristoph HellwigArnd Bergmann
1/8
2/8R-b A-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/8] ARM crc64 and XOR using NEON intrinsics

From: Ard Biesheuvel <[email protected]>

This is a follow-up to both [0] and [1], both of which included patch #1 of this series, which introduces the asm/neon-intrinsics.h header on 32-bit ARM. The remaining changes rely on this.

The purpose of this series is to streamline / clean up the use of NEON intrinsics on 32-bit ARM, by sharing more code, clean up Make rules and finally, getting rid of the hacked up types.h header, which does some nasty things that are only needed when building NEON intrinsics code.

Patches #2 and #3 replace the ARM autovectorized XOR implementation with the NEON intrinsics version used by arm64.

Patches #4 and #5 enable the arm64 NEON intrinsics implementation of crc64 on 32-bit ARM.

Patches #6 and #7 drop the direct includes of <arm_neon.h> and perform some additional cleanup to reduce the delta between ARM and arm64 code and Make rules.

It would probably be easiest to take all these changes through a single tree, and the CRC tree seems like a suitable candidate, if Eric agrees.

Cc Christoph Hellwig <[email protected]>
Cc Russell King <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Eric Biggers <[email protected]>

[0] https://lore.kernel.org/all/[email protected]/
[1] https://lore.kernel.org/all/[email protected]/

Ard Biesheuvel (8):
ARM: Add a neon-intrinsics.h header like on arm64 xor/arm: Replace vectorized implementation with arm64's intrinsics xor/arm64: Use shared NEON intrinsics implementation from 32-bit ARM lib/crc: Turn NEON intrinsics crc64 implementation into common code lib/crc: arm: Enable arm64's NEON intrinsics implementation of crc64
crypto: aegis128 - Use neon-intrinsics.h on ARM too lib/raid6: Include asm/neon-intrinsics.h rather than arm_neon.h
ARM: Remove hacked-up asm/types.h header

 Documentation/arch/arm/kernel_mode_neon.rst        |   4 +-
 arch/arm/include/asm/neon-intrinsics.h             |  60 ++++++++
 arch/arm/include/uapi/asm/types.h                  |  41 ------
 crypto/Makefile                                    |  10 +-
 crypto/aegis128-neon-inner.c                       |   4 +-
 lib/crc/Kconfig                                    |   1 +
 lib/crc/Makefile                                   |   9 +-
 lib/crc/arm/crc64-neon.h                           |  34 +++++
 lib/crc/arm/crc64.h                                |  36 +++++
 lib/crc/arm64/crc64-neon.h                         |  21 +++
 lib/crc/arm64/crc64.h                              |   4 +-
 lib/crc/{arm64/crc64-neon-inner.c => crc64-neon.c} |  26 +---
 lib/raid/xor/Makefile                              |  13 +-
 lib/raid/xor/arm/xor-neon.c                        |  26 ----
 lib/raid/xor/arm/xor-neon.h                        |   7 +
 lib/raid/xor/arm/xor_arch.h                        |   7 +-
 lib/raid/xor/arm64/xor-eor3.c                      | 146 ++++++++++++++++++++
 lib/raid/xor/xor-8regs.c                           |   2 -
 lib/raid/xor/{arm64 => }/xor-neon.c                | 143 +------------------
 lib/raid6/neon.uc                                  |   2 +-
 lib/raid6/recov_neon_inner.c                       |   2 +-
 21 files changed, 340 insertions(+), 258 deletions(-)
 create mode 100644 arch/arm/include/asm/neon-intrinsics.h
 delete mode 100644 arch/arm/include/uapi/asm/types.h
 create mode 100644 lib/crc/arm/crc64-neon.h
 create mode 100644 lib/crc/arm/crc64.h
 create mode 100644 lib/crc/arm64/crc64-neon.h
 rename lib/crc/{arm64/crc64-neon-inner.c => crc64-neon.c} (62%)
 delete mode 100644 lib/raid/xor/arm/xor-neon.c
 create mode 100644 lib/raid/xor/arm/xor-neon.h
 create mode 100644 lib/raid/xor/arm64/xor-eor3.c
 rename lib/raid/xor/{arm64 => }/xor-neon.c (56%)

base-commit: 6596a02b207886e9e00bb0161c7fd59fea53c081

Signature · 1 line
2.54.0.rc1.555.g9c883467ad-goog