]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: Fix missing PAGE_PFN_MASK
authorAlexandre Ghiti <alexandre.ghiti@canonical.com>
Mon, 11 Jul 2022 03:59:51 +0000 (09:29 +0530)
committerAnup Patel <anup@brainfault.org>
Mon, 11 Jul 2022 04:03:35 +0000 (09:33 +0530)
commit5ec296b2ce0c5323e620d5a04addf150418b91a9
tree098415c3502e72e47adfe195cb3ff5861934a07e
parent0c8b98e40f9d61a6792a879de085b19667a1f51b
riscv: Fix missing PAGE_PFN_MASK

There are a bunch of functions that use the PFN from a page table entry
that end up with the svpbmt upper-bits because they are missing the newly
introduced PAGE_PFN_MASK which leads to wrong addresses conversions and
then crash: fix this by adding this mask.

Fixes: 88f4cb2d66e4 ("riscv: Fix accessing pfn bits in PTEs for non-32bit variants")
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/include/asm/pgtable-64.h
arch/riscv/include/asm/pgtable.h
arch/riscv/kvm/mmu.c