From: Ingo Molnar <mingo@kernel.org>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH v2] x86/hweight: Fix and improve __arch_hweight{32,64}() assembly
Date: Wed, 12 Mar 2025 13:16:14 +0100 [thread overview]
Message-ID: <Z9F7DoCQsIcf7MLe@gmail.com> (raw)
In-Reply-To: <CAFULd4bir3v7heqdUtPEFGEY66SwqxNkmRXy=uhB_3popS3zDQ@mail.gmail.com>
* Uros Bizjak <ubizjak@gmail.com> wrote:
> On Wed, Mar 12, 2025 at 1:09 PM Ingo Molnar <mingo@kernel.org> wrote:
> >
> >
> > * Uros Bizjak <ubizjak@gmail.com> wrote:
> >
> > > a) Use ASM_CALL_CONSTRAINT to prevent inline asm that includes call
> > > instruction from being scheduled before the frame pointer gets set
> > > up by the containing function. This unconstrained scheduling might
> > > cause objtool to print a "call without frame pointer save/setup"
> > > warning. Current versions of compilers don't seem to trigger this
> > > condition, but without this constraint there's nothing to prevent
> > > the compiler from scheduling the insn in front of frame creation.
> > >
> > > b) Use asm_inline to instruct the compiler that the size of asm()
> > > is the minimum size of one instruction, ignoring how many instructions
> > > the compiler thinks it is. ALTERNATIVE macro that expands to several
> > > pseudo directives causes instruction length estimate to count
> > > more than 20 instructions.
> > >
> > > c) Use named operands in inline asm.
> >
> > I think this should be a 3-patch series. While it all modifies the same
> > code, each change could introduce separate issues, so it's better to be
> > individually bisectable IMO ...
>
> Ok, will split and send separate series.
Thanks!
Ingo
prev parent reply other threads:[~2025-03-12 12:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 15:07 [PATCH v2] x86/hweight: Fix and improve __arch_hweight{32,64}() assembly Uros Bizjak
2025-03-12 12:09 ` Ingo Molnar
2025-03-12 12:12 ` Uros Bizjak
2025-03-12 12:16 ` Ingo Molnar [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=Z9F7DoCQsIcf7MLe@gmail.com \
--to=mingo@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=ubizjak@gmail.com \
--cc=x86@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