]> www.infradead.org Git - users/hch/misc.git/commit
s390/crc32: Remove have_vxrs static key
authorHeiko Carstens <hca@linux.ibm.com>
Thu, 17 Apr 2025 12:30:56 +0000 (14:30 +0200)
committerEric Biggers <ebiggers@google.com>
Mon, 28 Apr 2025 16:07:19 +0000 (09:07 -0700)
commit93b988cf8e4c68b823e70a02e4c7c39eaa0053be
treed629b01c145a1492ca931e8392018f0f604d9d1c
parent7ef377c4d4abb7a2a74fc319dc1bce46f2449af7
s390/crc32: Remove have_vxrs static key

Replace the have_vxrs static key with a cpu_has_vx() call.  cpu_has_vx()
resolves into a compile time constant (true) if the kernel is compiled
for z13 or newer.  Otherwise it generates an unconditional one
instruction branch, which is patched based on CPU alternatives.

In any case the generated code is at least as good as before and avoids
static key handling.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://lore.kernel.org/r/20250417125318.12521F12-hca@linux.ibm.com/
Signed-off-by: Eric Biggers <ebiggers@google.com>
arch/s390/lib/crc32-glue.c