linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] lib/crc: drop "glue" from filenames
@ 2025-04-24  0:20 Eric Biggers
  2025-04-24  0:20 ` [PATCH 1/7] arm/crc: " Eric Biggers
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Eric Biggers @ 2025-04-24  0:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ard Biesheuvel, linux-crypto, linux-arm-kernel, linuxppc-dev,
	linux-s390, sparclinux, x86

This series fixes an odd naming convention that was unnecessarily
carried over from the original Crypto API code.

I'm planning to take this via the crc tree.

Eric Biggers (7):
  arm/crc: drop "glue" from filenames
  arm64/crc: drop "glue" from filenames
  powerpc/crc: drop "glue" from filenames
  powerpc/crc: rename crc32-vpmsum_core.S to crc-vpmsum-template.S
  s390/crc: drop "glue" from filenames
  sparc/crc: drop "glue" from filenames
  x86/crc: drop "glue" from filenames

 arch/arm/lib/Makefile                                       | 4 ++--
 arch/arm/lib/{crc-t10dif-glue.c => crc-t10dif.c}            | 0
 arch/arm/lib/{crc32-glue.c => crc32.c}                      | 0
 arch/arm64/lib/Makefile                                     | 4 ++--
 arch/arm64/lib/{crc-t10dif-glue.c => crc-t10dif.c}          | 0
 arch/arm64/lib/{crc32.S => crc32-core.S}                    | 0
 arch/arm64/lib/{crc32-glue.c => crc32.c}                    | 0
 arch/powerpc/lib/Makefile                                   | 4 ++--
 arch/powerpc/lib/{crc-t10dif-glue.c => crc-t10dif.c}        | 0
 .../lib/{crc32-vpmsum_core.S => crc-vpmsum-template.S}      | 0
 arch/powerpc/lib/{crc32-glue.c => crc32.c}                  | 0
 arch/powerpc/lib/crc32c-vpmsum_asm.S                        | 2 +-
 arch/powerpc/lib/crct10dif-vpmsum_asm.S                     | 2 +-
 arch/s390/lib/Makefile                                      | 2 +-
 arch/s390/lib/{crc32-glue.c => crc32.c}                     | 0
 arch/sparc/lib/Makefile                                     | 2 +-
 arch/sparc/lib/{crc32_glue.c => crc32.c}                    | 2 +-
 arch/x86/lib/Makefile                                       | 6 +++---
 arch/x86/lib/{crc-t10dif-glue.c => crc-t10dif.c}            | 0
 arch/x86/lib/{crc32-glue.c => crc32.c}                      | 0
 arch/x86/lib/{crc64-glue.c => crc64.c}                      | 0
 21 files changed, 14 insertions(+), 14 deletions(-)
 rename arch/arm/lib/{crc-t10dif-glue.c => crc-t10dif.c} (100%)
 rename arch/arm/lib/{crc32-glue.c => crc32.c} (100%)
 rename arch/arm64/lib/{crc-t10dif-glue.c => crc-t10dif.c} (100%)
 rename arch/arm64/lib/{crc32.S => crc32-core.S} (100%)
 rename arch/arm64/lib/{crc32-glue.c => crc32.c} (100%)
 rename arch/powerpc/lib/{crc-t10dif-glue.c => crc-t10dif.c} (100%)
 rename arch/powerpc/lib/{crc32-vpmsum_core.S => crc-vpmsum-template.S} (100%)
 rename arch/powerpc/lib/{crc32-glue.c => crc32.c} (100%)
 rename arch/s390/lib/{crc32-glue.c => crc32.c} (100%)
 rename arch/sparc/lib/{crc32_glue.c => crc32.c} (97%)
 rename arch/x86/lib/{crc-t10dif-glue.c => crc-t10dif.c} (100%)
 rename arch/x86/lib/{crc32-glue.c => crc32.c} (100%)
 rename arch/x86/lib/{crc64-glue.c => crc64.c} (100%)

base-commit: 1ec3d4ff5c77422927896c1f7d0ed01267ec1213
-- 
2.49.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/7] arm/crc: drop "glue" from filenames
  2025-04-24  0:20 [PATCH 0/7] lib/crc: drop "glue" from filenames Eric Biggers
@ 2025-04-24  0:20 ` Eric Biggers
  2025-04-24  0:20 ` [PATCH 2/7] arm64/crc: " Eric Biggers
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Eric Biggers @ 2025-04-24  0:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ard Biesheuvel, linux-crypto, linux-arm-kernel, linuxppc-dev,
	linux-s390, sparclinux, x86

From: Eric Biggers <ebiggers@google.com>

The use of the term "glue" in filenames is a Crypto API-ism that rarely
shows up elsewhere in lib/ or arch/*/lib/.  I think adopting it there
was a mistake.  The library just uses standard functions, so the amount
of code that could be considered "glue" is quite small.  And while often
the C functions just wrap the assembly functions, there are also cases
like crc32c_arch() in arch/x86/lib/crc32-glue.c that blur the line by
in-lining the actual implementation into the C function.  That's not
"glue code", but rather the actual code.

Therefore, let's drop "glue" from the filenames and instead use e.g.
crc32.c instead of crc32-glue.c.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 arch/arm/lib/Makefile                            | 4 ++--
 arch/arm/lib/{crc-t10dif-glue.c => crc-t10dif.c} | 0
 arch/arm/lib/{crc32-glue.c => crc32.c}           | 0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/arm/lib/{crc-t10dif-glue.c => crc-t10dif.c} (100%)
 rename arch/arm/lib/{crc32-glue.c => crc32.c} (100%)

diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index 007874320937d..d05dd672bcd9c 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -45,9 +45,9 @@ ifeq ($(CONFIG_KERNEL_MODE_NEON),y)
 endif
 
 obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o
 
 obj-$(CONFIG_CRC32_ARCH) += crc32-arm.o
-crc32-arm-y := crc32-glue.o crc32-core.o
+crc32-arm-y := crc32.o crc32-core.o
 
 obj-$(CONFIG_CRC_T10DIF_ARCH) += crc-t10dif-arm.o
-crc-t10dif-arm-y := crc-t10dif-glue.o crc-t10dif-core.o
+crc-t10dif-arm-y := crc-t10dif.o crc-t10dif-core.o
diff --git a/arch/arm/lib/crc-t10dif-glue.c b/arch/arm/lib/crc-t10dif.c
similarity index 100%
rename from arch/arm/lib/crc-t10dif-glue.c
rename to arch/arm/lib/crc-t10dif.c
diff --git a/arch/arm/lib/crc32-glue.c b/arch/arm/lib/crc32.c
similarity index 100%
rename from arch/arm/lib/crc32-glue.c
rename to arch/arm/lib/crc32.c
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/7] arm64/crc: drop "glue" from filenames
  2025-04-24  0:20 [PATCH 0/7] lib/crc: drop "glue" from filenames Eric Biggers
  2025-04-24  0:20 ` [PATCH 1/7] arm/crc: " Eric Biggers
@ 2025-04-24  0:20 ` Eric Biggers
  2025-04-24  0:20 ` [PATCH 3/7] powerpc/crc: " Eric Biggers
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Eric Biggers @ 2025-04-24  0:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ard Biesheuvel, linux-crypto, linux-arm-kernel, linuxppc-dev,
	linux-s390, sparclinux, x86

From: Eric Biggers <ebiggers@google.com>

The use of the term "glue" in filenames is a Crypto API-ism that rarely
shows up elsewhere in lib/ or arch/*/lib/.  I think adopting it there
was a mistake.  The library just uses standard functions, so the amount
of code that could be considered "glue" is quite small.  And while often
the C functions just wrap the assembly functions, there are also cases
like crc32c_arch() in arch/x86/lib/crc32-glue.c that blur the line by
in-lining the actual implementation into the C function.  That's not
"glue code", but rather the actual code.

Therefore, let's drop "glue" from the filenames and instead use e.g.
crc32.c instead of crc32-glue.c.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 arch/arm64/lib/Makefile                            | 4 ++--
 arch/arm64/lib/{crc-t10dif-glue.c => crc-t10dif.c} | 0
 arch/arm64/lib/{crc32.S => crc32-core.S}           | 0
 arch/arm64/lib/{crc32-glue.c => crc32.c}           | 0
 4 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/arm64/lib/{crc-t10dif-glue.c => crc-t10dif.c} (100%)
 rename arch/arm64/lib/{crc32.S => crc32-core.S} (100%)
 rename arch/arm64/lib/{crc32-glue.c => crc32.c} (100%)

diff --git a/arch/arm64/lib/Makefile b/arch/arm64/lib/Makefile
index 4d49dff721a84..d97e290619bc5 100644
--- a/arch/arm64/lib/Makefile
+++ b/arch/arm64/lib/Makefile
@@ -12,14 +12,14 @@ CFLAGS_REMOVE_xor-neon.o	+= $(CC_FLAGS_NO_FPU)
 endif
 
 lib-$(CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE) += uaccess_flushcache.o
 
 obj-$(CONFIG_CRC32_ARCH) += crc32-arm64.o
-crc32-arm64-y := crc32.o crc32-glue.o
+crc32-arm64-y := crc32.o crc32-core.o
 
 obj-$(CONFIG_CRC_T10DIF_ARCH) += crc-t10dif-arm64.o
-crc-t10dif-arm64-y := crc-t10dif-glue.o crc-t10dif-core.o
+crc-t10dif-arm64-y := crc-t10dif.o crc-t10dif-core.o
 
 obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o
 
 obj-$(CONFIG_ARM64_MTE) += mte.o
 
diff --git a/arch/arm64/lib/crc-t10dif-glue.c b/arch/arm64/lib/crc-t10dif.c
similarity index 100%
rename from arch/arm64/lib/crc-t10dif-glue.c
rename to arch/arm64/lib/crc-t10dif.c
diff --git a/arch/arm64/lib/crc32.S b/arch/arm64/lib/crc32-core.S
similarity index 100%
rename from arch/arm64/lib/crc32.S
rename to arch/arm64/lib/crc32-core.S
diff --git a/arch/arm64/lib/crc32-glue.c b/arch/arm64/lib/crc32.c
similarity index 100%
rename from arch/arm64/lib/crc32-glue.c
rename to arch/arm64/lib/crc32.c
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/7] powerpc/crc: drop "glue" from filenames
  2025-04-24  0:20 [PATCH 0/7] lib/crc: drop "glue" from filenames Eric Biggers
  2025-04-24  0:20 ` [PATCH 1/7] arm/crc: " Eric Biggers
  2025-04-24  0:20 ` [PATCH 2/7] arm64/crc: " Eric Biggers
@ 2025-04-24  0:20 ` Eric Biggers
  2025-04-24  0:20 ` [PATCH 4/7] powerpc/crc: rename crc32-vpmsum_core.S to crc-vpmsum-template.S Eric Biggers
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Eric Biggers @ 2025-04-24  0:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ard Biesheuvel, linux-crypto, linux-arm-kernel, linuxppc-dev,
	linux-s390, sparclinux, x86

From: Eric Biggers <ebiggers@google.com>

The use of the term "glue" in filenames is a Crypto API-ism that rarely
shows up elsewhere in lib/ or arch/*/lib/.  I think adopting it there
was a mistake.  The library just uses standard functions, so the amount
of code that could be considered "glue" is quite small.  And while often
the C functions just wrap the assembly functions, there are also cases
like crc32c_arch() in arch/x86/lib/crc32-glue.c that blur the line by
in-lining the actual implementation into the C function.  That's not
"glue code", but rather the actual code.

Therefore, let's drop "glue" from the filenames and instead use e.g.
crc32.c instead of crc32-glue.c.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 arch/powerpc/lib/Makefile                            | 4 ++--
 arch/powerpc/lib/{crc-t10dif-glue.c => crc-t10dif.c} | 0
 arch/powerpc/lib/{crc32-glue.c => crc32.c}           | 0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/powerpc/lib/{crc-t10dif-glue.c => crc-t10dif.c} (100%)
 rename arch/powerpc/lib/{crc32-glue.c => crc32.c} (100%)

diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index dd8a4b52a0ccb..27f8a01438603 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -77,11 +77,11 @@ obj-$(CONFIG_ALTIVEC)	+= xor_vmx.o xor_vmx_glue.o
 CFLAGS_xor_vmx.o += -mhard-float -maltivec $(call cc-option,-mabi=altivec)
 # Enable <altivec.h>
 CFLAGS_xor_vmx.o += -isystem $(shell $(CC) -print-file-name=include)
 
 obj-$(CONFIG_CRC32_ARCH) += crc32-powerpc.o
-crc32-powerpc-y := crc32-glue.o crc32c-vpmsum_asm.o
+crc32-powerpc-y := crc32.o crc32c-vpmsum_asm.o
 
 obj-$(CONFIG_CRC_T10DIF_ARCH) += crc-t10dif-powerpc.o
-crc-t10dif-powerpc-y := crc-t10dif-glue.o crct10dif-vpmsum_asm.o
+crc-t10dif-powerpc-y := crc-t10dif.o crct10dif-vpmsum_asm.o
 
 obj-$(CONFIG_PPC64) += $(obj64-y)
diff --git a/arch/powerpc/lib/crc-t10dif-glue.c b/arch/powerpc/lib/crc-t10dif.c
similarity index 100%
rename from arch/powerpc/lib/crc-t10dif-glue.c
rename to arch/powerpc/lib/crc-t10dif.c
diff --git a/arch/powerpc/lib/crc32-glue.c b/arch/powerpc/lib/crc32.c
similarity index 100%
rename from arch/powerpc/lib/crc32-glue.c
rename to arch/powerpc/lib/crc32.c
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/7] powerpc/crc: rename crc32-vpmsum_core.S to crc-vpmsum-template.S
  2025-04-24  0:20 [PATCH 0/7] lib/crc: drop "glue" from filenames Eric Biggers
                   ` (2 preceding siblings ...)
  2025-04-24  0:20 ` [PATCH 3/7] powerpc/crc: " Eric Biggers
@ 2025-04-24  0:20 ` Eric Biggers
  2025-04-24  0:20 ` [PATCH 5/7] s390/crc: drop "glue" from filenames Eric Biggers
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Eric Biggers @ 2025-04-24  0:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ard Biesheuvel, linux-crypto, linux-arm-kernel, linuxppc-dev,
	linux-s390, sparclinux, x86

From: Eric Biggers <ebiggers@google.com>

Rename crc32-vpmsum_core.S to crc-vpmsum-template.S to properly convey
that (a) it actually generates code for both 32-bit and 16-bit CRCs, not
just 32-bit CRCs; and (b) it has "template" semantics, like x86's
crc-pclmul-template.S, in the sense that it's included by other files.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 arch/powerpc/lib/{crc32-vpmsum_core.S => crc-vpmsum-template.S} | 0
 arch/powerpc/lib/crc32c-vpmsum_asm.S                            | 2 +-
 arch/powerpc/lib/crct10dif-vpmsum_asm.S                         | 2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/powerpc/lib/{crc32-vpmsum_core.S => crc-vpmsum-template.S} (100%)

diff --git a/arch/powerpc/lib/crc32-vpmsum_core.S b/arch/powerpc/lib/crc-vpmsum-template.S
similarity index 100%
rename from arch/powerpc/lib/crc32-vpmsum_core.S
rename to arch/powerpc/lib/crc-vpmsum-template.S
diff --git a/arch/powerpc/lib/crc32c-vpmsum_asm.S b/arch/powerpc/lib/crc32c-vpmsum_asm.S
index bf442004ea1f2..1b35c55cce0a6 100644
--- a/arch/powerpc/lib/crc32c-vpmsum_asm.S
+++ b/arch/powerpc/lib/crc32c-vpmsum_asm.S
@@ -837,6 +837,6 @@
 	/* 33 bit reflected Barrett constant n */
 	.octa 0x00000000000000000000000105ec76f1
 
 #define CRC_FUNCTION_NAME __crc32c_vpmsum
 #define REFLECT
-#include "crc32-vpmsum_core.S"
+#include "crc-vpmsum-template.S"
diff --git a/arch/powerpc/lib/crct10dif-vpmsum_asm.S b/arch/powerpc/lib/crct10dif-vpmsum_asm.S
index f0b93a0fe168a..47a6266d89a8a 100644
--- a/arch/powerpc/lib/crct10dif-vpmsum_asm.S
+++ b/arch/powerpc/lib/crct10dif-vpmsum_asm.S
@@ -840,6 +840,6 @@
 	.octa 0x000000000000000000000001f65a57f8	/* x^64 div p(x) */
 	/* Barrett constant n */
 	.octa 0x0000000000000000000000018bb70000
 
 #define CRC_FUNCTION_NAME __crct10dif_vpmsum
-#include "crc32-vpmsum_core.S"
+#include "crc-vpmsum-template.S"
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 5/7] s390/crc: drop "glue" from filenames
  2025-04-24  0:20 [PATCH 0/7] lib/crc: drop "glue" from filenames Eric Biggers
                   ` (3 preceding siblings ...)
  2025-04-24  0:20 ` [PATCH 4/7] powerpc/crc: rename crc32-vpmsum_core.S to crc-vpmsum-template.S Eric Biggers
@ 2025-04-24  0:20 ` Eric Biggers
  2025-04-25  9:22   ` Heiko Carstens
  2025-04-24  0:20 ` [PATCH 6/7] sparc/crc: " Eric Biggers
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 12+ messages in thread
From: Eric Biggers @ 2025-04-24  0:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ard Biesheuvel, linux-crypto, linux-arm-kernel, linuxppc-dev,
	linux-s390, sparclinux, x86

From: Eric Biggers <ebiggers@google.com>

The use of the term "glue" in filenames is a Crypto API-ism that does
not show up elsewhere in lib/.  I think adopting it there was a mistake.
The library just uses standard functions, so the amount of code that
could be considered "glue" is quite small.  And while often the C
functions just wrap the assembly functions, there are also cases like
crc32c_arch() in arch/x86/lib/crc32-glue.c that blur the line by
in-lining the actual implementation into the C function.  That's not
"glue code", but rather the actual code.

Therefore, let's drop "glue" from the filenames and instead use e.g.
crc32.c instead of crc32-glue.c.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 arch/s390/lib/Makefile                  | 2 +-
 arch/s390/lib/{crc32-glue.c => crc32.c} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename arch/s390/lib/{crc32-glue.c => crc32.c} (100%)

diff --git a/arch/s390/lib/Makefile b/arch/s390/lib/Makefile
index 14bbfe50033c7..271a1c407121c 100644
--- a/arch/s390/lib/Makefile
+++ b/arch/s390/lib/Makefile
@@ -24,6 +24,6 @@ obj-$(CONFIG_S390_MODULES_SANITY_TEST_HELPERS) += test_modules_helpers.o
 lib-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o
 
 obj-$(CONFIG_EXPOLINE_EXTERN) += expoline.o
 
 obj-$(CONFIG_CRC32_ARCH) += crc32-s390.o
-crc32-s390-y := crc32-glue.o crc32le-vx.o crc32be-vx.o
+crc32-s390-y := crc32.o crc32le-vx.o crc32be-vx.o
diff --git a/arch/s390/lib/crc32-glue.c b/arch/s390/lib/crc32.c
similarity index 100%
rename from arch/s390/lib/crc32-glue.c
rename to arch/s390/lib/crc32.c
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 6/7] sparc/crc: drop "glue" from filenames
  2025-04-24  0:20 [PATCH 0/7] lib/crc: drop "glue" from filenames Eric Biggers
                   ` (4 preceding siblings ...)
  2025-04-24  0:20 ` [PATCH 5/7] s390/crc: drop "glue" from filenames Eric Biggers
@ 2025-04-24  0:20 ` Eric Biggers
  2025-04-24  0:20 ` [PATCH 7/7] x86/crc: " Eric Biggers
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Eric Biggers @ 2025-04-24  0:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ard Biesheuvel, linux-crypto, linux-arm-kernel, linuxppc-dev,
	linux-s390, sparclinux, x86

From: Eric Biggers <ebiggers@google.com>

The use of the term "glue" in filenames is a Crypto API-ism that rarely
shows up elsewhere in lib/ or arch/*/lib/.  I think adopting it there
was a mistake.  The library just uses standard functions, so the amount
of code that could be considered "glue" is quite small.  And while often
the C functions just wrap the assembly functions, there are also cases
like crc32c_arch() in arch/x86/lib/crc32-glue.c that blur the line by
in-lining the actual implementation into the C function.  That's not
"glue code", but rather the actual code.

Therefore, let's drop "glue" from the filenames and instead use e.g.
crc32.c instead of crc32-glue.c.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 arch/sparc/lib/Makefile                  | 2 +-
 arch/sparc/lib/{crc32_glue.c => crc32.c} | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/sparc/lib/{crc32_glue.c => crc32.c} (97%)

diff --git a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile
index 5724d0f356eb5..ef8860eb3f3d1 100644
--- a/arch/sparc/lib/Makefile
+++ b/arch/sparc/lib/Makefile
@@ -52,6 +52,6 @@ lib-$(CONFIG_SPARC64) += mcount.o ipcsum.o xor.o hweight.o ffs.o
 
 obj-$(CONFIG_SPARC64) += iomap.o
 obj-$(CONFIG_SPARC32) += atomic32.o
 obj-$(CONFIG_SPARC64) += PeeCeeI.o
 obj-$(CONFIG_CRC32_ARCH) += crc32-sparc.o
-crc32-sparc-y := crc32_glue.o crc32c_asm.o
+crc32-sparc-y := crc32.o crc32c_asm.o
diff --git a/arch/sparc/lib/crc32_glue.c b/arch/sparc/lib/crc32.c
similarity index 97%
rename from arch/sparc/lib/crc32_glue.c
rename to arch/sparc/lib/crc32.c
index d34e7cc7e1a1e..428fd5588e936 100644
--- a/arch/sparc/lib/crc32_glue.c
+++ b/arch/sparc/lib/crc32.c
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
-/* Glue code for CRC32C optimized for sparc64 crypto opcodes.
+/* CRC32c (Castagnoli), sparc64 crc32c opcode accelerated
  *
  * This is based largely upon arch/x86/crypto/crc32c-intel.c
  *
  * Copyright (C) 2008 Intel Corporation
  * Authors: Austin Zhang <austin_zhang@linux.intel.com>
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 7/7] x86/crc: drop "glue" from filenames
  2025-04-24  0:20 [PATCH 0/7] lib/crc: drop "glue" from filenames Eric Biggers
                   ` (5 preceding siblings ...)
  2025-04-24  0:20 ` [PATCH 6/7] sparc/crc: " Eric Biggers
@ 2025-04-24  0:20 ` Eric Biggers
  2025-04-24  6:22 ` [PATCH 0/7] lib/crc: " Ard Biesheuvel
  2025-04-25  0:51 ` Martin K. Petersen
  8 siblings, 0 replies; 12+ messages in thread
From: Eric Biggers @ 2025-04-24  0:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ard Biesheuvel, linux-crypto, linux-arm-kernel, linuxppc-dev,
	linux-s390, sparclinux, x86

From: Eric Biggers <ebiggers@google.com>

The use of the term "glue" in filenames is a Crypto API-ism that rarely
shows up elsewhere in lib/ or arch/*/lib/.  I think adopting it there
was a mistake.  The library just uses standard functions, so the amount
of code that could be considered "glue" is quite small.  And while often
the C functions just wrap the assembly functions, there are also cases
like crc32c_arch() in arch/x86/lib/crc32-glue.c that blur the line by
in-lining the actual implementation into the C function.  That's not
"glue code", but rather the actual code.

Therefore, let's drop "glue" from the filenames and instead use e.g.
crc32.c instead of crc32-glue.c.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 arch/x86/lib/Makefile                            | 6 +++---
 arch/x86/lib/{crc-t10dif-glue.c => crc-t10dif.c} | 0
 arch/x86/lib/{crc32-glue.c => crc32.c}           | 0
 arch/x86/lib/{crc64-glue.c => crc64.c}           | 0
 4 files changed, 3 insertions(+), 3 deletions(-)
 rename arch/x86/lib/{crc-t10dif-glue.c => crc-t10dif.c} (100%)
 rename arch/x86/lib/{crc32-glue.c => crc32.c} (100%)
 rename arch/x86/lib/{crc64-glue.c => crc64.c} (100%)

diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index 1c50352eb49f9..7cf8681cba0f2 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -37,18 +37,18 @@ lib-$(CONFIG_INSTRUCTION_DECODER) += insn.o inat.o insn-eval.o
 lib-$(CONFIG_RANDOMIZE_BASE) += kaslr.o
 lib-$(CONFIG_FUNCTION_ERROR_INJECTION)	+= error-inject.o
 lib-$(CONFIG_MITIGATION_RETPOLINE) += retpoline.o
 
 obj-$(CONFIG_CRC32_ARCH) += crc32-x86.o
-crc32-x86-y := crc32-glue.o crc32-pclmul.o
+crc32-x86-y := crc32.o crc32-pclmul.o
 crc32-x86-$(CONFIG_64BIT) += crc32c-3way.o
 
 obj-$(CONFIG_CRC64_ARCH) += crc64-x86.o
-crc64-x86-y := crc64-glue.o crc64-pclmul.o
+crc64-x86-y := crc64.o crc64-pclmul.o
 
 obj-$(CONFIG_CRC_T10DIF_ARCH) += crc-t10dif-x86.o
-crc-t10dif-x86-y := crc-t10dif-glue.o crc16-msb-pclmul.o
+crc-t10dif-x86-y := crc-t10dif.o crc16-msb-pclmul.o
 
 obj-y += msr.o msr-reg.o msr-reg-export.o hweight.o
 obj-y += iomem.o
 
 ifeq ($(CONFIG_X86_32),y)
diff --git a/arch/x86/lib/crc-t10dif-glue.c b/arch/x86/lib/crc-t10dif.c
similarity index 100%
rename from arch/x86/lib/crc-t10dif-glue.c
rename to arch/x86/lib/crc-t10dif.c
diff --git a/arch/x86/lib/crc32-glue.c b/arch/x86/lib/crc32.c
similarity index 100%
rename from arch/x86/lib/crc32-glue.c
rename to arch/x86/lib/crc32.c
diff --git a/arch/x86/lib/crc64-glue.c b/arch/x86/lib/crc64.c
similarity index 100%
rename from arch/x86/lib/crc64-glue.c
rename to arch/x86/lib/crc64.c
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/7] lib/crc: drop "glue" from filenames
  2025-04-24  0:20 [PATCH 0/7] lib/crc: drop "glue" from filenames Eric Biggers
                   ` (6 preceding siblings ...)
  2025-04-24  0:20 ` [PATCH 7/7] x86/crc: " Eric Biggers
@ 2025-04-24  6:22 ` Ard Biesheuvel
  2025-04-25  0:51 ` Martin K. Petersen
  8 siblings, 0 replies; 12+ messages in thread
From: Ard Biesheuvel @ 2025-04-24  6:22 UTC (permalink / raw)
  To: Eric Biggers
  Cc: linux-kernel, linux-crypto, linux-arm-kernel, linuxppc-dev,
	linux-s390, sparclinux, x86

On Thu, 24 Apr 2025 at 02:22, Eric Biggers <ebiggers@kernel.org> wrote:
>
> This series fixes an odd naming convention that was unnecessarily
> carried over from the original Crypto API code.
>
> I'm planning to take this via the crc tree.
>
> Eric Biggers (7):
>   arm/crc: drop "glue" from filenames
>   arm64/crc: drop "glue" from filenames
>   powerpc/crc: drop "glue" from filenames
>   powerpc/crc: rename crc32-vpmsum_core.S to crc-vpmsum-template.S
>   s390/crc: drop "glue" from filenames
>   sparc/crc: drop "glue" from filenames
>   x86/crc: drop "glue" from filenames
>

Acked-by: Ard Biesheuvel <ardb@kernel.org>

>  arch/arm/lib/Makefile                                       | 4 ++--
>  arch/arm/lib/{crc-t10dif-glue.c => crc-t10dif.c}            | 0
>  arch/arm/lib/{crc32-glue.c => crc32.c}                      | 0
>  arch/arm64/lib/Makefile                                     | 4 ++--
>  arch/arm64/lib/{crc-t10dif-glue.c => crc-t10dif.c}          | 0
>  arch/arm64/lib/{crc32.S => crc32-core.S}                    | 0
>  arch/arm64/lib/{crc32-glue.c => crc32.c}                    | 0
>  arch/powerpc/lib/Makefile                                   | 4 ++--
>  arch/powerpc/lib/{crc-t10dif-glue.c => crc-t10dif.c}        | 0
>  .../lib/{crc32-vpmsum_core.S => crc-vpmsum-template.S}      | 0
>  arch/powerpc/lib/{crc32-glue.c => crc32.c}                  | 0
>  arch/powerpc/lib/crc32c-vpmsum_asm.S                        | 2 +-
>  arch/powerpc/lib/crct10dif-vpmsum_asm.S                     | 2 +-
>  arch/s390/lib/Makefile                                      | 2 +-
>  arch/s390/lib/{crc32-glue.c => crc32.c}                     | 0
>  arch/sparc/lib/Makefile                                     | 2 +-
>  arch/sparc/lib/{crc32_glue.c => crc32.c}                    | 2 +-
>  arch/x86/lib/Makefile                                       | 6 +++---
>  arch/x86/lib/{crc-t10dif-glue.c => crc-t10dif.c}            | 0
>  arch/x86/lib/{crc32-glue.c => crc32.c}                      | 0
>  arch/x86/lib/{crc64-glue.c => crc64.c}                      | 0
>  21 files changed, 14 insertions(+), 14 deletions(-)
>  rename arch/arm/lib/{crc-t10dif-glue.c => crc-t10dif.c} (100%)
>  rename arch/arm/lib/{crc32-glue.c => crc32.c} (100%)
>  rename arch/arm64/lib/{crc-t10dif-glue.c => crc-t10dif.c} (100%)
>  rename arch/arm64/lib/{crc32.S => crc32-core.S} (100%)
>  rename arch/arm64/lib/{crc32-glue.c => crc32.c} (100%)
>  rename arch/powerpc/lib/{crc-t10dif-glue.c => crc-t10dif.c} (100%)
>  rename arch/powerpc/lib/{crc32-vpmsum_core.S => crc-vpmsum-template.S} (100%)
>  rename arch/powerpc/lib/{crc32-glue.c => crc32.c} (100%)
>  rename arch/s390/lib/{crc32-glue.c => crc32.c} (100%)
>  rename arch/sparc/lib/{crc32_glue.c => crc32.c} (97%)
>  rename arch/x86/lib/{crc-t10dif-glue.c => crc-t10dif.c} (100%)
>  rename arch/x86/lib/{crc32-glue.c => crc32.c} (100%)
>  rename arch/x86/lib/{crc64-glue.c => crc64.c} (100%)
>
> base-commit: 1ec3d4ff5c77422927896c1f7d0ed01267ec1213
> --
> 2.49.0
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/7] lib/crc: drop "glue" from filenames
  2025-04-24  0:20 [PATCH 0/7] lib/crc: drop "glue" from filenames Eric Biggers
                   ` (7 preceding siblings ...)
  2025-04-24  6:22 ` [PATCH 0/7] lib/crc: " Ard Biesheuvel
@ 2025-04-25  0:51 ` Martin K. Petersen
  2025-04-25  0:52   ` Martin K. Petersen
  8 siblings, 1 reply; 12+ messages in thread
From: Martin K. Petersen @ 2025-04-25  0:51 UTC (permalink / raw)
  To: Eric Biggers
  Cc: linux-kernel, Ard Biesheuvel, linux-crypto, linux-arm-kernel,
	linuxppc-dev, linux-s390, sparclinux, x86


Eric,

> This series fixes an odd naming convention that was unnecessarily
> carried over from the original Crypto API code.

LGTM.



-- 
Martin K. Petersen

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/7] lib/crc: drop "glue" from filenames
  2025-04-25  0:51 ` Martin K. Petersen
@ 2025-04-25  0:52   ` Martin K. Petersen
  0 siblings, 0 replies; 12+ messages in thread
From: Martin K. Petersen @ 2025-04-25  0:52 UTC (permalink / raw)
  To: Eric Biggers
  Cc: linux-kernel, Ard Biesheuvel, linux-crypto, linux-arm-kernel,
	linuxppc-dev, linux-s390, sparclinux, x86


>> This series fixes an odd naming convention that was unnecessarily
>> carried over from the original Crypto API code.
>
> LGTM.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 5/7] s390/crc: drop "glue" from filenames
  2025-04-24  0:20 ` [PATCH 5/7] s390/crc: drop "glue" from filenames Eric Biggers
@ 2025-04-25  9:22   ` Heiko Carstens
  0 siblings, 0 replies; 12+ messages in thread
From: Heiko Carstens @ 2025-04-25  9:22 UTC (permalink / raw)
  To: Eric Biggers
  Cc: linux-kernel, Ard Biesheuvel, linux-crypto, linux-arm-kernel,
	linuxppc-dev, linux-s390, sparclinux, x86

On Wed, Apr 23, 2025 at 05:20:36PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> The use of the term "glue" in filenames is a Crypto API-ism that does
> not show up elsewhere in lib/.  I think adopting it there was a mistake.
> The library just uses standard functions, so the amount of code that
> could be considered "glue" is quite small.  And while often the C
> functions just wrap the assembly functions, there are also cases like
> crc32c_arch() in arch/x86/lib/crc32-glue.c that blur the line by
> in-lining the actual implementation into the C function.  That's not
> "glue code", but rather the actual code.
> 
> Therefore, let's drop "glue" from the filenames and instead use e.g.
> crc32.c instead of crc32-glue.c.
> 
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
>  arch/s390/lib/Makefile                  | 2 +-
>  arch/s390/lib/{crc32-glue.c => crc32.c} | 0
>  2 files changed, 1 insertion(+), 1 deletion(-)
>  rename arch/s390/lib/{crc32-glue.c => crc32.c} (100%)

Acked-by: Heiko Carstens <hca@linux.ibm.com>

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-04-25  9:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-24  0:20 [PATCH 0/7] lib/crc: drop "glue" from filenames Eric Biggers
2025-04-24  0:20 ` [PATCH 1/7] arm/crc: " Eric Biggers
2025-04-24  0:20 ` [PATCH 2/7] arm64/crc: " Eric Biggers
2025-04-24  0:20 ` [PATCH 3/7] powerpc/crc: " Eric Biggers
2025-04-24  0:20 ` [PATCH 4/7] powerpc/crc: rename crc32-vpmsum_core.S to crc-vpmsum-template.S Eric Biggers
2025-04-24  0:20 ` [PATCH 5/7] s390/crc: drop "glue" from filenames Eric Biggers
2025-04-25  9:22   ` Heiko Carstens
2025-04-24  0:20 ` [PATCH 6/7] sparc/crc: " Eric Biggers
2025-04-24  0:20 ` [PATCH 7/7] x86/crc: " Eric Biggers
2025-04-24  6:22 ` [PATCH 0/7] lib/crc: " Ard Biesheuvel
2025-04-25  0:51 ` Martin K. Petersen
2025-04-25  0:52   ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).