lib: sbi: fix DBTR_SHMEM_MAKE_PHYS for RV64
authorXiang W <wxjstz@126.com>
Fri, 3 May 2024 13:53:35 +0000 (21:53 +0800)
committerAnup Patel <anup@brainfault.org>
Mon, 13 May 2024 11:08:35 +0000 (16:38 +0530)
Obtaining a 64-bit address under rv64 does not require combining
32-bit registers

Signed-off-by: Xiang W <wxjstz@126.com>
Reviewed-by: Himanshu Chauhan <hchauhan@ventanamicro.com>
lib/sbi/sbi_dbtr.c

index 3cc1ef86baa2f9c58dd1a18a6359e5a37e140758..94fd049004affb3ba5104b5c218c10e3518ef3cb 100644 (file)
@@ -48,7 +48,7 @@ static unsigned long hart_state_ptr_offset;
             _idx++, _entry = ((_etype *)_base + _idx))
 
 #if __riscv_xlen == 64
-#define DBTR_SHMEM_MAKE_PHYS(_p_hi, _p_lo) (((u64)(_p_hi) << 32) | (_p_lo))
+#define DBTR_SHMEM_MAKE_PHYS(_p_hi, _p_lo) (_p_lo)
 #elif __riscv_xlen == 32
 #define DBTR_SHMEM_MAKE_PHYS(_p_hi, _p_lo) (((u64)(_p_hi) << 32) | (_p_lo))
 #else