mainline build failure due to b67fbebd4cf9 ("mmu_gather: Force tlb-flush VM_PFNMAP vmas")

Sudip Mukherjee (Codethink)
2022-07-22T07:53:54Z

Hi All,

The latest mainline kernel branch fails to build for alpha allmodconfig
with the error:

In file included from ./arch/alpha/include/asm/tlb.h:5,
from mm/oom_kill.c:48:
./include/asm-generic/tlb.h:401:1: error: redefinition of 'tlb_update_vma_flags'
401 | tlb_update_vma_flags(struct mmu_gather *tlb, struct vm_area_struct *vma)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/tlb.h:372:1: note: previous definition of 'tlb_update_vma_flags' with type 'void(struct mmu_gather *, struct vm_area_struct *)'
372 | tlb_update_vma_flags(struct mmu_gather *tlb, struct vm_area_struct *vma) { }
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./arch/alpha/include/asm/tlb.h:5,
from arch/alpha/mm/init.c:32:
./include/asm-generic/tlb.h:401:1: error: redefinition of 'tlb_update_vma_flags'
401 | tlb_update_vma_flags(struct mmu_gather *tlb, struct vm_area_struct *vma)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/tlb.h:372:1: note: previous definition of 'tlb_update_vma_flags' with type 'void(struct mmu_gather *, struct vm_area_struct *)'
372 | tlb_update_vma_flags(struct mmu_gather *tlb, struct vm_area_struct *vma) { }
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./arch/alpha/include/asm/tlb.h:5,
from kernel/sched/core.c:77:
./include/asm-generic/tlb.h:401:1: error: redefinition of 'tlb_update_vma_flags'
401 | tlb_update_vma_flags(struct mmu_gather *tlb, struct vm_area_struct *vma)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/tlb.h:372:1: note: previous definition of 'tlb_update_vma_flags' with type 'void(struct mmu_gather *, struct vm_area_struct *)'
372 | tlb_update_vma_flags(struct mmu_gather *tlb, struct vm_area_struct *vma) { }
| ^~~~~~~~~~~~~~~~~~~~
In file included from ./arch/alpha/include/asm/tlb.h:5,
from fs/proc/task_mmu.c:25:
./include/asm-generic/tlb.h:401:1: error: redefinition of 'tlb_update_vma_flags'
401 | tlb_update_vma_flags(struct mmu_gather *tlb, struct vm_area_struct *vma)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/tlb.h:372:1: note: previous definition of 'tlb_update_vma_flags' with type 'void(struct mmu_gather *, struct vm_area_struct *)'
372 | tlb_update_vma_flags(struct mmu_gather *tlb, struct vm_area_struct *vma) { }
| ^~~~~~~~~~~~~~~~~~~~

git bisect pointed to b67fbebd4cf9 ("mmu_gather: Force tlb-flush VM_PFNMAP vmas").
And, reverting that commit has fixed the build failure.

I will be happy to test any patch or provide any extra log if needed.

--
Regards
Sudip