diff options
author | Xiang W <wxjstz@126.com> | 2025-03-19 20:38:29 +0800 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2025-04-15 11:22:00 +0530 |
commit | 8b026abc5a9f05f60897e63bb6ff3e2aee32dfa9 (patch) | |
tree | 97ef8b4524809c694b3537ca4764b0e9dfaa0008 | |
parent | ce57cb572e3dec5ae0cf122e5f1e71f3d8e647ff (diff) | |
download | opensbi-8b026abc5a9f05f60897e63bb6ff3e2aee32dfa9.zip opensbi-8b026abc5a9f05f60897e63bb6ff3e2aee32dfa9.tar.gz opensbi-8b026abc5a9f05f60897e63bb6ff3e2aee32dfa9.tar.bz2 |
lib: sbi: Fix SHMEM_PHYS_ADDR for RV32
Obtaining a 64-bit address under rv32 does not require combining two
32-bit registers because we ignore upper 32-bits on rv32.
Signed-off-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20250319123832.505033-1-wxjstz@126.com
Signed-off-by: Anup Patel <anup@brainfault.org>
-rw-r--r-- | lib/sbi/sbi_mpxy.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/sbi/sbi_mpxy.c b/lib/sbi/sbi_mpxy.c index c7f311e..920d2db 100644 --- a/lib/sbi/sbi_mpxy.c +++ b/lib/sbi/sbi_mpxy.c @@ -66,13 +66,7 @@ static SBI_LIST_HEAD(mpxy_channel_list); #define CAP_DISABLE(_c, _m) INSERT_FIELD(_c, _m, 0) #define CAP_GET(_c, _m) EXTRACT_FIELD(_c, _m) -#if __riscv_xlen == 64 #define SHMEM_PHYS_ADDR(_hi, _lo) (_lo) -#elif __riscv_xlen == 32 -#define SHMEM_PHYS_ADDR(_hi, _lo) (((u64)(_hi) << 32) | (_lo)) -#else -#error "Undefined XLEN" -#endif /** Per hart shared memory */ struct mpxy_shmem { |