riscv: Move cast inside kernel_mapping_[pv]a_to_[vp]a
authorSamuel Holland <samuel@sholland.org>
Sat, 26 Nov 2022 06:09:20 +0000 (00:09 -0600)
committerPalmer Dabbelt <palmer@rivosinc.com>
Fri, 9 Dec 2022 01:22:54 +0000 (17:22 -0800)
commit583286e2072ed25c31b7db14d69fdf03f1fae7ba
treead30ae9d9f32c95837d3b1e0c274a3e2f8b52102
parent0c49688174f5347c3f8012e84c0ffa0d2b2890c8
riscv: Move cast inside kernel_mapping_[pv]a_to_[vp]a

Before commit 44c922572952 ("RISC-V: enable XIP"), these macros cast
their argument to unsigned long. That commit moved the cast after an
assignment to an unsigned long variable, rendering it ineffectual.
Move the cast back, so we can remove the cast at each call site.

Reviewed-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20221126060920.65009-2-samuel@sholland.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/page.h
arch/riscv/mm/init.c