Re: [PATCH] x86: add more x86-64 micro-architecture levels
From: John
Date: Sun Sep 15 2024 - 08:25:41 EST
On Sunday, September 15th, 2024 at 7:40 AM, Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
> If these are going to be exposed to end users, we need some kind of
> help text that helps end users select among these options and what the
> pitfalls are.
>
> I actually don't have the foggiest idea what an "AMD x86-64 CPU with v2
> instructions" even is. Even saying "AMD x86-64 CPU" isn't super helpful
> because "AMD x86_64" is kinda a generic way to refer to all the 64-bit
> x86 CPUs, Intel included.
> 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.
> 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.
> 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'
> > config X86_HAVE_PAE
> > def_bool y
> > - depends on MCRUSOE || MEFFICEON || MCYRIXIII || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC7 || MCORE2 || MATOM || X86_64
> > + depends on MCRUSOE || MEFFICEON || MCYRIXIII || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC7 || MCORE2 || MATOM || X86_64 || MAMD_CPU_V2 || MAMD_CPU_V3 || MAMD_CPU_V4 || MINTEL_CPU_V2 || MINTEL_CPU_V3 || MINTEL_CPU_V4
>
>
> is rather silly when M*_CPU_V* all:
>
> depends on X86_64
>
> right?
True!
> 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.