[PATCH 2/2] [RFC] iommu: io-pgtable-arm-v7s: avoid gcc-16.0.1 section mismatch

Will Deacon will at kernel.org
Tue Mar 10 09:40:47 PDT 2026


On Tue, Feb 03, 2026 at 05:24:00PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd at arndb.de>
> 
> gcc-16 has gained some more advanced inlining techniques that enable
> it to inline the dummy_tlb_add_page() and dummy_tlb_flush() function
> pointers into a specialized version of __arm_v7s_unmap:
> 
> WARNING: modpost: vmlinux: section mismatch in reference: __arm_v7s_unmap+0x2cc (section: .text) -> dummy_tlb_add_page (section: .init.text)
> 
> From what I can tell, the transformation is correct, as this
> is only called when __arm_v7s_unmap() is called from
> arm_v7s_do_selftests(), which is also __init.
> 
> I have not come up with a good workaround, so this simply marks
> dummy_tlb_add_page() as not __init. Since there are currently only two
> files where this happens, that may be an easy way out.
> 
> If anyone has a better idea for how to deal with that, let me know!

Can we mark the dummy_* functions as 'noinline' instead? We shouldn't
have to keep the selftest code kicking around in memory after boot.

Will



More information about the linux-arm-kernel mailing list