]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: Fix DEBUG_VIRTUAL false warnings
authorAlexandre Ghiti <alexandre.ghiti@canonical.com>
Fri, 25 Feb 2022 12:39:50 +0000 (13:39 +0100)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 3 Mar 2022 23:32:04 +0000 (15:32 -0800)
commit4968d0964b49a4c69534c1a2b153c8c29f6f43c5
treeed60eabc07c5a6975ac83e142ed6321d87ea8726
parentdf5df92e86d85bf23a524c4dbb9acfd0f9786a91
riscv: Fix DEBUG_VIRTUAL false warnings

KERN_VIRT_SIZE used to encompass the kernel mapping before it was
redefined when moving the kasan mapping next to the kernel mapping to only
match the maximum amount of physical memory.

Then, kernel mapping addresses that go through __virt_to_phys are now
declared as wrong which is not true, one can use __virt_to_phys on such
addresses.

Fix this by redefining the condition that matches wrong addresses.

Fixes: 4c13fce4a1e8 ("riscv: Move KASAN mapping next to the kernel mapping")
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/mm/physaddr.c