android_kernel_samsung_sm8650/arch/riscv
Jisheng Zhang 1b125be4e0 riscv: mm: fix truncation warning on RV32
[ Upstream commit b690e266dae2f85f4dfea21fa6a05e3500a51054 ]

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.

Fix it anyway to make sparse happy.

Fixes: decf89f86e ("riscv: try to allocate crashkern region from 32bit addressible memory")
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202306080034.SLiCiOMn-lkp@intel.com/
Link: https://lore.kernel.org/r/20230709171036.1906-1-jszhang@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-23 13:49:26 +02:00
..
boot riscv: dts: sifive: fu740: fix size of pcie 32bit memory 2023-01-24 07:24:37 +01:00
configs riscv: enable CD-ROM file systems in defconfig 2022-08-25 17:01:09 -07:00
errata RISC-V: fix taking the text_mutex twice during sifive errata patching 2023-05-17 11:53:41 +02:00
include riscv: mm: Ensure prot of VM_WRITE and VM_EXEC must be readable 2023-06-14 11:15:32 +02:00
kernel riscv: uprobes: Restore thread.bad_cause 2023-07-19 16:21:40 +02:00
kvm RISC-V: Align SBI probe implementation with spec 2023-05-11 23:03:04 +09:00
lib riscv: lib: uaccess: fix CSR_STATUS SR_SUM bit 2022-08-10 14:06:31 -07:00
mm riscv: mm: fix truncation warning on RV32 2023-07-23 13:49:26 +02:00
net riscv, bpf: Fix inconsistent JIT image generation 2023-07-23 13:49:25 +02:00
purgatory riscv/purgatory: remove PGO flags 2023-06-21 16:00:55 +02:00
Kbuild riscv: move errata/ and kvm/ builds to arch/riscv/Kbuild 2022-06-01 22:26:32 -07:00
Kconfig riscv/mm: Convert to using lock_mm_and_find_vma() 2023-07-01 13:16:24 +02:00
Kconfig.debug
Kconfig.erratas riscv: make t-head erratas depend on MMU 2022-09-17 01:48:22 -07:00
Kconfig.socs riscv: Kconfig: Style cleanups 2022-06-30 19:26:16 -07:00
Makefile riscv: Handle zicsr/zifencei issues between clang and binutils 2023-03-30 12:49:28 +02:00