[PW_SID:1085990] riscv32 library enhancements and build fixes#1821
[PW_SID:1085990] riscv32 library enhancements and build fixes#1821linux-riscv-bot wants to merge 4 commits into
Conversation
Add riscv32-specific '__ashldi3()', '__ashrdi3()', and '__lshrdi3()'. Initially it was intended to fix the following link error observed when building EFI-enabled kernel with CONFIG_EFI_STUB=y and CONFIG_EFI_GENERIC_STUB=y: riscv32-linux-gnu-ld: ./drivers/firmware/efi/libstub/lib-cmdline.stub.o: in function `__efistub_.L49': __efistub_cmdline.c:(.init.text+0x1f2): undefined reference to `__efistub___ashldi3' riscv32-linux-gnu-ld: __efistub_cmdline.c:(.init.text+0x202): undefined reference to `__efistub___lshrdi3' Reported at [1] trying to build https://patchew.org/linux/20260212164413.889625-1-dmantipov@yandex.ru, tested with 'qemu-system-riscv32 -M virt' only. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202603041925.KLKqpK6N-lkp@intel.com [1] Suggested-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Assisted-by: gemini/gemini-3.1-pro-preview sashiko Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add KUnit tests for '__ashldi3()', '__ashrdi3()', and '__lshrdi3()' helper functions used to implement 64-bit arithmetic shift left, arithmetic shift right and logical shift right, respectively, on a 32-bit CPUs. Tested with 'qemu-system-riscv32 -M virt' and 'qemu-system-arm -M virt'. Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Tested-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
When building vmlinuz.efi with CONFIG_EFI_ZBOOT enabled, '__lshrdi3()' is also needed to fix yet another link error: riscv32-linux-gnu-ld: drivers/firmware/efi/libstub/lib-cmdline.stub.o: in function `__efistub_.L49': __efistub_cmdline.c:(.init.text+0x202): undefined reference to `__efistub___lshrdi3' And since riscv64 can have CONFIG_EFI_ZBOOT but doesn't need these library routines, rely on CONFIG_32BIT to manage linking of lib-ashldi3.o and lib-lshrdi3.o on riscv32 only. Reported-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Closes: https://lore.kernel.org/linux-riscv/20260409050018.GA371560@inky.localdomain Tested-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Suggested-by: Ard Biesheuvel <ardb@kernel.org> Assisted-by: gemini/gemini-3.1-pro-preview sashiko Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v7,1/3] riscv: add platform-specific double word shifts for riscv32" |
|
Patch 1: "[v7,1/3] riscv: add platform-specific double word shifts for riscv32" |
|
Patch 1: "[v7,1/3] riscv: add platform-specific double word shifts for riscv32" |
|
Patch 1: "[v7,1/3] riscv: add platform-specific double word shifts for riscv32" |
|
Patch 1: "[v7,1/3] riscv: add platform-specific double word shifts for riscv32" |
|
Patch 1: "[v7,1/3] riscv: add platform-specific double word shifts for riscv32" |
|
Patch 1: "[v7,1/3] riscv: add platform-specific double word shifts for riscv32" |
|
Patch 1: "[v7,1/3] riscv: add platform-specific double word shifts for riscv32" |
|
Patch 1: "[v7,1/3] riscv: add platform-specific double word shifts for riscv32" |
|
Patch 1: "[v7,1/3] riscv: add platform-specific double word shifts for riscv32" |
|
Patch 1: "[v7,1/3] riscv: add platform-specific double word shifts for riscv32" |
|
Patch 1: "[v7,1/3] riscv: add platform-specific double word shifts for riscv32" |
|
Patch 2: "[v7,2/3] lib: kunit: add tests for __ashldi3(), __ashrdi3(), and __lshrdi3()" |
|
Patch 2: "[v7,2/3] lib: kunit: add tests for __ashldi3(), __ashrdi3(), and __lshrdi3()" |
|
Patch 2: "[v7,2/3] lib: kunit: add tests for __ashldi3(), __ashrdi3(), and __lshrdi3()" |
|
Patch 2: "[v7,2/3] lib: kunit: add tests for __ashldi3(), __ashrdi3(), and __lshrdi3()" |
|
Patch 2: "[v7,2/3] lib: kunit: add tests for __ashldi3(), __ashrdi3(), and __lshrdi3()" |
|
Patch 2: "[v7,2/3] lib: kunit: add tests for __ashldi3(), __ashrdi3(), and __lshrdi3()" |
|
Patch 2: "[v7,2/3] lib: kunit: add tests for __ashldi3(), __ashrdi3(), and __lshrdi3()" |
|
Patch 2: "[v7,2/3] lib: kunit: add tests for __ashldi3(), __ashrdi3(), and __lshrdi3()" |
|
Patch 2: "[v7,2/3] lib: kunit: add tests for __ashldi3(), __ashrdi3(), and __lshrdi3()" |
|
Patch 2: "[v7,2/3] lib: kunit: add tests for __ashldi3(), __ashrdi3(), and __lshrdi3()" |
|
Patch 2: "[v7,2/3] lib: kunit: add tests for __ashldi3(), __ashrdi3(), and __lshrdi3()" |
|
Patch 2: "[v7,2/3] lib: kunit: add tests for __ashldi3(), __ashrdi3(), and __lshrdi3()" |
|
Patch 3: "[v7,3/3] riscv: fix building compressed EFI image" |
|
Patch 3: "[v7,3/3] riscv: fix building compressed EFI image" |
|
Patch 3: "[v7,3/3] riscv: fix building compressed EFI image" |
|
Patch 3: "[v7,3/3] riscv: fix building compressed EFI image" |
|
Patch 3: "[v7,3/3] riscv: fix building compressed EFI image" |
|
Patch 3: "[v7,3/3] riscv: fix building compressed EFI image" |
|
Patch 3: "[v7,3/3] riscv: fix building compressed EFI image" |
|
Patch 3: "[v7,3/3] riscv: fix building compressed EFI image" |
|
Patch 3: "[v7,3/3] riscv: fix building compressed EFI image" |
|
Patch 3: "[v7,3/3] riscv: fix building compressed EFI image" |
|
Patch 3: "[v7,3/3] riscv: fix building compressed EFI image" |
|
Patch 3: "[v7,3/3] riscv: fix building compressed EFI image" |
c4947c7 to
694800f
Compare
PR for series 1085990 applied to workflow
Name: riscv32 library enhancements and build fixes
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1085990
Version: 7