Re: [PATCH 6.12 000/403] 6.12.109-rc1 review

From: Dominique Martinet

Date: Fri Sep 04 2026 - 09:47:39 EST


Jon Hunter wrote on Fri, Sep 04, 2026 at 11:34:27AM +0100:
> On 04/09/2026 10:07, Dominique Martinet wrote:
> >
> > > Dev Jain <dev.jain@xxxxxxx>
> > > mm/page_vma_mapped: use huge_ptep_get() for hugetlb
> >
> > This fails build on arm (config attached)
> >
> > CC mm/page_vma_mapped.o
> > ../mm/page_vma_mapped.c: In function 'check_pte':
> > ../mm/page_vma_mapped.c:103:25: error: implicit declaration of function 'huge_ptep_get' [-Wimplicit-function-declaratio]
> > 103 | ptent = huge_ptep_get(pvmw->vma->vm_mm, pvmw->address,
> > | ^~~~~~~~~~~~~
> > make[3]: *** [../scripts/Makefile.build:229: mm/page_vma_mapped.o] Error
> >
> >
> > Don't have time to look further right now, might have a look after kids
> > sleep if nobody beat me to it
>
>
> I see the same (appears to break 6.18.y too) and bisect points to ...
>
> # first bad commit: [25fb3e9ad3b665b57e218dafb58acd13b1a672b7] mm/migrate: use huge_ptep_get() in remove_migration_pte()

Yeah... So this builds on master because this commit:
f5407e9b697c ("mm/rmap: use huge_ptep_get() in try_to_unmap_one()")
added a function declaration in linux/hugetlb.h !CONFIG_HUGETLB_PAGE
code:
```
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 817b8b4223fa..95b1b6ee1f96 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -1270,6 +1270,8 @@ static inline void hugetlb_count_sub(long l, struct mm_struct *mm)
{
}

+pte_t huge_ptep_get(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
+
static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep)
{
```

The rest of that commit isn't applicable, so we either need to roll that
change in 'mm/migrate: use huge_ptep_get() in remove_migration_pte()' or
add it separately (or drop that commit)


With that fixed, build passed, and I don't see any other problem in
tests either (arm target still running, but having looked at the diff I
don't expect any failure, will report within ~30mins if something else
comes up):
Tested ee6921fed8a4 ("Linux 6.12.109-rc1") on:
- arm i.MX6ULL (Armadillo 640)
- arm64 i.MX8MP (Armadillo G4)
- arm64 i.MX8ULP (Armadillo IoT A9E)
Tested-by: Dominique Martinet <dominique.martinet@xxxxxxxxxxxxxxxxx>

Thanks,
--
Dominique Martinet

--
Dominique Martinet | Asmadeus