riscv: Fix arch_hugetlb_migration_supported() for NAPOT
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Tue, 30 Jan 2024 12:01:14 +0000 (13:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2024 18:10:53 +0000 (19:10 +0100)
commitbc401f796061bd64b364e9f75dcf9368c1a103cc
tree1a9ba8ac828060ceb1fc11d081a3f97ca8bae5b2
parentda9c33a70f095d5d55c36d0bfeba969e31de08ae
riscv: Fix arch_hugetlb_migration_supported() for NAPOT

[ Upstream commit ce68c035457bdd025a9961e0ba2157323090c581 ]

arch_hugetlb_migration_supported() must be reimplemented to add support
for NAPOT hugepages, which is done here.

Fixes: 82a1a1f3bfb6 ("riscv: mm: support Svnapot in hugetlb page")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20240130120114.106003-1-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/riscv/include/asm/hugetlb.h
arch/riscv/mm/hugetlbpage.c