Message ID | 20240807151629.144168-7-andrew.jones@linux.dev (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | riscv: 32-bit should use phys_addr_t | expand |
diff --git a/lib/riscv/setup.c b/lib/riscv/setup.c index e0b5f6f7daf5..2c7792a5b0bd 100644 --- a/lib/riscv/setup.c +++ b/lib/riscv/setup.c @@ -193,7 +193,7 @@ void setup(const void *fdt, phys_addr_t freemem_start) const char *bootargs; int ret; - assert(sizeof(long) == 8 || freemem_start < VA_BASE); + assert(freemem_start < VA_BASE); freemem = __va(freemem_start); freemem_push_fdt(&freemem, fdt);
The VA_BASE check in setup() also applies to rv64, as is clear from the later VA_BASE check in mem_allocator_init(), which ensures freemem_start < freemem_end < VA_BASE. Fixes: 6895ce6dc618 ("riscv: Populate memregions and switch to page allocator") Signed-off-by: Andrew Jones <andrew.jones@linux.dev> --- lib/riscv/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)