Message ID | 20250325121624.523258-15-guoren@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | rv64ilp32_abi: Build CONFIG_64BIT kernel-self with ILP32 ABI | expand |
Context | Check | Description |
---|---|---|
bjorn/pre-ci_am | success | Success |
bjorn/build-rv32-defconfig | fail | build-rv32-defconfig |
bjorn/build-rv64-clang-allmodconfig | fail | build-rv64-clang-allmodconfig |
bjorn/build-rv64-gcc-allmodconfig | fail | build-rv64-gcc-allmodconfig |
bjorn/build-rv64-nommu-k210-defconfig | success | build-rv64-nommu-k210-defconfig |
bjorn/build-rv64-nommu-k210-virt | success | build-rv64-nommu-k210-virt |
bjorn/checkpatch | success | checkpatch |
bjorn/dtb-warn-rv64 | success | dtb-warn-rv64 |
bjorn/header-inline | success | header-inline |
bjorn/kdoc | success | kdoc |
bjorn/module-param | success | module-param |
bjorn/verify-fixes | success | verify-fixes |
bjorn/verify-signedoff | success | verify-signedoff |
diff --git a/arch/riscv/kernel/module.c b/arch/riscv/kernel/module.c index 47d0ebeec93c..d7360878e618 100644 --- a/arch/riscv/kernel/module.c +++ b/arch/riscv/kernel/module.c @@ -45,7 +45,7 @@ struct relocation_handlers { */ static bool riscv_insn_valid_32bit_offset(ptrdiff_t val) { -#ifdef CONFIG_32BIT +#if BITS_PER_LONG == 32 return true; #else return (-(1L << 31) - (1L << 11)) <= val && val < ((1L << 31) - (1L << 11)); diff --git a/include/asm-generic/module.h b/include/asm-generic/module.h index 98e1541b72b7..f870171b14a8 100644 --- a/include/asm-generic/module.h +++ b/include/asm-generic/module.h @@ -12,7 +12,7 @@ struct mod_arch_specific }; #endif -#ifdef CONFIG_64BIT +#if BITS_PER_LONG == 64 #define Elf_Shdr Elf64_Shdr #define Elf_Phdr Elf64_Phdr #define Elf_Sym Elf64_Sym