[RFC PATCH V3 35/43] rv64ilp32_abi: net: Use BITS_PER_LONG in struct dst_entry

guoren
2025-03-25T12:25:10Z

The rv64ilp32 ABI depends on CONFIG_64BIT for its ILP32 data type,
which is smaller. To align with ILP32 requirements, CONFIG_64BIT
was changed to BITS_PER_LONG in struct dts_entry.

Signed-off-by: Guo Ren (Alibaba DAMO Academy) <guoren@kernel.org>
---
include/net/dst.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/net/dst.h b/include/net/dst.h
index 78c78cdce0e9..af1c74c4836e 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -65,7 +65,7 @@ struct dst_entry {
* __rcuref wants to be on a different cache line from
* input/output/ops or performance tanks badly
*/
-#ifdef CONFIG_64BIT
+#if BITS_PER_LONG == 64
rcuref_t __rcuref; /* 64-bit offset 64 */
#endif
int __use;
@@ -74,7 +74,7 @@ struct dst_entry {
short error;
short __pad;
__u32 tclassid;
-#ifndef CONFIG_64BIT
+#if BITS_PER_LONG == 32
struct lwtunnel_state *lwtstate;
rcuref_t __rcuref; /* 32-bit offset 64 */
#endif
@@ -89,7 +89,7 @@ struct dst_entry {
*/
struct list_head rt_uncached;
struct uncached_list *rt_uncached_list;
-#ifdef CONFIG_64BIT
+#if BITS_PER_LONG == 64
struct lwtunnel_state *lwtstate;
#endif
};
--
2.40.1