Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Arnd Bergmann <arnd@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Joerg Roedel <joro@8bytes.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@kernel.org>,
	linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev,
	linux-kernel@vger.kernel.org, Mostafa Saleh <smostafa@google.com>
Subject: Re: [PATCH 2/2] [RFC] iommu: io-pgtable-arm-v7s: avoid gcc-16.0.1 section mismatch
Date: Fri, 13 Mar 2026 16:57:14 +0000	[thread overview]
Message-ID: <abRB6g-48ZX6Yl2r@willie-the-truck> (raw)
In-Reply-To: <3eab12fd-31d3-4a41-a0d9-61b0f6c8ada3@app.fastmail.com>

On Tue, Mar 10, 2026 at 08:26:40PM +0100, Arnd Bergmann wrote:
> On Tue, Mar 10, 2026, at 17:40, Will Deacon wrote:
> > On Tue, Feb 03, 2026 at 05:24:00PM +0100, Arnd Bergmann wrote:
> >> 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!
> >
> > Can we mark the dummy_* functions as 'noinline' instead? We shouldn't
> > have to keep the selftest code kicking around in memory after boot.
> 
> I think that would work as well, but I'd have to test it properly,
> as the gcc behavior was already not what I had expected.
> 
> Another option may be to take this a bit further and do the
> same for the arm_v7s selftest that Mostafa did in the lpae
> selftest with 7e06063a43d3 ("iommu/io-pgtable-arm-selftests:
> Use KUnit") and a3c24b6d7cd6 ("iommu/io-pgtable-arm-selftests:
> Modularize the test").
> 
> I think that would be the most logical step, but it's also
> beyond what I can do as a simple build fix.

tbh, I'm happy to take the noinline variant as a quick hack if it works.

Will


  reply	other threads:[~2026-03-13 16:57 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 ` [PATCH 2/2] [RFC] iommu: io-pgtable-arm-v7s: " Arnd Bergmann
2026-03-10 16:40   ` Will Deacon
2026-03-10 19:26     ` Arnd Bergmann
2026-03-13 16:57       ` Will Deacon [this message]
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=abRB6g-48ZX6Yl2r@willie-the-truck \
    --to=will@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=smostafa@google.com \
    --cc=tglx@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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