LoongArch: Add ARCH_HAS_PTE_DEVMAP support
authorHuacai Chen <chenhuacai@loongson.cn>
Sat, 20 Jul 2024 14:40:59 +0000 (22:40 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Sat, 20 Jul 2024 14:40:59 +0000 (22:40 +0800)
commitb7a2750ef268e2723acb785c4903b0b78c3dcbc6
tree5c86b9d99b40f18a36f2186c8570364559c2db51
parenta0f7085f6a63f19f83f2644ce2da49a8d3cf7c0f
LoongArch: Add ARCH_HAS_PTE_DEVMAP support

In order for things like get_user_pages() to work on ZONE_DEVICE memory,
we need a software PTE bit to identify device-backed PFNs.  Hook this up
along with the relevant helpers to join in with ARCH_HAS_PTE_DEVMAP.

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/Kconfig
arch/loongarch/include/asm/pgtable-bits.h
arch/loongarch/include/asm/pgtable.h