From: Dave Hansen <dave.hansen@intel.com>
To: John <therealgraysky@proton.me>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
Unknown <x86@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] x86: add more x86-64 micro-architecture levels
Date: Sun, 15 Sep 2024 05:58:01 -0700 [thread overview]
Message-ID: <4d172613-481b-4b45-aa59-165ef1c7dc9b@intel.com> (raw)
In-Reply-To: <OCPUzm9NO5UcsvzQfzIazzMh7nymvY5oz3pBojDqEOlhVrYTdYZ35Il0oi8WkwFN7N-1HpCIPXFgQ3MGT7108YhjiBWWv7RqrC40mlW4ak4=@proton.me>
On 9/15/24 05:25, John wrote:
>> Why is this copied and pasted six times?
>>
>> + depends on (CC_IS_GCC && GCC_VERSION > 110000)...
> I believe the version requirement is needed for each of these new
> options. Please correct me if I am mistaken.
The requirement is fine.
But copying and pasting the same string without refactoring it is not.
You should refactor it:
bool SUPPORT_MARCH_CODEVERS
depends on (CC_IS_GCC && GCC_VERSION > 110000)...
depends on X86_64
and then have each site do this:
+config MINTEL_CPU_V4
+ bool "Intel x86-64-v4"
+ depends on SUPPORT_MARCH_CODEVERS
+ help
...
>> Why are there v4's for both AMD and Intel that do the exact same
>> thing?
>
> I did it this way to selectively include the AMD-specific and
> Intel-specific membership in the config options below. For example,
> the AMD options should be included in the X86_INTEL_USERCOPY config.
I think you mean "the AMD options should *not* be included..."
...
>> Alternatively, anyone wanting to do this could just hack their makefile
>> or (I assume) pass CFLAGS= into the build command-line. Why is
>> something like that insufficient.
>
> I believe this would work:
> export KCFLAGS=' -march=x86-64-v3'
> export KCPPFLAGS=' -march=x86-64-v3'
So why not just have users do that?
>> So, taking a step back: Please convince us that this is something we
>> want to expose to end users in the first place, as opposed to having
>> them hack makefiles or just allowing users a string instead of using the
>> existing CONFIG_M* Kconfig options.
>
> This was just the logical extension of the already included and now
> antiquated options, for example pentium-mmx, k6, etc.
It's probably best not to extend that beast. It really is a relic of
the past and, practically, all of our 64-bit builds are GENERIC_CPU=y
and have been for a long time. We've moved away from the old days where
you could easily compile a kernel that didn't boot.
We're basically handing our users a big long piece of rope with which to
hang themselves here. This patch makes it easy and doesn't do a great
job of explaining why they'd take the risk or what the benefit is.
I don't think we should do this.
next prev parent reply other threads:[~2024-09-15 12:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-15 11:05 John
2024-09-15 11:40 ` Dave Hansen
2024-09-15 12:25 ` John
2024-09-15 12:58 ` Dave Hansen [this message]
2024-09-15 18:42 ` John
2024-09-17 18:22 ` John
2024-09-17 18:45 ` H. Peter Anvin
2024-09-15 12:49 ` Borislav Petkov
2024-09-15 12:53 ` Dave Hansen
2024-09-17 21:33 ` Hanabishi
2024-09-18 19:02 ` John
2024-09-18 20:25 ` Hanabishi
2024-09-18 21:14 ` John
2024-09-18 21:48 ` Hanabishi
2024-09-18 23:07 ` John
2024-09-16 5:14 ` WangYuli
2024-09-24 7:00 ` kernel test robot
2024-09-24 13:38 ` Dave Hansen
2024-09-24 17:40 ` John
2024-09-26 1:43 ` Oliver Sang
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=4d172613-481b-4b45-aa59-165ef1c7dc9b@intel.com \
--to=dave.hansen@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=therealgraysky@proton.me \
--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
all inboxes | Powered by JetHome®