On Fri, May 22, 2026, at 23:33, David Laight wrote:
> On Fri, 22 May 2026 16:19:59 +0200
> Arnd Bergmann <[email protected]> wrote:
>
>> From: Arnd Bergmann <[email protected]>
> ...
>> Change the CPU selection to build everything with either -march=i586
>> or -march=i686 and make the specific options only change the -mtune=
>> parameter where this was previously handled by -march=. Note that
>> the only -mtune= options that gcc or clang understand for x86-32
>> are i486, pentium, pentiumpro, pentium4, atom, geode, k6 and athlon,
>> the other ten are just aliases for one of them.
>
> Hmmm... That rather implies there is nothing for anything designed
> in the last 20 years.
> No wonder code generation choices look strange at times.
I think this is correct: I can only think of two 32-bit x86
cores designed in the past 20 year: Quark is basically a i486
pipeline and rarely used with Linux these days. RDC Emkore
is still used in low-end SoCs like Vortex86EX2 but never
gained GCC support.
> You don't want to pick p4, so I guess either p-pro or athlon?
If you have a p4, why wouldn't you pick that option?
Most other 32-bit Intel cores (Pentium II, Pentium III,
Pentium-M, Yonah/Core) are indeed iterations of
Pentium Pro, picking the more specific Kconfig option
has never had any effect on gcc tuning parameters.
If you want a kernel that can run more more than one
CPU, CONFIG_X86_GENERIC will still do that, but that
is likely measurably worse on the more sensitive cores
like k6/nx686 or geode/cx5x86.
> But neither is really anything like even Sandy bridge.
Sandy Bridge was well into the 64-bit era. Even when that was
new, you wouldn't have run a 32-bit kernel on it (or cared
about CPU optimizations if you did). For x86-64 there is no
CPU selection and we just always build with -mtune=generic.
Thisi works well with any out-of-order microarchitecture.
Arnd