1 |
commit: 32295054ff07918abe69ef158a9103ff30932d15 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 30 18:57:54 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 30 18:57:54 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=32295054 |
7 |
|
8 |
Rename cpu opt patch to standardize on naming format |
9 |
|
10 |
Remove redundant patches |
11 |
|
12 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
13 |
|
14 |
0000_README | 8 +- |
15 |
...> 5010_enable-cpu-optimizations-universal.patch | 271 +++++++--- |
16 |
5012_enable-cpu-optimizations-for-gcc91.patch | 549 --------------------- |
17 |
3 files changed, 191 insertions(+), 637 deletions(-) |
18 |
|
19 |
diff --git a/0000_README b/0000_README |
20 |
index acf61dd..9d8e885 100644 |
21 |
--- a/0000_README |
22 |
+++ b/0000_README |
23 |
@@ -203,10 +203,6 @@ Patch: 5000_shifts-ubuntu-20.04.patch |
24 |
From: https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/focal |
25 |
Desc: UID/GID shifting overlay filesystem for containers |
26 |
|
27 |
-Patch: 5012_enable-cpu-optimizations-for-gcc91.patch |
28 |
+Patch: 5010_enable-cpu-optimizations-universal.patch |
29 |
From: https://github.com/graysky2/kernel_gcc_patch/ |
30 |
-Desc: Kernel patch enables gcc >= v9.1 optimizations for additional CPUs. |
31 |
- |
32 |
-Patch: 5013_enable-cpu-optimizations-for-gcc10.patch |
33 |
-From: https://github.com/graysky2/kernel_gcc_patch/ |
34 |
-Desc: Kernel patch enables gcc = v10.1+ optimizations for additional CPUs. |
35 |
+Desc: Kernel >= 5.8 patch enables gcc = v9+ optimizations for additional CPUs. |
36 |
|
37 |
diff --git a/5013_enable-cpu-optimizations-for-gcc10.patch b/5010_enable-cpu-optimizations-universal.patch |
38 |
similarity index 66% |
39 |
rename from 5013_enable-cpu-optimizations-for-gcc10.patch |
40 |
rename to 5010_enable-cpu-optimizations-universal.patch |
41 |
index c90b586..1868f23 100644 |
42 |
--- a/5013_enable-cpu-optimizations-for-gcc10.patch |
43 |
+++ b/5010_enable-cpu-optimizations-universal.patch |
44 |
@@ -1,64 +1,82 @@ |
45 |
-From 4666424a864159b4de572c90adb2c3e1fcdd5890 Mon Sep 17 00:00:00 2001 |
46 |
+From 59db769ad69e080c512b3890e1d27d6120f4a1a4 Mon Sep 17 00:00:00 2001 |
47 |
From: graysky <graysky@×××××××××.us> |
48 |
-Date: Fri, 13 Nov 2020 15:45:08 -0500 |
49 |
-Subject: [PATCH]more-uarches-for-gcc-v10-and-kernel-5.8+ |
50 |
+Date: Mon, 12 Apr 2021 07:09:27 -0400 |
51 |
+Subject: [PATCH] more uarches for kernel 5.8+ |
52 |
+MIME-Version: 1.0 |
53 |
+Content-Type: text/plain; charset=UTF-8 |
54 |
+Content-Transfer-Encoding: 8bit |
55 |
|
56 |
WARNING |
57 |
-This patch works with gcc versions 10.1+ and with kernel version 5.8+ and should |
58 |
+This patch works with all gcc versions 9.0+ and with kernel version 5.8+ and should |
59 |
NOT be applied when compiling on older versions of gcc due to key name changes |
60 |
of the march flags introduced with the version 4.9 release of gcc.[1] |
61 |
|
62 |
-Use the older version of this patch hosted on the same github for older |
63 |
-versions of gcc. |
64 |
- |
65 |
FEATURES |
66 |
This patch adds additional CPU options to the Linux kernel accessible under: |
67 |
Processor type and features ---> |
68 |
Processor family ---> |
69 |
|
70 |
-The expanded microarchitectures include: |
71 |
-* AMD Improved K8-family |
72 |
-* AMD K10-family |
73 |
-* AMD Family 10h (Barcelona) |
74 |
-* AMD Family 14h (Bobcat) |
75 |
-* AMD Family 16h (Jaguar) |
76 |
-* AMD Family 15h (Bulldozer) |
77 |
-* AMD Family 15h (Piledriver) |
78 |
-* AMD Family 15h (Steamroller) |
79 |
-* AMD Family 15h (Excavator) |
80 |
-* AMD Family 17h (Zen) |
81 |
-* AMD Family 17h (Zen 2) |
82 |
-* Intel Silvermont low-power processors |
83 |
-* Intel Goldmont low-power processors (Apollo Lake and Denverton) |
84 |
-* Intel Goldmont Plus low-power processors (Gemini Lake) |
85 |
-* Intel 1st Gen Core i3/i5/i7 (Nehalem) |
86 |
-* Intel 1.5 Gen Core i3/i5/i7 (Westmere) |
87 |
-* Intel 2nd Gen Core i3/i5/i7 (Sandybridge) |
88 |
-* Intel 3rd Gen Core i3/i5/i7 (Ivybridge) |
89 |
-* Intel 4th Gen Core i3/i5/i7 (Haswell) |
90 |
-* Intel 5th Gen Core i3/i5/i7 (Broadwell) |
91 |
-* Intel 6th Gen Core i3/i5/i7 (Skylake) |
92 |
-* Intel 6th Gen Core i7/i9 (Skylake X) |
93 |
-* Intel 8th Gen Core i3/i5/i7 (Cannon Lake) |
94 |
-* Intel 10th Gen Core i7/i9 (Ice Lake) |
95 |
-* Intel Xeon (Cascade Lake) |
96 |
-* Intel Xeon (Cooper Lake) |
97 |
-* Intel 3rd Gen 10nm++ i3/i5/i7/i9-family (Tiger Lake) |
98 |
+With the release of gcc 11.0, several generic 64-bit levels are offered which |
99 |
+are good for supported Intel or AMD CPUs: |
100 |
+• x86-64-v2 |
101 |
+• x86-64-v3 |
102 |
+• x86-64-v4 |
103 |
+ |
104 |
+Users of glibc 2.33 and above can see which level is supported by current |
105 |
+hardware by running: |
106 |
+ /lib/ld-linux-x86-64.so.2 --help | grep supported |
107 |
+ |
108 |
+Alternatively, compare the flags from /proc/cpuinfo to this list.[2] |
109 |
+ |
110 |
+CPU-specific microarchitectures include: |
111 |
+• AMD Improved K8-family |
112 |
+• AMD K10-family |
113 |
+• AMD Family 10h (Barcelona) |
114 |
+• AMD Family 14h (Bobcat) |
115 |
+• AMD Family 16h (Jaguar) |
116 |
+• AMD Family 15h (Bulldozer) |
117 |
+• AMD Family 15h (Piledriver) |
118 |
+• AMD Family 15h (Steamroller) |
119 |
+• AMD Family 15h (Excavator) |
120 |
+• AMD Family 17h (Zen) |
121 |
+• AMD Family 17h (Zen 2) |
122 |
+• AMD Family 19h (Zen 3)† |
123 |
+• Intel Silvermont low-power processors |
124 |
+• Intel Goldmont low-power processors (Apollo Lake and Denverton) |
125 |
+• Intel Goldmont Plus low-power processors (Gemini Lake) |
126 |
+• Intel 1st Gen Core i3/i5/i7 (Nehalem) |
127 |
+• Intel 1.5 Gen Core i3/i5/i7 (Westmere) |
128 |
+• Intel 2nd Gen Core i3/i5/i7 (Sandybridge) |
129 |
+• Intel 3rd Gen Core i3/i5/i7 (Ivybridge) |
130 |
+• Intel 4th Gen Core i3/i5/i7 (Haswell) |
131 |
+• Intel 5th Gen Core i3/i5/i7 (Broadwell) |
132 |
+• Intel 6th Gen Core i3/i5/i7 (Skylake) |
133 |
+• Intel 6th Gen Core i7/i9 (Skylake X) |
134 |
+• Intel 8th Gen Core i3/i5/i7 (Cannon Lake) |
135 |
+• Intel 10th Gen Core i7/i9 (Ice Lake) |
136 |
+• Intel Xeon (Cascade Lake) |
137 |
+• Intel Xeon (Cooper Lake)* |
138 |
+• Intel 3rd Gen 10nm++ i3/i5/i7/i9-family (Tiger Lake)* |
139 |
+• Intel 3rd Gen 10nm++ Xeon (Sapphire Rapids)‡ |
140 |
+• Intel 11th Gen i3/i5/i7/i9-family (Rocket Lake)‡ |
141 |
+• Intel 12th Gen i3/i5/i7/i9-family (Alder Lake)‡ |
142 |
+ |
143 |
+Notes: If not otherwise noted, gcc >=9.1 is required for support. |
144 |
+ *Requires gcc >=10.1 †Required gcc >=10.3 ‡Required gcc >=11.0 |
145 |
|
146 |
It also offers to compile passing the 'native' option which, "selects the CPU |
147 |
to generate code for at compilation time by determining the processor type of |
148 |
the compiling machine. Using -march=native enables all instruction subsets |
149 |
supported by the local machine and will produce code optimized for the local |
150 |
-machine under the constraints of the selected instruction set."[2] |
151 |
+machine under the constraints of the selected instruction set."[3] |
152 |
|
153 |
-Do NOT try using the 'native' option on AMD Piledriver, Steamroller, or |
154 |
-Excavator CPUs (-march=bdver{2,3,4} flag). The build will error out due the |
155 |
-kernel's objtool issue with these.[3a,b] |
156 |
+Users of Intel CPUs should select the 'Intel-Native' option and users of AMD |
157 |
+CPUs should select the 'AMD-Native' option. |
158 |
|
159 |
-MINOR NOTES |
160 |
-This patch also changes 'atom' to 'bonnell' in accordance with the gcc v4.9 |
161 |
-changes. Note that upstream is using the deprecated 'match=atom' flags when I |
162 |
-believe it should use the newer 'march=bonnell' flag for atom processors.[4] |
163 |
+MINOR NOTES RELATING TO INTEL ATOM PROCESSORS |
164 |
+This patch also changes -march=atom to -march=bonnell in accordance with the |
165 |
+gcc v4.9 changes. Upstream is using the deprecated -match=atom flags when I |
166 |
+believe it should use the newer -march=bonnell flag for atom processors.[4] |
167 |
|
168 |
It is not recommended to compile on Atom-CPUs with the 'native' option.[5] The |
169 |
recommendation is to use the 'atom' option instead. |
170 |
@@ -72,28 +90,26 @@ https://github.com/graysky2/kernel_gcc_patch |
171 |
|
172 |
REQUIREMENTS |
173 |
linux version >=5.8 |
174 |
-gcc version >=10.1 |
175 |
+gcc version >=9.0 |
176 |
|
177 |
ACKNOWLEDGMENTS |
178 |
This patch builds on the seminal work by Jeroen.[6] |
179 |
|
180 |
REFERENCES |
181 |
1. https://gcc.gnu.org/gcc-4.9/changes.html |
182 |
-2. https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html |
183 |
-3a. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95671#c11 |
184 |
-3b. https://github.com/graysky2/kernel_gcc_patch/issues/55 |
185 |
+2. https://gitlab.com/x86-psABIs/x86-64-ABI/-/commit/77566eb03bc6a326811cb7e9 |
186 |
+3. https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#index-x86-Options |
187 |
4. https://bugzilla.kernel.org/show_bug.cgi?id=77461 |
188 |
5. https://github.com/graysky2/kernel_gcc_patch/issues/15 |
189 |
6. http://www.linuxforge.net/docs/linux/linux-gcc.php |
190 |
- |
191 |
--- |
192 |
- arch/x86/Kconfig.cpu | 258 ++++++++++++++++++++++++++++++-- |
193 |
- arch/x86/Makefile | 39 ++++- |
194 |
- arch/x86/include/asm/vermagic.h | 56 +++++++ |
195 |
- 3 files changed, 336 insertions(+), 17 deletions(-) |
196 |
+ arch/x86/Kconfig.cpu | 332 ++++++++++++++++++++++++++++++-- |
197 |
+ arch/x86/Makefile | 47 ++++- |
198 |
+ arch/x86/include/asm/vermagic.h | 66 +++++++ |
199 |
+ 3 files changed, 428 insertions(+), 17 deletions(-) |
200 |
|
201 |
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu |
202 |
-index 814fe0d349b0..134390e619bb 100644 |
203 |
+index 814fe0d349b0..872b9cf598e3 100644 |
204 |
--- a/arch/x86/Kconfig.cpu |
205 |
+++ b/arch/x86/Kconfig.cpu |
206 |
@@ -157,7 +157,7 @@ config MPENTIUM4 |
207 |
@@ -114,7 +130,7 @@ index 814fe0d349b0..134390e619bb 100644 |
208 |
depends on X86_32 |
209 |
help |
210 |
Select this for an AMD Athlon K7-family processor. Enables use of |
211 |
-@@ -173,12 +173,90 @@ config MK7 |
212 |
+@@ -173,12 +173,98 @@ config MK7 |
213 |
flags to GCC. |
214 |
|
215 |
config MK8 |
216 |
@@ -202,11 +218,19 @@ index 814fe0d349b0..134390e619bb 100644 |
217 |
+ Select this for AMD Family 17h Zen 2 processors. |
218 |
+ |
219 |
+ Enables -march=znver2 |
220 |
++ |
221 |
++config MZEN3 |
222 |
++ bool "AMD Zen 3" |
223 |
++ depends on GCC_VERSION > 100300 |
224 |
++ help |
225 |
++ Select this for AMD Family 19h Zen 3 processors. |
226 |
++ |
227 |
++ Enables -march=znver3 |
228 |
+ |
229 |
config MCRUSOE |
230 |
bool "Crusoe" |
231 |
depends on X86_32 |
232 |
-@@ -270,7 +348,7 @@ config MPSC |
233 |
+@@ -270,7 +356,7 @@ config MPSC |
234 |
in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one. |
235 |
|
236 |
config MCORE2 |
237 |
@@ -215,7 +239,7 @@ index 814fe0d349b0..134390e619bb 100644 |
238 |
help |
239 |
|
240 |
Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and |
241 |
-@@ -278,6 +356,8 @@ config MCORE2 |
242 |
+@@ -278,6 +364,8 @@ config MCORE2 |
243 |
family in /proc/cpuinfo. Newer ones have 6 and older ones 15 |
244 |
(not a typo) |
245 |
|
246 |
@@ -224,7 +248,7 @@ index 814fe0d349b0..134390e619bb 100644 |
247 |
config MATOM |
248 |
bool "Intel Atom" |
249 |
help |
250 |
-@@ -287,6 +367,150 @@ config MATOM |
251 |
+@@ -287,6 +375,182 @@ config MATOM |
252 |
accordingly optimized code. Use a recent GCC with specific Atom |
253 |
support in order to fully benefit from selecting this option. |
254 |
|
255 |
@@ -356,6 +380,7 @@ index 814fe0d349b0..134390e619bb 100644 |
256 |
+ |
257 |
+config MCOOPERLAKE |
258 |
+ bool "Intel Cooper Lake" |
259 |
++ depends on GCC_VERSION > 100100 |
260 |
+ select X86_P6_NOP |
261 |
+ help |
262 |
+ |
263 |
@@ -365,22 +390,77 @@ index 814fe0d349b0..134390e619bb 100644 |
264 |
+ |
265 |
+config MTIGERLAKE |
266 |
+ bool "Intel Tiger Lake" |
267 |
++ depends on GCC_VERSION > 100100 |
268 |
+ select X86_P6_NOP |
269 |
+ help |
270 |
+ |
271 |
+ Select this for third-generation 10 nm process processors in the Tiger Lake family. |
272 |
+ |
273 |
+ Enables -march=tigerlake |
274 |
++ |
275 |
++config MSAPPHIRERAPIDS |
276 |
++ bool "Intel Sapphire Rapids" |
277 |
++ depends on GCC_VERSION > 110000 |
278 |
++ select X86_P6_NOP |
279 |
++ help |
280 |
++ |
281 |
++ Select this for third-generation 10 nm process processors in the Sapphire Rapids family. |
282 |
++ |
283 |
++ Enables -march=sapphirerapids |
284 |
++ |
285 |
++config MROCKETLAKE |
286 |
++ bool "Intel Rocket Lake" |
287 |
++ depends on GCC_VERSION > 110000 |
288 |
++ select X86_P6_NOP |
289 |
++ help |
290 |
++ |
291 |
++ Select this for eleventh-generation processors in the Rocket Lake family. |
292 |
++ |
293 |
++ Enables -march=rocketlake |
294 |
++ |
295 |
++config MALDERLAKE |
296 |
++ bool "Intel Alder Lake" |
297 |
++ depends on GCC_VERSION > 110000 |
298 |
++ select X86_P6_NOP |
299 |
++ help |
300 |
++ |
301 |
++ Select this for twelfth-generation processors in the Alder Lake family. |
302 |
++ |
303 |
++ Enables -march=alderlake |
304 |
+ |
305 |
config GENERIC_CPU |
306 |
bool "Generic-x86-64" |
307 |
depends on X86_64 |
308 |
-@@ -294,6 +518,16 @@ config GENERIC_CPU |
309 |
+@@ -294,6 +558,50 @@ config GENERIC_CPU |
310 |
Generic x86-64 CPU. |
311 |
Run equally well on all x86-64 CPUs. |
312 |
|
313 |
-+config MNATIVE |
314 |
-+ bool "Native optimizations autodetected by GCC" |
315 |
++config GENERIC_CPU2 |
316 |
++ bool "Generic-x86-64-v2" |
317 |
++ depends on GCC_VERSION > 110000 |
318 |
++ depends on X86_64 |
319 |
++ help |
320 |
++ Generic x86-64 CPU. |
321 |
++ Run equally well on all x86-64 CPUs with min support of x86-64-v2. |
322 |
++ |
323 |
++config GENERIC_CPU3 |
324 |
++ bool "Generic-x86-64-v3" |
325 |
++ depends on GCC_VERSION > 110000 |
326 |
++ depends on X86_64 |
327 |
++ help |
328 |
++ Generic x86-64-v3 CPU with v3 instructions. |
329 |
++ Run equally well on all x86-64 CPUs with min support of x86-64-v3. |
330 |
++ |
331 |
++config GENERIC_CPU4 |
332 |
++ bool "Generic-x86-64-v4" |
333 |
++ depends on GCC_VERSION > 110000 |
334 |
++ depends on X86_64 |
335 |
++ help |
336 |
++ Generic x86-64 CPU with v4 instructions. |
337 |
++ Run equally well on all x86-64 CPUs with min support of x86-64-v4. |
338 |
++ |
339 |
++config MNATIVE_INTEL |
340 |
++ bool "Intel-Native optimizations autodetected by GCC" |
341 |
+ help |
342 |
+ |
343 |
+ GCC 4.2 and above support -march=native, which automatically detects |
344 |
@@ -388,70 +468,80 @@ index 814fe0d349b0..134390e619bb 100644 |
345 |
+ for AMD CPUs. Intel Only! |
346 |
+ |
347 |
+ Enables -march=native |
348 |
++ |
349 |
++config MNATIVE_AMD |
350 |
++ bool "AMD-Native optimizations autodetected by GCC" |
351 |
++ help |
352 |
++ |
353 |
++ GCC 4.2 and above support -march=native, which automatically detects |
354 |
++ the optimum settings to use based on your processor. Do NOT use this |
355 |
++ for Intel CPUs. AMD Only! |
356 |
++ |
357 |
++ Enables -march=native |
358 |
+ |
359 |
endchoice |
360 |
|
361 |
config X86_GENERIC |
362 |
-@@ -318,7 +552,7 @@ config X86_INTERNODE_CACHE_SHIFT |
363 |
+@@ -318,7 +626,7 @@ config X86_INTERNODE_CACHE_SHIFT |
364 |
config X86_L1_CACHE_SHIFT |
365 |
int |
366 |
default "7" if MPENTIUM4 || MPSC |
367 |
- default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU |
368 |
-+ default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MNATIVE || X86_GENERIC || GENERIC_CPU |
369 |
++ default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MZEN3 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MNATIVE_INTEL || MNATIVE_AMD || X86_GENERIC || GENERIC_CPU || GENERIC_CPU2 || GENERIC_CPU3 || GENERIC_CPU4 |
370 |
default "4" if MELAN || M486SX || M486 || MGEODEGX1 |
371 |
default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX |
372 |
|
373 |
-@@ -336,11 +570,11 @@ config X86_ALIGNMENT_16 |
374 |
+@@ -336,11 +644,11 @@ config X86_ALIGNMENT_16 |
375 |
|
376 |
config X86_INTEL_USERCOPY |
377 |
def_bool y |
378 |
- depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2 |
379 |
-+ 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 || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MNATIVE |
380 |
++ 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 || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MNATIVE_INTEL |
381 |
|
382 |
config X86_USE_PPRO_CHECKSUM |
383 |
def_bool y |
384 |
- depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MATOM |
385 |
-+ 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 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MNATIVE |
386 |
++ 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 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MNATIVE_INTEL || MNATIVE_AMD |
387 |
|
388 |
config X86_USE_3DNOW |
389 |
def_bool y |
390 |
-@@ -360,26 +594,26 @@ config X86_USE_3DNOW |
391 |
+@@ -360,26 +668,26 @@ config X86_USE_3DNOW |
392 |
config X86_P6_NOP |
393 |
def_bool y |
394 |
depends on X86_64 |
395 |
- depends on (MCORE2 || MPENTIUM4 || MPSC) |
396 |
-+ depends on (MCORE2 || MPENTIUM4 || MPSC || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MNATIVE) |
397 |
++ depends on (MCORE2 || MPENTIUM4 || MPSC || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MNATIVE_INTEL) |
398 |
|
399 |
config X86_TSC |
400 |
def_bool y |
401 |
- 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 |
402 |
-+ depends on (MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MATOM || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MNATIVE) || X86_64 |
403 |
++ depends on (MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MATOM || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MZEN3 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MNATIVE_INTEL || MNATIVE_AMD) || X86_64 |
404 |
|
405 |
config X86_CMPXCHG64 |
406 |
def_bool y |
407 |
- depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586TSC || M586MMX || MATOM || MGEODE_LX || MGEODEGX1 || MK6 || MK7 || MK8 |
408 |
-+ depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586TSC || M586MMX || MATOM || MGEODE_LX || MGEODEGX1 || MK6 || MK7 || MK8 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MNATIVE |
409 |
++ depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586TSC || M586MMX || MATOM || MGEODE_LX || MGEODEGX1 || MK6 || MK7 || MK8 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MZEN3 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MNATIVE_INTEL || MNATIVE_AMD |
410 |
|
411 |
# this should be set for all -march=.. options where the compiler |
412 |
# generates cmov. |
413 |
config X86_CMOV |
414 |
def_bool y |
415 |
- depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX) |
416 |
-+ depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MNATIVE) |
417 |
++ depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MZEN3 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MNATIVE_INTEL || MNATIVE_AMD) |
418 |
|
419 |
config X86_MINIMUM_CPU_FAMILY |
420 |
int |
421 |
default "64" if X86_64 |
422 |
- default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8) |
423 |
-+ default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MNATIVE) |
424 |
++ default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MZEN3 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MCOOPERLAKE || MTIGERLAKE || MSAPPHIRERAPIDS || MROCKETLAKE || MALDERLAKE || MNATIVE_INTEL || MNATIVE_AMD) |
425 |
default "5" if X86_32 && X86_CMPXCHG64 |
426 |
default "4" |
427 |
|
428 |
diff --git a/arch/x86/Makefile b/arch/x86/Makefile |
429 |
-index 7116da3980be..50c8af35092b 100644 |
430 |
+index 9a85eae37b17..facf9a278fe3 100644 |
431 |
--- a/arch/x86/Makefile |
432 |
+++ b/arch/x86/Makefile |
433 |
-@@ -110,11 +110,40 @@ else |
434 |
+@@ -113,11 +113,48 @@ else |
435 |
# FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu) |
436 |
cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) |
437 |
cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) |
438 |
@@ -473,9 +563,11 @@ index 7116da3980be..50c8af35092b 100644 |
439 |
+ cflags-$(CONFIG_MEXCAVATOR) += $(call cc-option,-march=bdver4) |
440 |
+ cflags-$(CONFIG_MEXCAVATOR) += $(call cc-option,-mno-tbm) |
441 |
+ cflags-$(CONFIG_MZEN) += $(call cc-option,-march=znver1) |
442 |
-+ cflags-$(CONFIG_MZEN2) += $(call cc-option,-march=znver2) |
443 |
++ cflags-$(CONFIG_MZEN2) += $(call cc-option,-march=znver2) |
444 |
++ cflags-$(CONFIG_MZEN3) += $(call cc-option,-march=znver3) |
445 |
+ |
446 |
-+ cflags-$(CONFIG_MNATIVE) += $(call cc-option,-march=native) |
447 |
++ cflags-$(CONFIG_MNATIVE_INTEL) += $(call cc-option,-march=native) |
448 |
++ cflags-$(CONFIG_MNATIVE_AMD) += $(call cc-option,-march=native) |
449 |
+ cflags-$(CONFIG_MATOM) += $(call cc-option,-march=bonnell) |
450 |
+ cflags-$(CONFIG_MCORE2) += $(call cc-option,-march=core2) |
451 |
+ cflags-$(CONFIG_MNEHALEM) += $(call cc-option,-march=nehalem) |
452 |
@@ -494,19 +586,27 @@ index 7116da3980be..50c8af35092b 100644 |
453 |
+ cflags-$(CONFIG_MCASCADELAKE) += $(call cc-option,-march=cascadelake) |
454 |
+ cflags-$(CONFIG_MCOOPERLAKE) += $(call cc-option,-march=cooperlake) |
455 |
+ cflags-$(CONFIG_MTIGERLAKE) += $(call cc-option,-march=tigerlake) |
456 |
++ cflags-$(CONFIG_MSAPPHIRERAPIDS) += $(call cc-option,-march=sapphirerapids) |
457 |
++ cflags-$(CONFIG_MROCKETLAKE) += $(call cc-option,-march=rocketlake) |
458 |
++ cflags-$(CONFIG_MALDERLAKE) += $(call cc-option,-march=alderlake) |
459 |
++ cflags-$(CONFIG_GENERIC_CPU2) += $(call cc-option,-march=x86-64-v2) |
460 |
++ cflags-$(CONFIG_GENERIC_CPU3) += $(call cc-option,-march=x86-64-v3) |
461 |
++ cflags-$(CONFIG_GENERIC_CPU4) += $(call cc-option,-march=x86-64-v4) |
462 |
cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic) |
463 |
KBUILD_CFLAGS += $(cflags-y) |
464 |
|
465 |
diff --git a/arch/x86/include/asm/vermagic.h b/arch/x86/include/asm/vermagic.h |
466 |
-index 75884d2cdec3..14c222e78213 100644 |
467 |
+index 75884d2cdec3..4e6a08d4c7e5 100644 |
468 |
--- a/arch/x86/include/asm/vermagic.h |
469 |
+++ b/arch/x86/include/asm/vermagic.h |
470 |
-@@ -17,6 +17,40 @@ |
471 |
+@@ -17,6 +17,48 @@ |
472 |
#define MODULE_PROC_FAMILY "586MMX " |
473 |
#elif defined CONFIG_MCORE2 |
474 |
#define MODULE_PROC_FAMILY "CORE2 " |
475 |
-+#elif defined CONFIG_MNATIVE |
476 |
-+#define MODULE_PROC_FAMILY "NATIVE " |
477 |
++#elif defined CONFIG_MNATIVE_INTEL |
478 |
++#define MODULE_PROC_FAMILY "NATIVE_INTEL " |
479 |
++#elif defined CONFIG_MNATIVE_AMD |
480 |
++#define MODULE_PROC_FAMILY "NATIVE_AMD " |
481 |
+#elif defined CONFIG_MNEHALEM |
482 |
+#define MODULE_PROC_FAMILY "NEHALEM " |
483 |
+#elif defined CONFIG_MWESTMERE |
484 |
@@ -539,10 +639,16 @@ index 75884d2cdec3..14c222e78213 100644 |
485 |
+#define MODULE_PROC_FAMILY "COOPERLAKE " |
486 |
+#elif defined CONFIG_MTIGERLAKE |
487 |
+#define MODULE_PROC_FAMILY "TIGERLAKE " |
488 |
++#elif defined CONFIG_MSAPPHIRERAPIDS |
489 |
++#define MODULE_PROC_FAMILY "SAPPHIRERAPIDS " |
490 |
++#elif defined CONFIG_ROCKETLAKE |
491 |
++#define MODULE_PROC_FAMILY "ROCKETLAKE " |
492 |
++#elif defined CONFIG_MALDERLAKE |
493 |
++#define MODULE_PROC_FAMILY "ALDERLAKE " |
494 |
#elif defined CONFIG_MATOM |
495 |
#define MODULE_PROC_FAMILY "ATOM " |
496 |
#elif defined CONFIG_M686 |
497 |
-@@ -35,6 +69,28 @@ |
498 |
+@@ -35,6 +77,30 @@ |
499 |
#define MODULE_PROC_FAMILY "K7 " |
500 |
#elif defined CONFIG_MK8 |
501 |
#define MODULE_PROC_FAMILY "K8 " |
502 |
@@ -568,10 +674,11 @@ index 75884d2cdec3..14c222e78213 100644 |
503 |
+#define MODULE_PROC_FAMILY "ZEN " |
504 |
+#elif defined CONFIG_MZEN2 |
505 |
+#define MODULE_PROC_FAMILY "ZEN2 " |
506 |
++#elif defined CONFIG_MZEN3 |
507 |
++#define MODULE_PROC_FAMILY "ZEN3 " |
508 |
#elif defined CONFIG_MELAN |
509 |
#define MODULE_PROC_FAMILY "ELAN " |
510 |
#elif defined CONFIG_MCRUSOE |
511 |
-- |
512 |
-2.30.1 |
513 |
- |
514 |
+2.31.1 |
515 |
|
516 |
|
517 |
diff --git a/5012_enable-cpu-optimizations-for-gcc91.patch b/5012_enable-cpu-optimizations-for-gcc91.patch |
518 |
deleted file mode 100644 |
519 |
index 56aff7e..0000000 |
520 |
--- a/5012_enable-cpu-optimizations-for-gcc91.patch |
521 |
+++ /dev/null |
522 |
@@ -1,549 +0,0 @@ |
523 |
-From 56af79dc8be395c6adf25a05de3566822dbb2947 Mon Sep 17 00:00:00 2001 |
524 |
-From: graysky <graysky@×××××××××.us> |
525 |
-Date: Tue, 9 Mar 2021 01:57:33 -0500 |
526 |
-Subject: [PATCH] more-uarches-for-gcc-v9-and-kernel-5.8+ |
527 |
- |
528 |
-WARNING |
529 |
-This patch works with gcc versions 9.1+ and with kernel version 5.8+ and should |
530 |
-NOT be applied when compiling on older versions of gcc due to key name changes |
531 |
-of the march flags introduced with the version 4.9 release of gcc.[1] |
532 |
- |
533 |
-Use the older version of this patch hosted on the same github for older |
534 |
-versions of gcc. |
535 |
- |
536 |
-FEATURES |
537 |
-This patch adds additional CPU options to the Linux kernel accessible under: |
538 |
- Processor type and features ---> |
539 |
- Processor family ---> |
540 |
- |
541 |
-The expanded microarchitectures include: |
542 |
-* AMD Improved K8-family |
543 |
-* AMD K10-family |
544 |
-* AMD Family 10h (Barcelona) |
545 |
-* AMD Family 14h (Bobcat) |
546 |
-* AMD Family 16h (Jaguar) |
547 |
-* AMD Family 15h (Bulldozer) |
548 |
-* AMD Family 15h (Piledriver) |
549 |
-* AMD Family 15h (Steamroller) |
550 |
-* AMD Family 15h (Excavator) |
551 |
-* AMD Family 17h (Zen) |
552 |
-* AMD Family 17h (Zen 2) |
553 |
-* Intel Silvermont low-power processors |
554 |
-* Intel Goldmont low-power processors (Apollo Lake and Denverton) |
555 |
-* Intel Goldmont Plus low-power processors (Gemini Lake) |
556 |
-* Intel 1st Gen Core i3/i5/i7 (Nehalem) |
557 |
-* Intel 1.5 Gen Core i3/i5/i7 (Westmere) |
558 |
-* Intel 2nd Gen Core i3/i5/i7 (Sandybridge) |
559 |
-* Intel 3rd Gen Core i3/i5/i7 (Ivybridge) |
560 |
-* Intel 4th Gen Core i3/i5/i7 (Haswell) |
561 |
-* Intel 5th Gen Core i3/i5/i7 (Broadwell) |
562 |
-* Intel 6th Gen Core i3/i5/i7 (Skylake) |
563 |
-* Intel 6th Gen Core i7/i9 (Skylake X) |
564 |
-* Intel 8th Gen Core i3/i5/i7 (Cannon Lake) |
565 |
-* Intel 10th Gen Core i7/i9 (Ice Lake) |
566 |
-* Intel Xeon (Cascade Lake) |
567 |
- |
568 |
-It also offers to compile passing the 'native' option which, "selects the CPU |
569 |
-to generate code for at compilation time by determining the processor type of |
570 |
-the compiling machine. Using -march=native enables all instruction subsets |
571 |
-supported by the local machine and will produce code optimized for the local |
572 |
-machine under the constraints of the selected instruction set."[2] |
573 |
- |
574 |
-Do NOT try using the 'native' option on AMD Piledriver, Steamroller, or |
575 |
-Excavator CPUs (-march=bdver{2,3,4} flag). The build will error out due the |
576 |
-kernel's objtool issue with these.[3a,b] |
577 |
- |
578 |
-MINOR NOTES |
579 |
-This patch also changes 'atom' to 'bonnell' in accordance with the gcc v4.9 |
580 |
-changes. Note that upstream is using the deprecated 'match=atom' flags when I |
581 |
-believe it should use the newer 'march=bonnell' flag for atom processors.[4] |
582 |
- |
583 |
-It is not recommended to compile on Atom-CPUs with the 'native' option.[5] The |
584 |
-recommendation is to use the 'atom' option instead. |
585 |
- |
586 |
-BENEFITS |
587 |
-Small but real speed increases are measurable using a make endpoint comparing |
588 |
-a generic kernel to one built with one of the respective microarchs. |
589 |
- |
590 |
-See the following experimental evidence supporting this statement: |
591 |
-https://github.com/graysky2/kernel_gcc_patch |
592 |
- |
593 |
-REQUIREMENTS |
594 |
-linux version >=5.8 |
595 |
-gcc version >=9.1 and <10 |
596 |
- |
597 |
-ACKNOWLEDGMENTS |
598 |
-This patch builds on the seminal work by Jeroen.[6] |
599 |
- |
600 |
-REFERENCES |
601 |
-1. https://gcc.gnu.org/gcc-4.9/changes.html |
602 |
-2. https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html |
603 |
-3a. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95671#c11 |
604 |
-3b. https://github.com/graysky2/kernel_gcc_patch/issues/55 |
605 |
-4. https://bugzilla.kernel.org/show_bug.cgi?id=77461 |
606 |
-5. https://github.com/graysky2/kernel_gcc_patch/issues/15 |
607 |
-6. http://www.linuxforge.net/docs/linux/linux-gcc.php |
608 |
---- |
609 |
- arch/x86/Kconfig.cpu | 240 ++++++++++++++++++++++++++++++-- |
610 |
- arch/x86/Makefile | 37 ++++- |
611 |
- arch/x86/include/asm/vermagic.h | 52 +++++++ |
612 |
- 3 files changed, 312 insertions(+), 17 deletions(-) |
613 |
- |
614 |
-diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu |
615 |
-index 814fe0d349b0..aa7dd036e8a3 100644 |
616 |
---- a/arch/x86/Kconfig.cpu |
617 |
-+++ b/arch/x86/Kconfig.cpu |
618 |
-@@ -157,7 +157,7 @@ config MPENTIUM4 |
619 |
- |
620 |
- |
621 |
- config MK6 |
622 |
-- bool "K6/K6-II/K6-III" |
623 |
-+ bool "AMD K6/K6-II/K6-III" |
624 |
- depends on X86_32 |
625 |
- help |
626 |
- Select this for an AMD K6-family processor. Enables use of |
627 |
-@@ -165,7 +165,7 @@ config MK6 |
628 |
- flags to GCC. |
629 |
- |
630 |
- config MK7 |
631 |
-- bool "Athlon/Duron/K7" |
632 |
-+ bool "AMD Athlon/Duron/K7" |
633 |
- depends on X86_32 |
634 |
- help |
635 |
- Select this for an AMD Athlon K7-family processor. Enables use of |
636 |
-@@ -173,12 +173,90 @@ config MK7 |
637 |
- flags to GCC. |
638 |
- |
639 |
- config MK8 |
640 |
-- bool "Opteron/Athlon64/Hammer/K8" |
641 |
-+ bool "AMD Opteron/Athlon64/Hammer/K8" |
642 |
- help |
643 |
- Select this for an AMD Opteron or Athlon64 Hammer-family processor. |
644 |
- Enables use of some extended instructions, and passes appropriate |
645 |
- optimization flags to GCC. |
646 |
- |
647 |
-+config MK8SSE3 |
648 |
-+ bool "AMD Opteron/Athlon64/Hammer/K8 with SSE3" |
649 |
-+ help |
650 |
-+ Select this for improved AMD Opteron or Athlon64 Hammer-family processors. |
651 |
-+ Enables use of some extended instructions, and passes appropriate |
652 |
-+ optimization flags to GCC. |
653 |
-+ |
654 |
-+config MK10 |
655 |
-+ bool "AMD 61xx/7x50/PhenomX3/X4/II/K10" |
656 |
-+ help |
657 |
-+ Select this for an AMD 61xx Eight-Core Magny-Cours, Athlon X2 7x50, |
658 |
-+ Phenom X3/X4/II, Athlon II X2/X3/X4, or Turion II-family processor. |
659 |
-+ Enables use of some extended instructions, and passes appropriate |
660 |
-+ optimization flags to GCC. |
661 |
-+ |
662 |
-+config MBARCELONA |
663 |
-+ bool "AMD Barcelona" |
664 |
-+ help |
665 |
-+ Select this for AMD Family 10h Barcelona processors. |
666 |
-+ |
667 |
-+ Enables -march=barcelona |
668 |
-+ |
669 |
-+config MBOBCAT |
670 |
-+ bool "AMD Bobcat" |
671 |
-+ help |
672 |
-+ Select this for AMD Family 14h Bobcat processors. |
673 |
-+ |
674 |
-+ Enables -march=btver1 |
675 |
-+ |
676 |
-+config MJAGUAR |
677 |
-+ bool "AMD Jaguar" |
678 |
-+ help |
679 |
-+ Select this for AMD Family 16h Jaguar processors. |
680 |
-+ |
681 |
-+ Enables -march=btver2 |
682 |
-+ |
683 |
-+config MBULLDOZER |
684 |
-+ bool "AMD Bulldozer" |
685 |
-+ help |
686 |
-+ Select this for AMD Family 15h Bulldozer processors. |
687 |
-+ |
688 |
-+ Enables -march=bdver1 |
689 |
-+ |
690 |
-+config MPILEDRIVER |
691 |
-+ bool "AMD Piledriver" |
692 |
-+ help |
693 |
-+ Select this for AMD Family 15h Piledriver processors. |
694 |
-+ |
695 |
-+ Enables -march=bdver2 |
696 |
-+ |
697 |
-+config MSTEAMROLLER |
698 |
-+ bool "AMD Steamroller" |
699 |
-+ help |
700 |
-+ Select this for AMD Family 15h Steamroller processors. |
701 |
-+ |
702 |
-+ Enables -march=bdver3 |
703 |
-+ |
704 |
-+config MEXCAVATOR |
705 |
-+ bool "AMD Excavator" |
706 |
-+ help |
707 |
-+ Select this for AMD Family 15h Excavator processors. |
708 |
-+ |
709 |
-+ Enables -march=bdver4 |
710 |
-+ |
711 |
-+config MZEN |
712 |
-+ bool "AMD Zen" |
713 |
-+ help |
714 |
-+ Select this for AMD Family 17h Zen processors. |
715 |
-+ |
716 |
-+ Enables -march=znver1 |
717 |
-+ |
718 |
-+config MZEN2 |
719 |
-+ bool "AMD Zen 2" |
720 |
-+ help |
721 |
-+ Select this for AMD Family 17h Zen 2 processors. |
722 |
-+ |
723 |
-+ Enables -march=znver2 |
724 |
-+ |
725 |
- config MCRUSOE |
726 |
- bool "Crusoe" |
727 |
- depends on X86_32 |
728 |
-@@ -270,7 +348,7 @@ config MPSC |
729 |
- in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one. |
730 |
- |
731 |
- config MCORE2 |
732 |
-- bool "Core 2/newer Xeon" |
733 |
-+ bool "Intel Core 2" |
734 |
- help |
735 |
- |
736 |
- Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and |
737 |
-@@ -278,6 +356,8 @@ config MCORE2 |
738 |
- family in /proc/cpuinfo. Newer ones have 6 and older ones 15 |
739 |
- (not a typo) |
740 |
- |
741 |
-+ Enables -march=core2 |
742 |
-+ |
743 |
- config MATOM |
744 |
- bool "Intel Atom" |
745 |
- help |
746 |
-@@ -287,6 +367,132 @@ config MATOM |
747 |
- accordingly optimized code. Use a recent GCC with specific Atom |
748 |
- support in order to fully benefit from selecting this option. |
749 |
- |
750 |
-+config MNEHALEM |
751 |
-+ bool "Intel Nehalem" |
752 |
-+ select X86_P6_NOP |
753 |
-+ help |
754 |
-+ |
755 |
-+ Select this for 1st Gen Core processors in the Nehalem family. |
756 |
-+ |
757 |
-+ Enables -march=nehalem |
758 |
-+ |
759 |
-+config MWESTMERE |
760 |
-+ bool "Intel Westmere" |
761 |
-+ select X86_P6_NOP |
762 |
-+ help |
763 |
-+ |
764 |
-+ Select this for the Intel Westmere formerly Nehalem-C family. |
765 |
-+ |
766 |
-+ Enables -march=westmere |
767 |
-+ |
768 |
-+config MSILVERMONT |
769 |
-+ bool "Intel Silvermont" |
770 |
-+ select X86_P6_NOP |
771 |
-+ help |
772 |
-+ |
773 |
-+ Select this for the Intel Silvermont platform. |
774 |
-+ |
775 |
-+ Enables -march=silvermont |
776 |
-+ |
777 |
-+config MGOLDMONT |
778 |
-+ bool "Intel Goldmont" |
779 |
-+ select X86_P6_NOP |
780 |
-+ help |
781 |
-+ |
782 |
-+ Select this for the Intel Goldmont platform including Apollo Lake and Denverton. |
783 |
-+ |
784 |
-+ Enables -march=goldmont |
785 |
-+ |
786 |
-+config MGOLDMONTPLUS |
787 |
-+ bool "Intel Goldmont Plus" |
788 |
-+ select X86_P6_NOP |
789 |
-+ help |
790 |
-+ |
791 |
-+ Select this for the Intel Goldmont Plus platform including Gemini Lake. |
792 |
-+ |
793 |
-+ Enables -march=goldmont-plus |
794 |
-+ |
795 |
-+config MSANDYBRIDGE |
796 |
-+ bool "Intel Sandy Bridge" |
797 |
-+ select X86_P6_NOP |
798 |
-+ help |
799 |
-+ |
800 |
-+ Select this for 2nd Gen Core processors in the Sandy Bridge family. |
801 |
-+ |
802 |
-+ Enables -march=sandybridge |
803 |
-+ |
804 |
-+config MIVYBRIDGE |
805 |
-+ bool "Intel Ivy Bridge" |
806 |
-+ select X86_P6_NOP |
807 |
-+ help |
808 |
-+ |
809 |
-+ Select this for 3rd Gen Core processors in the Ivy Bridge family. |
810 |
-+ |
811 |
-+ Enables -march=ivybridge |
812 |
-+ |
813 |
-+config MHASWELL |
814 |
-+ bool "Intel Haswell" |
815 |
-+ select X86_P6_NOP |
816 |
-+ help |
817 |
-+ |
818 |
-+ Select this for 4th Gen Core processors in the Haswell family. |
819 |
-+ |
820 |
-+ Enables -march=haswell |
821 |
-+ |
822 |
-+config MBROADWELL |
823 |
-+ bool "Intel Broadwell" |
824 |
-+ select X86_P6_NOP |
825 |
-+ help |
826 |
-+ |
827 |
-+ Select this for 5th Gen Core processors in the Broadwell family. |
828 |
-+ |
829 |
-+ Enables -march=broadwell |
830 |
-+ |
831 |
-+config MSKYLAKE |
832 |
-+ bool "Intel Skylake" |
833 |
-+ select X86_P6_NOP |
834 |
-+ help |
835 |
-+ |
836 |
-+ Select this for 6th Gen Core processors in the Skylake family. |
837 |
-+ |
838 |
-+ Enables -march=skylake |
839 |
-+ |
840 |
-+config MSKYLAKEX |
841 |
-+ bool "Intel Skylake X" |
842 |
-+ select X86_P6_NOP |
843 |
-+ help |
844 |
-+ |
845 |
-+ Select this for 6th Gen Core processors in the Skylake X family. |
846 |
-+ |
847 |
-+ Enables -march=skylake-avx512 |
848 |
-+ |
849 |
-+config MCANNONLAKE |
850 |
-+ bool "Intel Cannon Lake" |
851 |
-+ select X86_P6_NOP |
852 |
-+ help |
853 |
-+ |
854 |
-+ Select this for 8th Gen Core processors |
855 |
-+ |
856 |
-+ Enables -march=cannonlake |
857 |
-+ |
858 |
-+config MICELAKE |
859 |
-+ bool "Intel Ice Lake" |
860 |
-+ select X86_P6_NOP |
861 |
-+ help |
862 |
-+ |
863 |
-+ Select this for 10th Gen Core processors in the Ice Lake family. |
864 |
-+ |
865 |
-+ Enables -march=icelake-client |
866 |
-+ |
867 |
-+config MCASCADELAKE |
868 |
-+ bool "Intel Cascade Lake" |
869 |
-+ select X86_P6_NOP |
870 |
-+ help |
871 |
-+ |
872 |
-+ Select this for Xeon processors in the Cascade Lake family. |
873 |
-+ |
874 |
-+ Enables -march=cascadelake |
875 |
-+ |
876 |
- config GENERIC_CPU |
877 |
- bool "Generic-x86-64" |
878 |
- depends on X86_64 |
879 |
-@@ -294,6 +500,16 @@ config GENERIC_CPU |
880 |
- Generic x86-64 CPU. |
881 |
- Run equally well on all x86-64 CPUs. |
882 |
- |
883 |
-+config MNATIVE |
884 |
-+ bool "Native optimizations autodetected by GCC" |
885 |
-+ help |
886 |
-+ |
887 |
-+ GCC 4.2 and above support -march=native, which automatically detects |
888 |
-+ the optimum settings to use based on your processor. Do NOT use this |
889 |
-+ for AMD CPUs. Intel Only! |
890 |
-+ |
891 |
-+ Enables -march=native |
892 |
-+ |
893 |
- endchoice |
894 |
- |
895 |
- config X86_GENERIC |
896 |
-@@ -318,7 +534,7 @@ config X86_INTERNODE_CACHE_SHIFT |
897 |
- config X86_L1_CACHE_SHIFT |
898 |
- int |
899 |
- default "7" if MPENTIUM4 || MPSC |
900 |
-- default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU |
901 |
-+ default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MNATIVE || X86_GENERIC || GENERIC_CPU |
902 |
- default "4" if MELAN || M486SX || M486 || MGEODEGX1 |
903 |
- default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX |
904 |
- |
905 |
-@@ -336,11 +552,11 @@ config X86_ALIGNMENT_16 |
906 |
- |
907 |
- config X86_INTEL_USERCOPY |
908 |
- def_bool y |
909 |
-- depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2 |
910 |
-+ 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 || MCASCADELAKE || MNATIVE |
911 |
- |
912 |
- config X86_USE_PPRO_CHECKSUM |
913 |
- def_bool y |
914 |
-- depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MATOM |
915 |
-+ 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 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MNATIVE |
916 |
- |
917 |
- config X86_USE_3DNOW |
918 |
- def_bool y |
919 |
-@@ -360,26 +576,26 @@ config X86_USE_3DNOW |
920 |
- config X86_P6_NOP |
921 |
- def_bool y |
922 |
- depends on X86_64 |
923 |
-- depends on (MCORE2 || MPENTIUM4 || MPSC) |
924 |
-+ depends on (MCORE2 || MPENTIUM4 || MPSC || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MNATIVE) |
925 |
- |
926 |
- config X86_TSC |
927 |
- def_bool y |
928 |
-- 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 |
929 |
-+ depends on (MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MATOM || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MNATIVE) || X86_64 |
930 |
- |
931 |
- config X86_CMPXCHG64 |
932 |
- def_bool y |
933 |
-- depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586TSC || M586MMX || MATOM || MGEODE_LX || MGEODEGX1 || MK6 || MK7 || MK8 |
934 |
-+ depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586TSC || M586MMX || MATOM || MGEODE_LX || MGEODEGX1 || MK6 || MK7 || MK8 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MNATIVE |
935 |
- |
936 |
- # this should be set for all -march=.. options where the compiler |
937 |
- # generates cmov. |
938 |
- config X86_CMOV |
939 |
- def_bool y |
940 |
-- depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX) |
941 |
-+ depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MNATIVE) |
942 |
- |
943 |
- config X86_MINIMUM_CPU_FAMILY |
944 |
- int |
945 |
- default "64" if X86_64 |
946 |
-- default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8) |
947 |
-+ default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MJAGUAR || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MNATIVE) |
948 |
- default "5" if X86_32 && X86_CMPXCHG64 |
949 |
- default "4" |
950 |
- |
951 |
-diff --git a/arch/x86/Makefile b/arch/x86/Makefile |
952 |
-index 00e378de8bc0..7602ef4a2dd4 100644 |
953 |
---- a/arch/x86/Makefile |
954 |
-+++ b/arch/x86/Makefile |
955 |
-@@ -121,11 +121,38 @@ else |
956 |
- # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu) |
957 |
- cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) |
958 |
- cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) |
959 |
-- |
960 |
-- cflags-$(CONFIG_MCORE2) += \ |
961 |
-- $(call cc-option,-march=core2,$(call cc-option,-mtune=generic)) |
962 |
-- cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom) \ |
963 |
-- $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic)) |
964 |
-+ cflags-$(CONFIG_MK8SSE3) += $(call cc-option,-march=k8-sse3) |
965 |
-+ cflags-$(CONFIG_MK10) += $(call cc-option,-march=amdfam10) |
966 |
-+ cflags-$(CONFIG_MBARCELONA) += $(call cc-option,-march=barcelona) |
967 |
-+ cflags-$(CONFIG_MBOBCAT) += $(call cc-option,-march=btver1) |
968 |
-+ cflags-$(CONFIG_MJAGUAR) += $(call cc-option,-march=btver2) |
969 |
-+ cflags-$(CONFIG_MBULLDOZER) += $(call cc-option,-march=bdver1) |
970 |
-+ cflags-$(CONFIG_MPILEDRIVER) += $(call cc-option,-march=bdver2) |
971 |
-+ cflags-$(CONFIG_MPILEDRIVER) += $(call cc-option,-mno-tbm) |
972 |
-+ cflags-$(CONFIG_MSTEAMROLLER) += $(call cc-option,-march=bdver3) |
973 |
-+ cflags-$(CONFIG_MSTEAMROLLER) += $(call cc-option,-mno-tbm) |
974 |
-+ cflags-$(CONFIG_MEXCAVATOR) += $(call cc-option,-march=bdver4) |
975 |
-+ cflags-$(CONFIG_MEXCAVATOR) += $(call cc-option,-mno-tbm) |
976 |
-+ cflags-$(CONFIG_MZEN) += $(call cc-option,-march=znver1) |
977 |
-+ cflags-$(CONFIG_MZEN2) += $(call cc-option,-march=znver2) |
978 |
-+ |
979 |
-+ cflags-$(CONFIG_MNATIVE) += $(call cc-option,-march=native) |
980 |
-+ cflags-$(CONFIG_MATOM) += $(call cc-option,-march=bonnell) |
981 |
-+ cflags-$(CONFIG_MCORE2) += $(call cc-option,-march=core2) |
982 |
-+ cflags-$(CONFIG_MNEHALEM) += $(call cc-option,-march=nehalem) |
983 |
-+ cflags-$(CONFIG_MWESTMERE) += $(call cc-option,-march=westmere) |
984 |
-+ cflags-$(CONFIG_MSILVERMONT) += $(call cc-option,-march=silvermont) |
985 |
-+ cflags-$(CONFIG_MGOLDMONT) += $(call cc-option,-march=goldmont) |
986 |
-+ cflags-$(CONFIG_MGOLDMONTPLUS) += $(call cc-option,-march=goldmont-plus) |
987 |
-+ cflags-$(CONFIG_MSANDYBRIDGE) += $(call cc-option,-march=sandybridge) |
988 |
-+ cflags-$(CONFIG_MIVYBRIDGE) += $(call cc-option,-march=ivybridge) |
989 |
-+ cflags-$(CONFIG_MHASWELL) += $(call cc-option,-march=haswell) |
990 |
-+ cflags-$(CONFIG_MBROADWELL) += $(call cc-option,-march=broadwell) |
991 |
-+ cflags-$(CONFIG_MSKYLAKE) += $(call cc-option,-march=skylake) |
992 |
-+ cflags-$(CONFIG_MSKYLAKEX) += $(call cc-option,-march=skylake-avx512) |
993 |
-+ cflags-$(CONFIG_MCANNONLAKE) += $(call cc-option,-march=cannonlake) |
994 |
-+ cflags-$(CONFIG_MICELAKE) += $(call cc-option,-march=icelake-client) |
995 |
-+ cflags-$(CONFIG_MCASCADELAKE) += $(call cc-option,-march=cascadelake) |
996 |
- cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic) |
997 |
- KBUILD_CFLAGS += $(cflags-y) |
998 |
- |
999 |
-diff --git a/arch/x86/include/asm/vermagic.h b/arch/x86/include/asm/vermagic.h |
1000 |
-index 75884d2cdec3..0cf864d2d110 100644 |
1001 |
---- a/arch/x86/include/asm/vermagic.h |
1002 |
-+++ b/arch/x86/include/asm/vermagic.h |
1003 |
-@@ -17,6 +17,36 @@ |
1004 |
- #define MODULE_PROC_FAMILY "586MMX " |
1005 |
- #elif defined CONFIG_MCORE2 |
1006 |
- #define MODULE_PROC_FAMILY "CORE2 " |
1007 |
-+#elif defined CONFIG_MNATIVE |
1008 |
-+#define MODULE_PROC_FAMILY "NATIVE " |
1009 |
-+#elif defined CONFIG_MNEHALEM |
1010 |
-+#define MODULE_PROC_FAMILY "NEHALEM " |
1011 |
-+#elif defined CONFIG_MWESTMERE |
1012 |
-+#define MODULE_PROC_FAMILY "WESTMERE " |
1013 |
-+#elif defined CONFIG_MSILVERMONT |
1014 |
-+#define MODULE_PROC_FAMILY "SILVERMONT " |
1015 |
-+#elif defined CONFIG_MGOLDMONT |
1016 |
-+#define MODULE_PROC_FAMILY "GOLDMONT " |
1017 |
-+#elif defined CONFIG_MGOLDMONTPLUS |
1018 |
-+#define MODULE_PROC_FAMILY "GOLDMONTPLUS " |
1019 |
-+#elif defined CONFIG_MSANDYBRIDGE |
1020 |
-+#define MODULE_PROC_FAMILY "SANDYBRIDGE " |
1021 |
-+#elif defined CONFIG_MIVYBRIDGE |
1022 |
-+#define MODULE_PROC_FAMILY "IVYBRIDGE " |
1023 |
-+#elif defined CONFIG_MHASWELL |
1024 |
-+#define MODULE_PROC_FAMILY "HASWELL " |
1025 |
-+#elif defined CONFIG_MBROADWELL |
1026 |
-+#define MODULE_PROC_FAMILY "BROADWELL " |
1027 |
-+#elif defined CONFIG_MSKYLAKE |
1028 |
-+#define MODULE_PROC_FAMILY "SKYLAKE " |
1029 |
-+#elif defined CONFIG_MSKYLAKEX |
1030 |
-+#define MODULE_PROC_FAMILY "SKYLAKEX " |
1031 |
-+#elif defined CONFIG_MCANNONLAKE |
1032 |
-+#define MODULE_PROC_FAMILY "CANNONLAKE " |
1033 |
-+#elif defined CONFIG_MICELAKE |
1034 |
-+#define MODULE_PROC_FAMILY "ICELAKE " |
1035 |
-+#elif defined CONFIG_MCASCADELAKE |
1036 |
-+#define MODULE_PROC_FAMILY "CASCADELAKE " |
1037 |
- #elif defined CONFIG_MATOM |
1038 |
- #define MODULE_PROC_FAMILY "ATOM " |
1039 |
- #elif defined CONFIG_M686 |
1040 |
-@@ -35,6 +65,28 @@ |
1041 |
- #define MODULE_PROC_FAMILY "K7 " |
1042 |
- #elif defined CONFIG_MK8 |
1043 |
- #define MODULE_PROC_FAMILY "K8 " |
1044 |
-+#elif defined CONFIG_MK8SSE3 |
1045 |
-+#define MODULE_PROC_FAMILY "K8SSE3 " |
1046 |
-+#elif defined CONFIG_MK10 |
1047 |
-+#define MODULE_PROC_FAMILY "K10 " |
1048 |
-+#elif defined CONFIG_MBARCELONA |
1049 |
-+#define MODULE_PROC_FAMILY "BARCELONA " |
1050 |
-+#elif defined CONFIG_MBOBCAT |
1051 |
-+#define MODULE_PROC_FAMILY "BOBCAT " |
1052 |
-+#elif defined CONFIG_MBULLDOZER |
1053 |
-+#define MODULE_PROC_FAMILY "BULLDOZER " |
1054 |
-+#elif defined CONFIG_MPILEDRIVER |
1055 |
-+#define MODULE_PROC_FAMILY "PILEDRIVER " |
1056 |
-+#elif defined CONFIG_MSTEAMROLLER |
1057 |
-+#define MODULE_PROC_FAMILY "STEAMROLLER " |
1058 |
-+#elif defined CONFIG_MJAGUAR |
1059 |
-+#define MODULE_PROC_FAMILY "JAGUAR " |
1060 |
-+#elif defined CONFIG_MEXCAVATOR |
1061 |
-+#define MODULE_PROC_FAMILY "EXCAVATOR " |
1062 |
-+#elif defined CONFIG_MZEN |
1063 |
-+#define MODULE_PROC_FAMILY "ZEN " |
1064 |
-+#elif defined CONFIG_MZEN2 |
1065 |
-+#define MODULE_PROC_FAMILY "ZEN2 " |
1066 |
- #elif defined CONFIG_MELAN |
1067 |
- #define MODULE_PROC_FAMILY "ELAN " |
1068 |
- #elif defined CONFIG_MCRUSOE |
1069 |
--- |
1070 |
-2.30.1 |
1071 |
- |