Gentoo Archives: gentoo-commits

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