linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: Tor Vic <torvic9@mailbox.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"clang-built-linux@googlegroups.com" 
	<clang-built-linux@googlegroups.com>,
	"graysky@archlinux.us" <graysky@archlinux.us>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Masahiro Yamada <masahiroy@kernel.org>
Subject: Re: [PATCH 2/2] x86, Makefile: Add new generic x86-64 settings v2/v3/v4
Date: Tue, 17 Aug 2021 11:47:43 -0700	[thread overview]
Message-ID: <CAKwvOdnUFuvmoywKvGyrnDMHgkVrq3vSenLSy048U=amWs2QTQ@mail.gmail.com> (raw)
In-Reply-To: <ec0f00b1-04c7-9972-d28b-122964a127dd@mailbox.org>

On Tue, Aug 17, 2021 at 11:31 AM Tor Vic <torvic9@mailbox.org> wrote:
>
> On 17.08.21 18:22, Nick Desaulniers wrote:
> >
> > Ah, cc-option can be used from Kconfig. Perhaps a cc-option call to
> > -march=x86-64-vX with a comment about which compiler versions first
> > supported these (so that we can remove the feature test when the
> > minimum supported toolchains are advanced) would be better?
> >
>
> That makes sense. Will do a v2.
> Which of these possibilities is more "expensive"?
> I remember a recent patch where some of these calls were removed.

cc-option does "cost" more than these version checks, but it is more
concise about what we care about and they can be removed over time.
They also work better for different compilers, since it's easy to
forget to check one particular compiler, or get the compiler version
wrong, or break a pre-released compiler.  We generally want to prefer
feature detection to version detection.  I sent a series recently
removing stale checks.
-- 
Thanks,
~Nick Desaulniers

  reply	other threads:[~2021-08-17 18:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 14:23 [PATCH 1/2] x86, Makefile: Move the CPU-specific 64-bit tuning settings to arch/x86/Makefile.cpu torvic9
2021-08-17 14:24 ` [PATCH 2/2] x86, Makefile: Add new generic x86-64 settings v2/v3/v4 torvic9
2021-08-17 18:17   ` Nick Desaulniers
2021-08-17 18:22     ` Nick Desaulniers
2021-08-17 18:31       ` Tor Vic
2021-08-17 18:47         ` Nick Desaulniers [this message]
2021-08-17 18:36   ` Borislav Petkov
2021-08-17 19:12     ` Tor Vic
2021-08-18 15:08     ` torvic9
2021-08-18 17:59       ` Borislav Petkov
2021-08-18 18:28         ` Tor Vic
2021-08-18 18:43           ` Borislav Petkov
2021-08-18  7:15   ` Christoph Hellwig
2021-08-18  9:46     ` torvic9
2021-08-19 21:58     ` David Laight
2021-08-17 17:58 ` [PATCH 1/2] x86, Makefile: Move the CPU-specific 64-bit tuning settings to arch/x86/Makefile.cpu Nick Desaulniers
2021-08-17 18:28   ` Tor Vic
2021-08-18  7:11 ` Christoph Hellwig
2021-08-18  9:46   ` torvic9
2021-08-18 14:51 ` Masahiro Yamada

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='CAKwvOdnUFuvmoywKvGyrnDMHgkVrq3vSenLSy048U=amWs2QTQ@mail.gmail.com' \
    --to=ndesaulniers@google.com \
    --cc=bp@alien8.de \
    --cc=clang-built-linux@googlegroups.com \
    --cc=graysky@archlinux.us \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=torvic9@mailbox.org \
    --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;
as well as URLs for NNTP newsgroup(s).