asm-generic: Prepare for riscv use of pud_alloc_one and pud_free
authorAlexandre Ghiti <alexandre.ghiti@canonical.com>
Mon, 6 Dec 2021 10:46:50 +0000 (11:46 +0100)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 20 Jan 2022 01:54:08 +0000 (17:54 -0800)
commit60639f74c2f4fcc3ffa2ac0b120eaa874ccc713f
treefad7008b86a5a38798d7a3a64446cabbb58ee9ba
parent3270bfdb9e4a01bb15d018612a6354c1837b5f97
asm-generic: Prepare for riscv use of pud_alloc_one and pud_free

In the following commits, riscv will almost use the generic versions of
pud_alloc_one and pud_free but an additional check is required since those
functions are only relevant when using at least a 4-level page table, which
will be determined at runtime on riscv.

So move the content of those functions into other functions that riscv
can use without duplicating code.

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
include/asm-generic/pgalloc.h