linux-stable/arch/arm64
Qi Zheng 18f3962953 mm: hugetlb: kill set_huge_swap_pte_at()
Commit e5251fd430 ("mm/hugetlb: introduce set_huge_swap_pte_at()
helper") add set_huge_swap_pte_at() to handle swap entries on
architectures that support hugepages consisting of contiguous ptes.  And
currently the set_huge_swap_pte_at() is only overridden by arm64.

set_huge_swap_pte_at() provide a sz parameter to help determine the number
of entries to be updated.  But in fact, all hugetlb swap entries contain
pfn information, so we can find the corresponding folio through the pfn
recorded in the swap entry, then the folio_size() is the number of entries
that need to be updated.

And considering that users will easily cause bugs by ignoring the
difference between set_huge_swap_pte_at() and set_huge_pte_at().  Let's
handle swap entries in set_huge_pte_at() and remove the
set_huge_swap_pte_at(), then we can call set_huge_pte_at() anywhere, which
simplifies our coding.

Link: https://lkml.kernel.org/r/20220626145717.53572-1-zhengqi.arch@bytedance.com
Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Acked-by: Muchun Song <songmuchun@bytedance.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-07-03 18:08:50 -07:00
..
boot Samsung fixes for v5.19 2022-06-24 17:20:24 +02:00
configs - Enable essential PMIC and regulatro drivers for MT8195. 2022-05-13 14:02:30 +02:00
crypto crypto: arm64/sm4 - Fix wrong dependency of NEON/CE implementation 2022-04-15 16:34:30 +08:00
hyperv
include mm: hugetlb: kill set_huge_swap_pte_at() 2022-07-03 18:08:50 -07:00
kernel arm64 fixes for 5.19-rc3: 2022-06-17 13:55:19 -05:00
kvm KVM: arm64: Prevent kmemleak from accessing pKVM memory 2022-06-17 09:48:38 +01:00
lib S390: 2022-05-26 14:20:14 -07:00
mm mm: hugetlb: kill set_huge_swap_pte_at() 2022-07-03 18:08:50 -07:00
net bpf, arm64: Clear prog->jited_len along prog->jited 2022-06-07 10:40:53 -07:00
tools arm64/sysreg: Fix typo in Enum element regex 2022-06-10 16:23:48 +01:00
xen
Kbuild
Kconfig RISC-V Patches for the 5.19 Merge Window, Part 1 2022-05-31 14:10:54 -07:00
Kconfig.debug
Kconfig.platforms arm64 updates for 5.19: 2022-05-23 21:06:11 -07:00
Makefile kbuild: factor out the common installation code into scripts/install.sh 2022-05-11 21:45:53 +09:00