public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel•org>
To: Will Deacon <will@kernel•org>,
	Robin Murphy <robin.murphy@arm•com>,
	Joerg Roedel <joro@8bytes•org>,
	Andrew Morton <akpm@linux-foundation•org>,
	Thomas Gleixner <tglx@kernel•org>
Cc: linux-arm-kernel@lists•infradead.org, iommu@lists•linux.dev,
	linux-kernel@vger•kernel.org, Arnd Bergmann <arnd@arndb•de>
Subject: [PATCH 2/2] [RFC] iommu: io-pgtable-arm-v7s: avoid gcc-16.0.1 section mismatch
Date: Tue,  3 Feb 2026 17:24:00 +0100	[thread overview]
Message-ID: <20260203162406.2215716-2-arnd@kernel.org> (raw)
In-Reply-To: <20260203162406.2215716-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@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@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



  reply	other threads:[~2026-02-03 16:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03 16:23 [PATCH 1/2] [RFC] debugobjects: avoid gcc-16.0.1 section mismatch Arnd Bergmann
2026-02-03 16:24 ` Arnd Bergmann [this message]
2026-03-10 16:40   ` [PATCH 2/2] [RFC] iommu: io-pgtable-arm-v7s: " Will Deacon
2026-03-10 19:26     ` Arnd Bergmann
2026-03-13 16:57       ` Will Deacon
2026-05-08 13:17 ` [PATCH 1/2] [RFC] debugobjects: " Heiko Carstens
2026-05-10 19:31 ` Thomas Gleixner
2026-05-11  6:17   ` Arnd Bergmann
2026-05-11  7:18     ` Thomas Gleixner
2026-05-11  9:46       ` Arnd Bergmann
2026-05-11 16:10         ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260203162406.2215716-2-arnd@kernel.org \
    --to=arnd@kernel$(echo .)org \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=arnd@arndb$(echo .)de \
    --cc=iommu@lists$(echo .)linux.dev \
    --cc=joro@8bytes$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=robin.murphy@arm$(echo .)com \
    --cc=tglx@kernel$(echo .)org \
    --cc=will@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox