Message ID | 20250325121624.523258-39-guoren@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | rv64ilp32_abi: Build CONFIG_64BIT kernel-self with ILP32 ABI | expand |
diff --git a/arch/riscv/include/asm/syscall_table.h b/arch/riscv/include/asm/syscall_table.h index 0c2d61782813..aab2bc0ddf4e 100644 --- a/arch/riscv/include/asm/syscall_table.h +++ b/arch/riscv/include/asm/syscall_table.h @@ -1,6 +1,6 @@ #include <asm/bitsperlong.h> -#if __BITS_PER_LONG == 64 +#ifdef CONFIG_64BIT #include <asm/syscall_table_64.h> #else #include <asm/syscall_table_32.h> diff --git a/arch/riscv/include/asm/unistd.h b/arch/riscv/include/asm/unistd.h index e6d904fa67c5..86b9c1712f24 100644 --- a/arch/riscv/include/asm/unistd.h +++ b/arch/riscv/include/asm/unistd.h @@ -16,10 +16,10 @@ #define __ARCH_WANT_COMPAT_FADVISE64_64 #endif -#if defined(__LP64__) && !defined(__SYSCALL_COMPAT) +#if defined(CONFIG_64BIT) && !defined(__SYSCALL_COMPAT) #define __ARCH_WANT_NEW_STAT #define __ARCH_WANT_SET_GET_RLIMIT -#endif /* __LP64__ */ +#endif /* CONFIG_64BIT */ #define __ARCH_WANT_MEMFD_SECRET diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh index 1e5d2eeb726d..9cc4f9086dfe 100755 --- a/scripts/checksyscalls.sh +++ b/scripts/checksyscalls.sh @@ -76,7 +76,7 @@ cat << EOF #endif /* System calls for 32-bit kernels only */ -#if BITS_PER_LONG == 64 +#ifdef CONFIG_64BIT #define __IGNORE_sendfile64 #define __IGNORE_ftruncate64 #define __IGNORE_truncate64