[PATCH 2/2] [RFC] iommu: io-pgtable-arm-v7s: avoid gcc-16.0.1 section mismatch
Arnd Bergmann
arnd at kernel.org
Tue Feb 3 08:24:00 PST 2026
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!
Signed-off-by: Arnd Bergmann <arnd at arndb.de>
---
drivers/iommu/io-pgtable-arm-v7s.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/iommu/io-pgtable-arm-v7s.c b/drivers/iommu/io-pgtable-arm-v7s.c
index 523355e91a2c..705885924afb 100644
--- a/drivers/iommu/io-pgtable-arm-v7s.c
+++ b/drivers/iommu/io-pgtable-arm-v7s.c
@@ -775,23 +775,23 @@ struct io_pgtable_init_fns io_pgtable_arm_v7s_init_fns = {
#ifdef CONFIG_IOMMU_IO_PGTABLE_ARMV7S_SELFTEST
-static struct io_pgtable_cfg *cfg_cookie __initdata;
+static struct io_pgtable_cfg *cfg_cookie;
static void __init dummy_tlb_flush_all(void *cookie)
{
WARN_ON(cookie != cfg_cookie);
}
-static void __init dummy_tlb_flush(unsigned long iova, size_t size,
+static void dummy_tlb_flush(unsigned long iova, size_t size,
size_t granule, void *cookie)
{
WARN_ON(cookie != cfg_cookie);
WARN_ON(!(size & cfg_cookie->pgsize_bitmap));
}
-static void __init dummy_tlb_add_page(struct iommu_iotlb_gather *gather,
- unsigned long iova, size_t granule,
- void *cookie)
+static void dummy_tlb_add_page(struct iommu_iotlb_gather *gather,
+ unsigned long iova, size_t granule,
+ void *cookie)
{
dummy_tlb_flush(iova, granule, granule, cookie);
}
--
2.39.5
More information about the linux-arm-kernel
mailing list