public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Sherry Yang <sherry.yang@oracle.com>
Cc: "joerg.roedel@amd.com" <joerg.roedel@amd.com>,
	"kevin.tian@intel.com" <kevin.tian@intel.com>,
	"vasant.hegde@amd.com" <vasant.hegde@amd.com>,
	"joro@8bytes.org" <joro@8bytes.org>,
	"will@kernel.org" <will@kernel.org>,
	"robin.murphy@arm.com" <robin.murphy@arm.com>,
	"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] iommupt/amdv1: avoid GCOV builds triggering FIELD_PREP build failure
Date: Thu, 26 Mar 2026 09:01:01 -0300	[thread overview]
Message-ID: <20260326120101.GH67624@nvidia.com> (raw)
In-Reply-To: <94D79BCA-138D-4CED-995C-E89EF7635C92@oracle.com>

On Wed, Mar 25, 2026 at 11:39:37PM +0000, Sherry Yang wrote:
> 
> > On Mar 10, 2026, at 10:57 AM, Jason Gunthorpe <jgg@nvidia.com> wrote:
> > 
> > On Tue, Mar 10, 2026 at 05:17:31PM +0000, Sherry Yang wrote:
> > 
> >> Unfortunately, I ran into the FIELD_PREP build failure with
> >> 98d5110f90ae (“iommupt: Make it clearer to the compiler that
> >> pts.level == 0 for single page”) already merged, which means it
> >> doesn’t work for me. I noticed you mentioned clang 18 hit the same
> >> issue and fixed by the patch. We’re using GCC 14.2.1, looks like GCC
> >> still constant-folds the contiguous branch despite the change to
> >> pts.level.
> > 
> > This is all a performance path, I'm reluctant to add more code for
> > everyone just to hide things from GCC bugs.
> > 
> > Maybe you can rework this to be only when gcov is on, or maybe you can
> > fix it by futher enhancing what the other commit does. Perhaps an
> > always inline annotation is all that is missing?
> 
> 
> Thanks for the pointer — marking amdv1pt_install_leaf_entry() as
> __always_inline fixes the gcc/gcov build failure for me while keeping
> the original FIELD_PREP() path intact.
> 
> If you’re happy with this approach, I'll send the patch out.

That sounds good thanks

Jason

      reply	other threads:[~2026-03-26 12:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 16:31 [PATCH] iommupt/amdv1: avoid GCOV builds triggering FIELD_PREP build failure Sherry Yang
2026-03-10 16:41 ` Jason Gunthorpe
2026-03-10 17:17   ` Sherry Yang
2026-03-10 17:57     ` Jason Gunthorpe
2026-03-25 23:39       ` Sherry Yang
2026-03-26 12:01         ` Jason Gunthorpe [this message]

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=20260326120101.GH67624@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=iommu@lists.linux.dev \
    --cc=joerg.roedel@amd.com \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=sherry.yang@oracle.com \
    --cc=vasant.hegde@amd.com \
    --cc=will@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