]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
RDMA/rxe: Remove 32-bit architecture support
authorDaisuke Matsuda <matsuda-daisuke@fujitsu.com>
Mon, 21 Apr 2025 02:51:01 +0000 (11:51 +0900)
committerLeon Romanovsky <leon@kernel.org>
Mon, 21 Apr 2025 08:16:29 +0000 (04:16 -0400)
Major linux distibutions have phased out support for 32-bit machines. Since
rxe is primarily used for development and testing, the benefit of
maintaining 32-bit support is minimal. This change simplifies ATOMIC WRITE
implementations and improves maintainability of the driver.

Signed-off-by: Daisuke Matsuda <matsuda-daisuke@fujitsu.com>
Link: https://patch.msgid.link/20250421025101.3588139-1-matsuda-daisuke@fujitsu.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/sw/rxe/Kconfig
drivers/infiniband/sw/rxe/rxe_loc.h
drivers/infiniband/sw/rxe/rxe_mr.c
drivers/infiniband/sw/rxe/rxe_odp.c
drivers/infiniband/sw/rxe/rxe_param.h

index c180e7ebcfc5b9045d9f22c4a9a4ac2bfd1188b5..1ed5b63f8afc24e313c15c8bc20d39e14b77fd96 100644 (file)
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config RDMA_RXE
        tristate "Software RDMA over Ethernet (RoCE) driver"
-       depends on INET && PCI && INFINIBAND
+       depends on INET && PCI && INFINIBAND && 64BIT
        depends on INFINIBAND_VIRT_DMA
        select NET_UDP_TUNNEL
        select CRC32
index 30fa83c9c84649aabbb3d867ba8f52bd021d4b09..f7dbb9cddd12bdbebfea37df7caadec7d16f3874 100644 (file)
@@ -196,6 +196,7 @@ enum resp_states rxe_odp_atomic_op(struct rxe_mr *mr, u64 iova, int opcode,
                                   u64 compare, u64 swap_add, u64 *orig_val);
 int rxe_odp_flush_pmem_iova(struct rxe_mr *mr, u64 iova,
                            unsigned int length);
+enum resp_states rxe_odp_do_atomic_write(struct rxe_mr *mr, u64 iova, u64 value);
 #else /* CONFIG_INFINIBAND_ON_DEMAND_PAGING */
 static inline int
 rxe_odp_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova,
@@ -219,11 +220,6 @@ static inline int rxe_odp_flush_pmem_iova(struct rxe_mr *mr, u64 iova,
 {
        return -EOPNOTSUPP;
 }
-#endif /* CONFIG_INFINIBAND_ON_DEMAND_PAGING */
-
-#ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING
-enum resp_states rxe_odp_do_atomic_write(struct rxe_mr *mr, u64 iova, u64 value);
-#else
 static inline enum resp_states rxe_odp_do_atomic_write(struct rxe_mr *mr,
                                                       u64 iova, u64 value)
 {
index 1a74013a14abcf1ce72ef746aa35f8a95057476c..c4936d63e26a2d14cccf9be6d280beb05eccecb7 100644 (file)
@@ -539,8 +539,6 @@ enum resp_states rxe_mr_do_atomic_op(struct rxe_mr *mr, u64 iova, int opcode,
        return RESPST_NONE;
 }
 
-#if defined CONFIG_64BIT
-/* only implemented or called for 64 bit architectures */
 enum resp_states rxe_mr_do_atomic_write(struct rxe_mr *mr, u64 iova, u64 value)
 {
        unsigned int page_offset;
@@ -580,12 +578,6 @@ enum resp_states rxe_mr_do_atomic_write(struct rxe_mr *mr, u64 iova, u64 value)
 
        return RESPST_NONE;
 }
-#else
-enum resp_states rxe_mr_do_atomic_write(struct rxe_mr *mr, u64 iova, u64 value)
-{
-       return RESPST_ERR_UNSUPPORTED_OPCODE;
-}
-#endif
 
 int advance_dma_data(struct rxe_dma_info *dma, unsigned int length)
 {
index fa5e8f5017ccbb946636658ed95679c27c1c8a4e..6149d9ffe7f7019a43544e6285fa6dcdcc818d9c 100644 (file)
@@ -380,7 +380,6 @@ int rxe_odp_flush_pmem_iova(struct rxe_mr *mr, u64 iova,
        return 0;
 }
 
-/* CONFIG_64BIT=y */
 enum resp_states rxe_odp_do_atomic_write(struct rxe_mr *mr, u64 iova, u64 value)
 {
        struct ib_umem_odp *umem_odp = to_ib_umem_odp(mr->umem);
index 003f681e5dc022c62e3da9c6325e612afbefb1ff..767870568372dda86ea02da56db5a9e534302d83 100644 (file)
@@ -53,12 +53,9 @@ enum rxe_device_param {
                                        | IB_DEVICE_MEM_WINDOW
                                        | IB_DEVICE_FLUSH_GLOBAL
                                        | IB_DEVICE_FLUSH_PERSISTENT
-#ifdef CONFIG_64BIT
                                        | IB_DEVICE_MEM_WINDOW_TYPE_2B
                                        | IB_DEVICE_ATOMIC_WRITE,
-#else
-                                       | IB_DEVICE_MEM_WINDOW_TYPE_2B,
-#endif /* CONFIG_64BIT */
+
        RXE_MAX_SGE                     = 32,
        RXE_MAX_WQE_SIZE                = sizeof(struct rxe_send_wqe) +
                                          sizeof(struct ib_sge) * RXE_MAX_SGE,