linux/arch/s390/mm
Ryan Roberts a684bad77e 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 13:02:17 +01:00
..
cmm.c s390/mm: Add cond_resched() to cmm_alloc/free_pages() 2024-09-05 15:17:23 +02:00
dump_pagetables.c s390 updates for 6.12 merge window 2024-09-21 09:02:54 -07:00
extable.c s390/fpu: Add fpc exception handler / remove fixup section again 2025-02-17 10:05:44 +01:00
extmem.c s390/extmem: fix virtual vs physical address confusion 2024-02-09 13:58:16 +01:00
fault.c s390/mm/fault: convert do_secure_storage_access() from follow_page() to folio_walk 2024-09-01 20:26:01 -07:00
gmap.c s390: Replace S390_lowcore by get_lowcore() 2024-06-18 17:01:33 +02:00
hugetlbpage.c mm: hugetlb: Add huge page size param to huge_ptep_get_and_clear() 2025-03-13 13:02:17 +01:00
init.c memblock: updates for 6.12-rc1 2024-09-25 11:35:19 -07:00
maccess.c s390/uaccess: Make s390_kernel_write() usable for decompressor 2024-07-23 16:02:31 +02:00
Makefile s390/mm: provide simple ARCH_HAS_DEBUG_VIRTUAL support 2024-03-13 09:23:49 +01:00
mmap.c mm: make arch_get_unmapped_area() take vm_flags by default 2024-09-09 16:39:13 -07:00
page-states.c s390/cmma: rework no-dat handling 2023-11-05 22:34:58 +01:00
pageattr.c s390/pageattr: Implement missing kernel_page_present() 2024-12-05 14:01:11 +01:00
pfault.c s390/pfault: use consistent comment style 2023-07-29 14:57:18 +02:00
pgalloc.c s390 updates for 6.11 merge window 2024-07-18 15:41:45 -07:00
pgtable.c mm/treewide: replace pud_large() with pud_leaf() 2024-03-06 13:04:19 -08:00
physaddr.c s390/mm: provide simple ARCH_HAS_DEBUG_VIRTUAL support 2024-03-13 09:23:49 +01:00
vmem.c s390: Keep inittext section writable 2024-07-31 16:30:20 +02:00