linux/arch/loongarch
Ryan Roberts c04035ce80 mm: hugetlb: Add huge page size param to huge_ptep_get_and_clear()
commit 02410ac72a upstream.

In order to fix a bug, arm64 needs to be told the size of the huge page
for which the huge_pte is being cleared in huge_ptep_get_and_clear().
Provide for this by adding an `unsigned long sz` parameter to the
function. This follows the same pattern as huge_pte_clear() and
set_huge_pte_at().

This commit makes the required interface modifications to the core mm as
well as all arches that implement this function (arm64, loongarch, mips,
parisc, powerpc, riscv, s390, sparc). The actual arm64 bug will be fixed
in a separate commit.

Cc: stable@vger.kernel.org
Fixes: 66b3923a1a ("arm64: hugetlb: add support for PTE contiguous bit")
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com> # riscv
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> # s390
Link: https://lore.kernel.org/r/20250226120656.2400136-2-ryan.roberts@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-03-13 12:58:38 +01:00
..
boot loongarch: efi: enable generic EFI compressed boot 2022-09-20 09:50:31 +02:00
configs mm: z3fold: deprecate CONFIG_Z3FOLD 2024-10-10 11:58:02 +02:00
crypto LoongArch/crypto: Clean up useless assignment operations 2024-04-03 15:28:36 +02:00
include mm: hugetlb: Add huge page size param to huge_ptep_get_and_clear() 2025-03-13 12:58:38 +01:00
kernel LoongArch: Set max_pfn with the PFN of the last page 2025-03-13 12:58:23 +01:00
lib LoongArch: csum: Fix OoB access in IP checksum code for negative lengths 2025-02-21 13:57:07 +01:00
mm LoongArch: Fix sleeping in atomic context for PREEMPT_RT 2024-12-14 20:00:15 +01:00
net LoongArch: BPF: Adjust the parameter of emit_jirl() 2025-01-02 10:32:05 +01:00
pci LoongArch: Fix memleak in pci_acpi_scan_root() 2024-10-17 15:24:20 +02:00
power LoongArch: Fix warnings during S3 suspend 2025-02-08 09:52:27 +01:00
vdso LoongArch: Fix build failure with GCC 15 (-std=gnu23) 2024-12-09 10:32:31 +01:00
Kbuild LoongArch: Add BPF JIT support 2022-10-12 16:36:20 +08:00
Kconfig LoongArch: Select HAVE_ARCH_SECCOMP to use the common SECCOMP menu 2024-03-01 13:34:55 +01:00
Kconfig.debug LoongArch: Add prologue unwinder support 2022-08-12 13:10:11 +08:00
Makefile kbuild: unify vdso_install rules 2024-06-12 11:12:32 +02:00