[PATCH] riscv: mm: fix truncates issue on RV32

Palmer Dabbelt palmer at rivosinc.com
Wed Jul 12 08:52:17 PDT 2023


On Mon, 10 Jul 2023 01:10:36 +0800, Jisheng Zhang wrote:
> lkp reports below sparse warning when building for RV32:
> arch/riscv/mm/init.c:1204:48: sparse: warning: cast truncates bits from
> constant value (100000000 becomes 0)
> 
> IMO, the reason we didn't see this truncates bug in real world is "0"
> means MEMBLOCK_ALLOC_ACCESSIBLE in memblock and there's no RV32 HW
> with more than 4GB memory.
> 
> [...]

Applied, thanks!

[1/1] riscv: mm: fix truncates issue on RV32
      https://git.kernel.org/palmer/c/b690e266dae2

Best regards,
-- 
Palmer Dabbelt <palmer at rivosinc.com>




More information about the linux-riscv mailing list