Message ID | 20240423145743.392718-5-wxjstz@126.com |
---|---|
State | Superseded |
Headers | show |
Series | miscellaneous about sbi_dtbr | expand |
On 23/04/24 20:27, Xiang W wrote: > Obtaining a 64-bit address under rv64 does not require combining > 32-bit registers > > Signed-off-by: Xiang W <wxjstz@126.com> > --- > lib/sbi/sbi_dbtr.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/sbi/sbi_dbtr.c b/lib/sbi/sbi_dbtr.c > index 4093a82..29be9bb 100644 > --- a/lib/sbi/sbi_dbtr.c > +++ b/lib/sbi/sbi_dbtr.c > @@ -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 LGTM Reviewed-by: Himanshu Chauhan <hchauhan@ventanamicro.com> Regards Himanshu
diff --git a/lib/sbi/sbi_dbtr.c b/lib/sbi/sbi_dbtr.c index 4093a82..29be9bb 100644 --- a/lib/sbi/sbi_dbtr.c +++ b/lib/sbi/sbi_dbtr.c @@ -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
Obtaining a 64-bit address under rv64 does not require combining 32-bit registers Signed-off-by: Xiang W <wxjstz@126.com> --- lib/sbi/sbi_dbtr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)