1
0

release 6.15.2 (preliminary)

This commit is contained in:
2025-06-18 12:24:58 +03:00
parent 4d2691343a
commit 43dc655d2e
242 changed files with 7729 additions and 32303 deletions

View File

@@ -1,14 +1,6 @@
From 90b69178f6a866c7f3330c2006f6b5396146192c Mon Sep 17 00:00:00 2001
From 906ed24dfc7e1bbceacc087ba38aecfd22a9890b Mon Sep 17 00:00:00 2001
From: graysky <therealgraysky AT proton DOT me>
Date: Mon, 16 Sep 2024 05:55:58 -0400
Subject: ZEN: Add graysky's more-uarches
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From https://github.com/graysky2/kernel_compiler_patch
more-ISA-levels-and-uarches-for-kernel-6.1.79+.patch
Date: Mon, 16 Sep 2024 14:47:03 -0400
FEATURES
This patch adds additional tunings via new x86-64 ISA levels and
@@ -121,46 +113,122 @@ REFERENCES
1. https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#index-x86-Options
2. https://bugzilla.kernel.org/show_bug.cgi?id=77461
3. https://github.com/graysky2/kernel_gcc_patch/issues/15
4. https://www.linuxforge.net/docs/linux/linux-gcc.php
4. http://www.linuxforge.net/docs/linux/linux-gcc.php
---
arch/x86/Kconfig.cpu | 367 ++++++++++++++++++++++++++++++--
arch/x86/Makefile | 89 +++++++-
arch/x86/include/asm/vermagic.h | 72 +++++++
3 files changed, 511 insertions(+), 17 deletions(-)
arch/x86/Kconfig.cpu | 462 ++++++++++++++++++++++++++++++++++++++++++-
arch/x86/Makefile | 222 +++++++++++++++++++++
2 files changed, 675 insertions(+), 9 deletions(-)
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -155,9 +155,8 @@ config MPENTIUM4
-Paxville
-Dempsey
@@ -31,6 +31,7 @@ choice
- "Pentium-4" for the Intel Pentium 4 or P4-based Celeron.
- "K6" for the AMD K6, K6-II and K6-III (aka K6-3D).
- "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird).
+ - "Opteron/Athlon64/Hammer/K8" for all K8 and newer AMD CPUs.
- "Crusoe" for the Transmeta Crusoe series.
- "Efficeon" for the Transmeta Efficeon series.
- "Winchip-C6" for original IDT Winchip.
@@ -41,7 +42,10 @@ choice
- "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3.
- "VIA C3-2" for VIA C3-2 "Nehemiah" (model 9 and above).
- "VIA C7" for VIA C7.
+ - "Intel P4" for the Pentium 4/Netburst microarchitecture.
+ - "Core 2/newer Xeon" for all core2 and newer Intel CPUs.
- "Intel Atom" for the Atom-microarchitecture CPUs.
+ - "Generic-x86-64" for a kernel which runs on any x86-64 CPU.
See each option's help text for additional details. If you don't know
what to do, choose "Pentium-Pro".
@@ -135,10 +139,21 @@ config MPENTIUM4
-Mobile Pentium 4
-Mobile Pentium 4 M
-Extreme Edition (Gallatin)
+ -Prescott
+ -Prescott 2M
+ -Cedar Mill
+ -Presler
+ -Smithfiled
Xeons (Intel Xeon, Xeon MP, Xeon LV, Xeon MV) corename:
-Foster
-Prestonia
-Gallatin
+ -Nocona
+ -Irwindale
+ -Cranford
+ -Potomac
+ -Paxville
+ -Dempsey
-
config MK6
- bool "K6/K6-II/K6-III"
+ bool "AMD K6/K6-II/K6-III"
depends on X86_32
help
Select this for an AMD K6-family processor. Enables use of
@@ -165,7 +164,7 @@ config MK6
flags to GCC.
bool "K6/K6-II/K6-III"
@@ -245,6 +260,435 @@ config MATOM
config MK7
- bool "Athlon/Duron/K7"
+ bool "AMD Athlon/Duron/K7"
depends on X86_32
help
Select this for an AMD Athlon K7-family processor. Enables use of
@@ -173,12 +172,114 @@ config MK7
flags to GCC.
endchoice
config MK8
- bool "Opteron/Athlon64/Hammer/K8"
+config CC_HAS_MARCH_NATIVE
+ # This flag might not be available in cross-compilers:
+ def_bool $(cc-option, -march=native)
+ # LLVM 18 has an easily triggered internal compiler error in core
+ # networking code with '-march=native' on certain systems:
+ # https://github.com/llvm/llvm-project/issues/72026
+ # LLVM 19 introduces an optimization that resolves some high stack
+ # usage warnings that only appear wth '-march=native'.
+ depends on CC_IS_GCC || CLANG_VERSION >= 190100
+
+choice
+ prompt "x86_64 Compiler Build Optimization"
+ default GENERIC_CPU
+
+config X86_NATIVE_CPU
+ bool "Build and optimize for local/native CPU"
+ depends on X86_64
+ depends on CC_HAS_MARCH_NATIVE
+ help
+ Optimize for the current CPU used to compile the kernel.
+ Use this option if you intend to build the kernel for your
+ local machine.
+
+ Note that such a kernel might not work optimally on a
+ different x86 machine.
+
+ If unsure, say N.
+
+config GENERIC_CPU
+ bool "Generic-x86-64"
+ depends on X86_64
+ help
+ Generic x86-64 CPU.
+ Runs equally well on all x86-64 CPUs.
+
+config MNATIVE_INTEL
+ bool "Intel-Native optimizations autodetected by the compiler"
+ help
+
+ Clang 3.8, GCC 4.2 and above support -march=native, which automatically detects
+ the optimum settings to use based on your processor. Do NOT use this
+ for AMD CPUs. Intel Only!
+
+ Enables -march=native
+
+config MNATIVE_AMD
+ bool "AMD-Native optimizations autodetected by the compiler"
+ help
+
+ Clang 3.8, GCC 4.2 and above support -march=native, which automatically detects
+ the optimum settings to use based on your processor. Do NOT use this
+ for Intel CPUs. AMD Only!
+
+ Enables -march=native
+
+config MK8
+ bool "AMD Opteron/Athlon64/Hammer/K8"
help
Select this for an AMD Opteron or Athlon64 Hammer-family processor.
Enables use of some extended instructions, and passes appropriate
optimization flags to GCC.
+ help
+ Select this for an AMD Opteron or Athlon64 Hammer-family processor.
+ Enables use of some extended instructions, and passes appropriate
+ optimization flags to GCC.
+
+config MK8SSE3
+ bool "AMD Opteron/Athlon64/Hammer/K8 with SSE3"
+ help
@@ -226,21 +294,21 @@ REFERENCES
+ Enables -march=bdver4
+
+config MZEN
+ bool "AMD Zen"
+ bool "AMD Ryzen"
+ help
+ Select this for AMD Family 17h Zen processors.
+
+ Enables -march=znver1
+
+config MZEN2
+ bool "AMD Zen 2"
+ bool "AMD Ryzen 2"
+ help
+ Select this for AMD Family 17h Zen 2 processors.
+
+ Enables -march=znver2
+
+config MZEN3
+ bool "AMD Zen 3"
+ bool "AMD Ryzen 3"
+ depends on (CC_IS_GCC && GCC_VERSION >= 100300) || (CC_IS_CLANG && CLANG_VERSION >= 120000)
+ help
+ Select this for AMD Family 19h Zen 3 processors.
@@ -248,7 +316,7 @@ REFERENCES
+ Enables -march=znver3
+
+config MZEN4
+ bool "AMD Zen 4"
+ bool "AMD Ryzen 4"
+ depends on (CC_IS_GCC && GCC_VERSION >= 130000) || (CC_IS_CLANG && CLANG_VERSION >= 160000)
+ help
+ Select this for AMD Family 19h Zen 4 processors.
@@ -256,57 +324,48 @@ REFERENCES
+ Enables -march=znver4
+
+config MZEN5
+ bool "AMD Zen 5"
+ bool "AMD Ryzen 5"
+ depends on (CC_IS_GCC && GCC_VERSION > 140000) || (CC_IS_CLANG && CLANG_VERSION >= 190100)
+ help
+ Select this for AMD Family 19h Zen 5 processors.
+
+ Enables -march=znver5
+
config MCRUSOE
bool "Crusoe"
depends on X86_32
@@ -269,8 +370,17 @@ config MPSC
using the cpu family field
in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one.
+config MATOM
+ bool "Intel Atom"
+config MPSC
+ bool "Intel P4 / older Netburst based Xeon"
+ depends on X86_64
+ help
+ Optimize for Intel Pentium 4, Pentium D and older Nocona/Dempsey
+ Xeon CPUs with Intel 64bit which is compatible with x86-64.
+ Note that the latest Xeons (Xeon 51xx and 53xx) are not based on the
+ Netburst core and shouldn't use this option. You can distinguish them
+ using the cpu family field
+ in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one.
+
+config MCORE2
+ bool "Intel Core 2"
+ depends on X86_64
+ help
+
+ Select this for the Intel Atom platform. Intel Atom CPUs have an
+ in-order pipelining architecture and thus can benefit from
+ accordingly optimized code. Use a recent GCC with specific Atom
+ support in order to fully benefit from selecting this option.
+ Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and
+ 53xx) CPUs. You can distinguish newer from older Xeons by the CPU
+ family in /proc/cpuinfo. Newer ones have 6 and older ones 15
+ (not a typo)
+
config MCORE2
- bool "Core 2/newer Xeon"
+ bool "Intel Core 2"
help
Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and
@@ -278,14 +388,199 @@ config MCORE2
family in /proc/cpuinfo. Newer ones have 6 and older ones 15
(not a typo)
-config MATOM
- bool "Intel Atom"
+ Enables -march=core2
+
+config MNEHALEM
+ bool "Intel Nehalem"
help
- Select this for the Intel Atom platform. Intel Atom CPUs have an
- in-order pipelining architecture and thus can benefit from
- accordingly optimized code. Use a recent GCC with specific Atom
- support in order to fully benefit from selecting this option.
+ depends on X86_64
+ help
+
+ Select this for 1st Gen Core processors in the Nehalem family.
+
+ Enables -march=nehalem
+
+config MWESTMERE
+ bool "Intel Westmere"
+ depends on X86_64
+ help
+
+ Select this for the Intel Westmere formerly Nehalem-C family.
@@ -315,6 +374,7 @@ REFERENCES
+
+config MSILVERMONT
+ bool "Intel Silvermont"
+ depends on X86_64
+ help
+
+ Select this for the Intel Silvermont platform.
@@ -323,6 +383,7 @@ REFERENCES
+
+config MGOLDMONT
+ bool "Intel Goldmont"
+ depends on X86_64
+ help
+
+ Select this for the Intel Goldmont platform including Apollo Lake and Denverton.
@@ -331,6 +392,7 @@ REFERENCES
+
+config MGOLDMONTPLUS
+ bool "Intel Goldmont Plus"
+ depends on X86_64
+ help
+
+ Select this for the Intel Goldmont Plus platform including Gemini Lake.
@@ -339,6 +401,7 @@ REFERENCES
+
+config MSANDYBRIDGE
+ bool "Intel Sandy Bridge"
+ depends on X86_64
+ help
+
+ Select this for 2nd Gen Core processors in the Sandy Bridge family.
@@ -347,6 +410,7 @@ REFERENCES
+
+config MIVYBRIDGE
+ bool "Intel Ivy Bridge"
+ depends on X86_64
+ help
+
+ Select this for 3rd Gen Core processors in the Ivy Bridge family.
@@ -355,6 +419,7 @@ REFERENCES
+
+config MHASWELL
+ bool "Intel Haswell"
+ depends on X86_64
+ help
+
+ Select this for 4th Gen Core processors in the Haswell family.
@@ -363,6 +428,7 @@ REFERENCES
+
+config MBROADWELL
+ bool "Intel Broadwell"
+ depends on X86_64
+ help
+
+ Select this for 5th Gen Core processors in the Broadwell family.
@@ -371,6 +437,7 @@ REFERENCES
+
+config MSKYLAKE
+ bool "Intel Skylake"
+ depends on X86_64
+ help
+
+ Select this for 6th Gen Core processors in the Skylake family.
@@ -379,6 +446,7 @@ REFERENCES
+
+config MSKYLAKEX
+ bool "Intel Skylake X"
+ depends on X86_64
+ help
+
+ Select this for 6th Gen Core processors in the Skylake X family.
@@ -387,6 +455,7 @@ REFERENCES
+
+config MCANNONLAKE
+ bool "Intel Cannon Lake"
+ depends on X86_64
+ help
+
+ Select this for 8th Gen Core processors
@@ -395,6 +464,7 @@ REFERENCES
+
+config MICELAKE_CLIENT
+ bool "Intel Ice Lake"
+ depends on X86_64
+ help
+
+ Select this for 10th Gen Core client processors in the Ice Lake family.
@@ -403,22 +473,16 @@ REFERENCES
+
+config MICELAKE_SERVER
+ bool "Intel Ice Lake Server"
+ depends on X86_64
+ help
+
+ Select this for 10th Gen Core server processors in the Ice Lake family.
+
+ Enables -march=icelake-server
+
+config MCASCADELAKE
+ bool "Intel Cascade Lake"
+ help
+
+ Select this for Xeon processors in the Cascade Lake family.
+
+ Enables -march=cascadelake
+
+config MCOOPERLAKE
+ bool "Intel Cooper Lake"
+ depends on X86_64
+ depends on (CC_IS_GCC && GCC_VERSION > 100100) || (CC_IS_CLANG && CLANG_VERSION >= 100000)
+ help
+
@@ -426,8 +490,19 @@ REFERENCES
+
+ Enables -march=cooperlake
+
+config MCASCADELAKE
+ bool "Intel Cascade Lake"
+ depends on X86_64
+ depends on (CC_IS_GCC && GCC_VERSION > 100100) || (CC_IS_CLANG && CLANG_VERSION >= 100000)
+ help
+
+ Select this for Xeon processors in the Cascade Lake family.
+
+ Enables -march=cascadelake
+
+config MTIGERLAKE
+ bool "Intel Tiger Lake"
+ depends on X86_64
+ depends on (CC_IS_GCC && GCC_VERSION > 100100) || (CC_IS_CLANG && CLANG_VERSION >= 100000)
+ help
+
@@ -437,6 +512,7 @@ REFERENCES
+
+config MSAPPHIRERAPIDS
+ bool "Intel Sapphire Rapids"
+ depends on X86_64
+ depends on (CC_IS_GCC && GCC_VERSION > 110000) || (CC_IS_CLANG && CLANG_VERSION >= 120000)
+ help
+
@@ -446,6 +522,7 @@ REFERENCES
+
+config MROCKETLAKE
+ bool "Intel Rocket Lake"
+ depends on X86_64
+ depends on (CC_IS_GCC && GCC_VERSION > 110000) || (CC_IS_CLANG && CLANG_VERSION >= 120000)
+ help
+
@@ -455,6 +532,7 @@ REFERENCES
+
+config MALDERLAKE
+ bool "Intel Alder Lake"
+ depends on X86_64
+ depends on (CC_IS_GCC && GCC_VERSION > 110000) || (CC_IS_CLANG && CLANG_VERSION >= 120000)
+ help
+
@@ -464,6 +542,7 @@ REFERENCES
+
+config MRAPTORLAKE
+ bool "Intel Raptor Lake"
+ depends on X86_64
+ depends on (CC_IS_GCC && GCC_VERSION >= 130000) || (CC_IS_CLANG && CLANG_VERSION >= 150500)
+ help
+
@@ -473,6 +552,7 @@ REFERENCES
+
+config MMETEORLAKE
+ bool "Intel Meteor Lake"
+ depends on X86_64
+ depends on (CC_IS_GCC && GCC_VERSION >= 130000) || (CC_IS_CLANG && CLANG_VERSION >= 150500)
+ help
+
@@ -482,46 +562,16 @@ REFERENCES
+
+config MEMERALDRAPIDS
+ bool "Intel Emerald Rapids"
+ depends on X86_64
+ depends on (CC_IS_GCC && GCC_VERSION > 130000) || (CC_IS_CLANG && CLANG_VERSION >= 150500)
+ help
+
+ Select this for fifth-generation 10 nm process processors in the Emerald Rapids family.
+
+ Enables -march=emeraldrapids
config GENERIC_CPU
bool "Generic-x86-64"
@@ -294,6 +589,26 @@ config GENERIC_CPU
Generic x86-64 CPU.
Run equally well on all x86-64 CPUs.
+config MNATIVE_INTEL
+ bool "Intel-Native optimizations autodetected by the compiler"
+ help
+
+ Clang 3.8, GCC 4.2 and above support -march=native, which automatically detects
+ the optimum settings to use based on your processor. Do NOT use this
+ for AMD CPUs. Intel Only!
+endchoice
+
+ Enables -march=native
+
+config MNATIVE_AMD
+ bool "AMD-Native optimizations autodetected by the compiler"
+ help
+
+ Clang 3.8, GCC 4.2 and above support -march=native, which automatically detects
+ the optimum settings to use based on your processor. Do NOT use this
+ for Intel CPUs. AMD Only!
+
+ Enables -march=native
+
endchoice
config X86_GENERIC
@@ -308,6 +623,30 @@ config X86_GENERIC
This is really intended for distributors who need more
generic optimizations.
+config X86_64_VERSION
+ int "x86-64 compiler ISA level"
+ range 1 3
@@ -531,7 +581,7 @@ REFERENCES
+ Specify a specific x86-64 compiler ISA level.
+
+ There are three x86-64 ISA levels that work on top of
+ the x86-64 baseline, namely: x86-64-v2, x86-64-v3, and x86-64-v4.
+ the x86-64 baseline, namely: x86-64-v2 and x86-64-v3.
+
+ x86-64-v2 brings support for vector instructions up to Streaming SIMD
+ Extensions 4.2 (SSE4.2) and Supplemental Streaming SIMD Extensions 3
@@ -546,221 +596,291 @@ REFERENCES
+ /lib/ld-linux-x86-64.so.2 --help | grep supported
+ /lib64/ld-linux-x86-64.so.2 --help | grep supported
+
#
# Define implied options from the CPU selection here
config X86_INTERNODE_CACHE_SHIFT
@@ -318,7 +657,7 @@ config X86_INTERNODE_CACHE_SHIFT
config X86_GENERIC
bool "Generic x86 support"
depends on X86_32
@@ -266,8 +710,8 @@ config X86_INTERNODE_CACHE_SHIFT
config X86_L1_CACHE_SHIFT
int
default "7" if MPENTIUM4 || MPSC
- default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU
- default "7" if MPENTIUM4
- default "6" if MK7 || MPENTIUMM || MATOM || MVIAC7 || X86_GENERIC || X86_64
+ default "7" if MPENTIUM4 || MPSC
+ default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MZEN3 || MZEN4 || MZEN5 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE_CLIENT || MICELAKE_SERVER || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MRAPTORLAKE || MMETEORLAKE || MEMERALDRAPIDS || MNATIVE_INTEL || MNATIVE_AMD
default "4" if MELAN || M486SX || M486 || MGEODEGX1
default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX
@@ -336,11 +675,11 @@ config X86_ALIGNMENT_16
@@ -285,19 +729,19 @@ config X86_ALIGNMENT_16
config X86_INTEL_USERCOPY
def_bool y
- depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2
- depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK7 || MEFFICEON
+ depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE_CLIENT || MICELAKE_SERVER || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MRAPTORLAKE || MMETEORLAKE || MEMERALDRAPIDS || MNATIVE_INTEL
config X86_USE_PPRO_CHECKSUM
def_bool y
- depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MATOM
- depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MATOM
+ depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MATOM || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MZEN3 || MZEN4 || MZEN5 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE_CLIENT || MICELAKE_SERVER || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MRAPTORLAKE || MMETEORLAKE || MEMERALDRAPIDS || MNATIVE_INTEL || MNATIVE_AMD
#
# P6_NOPs are a relatively minor optimization that require a family >=
config X86_TSC
def_bool y
- depends on (MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MATOM) || X86_64
+ depends on (MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MATOM) || X86_64
config X86_HAVE_PAE
def_bool y
- depends on MCRUSOE || MEFFICEON || MCYRIXIII || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC7 || MATOM || X86_64
+ depends on MCRUSOE || MEFFICEON || MCYRIXIII || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC7 || MCORE2 || MATOM || X86_64
config X86_CX8
def_bool y
@@ -307,13 +751,13 @@ config X86_CX8
# generates cmov.
config X86_CMOV
def_bool y
- depends on (MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || MATOM || MGEODE_LX || X86_64)
+ depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)
config X86_MINIMUM_CPU_FAMILY
int
default "64" if X86_64
- default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MK7)
- default "5" if X86_32 && X86_CX8
+ default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCORE2 || MK7 || MK8)
+ default "5" if X86_32 && X86_CMPXCHG64
default "4"
config X86_DEBUGCTLMSR
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -182,15 +182,98 @@ else
cflags-$(CONFIG_MK8) += -march=k8
cflags-$(CONFIG_MPSC) += -march=nocona
cflags-$(CONFIG_MCORE2) += -march=core2
- cflags-$(CONFIG_MATOM) += -march=atom
- cflags-$(CONFIG_GENERIC_CPU) += -mtune=generic
+ cflags-$(CONFIG_MATOM) += -march=bonnell
+ ifeq ($(CONFIG_X86_64_VERSION),1)
+ cflags-$(CONFIG_GENERIC_CPU) += -mtune=generic
+ rustflags-$(CONFIG_GENERIC_CPU) += -Ztune-cpu=generic
+ else
+ cflags-$(CONFIG_GENERIC_CPU) += -march=x86-64-v$(CONFIG_X86_64_VERSION)
+ rustflags-$(CONFIG_GENERIC_CPU) += -Ctarget-cpu=x86-64-v$(CONFIG_X86_64_VERSION)
+ endif
+ cflags-$(CONFIG_MK8SSE3) += -march=k8-sse3
+ cflags-$(CONFIG_MK10) += -march=amdfam10
+ cflags-$(CONFIG_MBARCELONA) += -march=barcelona
+ cflags-$(CONFIG_MBOBCAT) += -march=btver1
+ cflags-$(CONFIG_MJAGUAR) += -march=btver2
+ cflags-$(CONFIG_MBULLDOZER) += -march=bdver1
+ cflags-$(CONFIG_MPILEDRIVER) += -march=bdver2 -mno-tbm
+ cflags-$(CONFIG_MSTEAMROLLER) += -march=bdver3 -mno-tbm
+ cflags-$(CONFIG_MEXCAVATOR) += -march=bdver4 -mno-tbm
+ cflags-$(CONFIG_MZEN) += -march=znver1
+ cflags-$(CONFIG_MZEN2) += -march=znver2
+ cflags-$(CONFIG_MZEN3) += -march=znver3
+ cflags-$(CONFIG_MZEN4) += -march=znver4
+ cflags-$(CONFIG_MZEN5) += -march=znver5
+ cflags-$(CONFIG_MNATIVE_INTEL) += -march=native
+ cflags-$(CONFIG_MNATIVE_AMD) += -march=native -mno-tbm
+ cflags-$(CONFIG_MNEHALEM) += -march=nehalem
+ cflags-$(CONFIG_MWESTMERE) += -march=westmere
+ cflags-$(CONFIG_MSILVERMONT) += -march=silvermont
+ cflags-$(CONFIG_MGOLDMONT) += -march=goldmont
+ cflags-$(CONFIG_MGOLDMONTPLUS) += -march=goldmont-plus
+ cflags-$(CONFIG_MSANDYBRIDGE) += -march=sandybridge
+ cflags-$(CONFIG_MIVYBRIDGE) += -march=ivybridge
+ cflags-$(CONFIG_MHASWELL) += -march=haswell
+ cflags-$(CONFIG_MBROADWELL) += -march=broadwell
+ cflags-$(CONFIG_MSKYLAKE) += -march=skylake
+ cflags-$(CONFIG_MSKYLAKEX) += -march=skylake-avx512
+ cflags-$(CONFIG_MCANNONLAKE) += -march=cannonlake
+ cflags-$(CONFIG_MICELAKE_CLIENT) += -march=icelake-client
+ cflags-$(CONFIG_MICELAKE_SERVER) += -march=icelake-server
+ cflags-$(CONFIG_MCASCADELAKE) += -march=cascadelake
+ cflags-$(CONFIG_MCOOPERLAKE) += -march=cooperlake
+ cflags-$(CONFIG_MTIGERLAKE) += -march=tigerlake
+ cflags-$(CONFIG_MSAPPHIRERAPIDS) += -march=sapphirerapids
+ cflags-$(CONFIG_MROCKETLAKE) += -march=rocketlake
+ cflags-$(CONFIG_MALDERLAKE) += -march=alderlake
+ cflags-$(CONFIG_MRAPTORLAKE) += -march=raptorlake
+ cflags-$(CONFIG_MMETEORLAKE) += -march=meteorlake
+ cflags-$(CONFIG_MEMERALDRAPIDS) += -march=emeraldrapids
KBUILD_CFLAGS += $(cflags-y)
@@ -173,8 +173,230 @@ else
# Use -mskip-rax-setup if supported.
KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup)
rustflags-$(CONFIG_MK8) += -Ctarget-cpu=k8
rustflags-$(CONFIG_MPSC) += -Ctarget-cpu=nocona
rustflags-$(CONFIG_MCORE2) += -Ctarget-cpu=core2
rustflags-$(CONFIG_MATOM) += -Ctarget-cpu=atom
- rustflags-$(CONFIG_GENERIC_CPU) += -Ztune-cpu=generic
+ rustflags-$(CONFIG_MK8SSE3) += -Ctarget-cpu=k8-sse3
+ rustflags-$(CONFIG_MK10) += -Ctarget-cpu=amdfam10
+ rustflags-$(CONFIG_MBARCELONA) += -Ctarget-cpu=barcelona
+ rustflags-$(CONFIG_MBOBCAT) += -Ctarget-cpu=btver1
+ rustflags-$(CONFIG_MJAGUAR) += -Ctarget-cpu=btver2
+ rustflags-$(CONFIG_MBULLDOZER) += -Ctarget-cpu=bdver1
+ rustflags-$(CONFIG_MPILEDRIVER) += -Ctarget-cpu=bdver2
+ rustflags-$(CONFIG_MSTEAMROLLER) += -Ctarget-cpu=bdver3
+ rustflags-$(CONFIG_MEXCAVATOR) += -Ctarget-cpu=bdver4
+ rustflags-$(CONFIG_MZEN) += -Ctarget-cpu=znver1
+ rustflags-$(CONFIG_MZEN2) += -Ctarget-cpu=znver2
+ rustflags-$(CONFIG_MZEN3) += -Ctarget-cpu=znver3
+ rustflags-$(CONFIG_MZEN4) += -Ctarget-cpu=znver4
+ rustflags-$(CONFIG_MZEN5) += -Ctarget-cpu=znver5
+ rustflags-$(CONFIG_MNATIVE_INTEL) += -Ctarget-cpu=native
+ rustflags-$(CONFIG_MNATIVE_AMD) += -Ctarget-cpu=native
+ rustflags-$(CONFIG_MNEHALEM) += -Ctarget-cpu=nehalem
+ rustflags-$(CONFIG_MWESTMERE) += -Ctarget-cpu=westmere
+ rustflags-$(CONFIG_MSILVERMONT) += -Ctarget-cpu=silvermont
+ rustflags-$(CONFIG_MGOLDMONT) += -Ctarget-cpu=goldmont
+ rustflags-$(CONFIG_MGOLDMONTPLUS) += -Ctarget-cpu=goldmont-plus
+ rustflags-$(CONFIG_MSANDYBRIDGE) += -Ctarget-cpu=sandybridge
+ rustflags-$(CONFIG_MIVYBRIDGE) += -Ctarget-cpu=ivybridge
+ rustflags-$(CONFIG_MHASWELL) += -Ctarget-cpu=haswell
+ rustflags-$(CONFIG_MBROADWELL) += -Ctarget-cpu=broadwell
+ rustflags-$(CONFIG_MSKYLAKE) += -Ctarget-cpu=skylake
+ rustflags-$(CONFIG_MSKYLAKEX) += -Ctarget-cpu=skylake-avx512
+ rustflags-$(CONFIG_MCANNONLAKE) += -Ctarget-cpu=cannonlake
+ rustflags-$(CONFIG_MICELAKE_CLIENT) += -Ctarget-cpu=icelake-client
+ rustflags-$(CONFIG_MICELAKE_SERVER) += -Ctarget-cpu=icelake-server
+ rustflags-$(CONFIG_MCASCADELAKE) += -Ctarget-cpu=cascadelake
+ rustflags-$(CONFIG_MCOOPERLAKE) += -Ctarget-cpu=cooperlake
+ rustflags-$(CONFIG_MTIGERLAKE) += -Ctarget-cpu=tigerlake
+ rustflags-$(CONFIG_MSAPPHIRERAPIDS) += -Ctarget-cpu=sapphirerapids
+ rustflags-$(CONFIG_MROCKETLAKE) += -Ctarget-cpu=rocketlake
+ rustflags-$(CONFIG_MALDERLAKE) += -Ctarget-cpu=alderlake
+ rustflags-$(CONFIG_MRAPTORLAKE) += -Ctarget-cpu=raptorlake
+ rustflags-$(CONFIG_MMETEORLAKE) += -Ctarget-cpu=meteorlake
+ rustflags-$(CONFIG_MEMERALDRAPIDS) += -Ctarget-cpu=emeraldrapids
KBUILD_RUSTFLAGS += $(rustflags-y)
+ifdef CONFIG_X86_NATIVE_CPU
+ KBUILD_CFLAGS += -march=native
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=native
+endif
+
+ifdef CONFIG_MNATIVE_INTEL
+ KBUILD_CFLAGS += -march=native
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=native
+endif
+
+ifdef CONFIG_MNATIVE_AMD
+ KBUILD_CFLAGS += -march=native
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=native
+endif
+
+ifdef CONFIG_MK8
+ KBUILD_CFLAGS += -march=k8
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=k8
+endif
+
+ifdef CONFIG_MK8SSE3
+ KBUILD_CFLAGS += -march=k8-sse3
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=k8-sse3
+endif
+
+ifdef CONFIG_MK10
+ KBUILD_CFLAGS += -march=amdfam10
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=amdfam10
+endif
+
+ifdef CONFIG_MBARCELONA
+ KBUILD_CFLAGS += -march=barcelona
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=barcelona
+endif
+
+ifdef CONFIG_MBOBCAT
+ KBUILD_CFLAGS += -march=btver1
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=btver1
+endif
+
+ifdef CONFIG_MJAGUAR
+ KBUILD_CFLAGS += -march=btver2
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=btver2
+endif
+
+ifdef CONFIG_MBULLDOZER
+ KBUILD_CFLAGS += -march=bdver1
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=bdver1
+endif
+
+ifdef CONFIG_MPILEDRIVER
+ KBUILD_CFLAGS += -march=bdver2 -mno-tbm
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=bdver2 -mno-tbm
+endif
+
+ifdef CONFIG_MSTEAMROLLER
+ KBUILD_CFLAGS += -march=bdver3 -mno-tbm
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=bdver3 -mno-tbm
+endif
+
+ifdef CONFIG_MEXCAVATOR
+ KBUILD_CFLAGS += -march=bdver4 -mno-tbm
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=bdver4 -mno-tbm
+endif
+
+ifdef CONFIG_MZEN
+ KBUILD_CFLAGS += -march=znver1
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=znver1
+endif
+
+ifdef CONFIG_MZEN2
+ KBUILD_CFLAGS += -march=znver2
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=znver2
+endif
+
+ifdef CONFIG_MZEN3
+ KBUILD_CFLAGS += -march=znver3
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=znver3
+endif
+
+ifdef CONFIG_MZEN4
+ KBUILD_CFLAGS += -march=znver4
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=znver4
+endif
+
+ifdef CONFIG_MZEN5
+ KBUILD_CFLAGS += -march=znver5
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=znver5
+endif
+
+ifdef CONFIG_MPSC
+ KBUILD_CFLAGS += -march=nocona
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=nocona
+endif
+
+ifdef CONFIG_MCORE2
+ KBUILD_CFLAGS += -march=core2
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=core2
+endif
+
+ifdef CONFIG_MNEHALEM
+ KBUILD_CFLAGS += -march=nehalem
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=nehalem
+endif
+
+ifdef CONFIG_MWESTMERE
+ KBUILD_CFLAGS += -march=westmere
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=westmere
+endif
+
+ifdef CONFIG_MSILVERMONT
+ KBUILD_CFLAGS += -march=silvermont
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=silvermont
+endif
+
+ifdef CONFIG_MGOLDMONT
+ KBUILD_CFLAGS += -march=goldmont
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=goldmont
+endif
+
+ifdef CONFIG_MGOLDMONTPLUS
+ KBUILD_CFLAGS += -march=goldmont-plus
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=goldmont-plus
+endif
+
+ifdef CONFIG_MSANDYBRIDGE
+ KBUILD_CFLAGS += -march=sandybridge
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=sandybridge
+endif
+
+ifdef CONFIG_MIVYBRIDGE
+ KBUILD_CFLAGS += -march=ivybridge
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=ivybridge
+endif
+
+ifdef CONFIG_MHASWELL
+ KBUILD_CFLAGS += -march=haswell
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=haswell
+endif
+
+ifdef CONFIG_MBROADWELL
+ KBUILD_CFLAGS += -march=broadwell
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=broadwell
+endif
+
+ifdef CONFIG_MSKYLAKE
+ KBUILD_CFLAGS += -march=skylake
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=skylake
+endif
+
+ifdef CONFIG_MSKYLAKEX
+ KBUILD_CFLAGS += -march=skylake-avx512
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=skylake-avx512
+endif
+
+ifdef CONFIG_MCANNONLAKE
+ KBUILD_CFLAGS += -march=cannonlake
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=cannonlake
+endif
+
+ifdef CONFIG_MICELAKE_CLIENT
+ KBUILD_CFLAGS += -march=icelake-client
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=icelake-client
+endif
+
+ifdef CONFIG_MICELAKE_SERVER
+ KBUILD_CFLAGS += -march=icelake-server
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=icelake-server
+endif
+
+ifdef CONFIG_MCOOPERLAKE
+ KBUILD_CFLAGS += -march=cooperlake
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=cooperlake
+endif
+
+ifdef CONFIG_MCASCADELAKE
+ KBUILD_CFLAGS += -march=cascadelake
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=cascadelake
+endif
+
+ifdef CONFIG_MTIGERLAKE
+ KBUILD_CFLAGS += -march=tigerlake
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=tigerlake
+endif
+
+ifdef CONFIG_MSAPPHIRERAPIDS
+ KBUILD_CFLAGS += -march=sapphirerapids
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=sapphirerapids
+endif
+
+ifdef CONFIG_MROCKETLAKE
+ KBUILD_CFLAGS += -march=rocketlake
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=rocketlake
+endif
+
+ifdef CONFIG_MALDERLAKE
+ KBUILD_CFLAGS += -march=alderlake
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=alderlake
+endif
+
+ifdef CONFIG_MRAPTORLAKE
+ KBUILD_CFLAGS += -march=raptorlake
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=raptorlake
+endif
+
+ifdef CONFIG_MMETEORLAKE
+ KBUILD_CFLAGS += -march=meteorlake
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=meteorlake
+endif
+
+ifdef CONFIG_MEMERALDRAPIDS
+ KBUILD_CFLAGS += -march=emeraldrapids
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=emeraldrapids
+endif
+
+ifdef CONFIG_GENERIC_CPU
+ifeq ($(CONFIG_X86_64_VERSION),1)
KBUILD_CFLAGS += -march=x86-64 -mtune=generic
KBUILD_RUSTFLAGS += -Ctarget-cpu=x86-64 -Ztune-cpu=generic
+else
+ KBUILD_CFLAGS +=-march=x86-64-v$(CONFIG_X86_64_VERSION)
+ KBUILD_RUSTFLAGS += -Ctarget-cpu=x86-64-v$(CONFIG_X86_64_VERSION)
+endif # CONFIG_X86_64_VERSION
+endif # CONFIG_GENERIC_CPU
KBUILD_CFLAGS += -mno-red-zone
--- a/arch/x86/include/asm/vermagic.h
+++ b/arch/x86/include/asm/vermagic.h
@@ -17,6 +17,56 @@
#define MODULE_PROC_FAMILY "586MMX "
#elif defined CONFIG_MCORE2
#define MODULE_PROC_FAMILY "CORE2 "
+#elif defined CONFIG_MNATIVE_INTEL
+#define MODULE_PROC_FAMILY "NATIVE_INTEL "
+#elif defined CONFIG_MNATIVE_AMD
+#define MODULE_PROC_FAMILY "NATIVE_AMD "
+#elif defined CONFIG_MNEHALEM
+#define MODULE_PROC_FAMILY "NEHALEM "
+#elif defined CONFIG_MWESTMERE
+#define MODULE_PROC_FAMILY "WESTMERE "
+#elif defined CONFIG_MSILVERMONT
+#define MODULE_PROC_FAMILY "SILVERMONT "
+#elif defined CONFIG_MGOLDMONT
+#define MODULE_PROC_FAMILY "GOLDMONT "
+#elif defined CONFIG_MGOLDMONTPLUS
+#define MODULE_PROC_FAMILY "GOLDMONTPLUS "
+#elif defined CONFIG_MSANDYBRIDGE
+#define MODULE_PROC_FAMILY "SANDYBRIDGE "
+#elif defined CONFIG_MIVYBRIDGE
+#define MODULE_PROC_FAMILY "IVYBRIDGE "
+#elif defined CONFIG_MHASWELL
+#define MODULE_PROC_FAMILY "HASWELL "
+#elif defined CONFIG_MBROADWELL
+#define MODULE_PROC_FAMILY "BROADWELL "
+#elif defined CONFIG_MSKYLAKE
+#define MODULE_PROC_FAMILY "SKYLAKE "
+#elif defined CONFIG_MSKYLAKEX
+#define MODULE_PROC_FAMILY "SKYLAKEX "
+#elif defined CONFIG_MCANNONLAKE
+#define MODULE_PROC_FAMILY "CANNONLAKE "
+#elif defined CONFIG_MICELAKE_CLIENT
+#define MODULE_PROC_FAMILY "ICELAKE_CLIENT "
+#elif defined CONFIG_MICELAKE_SERVER
+#define MODULE_PROC_FAMILY "ICELAKE_SERVER "
+#elif defined CONFIG_MCASCADELAKE
+#define MODULE_PROC_FAMILY "CASCADELAKE "
+#elif defined CONFIG_MCOOPERLAKE
+#define MODULE_PROC_FAMILY "COOPERLAKE "
+#elif defined CONFIG_MTIGERLAKE
+#define MODULE_PROC_FAMILY "TIGERLAKE "
+#elif defined CONFIG_MSAPPHIRERAPIDS
+#define MODULE_PROC_FAMILY "SAPPHIRERAPIDS "
+#elif defined CONFIG_ROCKETLAKE
+#define MODULE_PROC_FAMILY "ROCKETLAKE "
+#elif defined CONFIG_MALDERLAKE
+#define MODULE_PROC_FAMILY "ALDERLAKE "
+#elif defined CONFIG_MRAPTORLAKE
+#define MODULE_PROC_FAMILY "RAPTORLAKE "
+#elif defined CONFIG_MMETEORLAKE
+#define MODULE_PROC_FAMILY "METEORLAKE "
+#elif defined CONFIG_MEMERALDRAPIDS
+#define MODULE_PROC_FAMILY "EMERALDRAPIDS "
#elif defined CONFIG_MATOM
#define MODULE_PROC_FAMILY "ATOM "
#elif defined CONFIG_M686
@@ -35,6 +85,28 @@
#define MODULE_PROC_FAMILY "K7 "
#elif defined CONFIG_MK8
#define MODULE_PROC_FAMILY "K8 "
+#elif defined CONFIG_MK8SSE3
+#define MODULE_PROC_FAMILY "K8SSE3 "
+#elif defined CONFIG_MK10
+#define MODULE_PROC_FAMILY "K10 "
+#elif defined CONFIG_MBARCELONA
+#define MODULE_PROC_FAMILY "BARCELONA "
+#elif defined CONFIG_MBOBCAT
+#define MODULE_PROC_FAMILY "BOBCAT "
+#elif defined CONFIG_MBULLDOZER
+#define MODULE_PROC_FAMILY "BULLDOZER "
+#elif defined CONFIG_MPILEDRIVER
+#define MODULE_PROC_FAMILY "PILEDRIVER "
+#elif defined CONFIG_MSTEAMROLLER
+#define MODULE_PROC_FAMILY "STEAMROLLER "
+#elif defined CONFIG_MJAGUAR
+#define MODULE_PROC_FAMILY "JAGUAR "
+#elif defined CONFIG_MEXCAVATOR
+#define MODULE_PROC_FAMILY "EXCAVATOR "
+#elif defined CONFIG_MZEN
+#define MODULE_PROC_FAMILY "ZEN "
+#elif defined CONFIG_MZEN2
+#define MODULE_PROC_FAMILY "ZEN2 "
#elif defined CONFIG_MELAN
#define MODULE_PROC_FAMILY "ELAN "
#elif defined CONFIG_MCRUSOE
KBUILD_CFLAGS += -mcmodel=kernel

View File

@@ -1,4 +1,4 @@
From f4f448a305e9d705b9a0da102ddfd58bfaac5cc0 Mon Sep 17 00:00:00 2001
From 15db9c3419fd147812151d95fb34bbd70f2f9715 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Sun, 11 Dec 2022 23:51:16 +0100
Subject: ZEN: Restore CONFIG_OPTIMIZE_FOR_PERFORMANCE_O3
@@ -13,7 +13,7 @@ dependency on CONFIG_ARC and adds RUSTFLAGS.
--- a/Makefile
+++ b/Makefile
@@ -871,6 +871,9 @@ KBUILD_CFLAGS += -fno-delete-null-pointe
@@ -868,6 +868,9 @@ KBUILD_CFLAGS += -fno-delete-null-pointe
ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
KBUILD_CFLAGS += -O2
KBUILD_RUSTFLAGS += -Copt-level=2
@@ -25,7 +25,7 @@ dependency on CONFIG_ARC and adds RUSTFLAGS.
KBUILD_RUSTFLAGS += -Copt-level=s
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1473,6 +1473,12 @@ config CC_OPTIMIZE_FOR_PERFORMANCE
@@ -1479,6 +1479,12 @@ config CC_OPTIMIZE_FOR_PERFORMANCE
with the "-O2" compiler flag for best performance and most
helpful compile-time warnings.

View File

@@ -1,6 +1,6 @@
--- a/Makefile
+++ b/Makefile
@@ -879,6 +879,10 @@ KBUILD_CFLAGS += -Os
@@ -876,6 +876,10 @@ KBUILD_CFLAGS += -Os
KBUILD_RUSTFLAGS += -Copt-level=s
endif

View File

@@ -1,24 +1,22 @@
From 3ebc1fdf3e0ee9bff1efe20eb5791eba5c84a810 Mon Sep 17 00:00:00 2001
From 40f9fa82bb21a5e3f17f539897128a69824ad8ef Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Thu, 3 Aug 2023 13:53:49 +0000
Subject: XANMOD: x86/build: Prevent generating avx2 and avx512 floating-point code
Date: Mon, 18 Nov 2024 20:17:44 +0000
Subject: [PATCH 1/4] XANMOD: x86/build: Prevent generating avx2 floating-point
code
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
---
arch/x86/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -74,9 +74,9 @@ export BITS
@@ -74,7 +74,7 @@ export BITS
#
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383
#
-KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx
+KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-avx2 -mno-avx512f
+KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-avx2
KBUILD_RUSTFLAGS += --target=$(objtree)/scripts/target.json
-KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2
+KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2,-avx512f
KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2
#
# CFLAGS for compiling floating point code inside the kernel.

View File

@@ -4,8 +4,8 @@
#
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383
#
-KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-avx2 -mno-avx512f
+KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-avx2 -mno-avx512f -fno-tree-vectorize
-KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-avx2
+KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-avx2 -fno-tree-vectorize
KBUILD_RUSTFLAGS += --target=$(objtree)/scripts/target.json
KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2,-avx512f
KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2

View File

@@ -1,7 +1,8 @@
From b1a99a2a9675f80b7c04a239a6b047373ccf3a17 Mon Sep 17 00:00:00 2001
From 7e45fca50a3151248266bca7058e1efa9b5233ca Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Mon, 16 Sep 2024 00:55:35 +0000
Subject: XANMOD: kbuild: Add GCC SMS-based modulo scheduling flags
Subject: [PATCH 02/19] XANMOD: kbuild: Add GCC SMS-based modulo scheduling
flags
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
---
@@ -10,7 +11,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
--- a/Makefile
+++ b/Makefile
@@ -883,6 +883,13 @@ ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
@@ -880,6 +880,13 @@ ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
KBUILD_CFLAGS += $(call cc-option,-fivopts)
endif