Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: arm64/sha256 - fix build when CONFIG_PREEMPT_VOLUNTARY=y

Fix the build of sha256-ce.S when CONFIG_PREEMPT_VOLUNTARY=y by passing
the correct label to the cond_yield macro. Also adjust the code to
execute only one branch instruction when CONFIG_PREEMPT_VOLUNTARY=n.

Fixes: 6e36be511d28 ("crypto: arm64/sha256 - implement library instead of shash")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505071811.yYpLUbav-lkp@intel.com/
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Eric Biggers and committed by
Herbert Xu
4e0146a9 3bbc902e

+4 -3
+4 -3
arch/arm64/lib/crypto/sha256-ce.S
··· 123 123 add dgav.4s, dgav.4s, dg0v.4s 124 124 add dgbv.4s, dgbv.4s, dg1v.4s 125 125 126 + /* return early if voluntary preemption is needed */ 127 + cond_yield 1f, x5, x6 128 + 126 129 /* handled all input blocks? */ 127 - cbz x2, 1f 128 - cond_yield 3f, x5, x6 129 - b 0b 130 + cbnz x2, 0b 130 131 131 132 /* store new state */ 132 133 1: st1 {dgav.4s, dgbv.4s}, [x0]