Thread (63 messages) 63 messages, 10 authors, 2025-03-27
STALE450d

[RFC PATCH V3 31/43] rv64ilp32_abi: maple_tree: Use BITS_PER_LONG instead of CONFIG_64BIT

From: guoren@kernel.org
Date: 2025-03-25 12:24:10
Also in: bpf, kvm, kvm-riscv, linux-arch, linux-btrfs, linux-crypto, linux-fsdevel, linux-input, linux-media, linux-mm, linux-nfs, linux-perf-users, linux-riscv, linux-sctp, linux-serial, linux-usb, lkml, netdev, netfilter-devel
Subsystem: maple tree, the rest · Maintainers: Liam R. Howlett, Linus Torvalds

From: "Guo Ren (Alibaba DAMO Academy)" <guoren@kernel.org>

The Maple tree algorithm uses ulong type for each element. The
number of slots is based on BITS_PER_LONG for RV64ILP32 ABI, so
use BITS_PER_LONG instead of CONFIG_64BIT.

Signed-off-by: Guo Ren (Alibaba DAMO Academy) <guoren@kernel.org>
---
 include/linux/maple_tree.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h
index cbbcd18d4186..ff6265b6468b 100644
--- a/include/linux/maple_tree.h
+++ b/include/linux/maple_tree.h
@@ -24,7 +24,7 @@
  *
  * Nodes in the tree point to their parent unless bit 0 is set.
  */
-#if defined(CONFIG_64BIT) || defined(BUILD_VDSO32_64)
+#if (BITS_PER_LONG == 64) || defined(BUILD_VDSO32_64)
 /* 64bit sizes */
 #define MAPLE_NODE_SLOTS	31	/* 256 bytes including ->parent */
 #define MAPLE_RANGE64_SLOTS	16	/* 256 bytes */
-- 
2.40.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help