diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2021-07-29 16:29:19 +0300 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2021-07-30 18:08:22 +0300 |
commit | 88731c8f3636b133e27df88febcd7cd2fdece0a7 (patch) | |
tree | 120fb03e0fc537ef96a9745e6f49da6df5501557 /arch/s390/boot/compressed/clz_ctz.c | |
parent | 7561c14d8a4d1a24a40b1839d927d488e2d6345a (diff) | |
download | linux-88731c8f3636b133e27df88febcd7cd2fdece0a7.tar.xz |
s390/boot: fix zstd build for -march=z900
zstd decompression uses __builtin_clz() which fails back to __clzdi2()
when the kernel is built for older hardware like z900. This leads to
build failures like the following:
s390x-11.1.0-ld: /devel/src/kernel/arch/s390/boot/compressed/../../../../lib/zstd/bitstream.h:148: undefined reference to `__clzdi2'
Fix that by optionally including lib/clz_ctz.c into the decompressor.
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 7b034d9c1b08 ("s390/boot: add zstd support")
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Link: https://lore.kernel.org/r/patch-1.thread-f0f589.git-f0f58936888f.your-ad-here.call-01627564869-ext-2765@work.hours
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/boot/compressed/clz_ctz.c')
-rw-r--r-- | arch/s390/boot/compressed/clz_ctz.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/boot/compressed/clz_ctz.c b/arch/s390/boot/compressed/clz_ctz.c new file mode 100644 index 000000000000..c3ebf248596b --- /dev/null +++ b/arch/s390/boot/compressed/clz_ctz.c @@ -0,0 +1,2 @@ +// SPDX-License-Identifier: GPL-2.0 +#include "../../../../lib/clz_ctz.c" |