<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/arch/x86/Kconfig.cpu, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2025-03-25T07:24:06Z</updated>
<entry>
<title>x86/kbuild/64: Restrict clang versions that can use '-march=native'</title>
<updated>2025-03-25T07:24:06Z</updated>
<author>
<name>Nathan Chancellor</name>
<email>nathan@kernel.org</email>
</author>
<published>2025-03-25T03:23:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ad9b861824ac55d81431815fffaaff5e981badc1'/>
<id>urn:sha1:ad9b861824ac55d81431815fffaaff5e981badc1</id>
<content type='text'>
There are two issues that can appear when building with clang and
'-march=native'.

The first issue is a compiler crash in the ipv6 stack with clang-18,
such as when building allmodconfig. This was frequently reported on the
LLVM issue tracker:

  # Link: https://github.com/llvm/llvm-project/issues?q=is%3Aissue%20ip6_rcv_core

  Stack dump:
  0.      Program arguments: clang ... -march=native ... net/ipv6/ip6_input.c
  1.      &lt;eof&gt; parser at end of file
  2.      Code generation
  3.      Running pass 'Function Pass Manager' on module 'net/ipv6/ip6_input.c'.
  4.      Running pass 'X86 DAG-&gt;DAG Instruction Selection' on function '@ip6_rcv_core'

The second issue is certain -Wframe-larger-than warnings that appear
with clang versions prior to 19, which introduced an optimization that
produces much better code:

  # Link: https://github.com/llvm/llvm-project/commit/90ba33099cbb17e7c159e9ebc5a512037db99d6d [2]

  clang-18:

    drivers/media/pci/saa7164/saa7164-core.c:605:20: error: stack frame size (2392) exceeds limit (2048) in 'saa7164_irq' [-Werror,-Wframe-larger-than]
      605 | static irqreturn_t saa7164_irq(int irq, void *dev_id)
          |                    ^

  clang-19:

    drivers/media/pci/saa7164/saa7164-core.c:605:20: error: stack frame size (216) exceeds limit (128) in 'saa7164_irq' [-Werror,-Wframe-larger-than]
      605 | static irqreturn_t saa7164_irq(int irq, void *dev_id)
          |                    ^

Restrict the testing of the availability of '-march=native' to all
supported GCC versions and clang-19 and newer to avoid these known
resolved issues.

Fixes: 0480bc7e65dc ("x86/kbuild/64: Add the CONFIG_X86_NATIVE_CPU option to locally optimize the kernel with '-march=native'")
Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Cc: Tor Vic &lt;torvic9@mailbox.org&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
Cc: Juergen Gross &lt;jgross@suse.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: https://lore.kernel.org/r/20250324-x86-march-native-clang-19-and-newer-v1-1-3a05ed32a89e@kernel.org
</content>
</entry>
<entry>
<title>x86/kbuild/64: Test for the availability of the -mtune=native compiler flag</title>
<updated>2025-03-25T07:24:06Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2025-03-24T07:05:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=01412081863aa81db47423d5719f2726d2a00a32'/>
<id>urn:sha1:01412081863aa81db47423d5719f2726d2a00a32</id>
<content type='text'>
Stephen reported this build failure when cross-compiling:

  cc1: error: bad value 'native' for '-march=' switch

Test for the availability of the -march=native flag.

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Tested-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt; # build test
Cc: Tor Vic &lt;torvic9@mailbox.org&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
Cc: Juergen Gross &lt;jgross@suse.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: https://lore.kernel.org/r/20250324172723.49fb0416@canb.auug.org.au
</content>
</entry>
<entry>
<title>x86/kbuild/64: Add the CONFIG_X86_NATIVE_CPU option to locally optimize the kernel with '-march=native'</title>
<updated>2025-03-25T07:24:06Z</updated>
<author>
<name>Tor Vic</name>
<email>torvic9@mailbox.org</email>
</author>
<published>2025-03-21T14:28:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ea1dcca1de129dfdf145338a868648bc0e24717c'/>
<id>urn:sha1:ea1dcca1de129dfdf145338a868648bc0e24717c</id>
<content type='text'>
Add a 'native' option that allows users to build an optimized kernel for
their local machine (i.e. the machine which is used to build the kernel)
by passing '-march=native' to CFLAGS.

The idea comes from Linus' reply to Arnd's initial proposal:

  https://lore.kernel.org/all/CAHk-=wji1sV93yKbc==Z7OSSHBiDE=LAdG_d5Y-zPBrnSs0k2A@mail.gmail.com/

Here are some numbers comparing 'generic' to 'native' on a Skylake dual-core
laptop (generic --&gt; native):

  - vmlinux and compressed modules size:
      125'907'744 bytes --&gt; 125'595'280 bytes  (-0.248 %)
      18'810 kilobytes --&gt; 18'770 kilobytes    (-0.213 %)

  - phoronix, average of 3 runs:
      ffmpeg:
      130.99 --&gt; 131.15                        (+0.122 %)
      nginx:
      10'650 --&gt; 10'725                        (+0.704 %)
      hackbench (lower is better):
      102.27 --&gt; 99.50                         (-2.709 %)

  - xz compression of firefox tarball (lower is better):
      319.57 seconds --&gt; 317.34 seconds        (-0.698 %)

  - stress-ng, bogoops, average of 3 15-second runs:
      fork:
      111'744 --&gt; 115'509                      (+3.397 %)
      bsearch:
      7'211 --&gt; 7'436                          (+3.120 %)
      memfd:
      3'591 --&gt; 3'604                          (+0.362 %)
      mmapfork:
      630 --&gt; 629                              (-0.159 %)
      schedmix:
      42'715 --&gt; 43'251                        (+1.255 %)
      epoll:
      2'443'767 --&gt; 2'454'413                  (+0.436 %)
      vm:
      1'442'256 --&gt; 1'486'615                  (+3.076 %)

  - schbench (two message threads), 30-second runs:
      304 rps --&gt; 305 rps                      (+0.329 %)

There is little difference both in terms of size and of performance, however
the native build comes out on top ever so slightly.

[ mingo: Renamed the option to CONFIG_X86_NATIVE_CPU, expanded the help text
         and added Linus's Suggested-by tag. ]

Suggested-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Tor Vic &lt;torvic9@mailbox.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
Cc: Juergen Gross &lt;jgross@suse.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Link: https://lore.kernel.org/r/20250321142859.13889-1-torvic9@mailbox.org
</content>
</entry>
<entry>
<title>x86/mm: Add INVLPGB feature and Kconfig entry</title>
<updated>2025-03-19T10:08:52Z</updated>
<author>
<name>Rik van Riel</name>
<email>riel@surriel.com</email>
</author>
<published>2025-03-19T10:08:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=767ae437a32d644786c0779d0d54492ff9cbe574'/>
<id>urn:sha1:767ae437a32d644786c0779d0d54492ff9cbe574</id>
<content type='text'>
In addition, the CPU advertises the maximum number of pages that can be
shot down with one INVLPGB instruction in CPUID. Save that information
for later use.

  [ bp: use cpu_has(), typos, massage. ]

Signed-off-by: Rik van Riel &lt;riel@surriel.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20250226030129.530345-3-riel@surriel.com
</content>
</entry>
<entry>
<title>x86/cpufeatures: Rename X86_CMPXCHG64 to X86_CX8</title>
<updated>2025-02-28T10:42:34Z</updated>
<author>
<name>H. Peter Anvin (Intel)</name>
<email>hpa@zytor.com</email>
</author>
<published>2025-02-28T08:23:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=909639aa58fe4789644104c1fd89264c57da0979'/>
<id>urn:sha1:909639aa58fe4789644104c1fd89264c57da0979</id>
<content type='text'>
Replace X86_CMPXCHG64 with X86_CX8, as CX8 is the name of the CPUID
flag, thus to make it consistent with X86_FEATURE_CX8 defined in
&lt;asm/cpufeatures.h&gt;.

No functional change intended.

Signed-off-by: H. Peter Anvin (Intel) &lt;hpa@zytor.com&gt;
Signed-off-by: Xin Li (Intel) &lt;xin@zytor.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20250228082338.73859-2-xin@zytor.com
</content>
</entry>
<entry>
<title>x86/cpu: Drop configuration options for early 64-bit CPUs</title>
<updated>2025-02-27T10:19:06Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2025-02-26T21:37:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f388f60ca9041a95c9b3f157d316ed7c8f297e44'/>
<id>urn:sha1:f388f60ca9041a95c9b3f157d316ed7c8f297e44</id>
<content type='text'>
The x86 CPU selection menu is confusing for a number of reasons:

When configuring 32-bit kernels, it shows a small number of early 64-bit
microarchitectures (K8, Core 2) but not the regular generic 64-bit target
that is the normal default.  There is no longer a reason to run 32-bit
kernels on production 64-bit systems, so only actual 32-bit CPUs need
to be shown here.

When configuring 64-bit kernels, the options also pointless as there is
no way to pick any CPU from the past 15 years, leaving GENERIC_CPU as
the only sensible choice.

Address both of the above by removing the obsolete options and making
all 64-bit kernels run on both Intel and AMD CPUs from any generation.
Testing generic 32-bit kernels on 64-bit hardware remains possible,
just not building a 32-bit kernel that requires a 64-bit CPU.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: https://lore.kernel.org/r/20250226213714.4040853-5-arnd@kernel.org
</content>
</entry>
<entry>
<title>x86/Kconfig: Add cmpxchg8b support back to Geode CPUs</title>
<updated>2025-02-27T10:19:05Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2025-02-26T21:37:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6ac43f2be982ea54b75206dccd33f4cf81bfdc39'/>
<id>urn:sha1:6ac43f2be982ea54b75206dccd33f4cf81bfdc39</id>
<content type='text'>
An older cleanup of mine inadvertently removed geode-gx1 and geode-lx
from the list of CPUs that are known to support a working cmpxchg8b.

Fixes: 88a2b4edda3d ("x86/Kconfig: Rework CONFIG_X86_PAE dependency")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250226213714.4040853-2-arnd@kernel.org
</content>
</entry>
<entry>
<title>x86/Kconfig: Transmeta Crusoe is CPU family 5, not 6</title>
<updated>2024-02-09T15:28:19Z</updated>
<author>
<name>Aleksander Mazur</name>
<email>deweloper@wp.pl</email>
</author>
<published>2024-01-23T13:43:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f6a1892585cd19e63c4ef2334e26cd536d5b678d'/>
<id>urn:sha1:f6a1892585cd19e63c4ef2334e26cd536d5b678d</id>
<content type='text'>
The kernel built with MCRUSOE is unbootable on Transmeta Crusoe.  It shows
the following error message:

  This kernel requires an i686 CPU, but only detected an i586 CPU.
  Unable to boot - please use a kernel appropriate for your CPU.

Remove MCRUSOE from the condition introduced in commit in Fixes, effectively
changing X86_MINIMUM_CPU_FAMILY back to 5 on that machine, which matches the
CPU family given by CPUID.

  [ bp: Massage commit message. ]

Fixes: 25d76ac88821 ("x86/Kconfig: Explicitly enumerate i686-class CPUs in Kconfig")
Signed-off-by: Aleksander Mazur &lt;deweloper@wp.pl&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Acked-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: &lt;stable@kernel.org&gt;
Link: https://lore.kernel.org/r/20240123134309.1117782-1-deweloper@wp.pl
</content>
</entry>
<entry>
<title>x86/Kconfig: Rework CONFIG_X86_PAE dependency</title>
<updated>2023-12-19T12:03:06Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2023-12-04T08:47:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=88a2b4edda3d0709727be53f4423b0b832d91de3'/>
<id>urn:sha1:88a2b4edda3d0709727be53f4423b0b832d91de3</id>
<content type='text'>
While looking at a Xen Kconfig dependency issue, I tried to understand the
exact dependencies for CONFIG_X86_PAE, which is selected by CONFIG_HIGHMEM64G
but can also be enabled manually.

Apparently the dependencies for CONFIG_HIGHMEM64G are strictly about CPUs
that do support PAE, but the actual feature can be incorrectly enabled on
older CPUs as well. The CONFIG_X86_CMPXCHG64 dependencies on the other hand
include X86_PAE because cmpxchg8b is requried for PAE to work.

Rework this for readability and correctness, using a positive list of CPUs
that support PAE in a new X86_HAVE_PAE symbol that can serve as a dependency
for both X86_PAE and HIGHMEM64G as well as simplify the X86_CMPXCHG64
dependency list.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Link: https://lore.kernel.org/r/20231204084722.3789473-2-arnd@kernel.org
</content>
</entry>
<entry>
<title>x86/cpu: Remove X86_FEATURE_NAMES</title>
<updated>2023-05-15T18:03:08Z</updated>
<author>
<name>Lukas Bulwahn</name>
<email>lukas.bulwahn@gmail.com</email>
</author>
<published>2023-05-10T06:57:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7583e8fbdc49a4dbd916d14863cf1deeddb982f9'/>
<id>urn:sha1:7583e8fbdc49a4dbd916d14863cf1deeddb982f9</id>
<content type='text'>
While discussing to change the visibility of X86_FEATURE_NAMES (see Link)
in order to remove CONFIG_EMBEDDED, Boris suggested to simply make the
X86_FEATURE_NAMES functionality unconditional.

As the need for really tiny kernel images has gone away and kernel images
with !X86_FEATURE_NAMES are hardly tested, remove this config and the whole
ifdeffery in the source code.

Suggested-by: Borislav Petkov &lt;bp@alien8.de&gt;
Signed-off-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Link: https://lore.kernel.org/all/20230509084007.24373-1-lukas.bulwahn@gmail.com/
Link: https://lore.kernel.org/r/20230510065713.10996-3-lukas.bulwahn@gmail.com
</content>
</entry>
</feed>
