[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250325121624.523258-39-guoren@kernel.org>
Date: Tue, 25 Mar 2025 08:16:19 -0400
From: guoren@...nel.org
To: arnd@...db.de,
gregkh@...uxfoundation.org,
torvalds@...ux-foundation.org,
paul.walmsley@...ive.com,
palmer@...belt.com,
anup@...infault.org,
atishp@...shpatra.org,
oleg@...hat.com,
kees@...nel.org,
tglx@...utronix.de,
will@...nel.org,
mark.rutland@....com,
brauner@...nel.org,
akpm@...ux-foundation.org,
rostedt@...dmis.org,
edumazet@...gle.com,
unicorn_wang@...look.com,
inochiama@...look.com,
gaohan@...as.ac.cn,
shihua@...as.ac.cn,
jiawei@...as.ac.cn,
wuwei2016@...as.ac.cn,
drew@...7.com,
prabhakar.mahadev-lad.rj@...renesas.com,
ctsai390@...estech.com,
wefu@...hat.com,
kuba@...nel.org,
pabeni@...hat.com,
josef@...icpanda.com,
dsterba@...e.com,
mingo@...hat.com,
peterz@...radead.org,
boqun.feng@...il.com,
guoren@...nel.org,
xiao.w.wang@...el.com,
qingfang.deng@...lower.com.cn,
leobras@...hat.com,
jszhang@...nel.org,
conor.dooley@...rochip.com,
samuel.holland@...ive.com,
yongxuan.wang@...ive.com,
luxu.kernel@...edance.com,
david@...hat.com,
ruanjinjie@...wei.com,
cuiyunhui@...edance.com,
wangkefeng.wang@...wei.com,
qiaozhe@...as.ac.cn
Cc: ardb@...nel.org,
ast@...nel.org,
linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org,
kvm@...r.kernel.org,
kvm-riscv@...ts.infradead.org,
linux-mm@...ck.org,
linux-crypto@...r.kernel.org,
bpf@...r.kernel.org,
linux-input@...r.kernel.org,
linux-perf-users@...r.kernel.org,
linux-serial@...r.kernel.org,
linux-fsdevel@...r.kernel.org,
linux-arch@...r.kernel.org,
maple-tree@...ts.infradead.org,
linux-trace-kernel@...r.kernel.org,
netdev@...r.kernel.org,
linux-atm-general@...ts.sourceforge.net,
linux-btrfs@...r.kernel.org,
netfilter-devel@...r.kernel.org,
coreteam@...filter.org,
linux-nfs@...r.kernel.org,
linux-sctp@...r.kernel.org,
linux-usb@...r.kernel.org,
linux-media@...r.kernel.org
Subject: [RFC PATCH V3 38/43] rv64ilp32_abi: syscall: Use CONFIG_64BIT instead of BITS_PER_LONG
From: "Guo Ren (Alibaba DAMO Academy)" <guoren@...nel.org>
The RV64ILP32 ABI adopts the syscall rules from CONFIG_64BIT and
directly uses 64BIT, replacing BITS_PER_LONG representation.
Signed-off-by: Guo Ren (Alibaba DAMO Academy) <guoren@...nel.org>
---
arch/riscv/include/asm/syscall_table.h | 2 +-
arch/riscv/include/asm/unistd.h | 4 ++--
scripts/checksyscalls.sh | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
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
--
2.40.1
Powered by blists - more mailing lists