Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:5.8 commit in: /
Date: Mon, 03 Aug 2020 14:42:41
Message-Id: 1596465721.1ca9312bc86801564378e2465414c6ba223d5bd3.mpagano@gentoo
1 commit: 1ca9312bc86801564378e2465414c6ba223d5bd3
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 3 14:42:01 2020 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 3 14:42:01 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=1ca9312b
7
8 Remove broken patch (gcc opts for gcc 9.1.X)
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 -
13 5012_enable-cpu-optimizations-for-gcc91.patch | 641 --------------------------
14 2 files changed, 645 deletions(-)
15
16 diff --git a/0000_README b/0000_README
17 index 6e07572..27a700b 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -103,10 +103,6 @@ Patch: 5007_ZSTD-v10-8-8-gitignore-add-ZSTD-compressed-files.patch
21 From: https://lkml.org/lkml/2020/4/1/29
22 Desc: .gitignore: add ZSTD-compressed files
23
24 -Patch: 5012_enable-cpu-optimizations-for-gcc91.patch
25 -From: https://github.com/graysky2/kernel_gcc_patch/
26 -Desc: Kernel patch enables gcc = v9.1+ optimizations for additional CPUs.
27 -
28 Patch: 5013_enable-cpu-optimizations-for-gcc10.patch
29 From: https://github.com/graysky2/kernel_gcc_patch/
30 Desc: Kernel patch enables gcc = v10.1+ optimizations for additional CPUs.
31
32 diff --git a/5012_enable-cpu-optimizations-for-gcc91.patch b/5012_enable-cpu-optimizations-for-gcc91.patch
33 deleted file mode 100644
34 index 2f16153..0000000
35 --- a/5012_enable-cpu-optimizations-for-gcc91.patch
36 +++ /dev/null
37 @@ -1,641 +0,0 @@
38 -WARNING
39 -This patch works with gcc versions 9.1+ and with kernel version 5.7+ and should
40 -NOT be applied when compiling on older versions of gcc due to key name changes
41 -of the march flags introduced with the version 4.9 release of gcc.[1]
42 -
43 -Use the older version of this patch hosted on the same github for older
44 -versions of gcc.
45 -
46 -FEATURES
47 -This patch adds additional CPU options to the Linux kernel accessible under:
48 - Processor type and features --->
49 - Processor family --->
50 -
51 -The expanded microarchitectures include:
52 -* AMD Improved K8-family
53 -* AMD K10-family
54 -* AMD Family 10h (Barcelona)
55 -* AMD Family 14h (Bobcat)
56 -* AMD Family 16h (Jaguar)
57 -* AMD Family 15h (Bulldozer)
58 -* AMD Family 15h (Piledriver)
59 -* AMD Family 15h (Steamroller)
60 -* AMD Family 15h (Excavator)
61 -* AMD Family 17h (Zen)
62 -* AMD Family 17h (Zen 2)
63 -* Intel Silvermont low-power processors
64 -* Intel Goldmont low-power processors (Apollo Lake and Denverton)
65 -* Intel Goldmont Plus low-power processors (Gemini Lake)
66 -* Intel 1st Gen Core i3/i5/i7 (Nehalem)
67 -* Intel 1.5 Gen Core i3/i5/i7 (Westmere)
68 -* Intel 2nd Gen Core i3/i5/i7 (Sandybridge)
69 -* Intel 3rd Gen Core i3/i5/i7 (Ivybridge)
70 -* Intel 4th Gen Core i3/i5/i7 (Haswell)
71 -* Intel 5th Gen Core i3/i5/i7 (Broadwell)
72 -* Intel 6th Gen Core i3/i5/i7 (Skylake)
73 -* Intel 6th Gen Core i7/i9 (Skylake X)
74 -* Intel 8th Gen Core i3/i5/i7 (Cannon Lake)
75 -* Intel 10th Gen Core i7/i9 (Ice Lake)
76 -* Intel Xeon (Cascade Lake)
77 -
78 -It also offers to compile passing the 'native' option which, "selects the CPU
79 -to generate code for at compilation time by determining the processor type of
80 -the compiling machine. Using -march=native enables all instruction subsets
81 -supported by the local machine and will produce code optimized for the local
82 -machine under the constraints of the selected instruction set."[2]
83 -
84 -Do NOT try using the 'native' option on AMD Piledriver, Steamroller, or
85 -Excavator CPUs (-march=bdver{2,3,4} flag). The build will error out due the
86 -kernel's objtool issue with these.[3a,b]
87 -
88 -MINOR NOTES
89 -This patch also changes 'atom' to 'bonnell' in accordance with the gcc v4.9
90 -changes. Note that upstream is using the deprecated 'match=atom' flags when I
91 -believe it should use the newer 'march=bonnell' flag for atom processors.[4]
92 -
93 -It is not recommended to compile on Atom-CPUs with the 'native' option.[5] The
94 -recommendation is to use the 'atom' option instead.
95 -
96 -BENEFITS
97 -Small but real speed increases are measurable using a make endpoint comparing
98 -a generic kernel to one built with one of the respective microarchs.
99 -
100 -See the following experimental evidence supporting this statement:
101 -https://github.com/graysky2/kernel_gcc_patch
102 -
103 -REQUIREMENTS
104 -linux version >=5.7
105 -gcc version >=9.1 and <10
106 -
107 -ACKNOWLEDGMENTS
108 -This patch builds on the seminal work by Jeroen.[6]
109 -
110 -REFERENCES
111 -1. https://gcc.gnu.org/gcc-4.9/changes.html
112 -2. https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
113 -3a. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95671#c11
114 -3b. https://github.com/graysky2/kernel_gcc_patch/issues/55
115 -4. https://bugzilla.kernel.org/show_bug.cgi?id=77461
116 -5. https://github.com/graysky2/kernel_gcc_patch/issues/15
117 -6. http://www.linuxforge.net/docs/linux/linux-gcc.php
118 -
119 ---- a/arch/x86/include/asm/vermagic.h 2020-06-10 14:21:45.000000000 -0400
120 -+++ b/arch/x86/include/asm/vermagic.h 2020-06-15 10:44:10.437477053 -0400
121 -@@ -17,6 +17,36 @@
122 - #define MODULE_PROC_FAMILY "586MMX "
123 - #elif defined CONFIG_MCORE2
124 - #define MODULE_PROC_FAMILY "CORE2 "
125 -+#elif defined CONFIG_MNATIVE
126 -+#define MODULE_PROC_FAMILY "NATIVE "
127 -+#elif defined CONFIG_MNEHALEM
128 -+#define MODULE_PROC_FAMILY "NEHALEM "
129 -+#elif defined CONFIG_MWESTMERE
130 -+#define MODULE_PROC_FAMILY "WESTMERE "
131 -+#elif defined CONFIG_MSILVERMONT
132 -+#define MODULE_PROC_FAMILY "SILVERMONT "
133 -+#elif defined CONFIG_MGOLDMONT
134 -+#define MODULE_PROC_FAMILY "GOLDMONT "
135 -+#elif defined CONFIG_MGOLDMONTPLUS
136 -+#define MODULE_PROC_FAMILY "GOLDMONTPLUS "
137 -+#elif defined CONFIG_MSANDYBRIDGE
138 -+#define MODULE_PROC_FAMILY "SANDYBRIDGE "
139 -+#elif defined CONFIG_MIVYBRIDGE
140 -+#define MODULE_PROC_FAMILY "IVYBRIDGE "
141 -+#elif defined CONFIG_MHASWELL
142 -+#define MODULE_PROC_FAMILY "HASWELL "
143 -+#elif defined CONFIG_MBROADWELL
144 -+#define MODULE_PROC_FAMILY "BROADWELL "
145 -+#elif defined CONFIG_MSKYLAKE
146 -+#define MODULE_PROC_FAMILY "SKYLAKE "
147 -+#elif defined CONFIG_MSKYLAKEX
148 -+#define MODULE_PROC_FAMILY "SKYLAKEX "
149 -+#elif defined CONFIG_MCANNONLAKE
150 -+#define MODULE_PROC_FAMILY "CANNONLAKE "
151 -+#elif defined CONFIG_MICELAKE
152 -+#define MODULE_PROC_FAMILY "ICELAKE "
153 -+#elif defined CONFIG_MCASCADELAKE
154 -+#define MODULE_PROC_FAMILY "CASCADELAKE "
155 - #elif defined CONFIG_MATOM
156 - #define MODULE_PROC_FAMILY "ATOM "
157 - #elif defined CONFIG_M686
158 -@@ -35,6 +65,28 @@
159 - #define MODULE_PROC_FAMILY "K7 "
160 - #elif defined CONFIG_MK8
161 - #define MODULE_PROC_FAMILY "K8 "
162 -+#elif defined CONFIG_MK8SSE3
163 -+#define MODULE_PROC_FAMILY "K8SSE3 "
164 -+#elif defined CONFIG_MK10
165 -+#define MODULE_PROC_FAMILY "K10 "
166 -+#elif defined CONFIG_MBARCELONA
167 -+#define MODULE_PROC_FAMILY "BARCELONA "
168 -+#elif defined CONFIG_MBOBCAT
169 -+#define MODULE_PROC_FAMILY "BOBCAT "
170 -+#elif defined CONFIG_MBULLDOZER
171 -+#define MODULE_PROC_FAMILY "BULLDOZER "
172 -+#elif defined CONFIG_MPILEDRIVER
173 -+#define MODULE_PROC_FAMILY "PILEDRIVER "
174 -+#elif defined CONFIG_MSTEAMROLLER
175 -+#define MODULE_PROC_FAMILY "STEAMROLLER "
176 -+#elif defined CONFIG_MJAGUAR
177 -+#define MODULE_PROC_FAMILY "JAGUAR "
178 -+#elif defined CONFIG_MEXCAVATOR
179 -+#define MODULE_PROC_FAMILY "EXCAVATOR "
180 -+#elif defined CONFIG_MZEN
181 -+#define MODULE_PROC_FAMILY "ZEN "
182 -+#elif defined CONFIG_MZEN2
183 -+#define MODULE_PROC_FAMILY "ZEN2 "
184 - #elif defined CONFIG_MELAN
185 - #define MODULE_PROC_FAMILY "ELAN "
186 - #elif defined CONFIG_MCRUSOE
187 ---- a/arch/x86/Kconfig.cpu 2020-06-10 14:21:45.000000000 -0400
188 -+++ b/arch/x86/Kconfig.cpu 2020-06-15 10:44:10.437477053 -0400
189 -@@ -123,6 +123,7 @@ config MPENTIUMM
190 - config MPENTIUM4
191 - bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon"
192 - depends on X86_32
193 -+ select X86_P6_NOP
194 - ---help---
195 - Select this for Intel Pentium 4 chips. This includes the
196 - Pentium 4, Pentium D, P4-based Celeron and Xeon, and
197 -@@ -155,9 +156,8 @@ config MPENTIUM4
198 - -Paxville
199 - -Dempsey
200 -
201 --
202 - config MK6
203 -- bool "K6/K6-II/K6-III"
204 -+ bool "AMD K6/K6-II/K6-III"
205 - depends on X86_32
206 - ---help---
207 - Select this for an AMD K6-family processor. Enables use of
208 -@@ -165,7 +165,7 @@ config MK6
209 - flags to GCC.
210 -
211 - config MK7
212 -- bool "Athlon/Duron/K7"
213 -+ bool "AMD Athlon/Duron/K7"
214 - depends on X86_32
215 - ---help---
216 - Select this for an AMD Athlon K7-family processor. Enables use of
217 -@@ -173,12 +173,90 @@ config MK7
218 - flags to GCC.
219 -
220 - config MK8
221 -- bool "Opteron/Athlon64/Hammer/K8"
222 -+ bool "AMD Opteron/Athlon64/Hammer/K8"
223 - ---help---
224 - Select this for an AMD Opteron or Athlon64 Hammer-family processor.
225 - Enables use of some extended instructions, and passes appropriate
226 - optimization flags to GCC.
227 -
228 -+config MK8SSE3
229 -+ bool "AMD Opteron/Athlon64/Hammer/K8 with SSE3"
230 -+ ---help---
231 -+ Select this for improved AMD Opteron or Athlon64 Hammer-family processors.
232 -+ Enables use of some extended instructions, and passes appropriate
233 -+ optimization flags to GCC.
234 -+
235 -+config MK10
236 -+ bool "AMD 61xx/7x50/PhenomX3/X4/II/K10"
237 -+ ---help---
238 -+ Select this for an AMD 61xx Eight-Core Magny-Cours, Athlon X2 7x50,
239 -+ Phenom X3/X4/II, Athlon II X2/X3/X4, or Turion II-family processor.
240 -+ Enables use of some extended instructions, and passes appropriate
241 -+ optimization flags to GCC.
242 -+
243 -+config MBARCELONA
244 -+ bool "AMD Barcelona"
245 -+ ---help---
246 -+ Select this for AMD Family 10h Barcelona processors.
247 -+
248 -+ Enables -march=barcelona
249 -+
250 -+config MBOBCAT
251 -+ bool "AMD Bobcat"
252 -+ ---help---
253 -+ Select this for AMD Family 14h Bobcat processors.
254 -+
255 -+ Enables -march=btver1
256 -+
257 -+config MJAGUAR
258 -+ bool "AMD Jaguar"
259 -+ ---help---
260 -+ Select this for AMD Family 16h Jaguar processors.
261 -+
262 -+ Enables -march=btver2
263 -+
264 -+config MBULLDOZER
265 -+ bool "AMD Bulldozer"
266 -+ ---help---
267 -+ Select this for AMD Family 15h Bulldozer processors.
268 -+
269 -+ Enables -march=bdver1
270 -+
271 -+config MPILEDRIVER
272 -+ bool "AMD Piledriver"
273 -+ ---help---
274 -+ Select this for AMD Family 15h Piledriver processors.
275 -+
276 -+ Enables -march=bdver2
277 -+
278 -+config MSTEAMROLLER
279 -+ bool "AMD Steamroller"
280 -+ ---help---
281 -+ Select this for AMD Family 15h Steamroller processors.
282 -+
283 -+ Enables -march=bdver3
284 -+
285 -+config MEXCAVATOR
286 -+ bool "AMD Excavator"
287 -+ ---help---
288 -+ Select this for AMD Family 15h Excavator processors.
289 -+
290 -+ Enables -march=bdver4
291 -+
292 -+config MZEN
293 -+ bool "AMD Zen"
294 -+ ---help---
295 -+ Select this for AMD Family 17h Zen processors.
296 -+
297 -+ Enables -march=znver1
298 -+
299 -+config MZEN2
300 -+ bool "AMD Zen 2"
301 -+ ---help---
302 -+ Select this for AMD Family 17h Zen 2 processors.
303 -+
304 -+ Enables -march=znver2
305 -+
306 - config MCRUSOE
307 - bool "Crusoe"
308 - depends on X86_32
309 -@@ -260,6 +338,7 @@ config MVIAC7
310 -
311 - config MPSC
312 - bool "Intel P4 / older Netburst based Xeon"
313 -+ select X86_P6_NOP
314 - depends on X86_64
315 - ---help---
316 - Optimize for Intel Pentium 4, Pentium D and older Nocona/Dempsey
317 -@@ -269,8 +348,19 @@ config MPSC
318 - using the cpu family field
319 - in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one.
320 -
321 -+config MATOM
322 -+ bool "Intel Atom"
323 -+ select X86_P6_NOP
324 -+ ---help---
325 -+
326 -+ Select this for the Intel Atom platform. Intel Atom CPUs have an
327 -+ in-order pipelining architecture and thus can benefit from
328 -+ accordingly optimized code. Use a recent GCC with specific Atom
329 -+ support in order to fully benefit from selecting this option.
330 -+
331 - config MCORE2
332 -- bool "Core 2/newer Xeon"
333 -+ bool "Intel Core 2"
334 -+ select X86_P6_NOP
335 - ---help---
336 -
337 - Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and
338 -@@ -278,14 +368,133 @@ config MCORE2
339 - family in /proc/cpuinfo. Newer ones have 6 and older ones 15
340 - (not a typo)
341 -
342 --config MATOM
343 -- bool "Intel Atom"
344 -+ Enables -march=core2
345 -+
346 -+config MNEHALEM
347 -+ bool "Intel Nehalem"
348 -+ select X86_P6_NOP
349 - ---help---
350 -
351 -- Select this for the Intel Atom platform. Intel Atom CPUs have an
352 -- in-order pipelining architecture and thus can benefit from
353 -- accordingly optimized code. Use a recent GCC with specific Atom
354 -- support in order to fully benefit from selecting this option.
355 -+ Select this for 1st Gen Core processors in the Nehalem family.
356 -+
357 -+ Enables -march=nehalem
358 -+
359 -+config MWESTMERE
360 -+ bool "Intel Westmere"
361 -+ select X86_P6_NOP
362 -+ ---help---
363 -+
364 -+ Select this for the Intel Westmere formerly Nehalem-C family.
365 -+
366 -+ Enables -march=westmere
367 -+
368 -+config MSILVERMONT
369 -+ bool "Intel Silvermont"
370 -+ select X86_P6_NOP
371 -+ ---help---
372 -+
373 -+ Select this for the Intel Silvermont platform.
374 -+
375 -+ Enables -march=silvermont
376 -+
377 -+config MGOLDMONT
378 -+ bool "Intel Goldmont"
379 -+ select X86_P6_NOP
380 -+ ---help---
381 -+
382 -+ Select this for the Intel Goldmont platform including Apollo Lake and Denverton.
383 -+
384 -+ Enables -march=goldmont
385 -+
386 -+config MGOLDMONTPLUS
387 -+ bool "Intel Goldmont Plus"
388 -+ select X86_P6_NOP
389 -+ ---help---
390 -+
391 -+ Select this for the Intel Goldmont Plus platform including Gemini Lake.
392 -+
393 -+ Enables -march=goldmont-plus
394 -+
395 -+config MSANDYBRIDGE
396 -+ bool "Intel Sandy Bridge"
397 -+ select X86_P6_NOP
398 -+ ---help---
399 -+
400 -+ Select this for 2nd Gen Core processors in the Sandy Bridge family.
401 -+
402 -+ Enables -march=sandybridge
403 -+
404 -+config MIVYBRIDGE
405 -+ bool "Intel Ivy Bridge"
406 -+ select X86_P6_NOP
407 -+ ---help---
408 -+
409 -+ Select this for 3rd Gen Core processors in the Ivy Bridge family.
410 -+
411 -+ Enables -march=ivybridge
412 -+
413 -+config MHASWELL
414 -+ bool "Intel Haswell"
415 -+ select X86_P6_NOP
416 -+ ---help---
417 -+
418 -+ Select this for 4th Gen Core processors in the Haswell family.
419 -+
420 -+ Enables -march=haswell
421 -+
422 -+config MBROADWELL
423 -+ bool "Intel Broadwell"
424 -+ select X86_P6_NOP
425 -+ ---help---
426 -+
427 -+ Select this for 5th Gen Core processors in the Broadwell family.
428 -+
429 -+ Enables -march=broadwell
430 -+
431 -+config MSKYLAKE
432 -+ bool "Intel Skylake"
433 -+ select X86_P6_NOP
434 -+ ---help---
435 -+
436 -+ Select this for 6th Gen Core processors in the Skylake family.
437 -+
438 -+ Enables -march=skylake
439 -+
440 -+config MSKYLAKEX
441 -+ bool "Intel Skylake X"
442 -+ select X86_P6_NOP
443 -+ ---help---
444 -+
445 -+ Select this for 6th Gen Core processors in the Skylake X family.
446 -+
447 -+ Enables -march=skylake-avx512
448 -+
449 -+config MCANNONLAKE
450 -+ bool "Intel Cannon Lake"
451 -+ select X86_P6_NOP
452 -+ ---help---
453 -+
454 -+ Select this for 8th Gen Core processors
455 -+
456 -+ Enables -march=cannonlake
457 -+
458 -+config MICELAKE
459 -+ bool "Intel Ice Lake"
460 -+ select X86_P6_NOP
461 -+ ---help---
462 -+
463 -+ Select this for 10th Gen Core processors in the Ice Lake family.
464 -+
465 -+ Enables -march=icelake-client
466 -+
467 -+config MCASCADELAKE
468 -+ bool "Intel Cascade Lake"
469 -+ select X86_P6_NOP
470 -+ ---help---
471 -+
472 -+ Select this for Xeon processors in the Cascade Lake family.
473 -+
474 -+ Enables -march=cascadelake
475 -
476 - config GENERIC_CPU
477 - bool "Generic-x86-64"
478 -@@ -294,6 +503,19 @@ config GENERIC_CPU
479 - Generic x86-64 CPU.
480 - Run equally well on all x86-64 CPUs.
481 -
482 -+config MNATIVE
483 -+ bool "Native optimizations autodetected by GCC"
484 -+ ---help---
485 -+
486 -+ GCC 4.2 and above support -march=native, which automatically detects
487 -+ the optimum settings to use based on your processor. -march=native
488 -+ also detects and applies additional settings beyond -march specific
489 -+ to your CPU, (eg. -msse4). Unless you have a specific reason not to
490 -+ (e.g. distcc cross-compiling), you should probably be using
491 -+ -march=native rather than anything listed below.
492 -+
493 -+ Enables -march=native
494 -+
495 - endchoice
496 -
497 - config X86_GENERIC
498 -@@ -318,7 +540,7 @@ config X86_INTERNODE_CACHE_SHIFT
499 - config X86_L1_CACHE_SHIFT
500 - int
501 - default "7" if MPENTIUM4 || MPSC
502 -- default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU
503 -+ default "6" if MK7 || MK8 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MJAGUAR || MPENTIUMM || MCORE2 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MNATIVE || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU
504 - default "4" if MELAN || M486SX || M486 || MGEODEGX1
505 - default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX
506 -
507 -@@ -336,35 +558,36 @@ config X86_ALIGNMENT_16
508 -
509 - config X86_INTEL_USERCOPY
510 - def_bool y
511 -- depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2
512 -+ depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK8SSE3 || MK7 || MEFFICEON || MCORE2 || MK10 || MBARCELONA || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MNATIVE
513 -
514 - config X86_USE_PPRO_CHECKSUM
515 - def_bool y
516 -- depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MATOM
517 -+ depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MK10 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MK8SSE3 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MATOM || MNATIVE
518 -
519 - config X86_USE_3DNOW
520 - def_bool y
521 - depends on (MCYRIXIII || MK7 || MGEODE_LX) && !UML
522 -
523 --#
524 --# P6_NOPs are a relatively minor optimization that require a family >=
525 --# 6 processor, except that it is broken on certain VIA chips.
526 --# Furthermore, AMD chips prefer a totally different sequence of NOPs
527 --# (which work on all CPUs). In addition, it looks like Virtual PC
528 --# does not understand them.
529 --#
530 --# As a result, disallow these if we're not compiling for X86_64 (these
531 --# NOPs do work on all x86-64 capable chips); the list of processors in
532 --# the right-hand clause are the cores that benefit from this optimization.
533 --#
534 - config X86_P6_NOP
535 -- def_bool y
536 -- depends on X86_64
537 -- depends on (MCORE2 || MPENTIUM4 || MPSC)
538 -+ default n
539 -+ bool "Support for P6_NOPs on Intel chips"
540 -+ depends on (MCORE2 || MPENTIUM4 || MPSC || MATOM || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MNATIVE)
541 -+ ---help---
542 -+ P6_NOPs are a relatively minor optimization that require a family >=
543 -+ 6 processor, except that it is broken on certain VIA chips.
544 -+ Furthermore, AMD chips prefer a totally different sequence of NOPs
545 -+ (which work on all CPUs). In addition, it looks like Virtual PC
546 -+ does not understand them.
547 -+
548 -+ As a result, disallow these if we're not compiling for X86_64 (these
549 -+ NOPs do work on all x86-64 capable chips); the list of processors in
550 -+ the right-hand clause are the cores that benefit from this optimization.
551 -+
552 -+ Say Y if you have Intel CPU newer than Pentium Pro, N otherwise.
553 -
554 - config X86_TSC
555 - def_bool y
556 -- 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
557 -+ depends on (MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MK8SSE3 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MNATIVE || MATOM) || X86_64
558 -
559 - config X86_CMPXCHG64
560 - def_bool y
561 -@@ -374,7 +597,7 @@ config X86_CMPXCHG64
562 - # generates cmov.
563 - config X86_CMOV
564 - def_bool y
565 -- depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)
566 -+ depends on (MK8 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT || MBULLDOZER || MPILEDRIVER || MSTEAMROLLER || MEXCAVATOR || MZEN || MZEN2 || MJAGUAR || MK7 || MCORE2 || MNEHALEM || MWESTMERE || MSILVERMONT || MGOLDMONT || MGOLDMONTPLUS || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || MBROADWELL || MSKYLAKE || MSKYLAKEX || MCANNONLAKE || MICELAKE || MCASCADELAKE || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MNATIVE || MATOM || MGEODE_LX)
567 -
568 - config X86_MINIMUM_CPU_FAMILY
569 - int
570 ---- a/arch/x86/Makefile 2020-06-10 14:21:45.000000000 -0400
571 -+++ b/arch/x86/Makefile 2020-06-15 10:44:35.608035680 -0400
572 -@@ -119,13 +119,56 @@ else
573 - KBUILD_CFLAGS += $(call cc-option,-mskip-rax-setup)
574 -
575 - # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu)
576 -+ cflags-$(CONFIG_MNATIVE) += $(call cc-option,-march=native)
577 - cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
578 -+ cflags-$(CONFIG_MK8SSE3) += $(call cc-option,-march=k8-sse3,-mtune=k8)
579 -+ cflags-$(CONFIG_MK10) += $(call cc-option,-march=amdfam10)
580 -+ cflags-$(CONFIG_MBARCELONA) += $(call cc-option,-march=barcelona)
581 -+ cflags-$(CONFIG_MBOBCAT) += $(call cc-option,-march=btver1)
582 -+ cflags-$(CONFIG_MJAGUAR) += $(call cc-option,-march=btver2)
583 -+ cflags-$(CONFIG_MBULLDOZER) += $(call cc-option,-march=bdver1)
584 -+ cflags-$(CONFIG_MPILEDRIVER) += $(call cc-option,-march=bdver2)
585 -+ cflags-$(CONFIG_MPILEDRIVER) += $(call cc-option,-mno-tbm)
586 -+ cflags-$(CONFIG_MSTEAMROLLER) += $(call cc-option,-march=bdver3)
587 -+ cflags-$(CONFIG_MSTEAMROLLER) += $(call cc-option,-mno-tbm)
588 -+ cflags-$(CONFIG_MEXCAVATOR) += $(call cc-option,-march=bdver4)
589 -+ cflags-$(CONFIG_MEXCAVATOR) += $(call cc-option,-mno-tbm)
590 -+ cflags-$(CONFIG_MZEN) += $(call cc-option,-march=znver1)
591 -+ cflags-$(CONFIG_MZEN2) += $(call cc-option,-march=znver2)
592 - cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
593 -
594 - cflags-$(CONFIG_MCORE2) += \
595 -- $(call cc-option,-march=core2,$(call cc-option,-mtune=generic))
596 -- cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom) \
597 -- $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
598 -+ $(call cc-option,-march=core2,$(call cc-option,-mtune=core2))
599 -+ cflags-$(CONFIG_MNEHALEM) += \
600 -+ $(call cc-option,-march=nehalem,$(call cc-option,-mtune=nehalem))
601 -+ cflags-$(CONFIG_MWESTMERE) += \
602 -+ $(call cc-option,-march=westmere,$(call cc-option,-mtune=westmere))
603 -+ cflags-$(CONFIG_MSILVERMONT) += \
604 -+ $(call cc-option,-march=silvermont,$(call cc-option,-mtune=silvermont))
605 -+ cflags-$(CONFIG_MGOLDMONT) += \
606 -+ $(call cc-option,-march=goldmont,$(call cc-option,-mtune=goldmont))
607 -+ cflags-$(CONFIG_MGOLDMONTPLUS) += \
608 -+ $(call cc-option,-march=goldmont-plus,$(call cc-option,-mtune=goldmont-plus))
609 -+ cflags-$(CONFIG_MSANDYBRIDGE) += \
610 -+ $(call cc-option,-march=sandybridge,$(call cc-option,-mtune=sandybridge))
611 -+ cflags-$(CONFIG_MIVYBRIDGE) += \
612 -+ $(call cc-option,-march=ivybridge,$(call cc-option,-mtune=ivybridge))
613 -+ cflags-$(CONFIG_MHASWELL) += \
614 -+ $(call cc-option,-march=haswell,$(call cc-option,-mtune=haswell))
615 -+ cflags-$(CONFIG_MBROADWELL) += \
616 -+ $(call cc-option,-march=broadwell,$(call cc-option,-mtune=broadwell))
617 -+ cflags-$(CONFIG_MSKYLAKE) += \
618 -+ $(call cc-option,-march=skylake,$(call cc-option,-mtune=skylake))
619 -+ cflags-$(CONFIG_MSKYLAKEX) += \
620 -+ $(call cc-option,-march=skylake-avx512,$(call cc-option,-mtune=skylake-avx512))
621 -+ cflags-$(CONFIG_MCANNONLAKE) += \
622 -+ $(call cc-option,-march=cannonlake,$(call cc-option,-mtune=cannonlake))
623 -+ cflags-$(CONFIG_MICELAKE) += \
624 -+ $(call cc-option,-march=icelake-client,$(call cc-option,-mtune=icelake-client))
625 -+ cflags-$(CONFIG_MCASCADELAKE) += \
626 -+ $(call cc-option,-march=cascadelake,$(call cc-option,-mtune=cascadelake))
627 -+ cflags-$(CONFIG_MATOM) += $(call cc-option,-march=bonnell) \
628 -+ $(call cc-option,-mtune=bonnell,$(call cc-option,-mtune=generic))
629 - cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic)
630 - KBUILD_CFLAGS += $(cflags-y)
631 -
632 ---- a/arch/x86/Makefile_32.cpu 2020-06-10 14:21:45.000000000 -0400
633 -+++ b/arch/x86/Makefile_32.cpu 2020-06-15 10:44:10.437477053 -0400
634 -@@ -24,7 +24,19 @@ cflags-$(CONFIG_MK6) += -march=k6
635 - # Please note, that patches that add -march=athlon-xp and friends are pointless.
636 - # They make zero difference whatsosever to performance at this time.
637 - cflags-$(CONFIG_MK7) += -march=athlon
638 -+cflags-$(CONFIG_MNATIVE) += $(call cc-option,-march=native)
639 - cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8,-march=athlon)
640 -+cflags-$(CONFIG_MK8SSE3) += $(call cc-option,-march=k8-sse3,-march=athlon)
641 -+cflags-$(CONFIG_MK10) += $(call cc-option,-march=amdfam10,-march=athlon)
642 -+cflags-$(CONFIG_MBARCELONA) += $(call cc-option,-march=barcelona,-march=athlon)
643 -+cflags-$(CONFIG_MBOBCAT) += $(call cc-option,-march=btver1,-march=athlon)
644 -+cflags-$(CONFIG_MJAGUAR) += $(call cc-option,-march=btver2,-march=athlon)
645 -+cflags-$(CONFIG_MBULLDOZER) += $(call cc-option,-march=bdver1,-march=athlon)
646 -+cflags-$(CONFIG_MPILEDRIVER) += $(call cc-option,-march=bdver2,-march=athlon)
647 -+cflags-$(CONFIG_MSTEAMROLLER) += $(call cc-option,-march=bdver3,-march=athlon)
648 -+cflags-$(CONFIG_MEXCAVATOR) += $(call cc-option,-march=bdver4,-march=athlon)
649 -+cflags-$(CONFIG_MZEN) += $(call cc-option,-march=znver1,-march=athlon)
650 -+cflags-$(CONFIG_MZEN2) += $(call cc-option,-march=znver2,-march=athlon)
651 - cflags-$(CONFIG_MCRUSOE) += -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0
652 - cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call tune,pentium3) -falign-functions=0 -falign-jumps=0 -falign-loops=0
653 - cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=winchip-c6,-march=i586)
654 -@@ -33,8 +45,22 @@ cflags-$(CONFIG_MCYRIXIII) += $(call cc-
655 - cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686)
656 - cflags-$(CONFIG_MVIAC7) += -march=i686
657 - cflags-$(CONFIG_MCORE2) += -march=i686 $(call tune,core2)
658 --cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom,$(call cc-option,-march=core2,-march=i686)) \
659 -- $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
660 -+cflags-$(CONFIG_MNEHALEM) += -march=i686 $(call tune,nehalem)
661 -+cflags-$(CONFIG_MWESTMERE) += -march=i686 $(call tune,westmere)
662 -+cflags-$(CONFIG_MSILVERMONT) += -march=i686 $(call tune,silvermont)
663 -+cflags-$(CONFIG_MGOLDMONT) += -march=i686 $(call tune,goldmont)
664 -+cflags-$(CONFIG_MGOLDMONTPLUS) += -march=i686 $(call tune,goldmont-plus)
665 -+cflags-$(CONFIG_MSANDYBRIDGE) += -march=i686 $(call tune,sandybridge)
666 -+cflags-$(CONFIG_MIVYBRIDGE) += -march=i686 $(call tune,ivybridge)
667 -+cflags-$(CONFIG_MHASWELL) += -march=i686 $(call tune,haswell)
668 -+cflags-$(CONFIG_MBROADWELL) += -march=i686 $(call tune,broadwell)
669 -+cflags-$(CONFIG_MSKYLAKE) += -march=i686 $(call tune,skylake)
670 -+cflags-$(CONFIG_MSKYLAKEX) += -march=i686 $(call tune,skylake-avx512)
671 -+cflags-$(CONFIG_MCANNONLAKE) += -march=i686 $(call tune,cannonlake)
672 -+cflags-$(CONFIG_MICELAKE) += -march=i686 $(call tune,icelake-client)
673 -+cflags-$(CONFIG_MCASCADELAKE) += -march=i686 $(call tune,cascadelake)
674 -+cflags-$(CONFIG_MATOM) += $(call cc-option,-march=bonnell,$(call cc-option,-march=core2,-march=i686)) \
675 -+ $(call cc-option,-mtune=bonnell,$(call cc-option,-mtune=generic))
676 -
677 - # AMD Elan support
678 - cflags-$(CONFIG_MELAN) += -march=i486