From: Nick Desaulniers <ndesaulniers@google.com>
To: 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>,
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 1/2] x86, Makefile: Move the CPU-specific 64-bit tuning settings to arch/x86/Makefile.cpu
Date: Tue, 17 Aug 2021 10:58:39 -0700 [thread overview]
Message-ID: <CAKwvOdkpJc66DWTJV1qTZ6ch-qLxf+g-mJnLmP0ea396P1oYmA@mail.gmail.com> (raw)
In-Reply-To: <269701460.117528.1629210189833@office.mailbox.org>
Tor,
Thanks for the patches. One thing I always try to do is use
./scripts/get_maintainer.pl to get the appropriate maintainers and
reviewers cc'ed. I prefer to explicitly put the maintainers that I
expect to pick up a patch in the To: line.
$ ./scripts/get_maintainer.pl arch/x86/Makefile -norolestats
Thomas Gleixner <tglx@linutronix.de>
Ingo Molnar <mingo@redhat.com>
Borislav Petkov <bp@alien8.de>
x86@kernel.org
"H. Peter Anvin" <hpa@zytor.com>
Nathan Chancellor <nathan@kernel.org>
Nick Desaulniers <ndesaulniers@google.com>
linux-kernel@vger.kernel.org
clang-built-linux@googlegroups.com
added them to CC. Probably needs a refresh at this point, but
https://nickdesaulniers.github.io/blog/2017/05/16/submitting-your-first-patch-to-the-linux-kernel-and-responding-to-feedback/
is still mostly relevant.
On Tue, Aug 17, 2021 at 7:23 AM torvic9 via Clang Built Linux
<clang-built-linux@googlegroups.com> wrote:
>
> In accordance with the FIXME comment in arch/x86/Makefile, move the
> CPU-specific 64-bit tuning settings to arch/x86/Makefile.cpu.
>
> Signed-off-by: Tor Vic <torvic9@mailbox.org>
> ---
> arch/x86/Makefile | 11 ++---------
> arch/x86/Makefile.cpu | 12 ++++++++++++
> 2 files changed, 14 insertions(+), 9 deletions(-)
> create mode 100644 arch/x86/Makefile.cpu
>
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index 307fd0000a83..94105d7ad22c 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -119,15 +119,8 @@ else
> # Use -mskip-rax-setup if supported.
> KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup)
>
> - # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu)
> - cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
> - cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
> -
> - cflags-$(CONFIG_MCORE2) += \
> - $(call cc-option,-march=core2,$(call cc-option,-mtune=generic))
> - cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom) \
> - $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
> - cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
> + # CPU-specific tuning (64-bit).
> + include arch/x86/Makefile.cpu
So we have arch/x86/Makefile_32.cpu, would it be more symmetrical to
have a new arch/x86/Makefile_64.cpu (rather than Makefile.cpu)?
> KBUILD_CFLAGS += $(cflags-y)
>
> KBUILD_CFLAGS += -mno-red-zone
> diff --git a/arch/x86/Makefile.cpu b/arch/x86/Makefile.cpu
> new file mode 100644
> index 000000000000..fb407ae94d90
> --- /dev/null
> +++ b/arch/x86/Makefile.cpu
> @@ -0,0 +1,12 @@
> +# SPDX-License-Identifier: GPL-2.0
> +# CPU tuning section (64-bit) - shared with UML.
> +# Must change only cflags-y (or [yn]), not CFLAGS! That makes a difference for UML.
> +
> +cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
> +cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
> +
> +cflags-$(CONFIG_MCORE2) += \
> + $(call cc-option,-march=core2,$(call cc-option,-mtune=generic))
> +cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom) \
> + $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
> +cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
I was going to say we probably don't want to limit -mtune=genric to
64b only, but it seems that arch/x86/Makefile_32.cpu has some
duplication here.
47 cflags-$(CONFIG_X86_GENERIC) += $(call tune,generic,$(call
tune,i686))
That probably could be hoisted back into arch/x86/Makefile before the
CONFIG_X86_32 check, but I'm not sure about the differences between
CONFIG_GENERIC_CPU vs CONFIG_X86_GENERIC?
--
Thanks,
~Nick Desaulniers
next prev parent reply other threads:[~2021-08-17 17:58 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
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 ` Nick Desaulniers [this message]
2021-08-17 18:28 ` [PATCH 1/2] x86, Makefile: Move the CPU-specific 64-bit tuning settings to arch/x86/Makefile.cpu 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=CAKwvOdkpJc66DWTJV1qTZ6ch-qLxf+g-mJnLmP0ea396P1oYmA@mail.gmail.com \
--to=ndesaulniers@google.com \
--cc=bp@alien8.de \
--cc=clang-built-linux@googlegroups.com \
--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).