1 |
commit: 149451916045d65e0f2e6944027ab2a23825630c |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 25 17:48:25 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 25 17:48:25 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=14945191 |
7 |
|
8 |
Genpatches Updates |
9 |
|
10 |
Patch to enable link security restrictions by default. |
11 |
Support for namespace user.pax.* on tmpfs |
12 |
Enable link security restrictions by default. |
13 |
Bluetooth: Check key sizes only when Secure Simple Pairing |
14 |
is enabled. See bug #686758 |
15 |
tmp513 requies REGMAP_I2C to build. Select it by default in |
16 |
Kconfig. See bug #710790. Thanks to Phil Stracchino |
17 |
sign-file: full functionality with modern LibreSSL |
18 |
Add Gentoo Linux support config settings and defaults. |
19 |
|
20 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
21 |
|
22 |
0000_README | 25 + |
23 |
1500_XATTR_USER_PREFIX.patch | 67 ++ |
24 |
...ble-link-security-restrictions-by-default.patch | 20 + |
25 |
...zes-only-if-Secure-Simple-Pairing-enabled.patch | 37 ++ |
26 |
...3-Fix-build-issue-by-selecting-CONFIG_REG.patch | 30 + |
27 |
2920_sign-file-patch-for-libressl.patch | 16 + |
28 |
5010_enable-cpu-optimizations-universal.patch | 684 +++++++++++++++++++++ |
29 |
7 files changed, 879 insertions(+) |
30 |
|
31 |
diff --git a/0000_README b/0000_README |
32 |
index 9018993..2bffadc 100644 |
33 |
--- a/0000_README |
34 |
+++ b/0000_README |
35 |
@@ -43,6 +43,31 @@ EXPERIMENTAL |
36 |
Individual Patch Descriptions: |
37 |
-------------------------------------------------------------------------- |
38 |
|
39 |
+Patch: 1500_XATTR_USER_PREFIX.patch |
40 |
+From: https://bugs.gentoo.org/show_bug.cgi?id=470644 |
41 |
+Desc: Support for namespace user.pax.* on tmpfs. |
42 |
+ |
43 |
+Patch: 1510_fs-enable-link-security-restrictions-by-default.patch |
44 |
+From: http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/ |
45 |
+Desc: Enable link security restrictions by default. |
46 |
+ |
47 |
+Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch |
48 |
+From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-marcel@××××××××.org/raw |
49 |
+Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758 |
50 |
+ |
51 |
+Patch: 2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch |
52 |
+From: https://bugs.gentoo.org/710790 |
53 |
+Desc: tmp513 requies REGMAP_I2C to build. Select it by default in Kconfig. See bug #710790. Thanks to Phil Stracchino |
54 |
+ |
55 |
+Patch: 2920_sign-file-patch-for-libressl.patch |
56 |
+From: https://bugs.gentoo.org/717166 |
57 |
+Desc: sign-file: full functionality with modern LibreSSL |
58 |
+ |
59 |
Patch: 4567_distro-Gentoo-Kconfig.patch |
60 |
From: Tom Wijsman <TomWij@g.o> |
61 |
Desc: Add Gentoo Linux support config settings and defaults. |
62 |
+ |
63 |
+Patch: 5010_enable-cpu-optimizations-universal.patch |
64 |
+From: https://github.com/graysky2/kernel_gcc_patch/ |
65 |
+Desc: Kernel >= 5.8 patch enables gcc = v9+ optimizations for additional CPUs. |
66 |
+ |
67 |
|
68 |
diff --git a/1500_XATTR_USER_PREFIX.patch b/1500_XATTR_USER_PREFIX.patch |
69 |
new file mode 100644 |
70 |
index 0000000..245dcc2 |
71 |
--- /dev/null |
72 |
+++ b/1500_XATTR_USER_PREFIX.patch |
73 |
@@ -0,0 +1,67 @@ |
74 |
+From: Anthony G. Basile <blueness@g.o> |
75 |
+ |
76 |
+This patch adds support for a restricted user-controlled namespace on |
77 |
+tmpfs filesystem used to house PaX flags. The namespace must be of the |
78 |
+form user.pax.* and its value cannot exceed a size of 8 bytes. |
79 |
+ |
80 |
+This is needed even on all Gentoo systems so that XATTR_PAX flags |
81 |
+are preserved for users who might build packages using portage on |
82 |
+a tmpfs system with a non-hardened kernel and then switch to a |
83 |
+hardened kernel with XATTR_PAX enabled. |
84 |
+ |
85 |
+The namespace is added to any user with Extended Attribute support |
86 |
+enabled for tmpfs. Users who do not enable xattrs will not have |
87 |
+the XATTR_PAX flags preserved. |
88 |
+ |
89 |
+diff --git a/include/uapi/linux/xattr.h b/include/uapi/linux/xattr.h |
90 |
+index 1590c49..5eab462 100644 |
91 |
+--- a/include/uapi/linux/xattr.h |
92 |
++++ b/include/uapi/linux/xattr.h |
93 |
+@@ -73,5 +73,9 @@ |
94 |
+ #define XATTR_POSIX_ACL_DEFAULT "posix_acl_default" |
95 |
+ #define XATTR_NAME_POSIX_ACL_DEFAULT XATTR_SYSTEM_PREFIX XATTR_POSIX_ACL_DEFAULT |
96 |
+ |
97 |
++/* User namespace */ |
98 |
++#define XATTR_PAX_PREFIX XATTR_USER_PREFIX "pax." |
99 |
++#define XATTR_PAX_FLAGS_SUFFIX "flags" |
100 |
++#define XATTR_NAME_PAX_FLAGS XATTR_PAX_PREFIX XATTR_PAX_FLAGS_SUFFIX |
101 |
+ |
102 |
+ #endif /* _UAPI_LINUX_XATTR_H */ |
103 |
+--- a/mm/shmem.c 2020-05-04 15:30:27.042035334 -0400 |
104 |
++++ b/mm/shmem.c 2020-05-04 15:34:57.013881725 -0400 |
105 |
+@@ -3238,6 +3238,14 @@ static int shmem_xattr_handler_set(const |
106 |
+ struct shmem_inode_info *info = SHMEM_I(inode); |
107 |
+ |
108 |
+ name = xattr_full_name(handler, name); |
109 |
++ |
110 |
++ if (!strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)) { |
111 |
++ if (strcmp(name, XATTR_NAME_PAX_FLAGS)) |
112 |
++ return -EOPNOTSUPP; |
113 |
++ if (size > 8) |
114 |
++ return -EINVAL; |
115 |
++ } |
116 |
++ |
117 |
+ return simple_xattr_set(&info->xattrs, name, value, size, flags, NULL); |
118 |
+ } |
119 |
+ |
120 |
+@@ -3253,6 +3261,12 @@ static const struct xattr_handler shmem_ |
121 |
+ .set = shmem_xattr_handler_set, |
122 |
+ }; |
123 |
+ |
124 |
++static const struct xattr_handler shmem_user_xattr_handler = { |
125 |
++ .prefix = XATTR_USER_PREFIX, |
126 |
++ .get = shmem_xattr_handler_get, |
127 |
++ .set = shmem_xattr_handler_set, |
128 |
++}; |
129 |
++ |
130 |
+ static const struct xattr_handler *shmem_xattr_handlers[] = { |
131 |
+ #ifdef CONFIG_TMPFS_POSIX_ACL |
132 |
+ &posix_acl_access_xattr_handler, |
133 |
+@@ -3260,6 +3274,7 @@ static const struct xattr_handler *shmem |
134 |
+ #endif |
135 |
+ &shmem_security_xattr_handler, |
136 |
+ &shmem_trusted_xattr_handler, |
137 |
++ &shmem_user_xattr_handler, |
138 |
+ NULL |
139 |
+ }; |
140 |
+ |
141 |
|
142 |
diff --git a/1510_fs-enable-link-security-restrictions-by-default.patch b/1510_fs-enable-link-security-restrictions-by-default.patch |
143 |
new file mode 100644 |
144 |
index 0000000..f0ed144 |
145 |
--- /dev/null |
146 |
+++ b/1510_fs-enable-link-security-restrictions-by-default.patch |
147 |
@@ -0,0 +1,20 @@ |
148 |
+From: Ben Hutchings <ben@××××××××××××.uk> |
149 |
+Subject: fs: Enable link security restrictions by default |
150 |
+Date: Fri, 02 Nov 2012 05:32:06 +0000 |
151 |
+Bug-Debian: https://bugs.debian.org/609455 |
152 |
+Forwarded: not-needed |
153 |
+This reverts commit 561ec64ae67ef25cac8d72bb9c4bfc955edfd415 |
154 |
+('VFS: don't do protected {sym,hard}links by default'). |
155 |
+--- a/fs/namei.c 2018-09-28 07:56:07.770005006 -0400 |
156 |
++++ b/fs/namei.c 2018-09-28 07:56:43.370349204 -0400 |
157 |
+@@ -885,8 +885,8 @@ static inline void put_link(struct namei |
158 |
+ path_put(&last->link); |
159 |
+ } |
160 |
+ |
161 |
+-int sysctl_protected_symlinks __read_mostly = 0; |
162 |
+-int sysctl_protected_hardlinks __read_mostly = 0; |
163 |
++int sysctl_protected_symlinks __read_mostly = 1; |
164 |
++int sysctl_protected_hardlinks __read_mostly = 1; |
165 |
+ int sysctl_protected_fifos __read_mostly; |
166 |
+ int sysctl_protected_regular __read_mostly; |
167 |
+ |
168 |
|
169 |
diff --git a/2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch b/2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch |
170 |
new file mode 100644 |
171 |
index 0000000..394ad48 |
172 |
--- /dev/null |
173 |
+++ b/2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch |
174 |
@@ -0,0 +1,37 @@ |
175 |
+The encryption is only mandatory to be enforced when both sides are using |
176 |
+Secure Simple Pairing and this means the key size check makes only sense |
177 |
+in that case. |
178 |
+ |
179 |
+On legacy Bluetooth 2.0 and earlier devices like mice the encryption was |
180 |
+optional and thus causing an issue if the key size check is not bound to |
181 |
+using Secure Simple Pairing. |
182 |
+ |
183 |
+Fixes: d5bb334a8e17 ("Bluetooth: Align minimum encryption key size for LE and BR/EDR connections") |
184 |
+Signed-off-by: Marcel Holtmann <marcel@××××××××.org> |
185 |
+Cc: stable@×××××××××××.org |
186 |
+--- |
187 |
+ net/bluetooth/hci_conn.c | 9 +++++++-- |
188 |
+ 1 file changed, 7 insertions(+), 2 deletions(-) |
189 |
+ |
190 |
+diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c |
191 |
+index 3cf0764d5793..7516cdde3373 100644 |
192 |
+--- a/net/bluetooth/hci_conn.c |
193 |
++++ b/net/bluetooth/hci_conn.c |
194 |
+@@ -1272,8 +1272,13 @@ int hci_conn_check_link_mode(struct hci_conn *conn) |
195 |
+ return 0; |
196 |
+ } |
197 |
+ |
198 |
+- if (hci_conn_ssp_enabled(conn) && |
199 |
+- !test_bit(HCI_CONN_ENCRYPT, &conn->flags)) |
200 |
++ /* If Secure Simple Pairing is not enabled, then legacy connection |
201 |
++ * setup is used and no encryption or key sizes can be enforced. |
202 |
++ */ |
203 |
++ if (!hci_conn_ssp_enabled(conn)) |
204 |
++ return 1; |
205 |
++ |
206 |
++ if (!test_bit(HCI_CONN_ENCRYPT, &conn->flags)) |
207 |
+ return 0; |
208 |
+ |
209 |
+ /* The minimum encryption key size needs to be enforced by the |
210 |
+-- |
211 |
+2.20.1 |
212 |
|
213 |
diff --git a/2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch b/2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch |
214 |
new file mode 100644 |
215 |
index 0000000..4335685 |
216 |
--- /dev/null |
217 |
+++ b/2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch |
218 |
@@ -0,0 +1,30 @@ |
219 |
+From dc328d75a6f37f4ff11a81ae16b1ec88c3197640 Mon Sep 17 00:00:00 2001 |
220 |
+From: Mike Pagano <mpagano@g.o> |
221 |
+Date: Mon, 23 Mar 2020 08:20:06 -0400 |
222 |
+Subject: [PATCH 1/1] This driver requires REGMAP_I2C to build. Select it by |
223 |
+ default in Kconfig. Reported at gentoo bugzilla: |
224 |
+ https://bugs.gentoo.org/710790 |
225 |
+Cc: mpagano@g.o |
226 |
+ |
227 |
+Reported-by: Phil Stracchino <phils@××××××××××.net> |
228 |
+ |
229 |
+Signed-off-by: Mike Pagano <mpagano@g.o> |
230 |
+--- |
231 |
+ drivers/hwmon/Kconfig | 1 + |
232 |
+ 1 file changed, 1 insertion(+) |
233 |
+ |
234 |
+diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig |
235 |
+index 47ac20aee06f..530b4f29ba85 100644 |
236 |
+--- a/drivers/hwmon/Kconfig |
237 |
++++ b/drivers/hwmon/Kconfig |
238 |
+@@ -1769,6 +1769,7 @@ config SENSORS_TMP421 |
239 |
+ config SENSORS_TMP513 |
240 |
+ tristate "Texas Instruments TMP513 and compatibles" |
241 |
+ depends on I2C |
242 |
++ select REGMAP_I2C |
243 |
+ help |
244 |
+ If you say yes here you get support for Texas Instruments TMP512, |
245 |
+ and TMP513 temperature and power supply sensor chips. |
246 |
+-- |
247 |
+2.24.1 |
248 |
+ |
249 |
|
250 |
diff --git a/2920_sign-file-patch-for-libressl.patch b/2920_sign-file-patch-for-libressl.patch |
251 |
new file mode 100644 |
252 |
index 0000000..e6ec017 |
253 |
--- /dev/null |
254 |
+++ b/2920_sign-file-patch-for-libressl.patch |
255 |
@@ -0,0 +1,16 @@ |
256 |
+--- a/scripts/sign-file.c 2020-05-20 18:47:21.282820662 -0400 |
257 |
++++ b/scripts/sign-file.c 2020-05-20 18:48:37.991081899 -0400 |
258 |
+@@ -41,9 +41,10 @@ |
259 |
+ * signing with anything other than SHA1 - so we're stuck with that if such is |
260 |
+ * the case. |
261 |
+ */ |
262 |
+-#if defined(LIBRESSL_VERSION_NUMBER) || \ |
263 |
+- OPENSSL_VERSION_NUMBER < 0x10000000L || \ |
264 |
+- defined(OPENSSL_NO_CMS) |
265 |
++#if defined(OPENSSL_NO_CMS) || \ |
266 |
++ ( defined(LIBRESSL_VERSION_NUMBER) \ |
267 |
++ && (LIBRESSL_VERSION_NUMBER < 0x3010000fL) ) || \ |
268 |
++ OPENSSL_VERSION_NUMBER < 0x10000000L |
269 |
+ #define USE_PKCS7 |
270 |
+ #endif |
271 |
+ #ifndef USE_PKCS7 |
272 |
|
273 |
diff --git a/5010_enable-cpu-optimizations-universal.patch b/5010_enable-cpu-optimizations-universal.patch |
274 |
new file mode 100644 |
275 |
index 0000000..1868f23 |
276 |
--- /dev/null |
277 |
+++ b/5010_enable-cpu-optimizations-universal.patch |
278 |
@@ -0,0 +1,684 @@ |
279 |
+From 59db769ad69e080c512b3890e1d27d6120f4a1a4 Mon Sep 17 00:00:00 2001 |
280 |
+From: graysky <graysky@×××××××××.us> |
281 |
+Date: Mon, 12 Apr 2021 07:09:27 -0400 |
282 |
+Subject: [PATCH] more uarches for kernel 5.8+ |
283 |
+MIME-Version: 1.0 |
284 |
+Content-Type: text/plain; charset=UTF-8 |
285 |
+Content-Transfer-Encoding: 8bit |
286 |
+ |
287 |
+WARNING |
288 |
+This patch works with all gcc versions 9.0+ and with kernel version 5.8+ and should |
289 |
+NOT be applied when compiling on older versions of gcc due to key name changes |
290 |
+of the march flags introduced with the version 4.9 release of gcc.[1] |
291 |
+ |
292 |
+FEATURES |
293 |
+This patch adds additional CPU options to the Linux kernel accessible under: |
294 |
+ Processor type and features ---> |
295 |
+ Processor family ---> |
296 |
+ |
297 |
+With the release of gcc 11.0, several generic 64-bit levels are offered which |
298 |
+are good for supported Intel or AMD CPUs: |
299 |
+• x86-64-v2 |
300 |
+• x86-64-v3 |
301 |
+• x86-64-v4 |
302 |
+ |
303 |
+Users of glibc 2.33 and above can see which level is supported by current |
304 |
+hardware by running: |
305 |
+ /lib/ld-linux-x86-64.so.2 --help | grep supported |
306 |
+ |
307 |
+Alternatively, compare the flags from /proc/cpuinfo to this list.[2] |
308 |
+ |
309 |
+CPU-specific microarchitectures include: |
310 |
+• AMD Improved K8-family |
311 |
+• AMD K10-family |
312 |
+• AMD Family 10h (Barcelona) |
313 |
+• AMD Family 14h (Bobcat) |
314 |
+• AMD Family 16h (Jaguar) |
315 |
+• AMD Family 15h (Bulldozer) |
316 |
+• AMD Family 15h (Piledriver) |
317 |
+• AMD Family 15h (Steamroller) |
318 |
+• AMD Family 15h (Excavator) |
319 |
+• AMD Family 17h (Zen) |
320 |
+• AMD Family 17h (Zen 2) |
321 |
+• AMD Family 19h (Zen 3)† |
322 |
+• Intel Silvermont low-power processors |
323 |
+• Intel Goldmont low-power processors (Apollo Lake and Denverton) |
324 |
+• Intel Goldmont Plus low-power processors (Gemini Lake) |
325 |
+• Intel 1st Gen Core i3/i5/i7 (Nehalem) |
326 |
+• Intel 1.5 Gen Core i3/i5/i7 (Westmere) |
327 |
+• Intel 2nd Gen Core i3/i5/i7 (Sandybridge) |
328 |
+• Intel 3rd Gen Core i3/i5/i7 (Ivybridge) |
329 |
+• Intel 4th Gen Core i3/i5/i7 (Haswell) |
330 |
+• Intel 5th Gen Core i3/i5/i7 (Broadwell) |
331 |
+• Intel 6th Gen Core i3/i5/i7 (Skylake) |
332 |
+• Intel 6th Gen Core i7/i9 (Skylake X) |
333 |
+• Intel 8th Gen Core i3/i5/i7 (Cannon Lake) |
334 |
+• Intel 10th Gen Core i7/i9 (Ice Lake) |
335 |
+• Intel Xeon (Cascade Lake) |
336 |
+• Intel Xeon (Cooper Lake)* |
337 |
+• Intel 3rd Gen 10nm++ i3/i5/i7/i9-family (Tiger Lake)* |
338 |
+• Intel 3rd Gen 10nm++ Xeon (Sapphire Rapids)‡ |
339 |
+• Intel 11th Gen i3/i5/i7/i9-family (Rocket Lake)‡ |
340 |
+• Intel 12th Gen i3/i5/i7/i9-family (Alder Lake)‡ |
341 |
+ |
342 |
+Notes: If not otherwise noted, gcc >=9.1 is required for support. |
343 |
+ *Requires gcc >=10.1 †Required gcc >=10.3 ‡Required gcc >=11.0 |
344 |
+ |
345 |
+It also offers to compile passing the 'native' option which, "selects the CPU |
346 |
+to generate code for at compilation time by determining the processor type of |
347 |
+the compiling machine. Using -march=native enables all instruction subsets |
348 |
+supported by the local machine and will produce code optimized for the local |
349 |
+machine under the constraints of the selected instruction set."[3] |
350 |
+ |
351 |
+Users of Intel CPUs should select the 'Intel-Native' option and users of AMD |
352 |
+CPUs should select the 'AMD-Native' option. |
353 |
+ |
354 |
+MINOR NOTES RELATING TO INTEL ATOM PROCESSORS |
355 |
+This patch also changes -march=atom to -march=bonnell in accordance with the |
356 |
+gcc v4.9 changes. Upstream is using the deprecated -match=atom flags when I |
357 |
+believe it should use the newer -march=bonnell flag for atom processors.[4] |
358 |
+ |
359 |
+It is not recommended to compile on Atom-CPUs with the 'native' option.[5] The |
360 |
+recommendation is to use the 'atom' option instead. |
361 |
+ |
362 |
+BENEFITS |
363 |
+Small but real speed increases are measurable using a make endpoint comparing |
364 |
+a generic kernel to one built with one of the respective microarchs. |
365 |
+ |
366 |
+See the following experimental evidence supporting this statement: |
367 |
+https://github.com/graysky2/kernel_gcc_patch |
368 |
+ |
369 |
+REQUIREMENTS |
370 |
+linux version >=5.8 |
371 |
+gcc version >=9.0 |
372 |
+ |
373 |
+ACKNOWLEDGMENTS |
374 |
+This patch builds on the seminal work by Jeroen.[6] |
375 |
+ |
376 |
+REFERENCES |
377 |
+1. https://gcc.gnu.org/gcc-4.9/changes.html |
378 |
+2. https://gitlab.com/x86-psABIs/x86-64-ABI/-/commit/77566eb03bc6a326811cb7e9 |
379 |
+3. https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#index-x86-Options |
380 |
+4. https://bugzilla.kernel.org/show_bug.cgi?id=77461 |
381 |
+5. https://github.com/graysky2/kernel_gcc_patch/issues/15 |
382 |
+6. http://www.linuxforge.net/docs/linux/linux-gcc.php |
383 |
+--- |
384 |
+ arch/x86/Kconfig.cpu | 332 ++++++++++++++++++++++++++++++-- |
385 |
+ arch/x86/Makefile | 47 ++++- |
386 |
+ arch/x86/include/asm/vermagic.h | 66 +++++++ |
387 |
+ 3 files changed, 428 insertions(+), 17 deletions(-) |
388 |
+ |
389 |
+diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu |
390 |
+index 814fe0d349b0..872b9cf598e3 100644 |
391 |
+--- a/arch/x86/Kconfig.cpu |
392 |
++++ b/arch/x86/Kconfig.cpu |
393 |
+@@ -157,7 +157,7 @@ config MPENTIUM4 |
394 |
+ |
395 |
+ |
396 |
+ config MK6 |
397 |
+- bool "K6/K6-II/K6-III" |
398 |
++ bool "AMD K6/K6-II/K6-III" |
399 |
+ depends on X86_32 |
400 |
+ help |
401 |
+ Select this for an AMD K6-family processor. Enables use of |
402 |
+@@ -165,7 +165,7 @@ config MK6 |
403 |
+ flags to GCC. |
404 |
+ |
405 |
+ config MK7 |
406 |
+- bool "Athlon/Duron/K7" |
407 |
++ bool "AMD Athlon/Duron/K7" |
408 |
+ depends on X86_32 |
409 |
+ help |
410 |
+ Select this for an AMD Athlon K7-family processor. Enables use of |
411 |
+@@ -173,12 +173,98 @@ config MK7 |
412 |
+ flags to GCC. |
413 |
+ |
414 |
+ config MK8 |
415 |
+- bool "Opteron/Athlon64/Hammer/K8" |
416 |
++ bool "AMD Opteron/Athlon64/Hammer/K8" |
417 |
+ help |
418 |
+ Select this for an AMD Opteron or Athlon64 Hammer-family processor. |
419 |
+ Enables use of some extended instructions, and passes appropriate |
420 |
+ optimization flags to GCC. |
421 |
+ |
422 |
++config MK8SSE3 |
423 |
++ bool "AMD Opteron/Athlon64/Hammer/K8 with SSE3" |
424 |
++ help |
425 |
++ Select this for improved AMD Opteron or Athlon64 Hammer-family processors. |
426 |
++ Enables use of some extended instructions, and passes appropriate |
427 |
++ optimization flags to GCC. |
428 |
++ |
429 |
++config MK10 |
430 |
++ bool "AMD 61xx/7x50/PhenomX3/X4/II/K10" |
431 |
++ help |
432 |
++ Select this for an AMD 61xx Eight-Core Magny-Cours, Athlon X2 7x50, |
433 |
++ Phenom X3/X4/II, Athlon II X2/X3/X4, or Turion II-family processor. |
434 |
++ Enables use of some extended instructions, and passes appropriate |
435 |
++ optimization flags to GCC. |
436 |
++ |
437 |
++config MBARCELONA |
438 |
++ bool "AMD Barcelona" |
439 |
++ help |
440 |
++ Select this for AMD Family 10h Barcelona processors. |
441 |
++ |
442 |
++ Enables -march=barcelona |
443 |
++ |
444 |
++config MBOBCAT |
445 |
++ bool "AMD Bobcat" |
446 |
++ help |
447 |
++ Select this for AMD Family 14h Bobcat processors. |
448 |
++ |
449 |
++ Enables -march=btver1 |
450 |
++ |
451 |
++config MJAGUAR |
452 |
++ bool "AMD Jaguar" |
453 |
++ help |
454 |
++ Select this for AMD Family 16h Jaguar processors. |
455 |
++ |
456 |
++ Enables -march=btver2 |
457 |
++ |
458 |
++config MBULLDOZER |
459 |
++ bool "AMD Bulldozer" |
460 |
++ help |
461 |
++ Select this for AMD Family 15h Bulldozer processors. |
462 |
++ |
463 |
++ Enables -march=bdver1 |
464 |
++ |
465 |
++config MPILEDRIVER |
466 |
++ bool "AMD Piledriver" |
467 |
++ help |
468 |
++ Select this for AMD Family 15h Piledriver processors. |
469 |
++ |
470 |
++ Enables -march=bdver2 |
471 |
++ |
472 |
++config MSTEAMROLLER |
473 |
++ bool "AMD Steamroller" |
474 |
++ help |
475 |
++ Select this for AMD Family 15h Steamroller processors. |
476 |
++ |
477 |
++ Enables -march=bdver3 |
478 |
++ |
479 |
++config MEXCAVATOR |
480 |
++ bool "AMD Excavator" |
481 |
++ help |
482 |
++ Select this for AMD Family 15h Excavator processors. |
483 |
++ |
484 |
++ Enables -march=bdver4 |
485 |
++ |
486 |
++config MZEN |
487 |
++ bool "AMD Zen" |
488 |
++ help |
489 |
++ Select this for AMD Family 17h Zen processors. |
490 |
++ |
491 |
++ Enables -march=znver1 |
492 |
++ |
493 |
++config MZEN2 |
494 |
++ bool "AMD Zen 2" |
495 |
++ help |
496 |
++ Select this for AMD Family 17h Zen 2 processors. |
497 |
++ |
498 |
++ Enables -march=znver2 |
499 |
++ |
500 |
++config MZEN3 |
501 |
++ bool "AMD Zen 3" |
502 |
++ depends on GCC_VERSION > 100300 |
503 |
++ help |
504 |
++ Select this for AMD Family 19h Zen 3 processors. |
505 |
++ |
506 |
++ Enables -march=znver3 |
507 |
++ |
508 |
+ config MCRUSOE |
509 |
+ bool "Crusoe" |
510 |
+ depends on X86_32 |
511 |
+@@ -270,7 +356,7 @@ config MPSC |
512 |
+ in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one. |
513 |
+ |
514 |
+ config MCORE2 |
515 |
+- bool "Core 2/newer Xeon" |
516 |
++ bool "Intel Core 2" |
517 |
+ help |
518 |
+ |
519 |
+ Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and |
520 |
+@@ -278,6 +364,8 @@ config MCORE2 |
521 |
+ family in /proc/cpuinfo. Newer ones have 6 and older ones 15 |
522 |
+ (not a typo) |
523 |
+ |
524 |
++ Enables -march=core2 |
525 |
++ |
526 |
+ config MATOM |
527 |
+ bool "Intel Atom" |
528 |
+ help |
529 |
+@@ -287,6 +375,182 @@ config MATOM |
530 |
+ accordingly optimized code. Use a recent GCC with specific Atom |
531 |
+ support in order to fully benefit from selecting this option. |
532 |
+ |
533 |
++config MNEHALEM |
534 |
++ bool "Intel Nehalem" |
535 |
++ select X86_P6_NOP |
536 |
++ help |
537 |
++ |
538 |
++ Select this for 1st Gen Core processors in the Nehalem family. |
539 |
++ |
540 |
++ Enables -march=nehalem |
541 |
++ |
542 |
++config MWESTMERE |
543 |
++ bool "Intel Westmere" |
544 |
++ select X86_P6_NOP |
545 |
++ help |
546 |
++ |
547 |
++ Select this for the Intel Westmere formerly Nehalem-C family. |
548 |
++ |
549 |
++ Enables -march=westmere |
550 |
++ |
551 |
++config MSILVERMONT |
552 |
++ bool "Intel Silvermont" |
553 |
++ select X86_P6_NOP |
554 |
++ help |
555 |
++ |
556 |
++ Select this for the Intel Silvermont platform. |
557 |
++ |
558 |
++ Enables -march=silvermont |
559 |
++ |
560 |
++config MGOLDMONT |
561 |
++ bool "Intel Goldmont" |
562 |
++ select X86_P6_NOP |
563 |
++ help |
564 |
++ |
565 |
++ Select this for the Intel Goldmont platform including Apollo Lake and Denverton. |
566 |
++ |
567 |
++ Enables -march=goldmont |
568 |
++ |
569 |
++config MGOLDMONTPLUS |
570 |
++ bool "Intel Goldmont Plus" |
571 |
++ select X86_P6_NOP |
572 |
++ help |
573 |
++ |
574 |
++ Select this for the Intel Goldmont Plus platform including Gemini Lake. |
575 |
++ |
576 |
++ Enables -march=goldmont-plus |
577 |
++ |
578 |
++config MSANDYBRIDGE |
579 |
++ bool "Intel Sandy Bridge" |
580 |
++ select X86_P6_NOP |
581 |
++ help |
582 |
++ |
583 |
++ Select this for 2nd Gen Core processors in the Sandy Bridge family. |
584 |
++ |
585 |
++ Enables -march=sandybridge |
586 |
++ |
587 |
++config MIVYBRIDGE |
588 |
++ bool "Intel Ivy Bridge" |
589 |
++ select X86_P6_NOP |
590 |
++ help |
591 |
++ |
592 |
++ Select this for 3rd Gen Core processors in the Ivy Bridge family. |
593 |
++ |
594 |
++ Enables -march=ivybridge |
595 |
++ |
596 |
++config MHASWELL |
597 |
++ bool "Intel Haswell" |
598 |
++ select X86_P6_NOP |
599 |
++ help |
600 |
++ |
601 |
++ Select this for 4th Gen Core processors in the Haswell family. |
602 |
++ |
603 |
++ Enables -march=haswell |
604 |
++ |
605 |
++config MBROADWELL |
606 |
++ bool "Intel Broadwell" |
607 |
++ select X86_P6_NOP |
608 |
++ help |
609 |
++ |
610 |
++ Select this for 5th Gen Core processors in the Broadwell family. |
611 |
++ |
612 |
++ Enables -march=broadwell |
613 |
++ |
614 |
++config MSKYLAKE |
615 |
++ bool "Intel Skylake" |
616 |
++ select X86_P6_NOP |
617 |
++ help |
618 |
++ |
619 |
++ Select this for 6th Gen Core processors in the Skylake family. |
620 |
++ |
621 |
++ Enables -march=skylake |
622 |
++ |
623 |
++config MSKYLAKEX |
624 |
++ bool "Intel Skylake X" |
625 |
++ select X86_P6_NOP |
626 |
++ help |
627 |
++ |
628 |
++ Select this for 6th Gen Core processors in the Skylake X family. |
629 |
++ |
630 |
++ Enables -march=skylake-avx512 |
631 |
++ |
632 |
++config MCANNONLAKE |
633 |
++ bool "Intel Cannon Lake" |
634 |
++ select X86_P6_NOP |
635 |
++ help |
636 |
++ |
637 |
++ Select this for 8th Gen Core processors |
638 |
++ |
639 |
++ Enables -march=cannonlake |
640 |
++ |
641 |
++config MICELAKE |
642 |
++ bool "Intel Ice Lake" |
643 |
++ select X86_P6_NOP |
644 |
++ help |
645 |
++ |
646 |
++ Select this for 10th Gen Core processors in the Ice Lake family. |
647 |
++ |
648 |
++ Enables -march=icelake-client |
649 |
++ |
650 |
++config MCASCADELAKE |
651 |
++ bool "Intel Cascade Lake" |
652 |
++ select X86_P6_NOP |
653 |
++ help |
654 |
++ |
655 |
++ Select this for Xeon processors in the Cascade Lake family. |
656 |
++ |
657 |
++ Enables -march=cascadelake |
658 |
++ |
659 |
++config MCOOPERLAKE |
660 |
++ bool "Intel Cooper Lake" |
661 |
++ depends on GCC_VERSION > 100100 |
662 |
++ select X86_P6_NOP |
663 |
++ help |
664 |
++ |
665 |
++ Select this for Xeon processors in the Cooper Lake family. |
666 |
++ |
667 |
++ Enables -march=cooperlake |
668 |
++ |
669 |
++config MTIGERLAKE |
670 |
++ bool "Intel Tiger Lake" |
671 |
++ depends on GCC_VERSION > 100100 |
672 |
++ select X86_P6_NOP |
673 |
++ help |
674 |
++ |
675 |
++ Select this for third-generation 10 nm process processors in the Tiger Lake family. |
676 |
++ |
677 |
++ Enables -march=tigerlake |
678 |
++ |
679 |
++config MSAPPHIRERAPIDS |
680 |
++ bool "Intel Sapphire Rapids" |
681 |
++ depends on GCC_VERSION > 110000 |
682 |
++ select X86_P6_NOP |
683 |
++ help |
684 |
++ |
685 |
++ Select this for third-generation 10 nm process processors in the Sapphire Rapids family. |
686 |
++ |
687 |
++ Enables -march=sapphirerapids |
688 |
++ |
689 |
++config MROCKETLAKE |
690 |
++ bool "Intel Rocket Lake" |
691 |
++ depends on GCC_VERSION > 110000 |
692 |
++ select X86_P6_NOP |
693 |
++ help |
694 |
++ |
695 |
++ Select this for eleventh-generation processors in the Rocket Lake family. |
696 |
++ |
697 |
++ Enables -march=rocketlake |
698 |
++ |
699 |
++config MALDERLAKE |
700 |
++ bool "Intel Alder Lake" |
701 |
++ depends on GCC_VERSION > 110000 |
702 |
++ select X86_P6_NOP |
703 |
++ help |
704 |
++ |
705 |
++ Select this for twelfth-generation processors in the Alder Lake family. |
706 |
++ |
707 |
++ Enables -march=alderlake |
708 |
++ |
709 |
+ config GENERIC_CPU |
710 |
+ bool "Generic-x86-64" |
711 |
+ depends on X86_64 |
712 |
+@@ -294,6 +558,50 @@ config GENERIC_CPU |
713 |
+ Generic x86-64 CPU. |
714 |
+ Run equally well on all x86-64 CPUs. |
715 |
+ |
716 |
++config GENERIC_CPU2 |
717 |
++ bool "Generic-x86-64-v2" |
718 |
++ depends on GCC_VERSION > 110000 |
719 |
++ depends on X86_64 |
720 |
++ help |
721 |
++ Generic x86-64 CPU. |
722 |
++ Run equally well on all x86-64 CPUs with min support of x86-64-v2. |
723 |
++ |
724 |
++config GENERIC_CPU3 |
725 |
++ bool "Generic-x86-64-v3" |
726 |
++ depends on GCC_VERSION > 110000 |
727 |
++ depends on X86_64 |
728 |
++ help |
729 |
++ Generic x86-64-v3 CPU with v3 instructions. |
730 |
++ Run equally well on all x86-64 CPUs with min support of x86-64-v3. |
731 |
++ |
732 |
++config GENERIC_CPU4 |
733 |
++ bool "Generic-x86-64-v4" |
734 |
++ depends on GCC_VERSION > 110000 |
735 |
++ depends on X86_64 |
736 |
++ help |
737 |
++ Generic x86-64 CPU with v4 instructions. |
738 |
++ Run equally well on all x86-64 CPUs with min support of x86-64-v4. |
739 |
++ |
740 |
++config MNATIVE_INTEL |
741 |
++ bool "Intel-Native optimizations autodetected by GCC" |
742 |
++ help |
743 |
++ |
744 |
++ GCC 4.2 and above support -march=native, which automatically detects |
745 |
++ the optimum settings to use based on your processor. Do NOT use this |
746 |
++ for AMD CPUs. Intel Only! |
747 |
++ |
748 |
++ Enables -march=native |
749 |
++ |
750 |
++config MNATIVE_AMD |
751 |
++ bool "AMD-Native optimizations autodetected by GCC" |
752 |
++ help |
753 |
++ |
754 |
++ GCC 4.2 and above support -march=native, which automatically detects |
755 |
++ the optimum settings to use based on your processor. Do NOT use this |
756 |
++ for Intel CPUs. AMD Only! |
757 |
++ |
758 |
++ Enables -march=native |
759 |
++ |
760 |
+ endchoice |
761 |
+ |
762 |
+ config X86_GENERIC |
763 |
+@@ -318,7 +626,7 @@ config X86_INTERNODE_CACHE_SHIFT |
764 |
+ config X86_L1_CACHE_SHIFT |
765 |
+ int |
766 |
+ default "7" if MPENTIUM4 || MPSC |
767 |
+- default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU |
768 |
++ 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 |
769 |
+ default "4" if MELAN || M486SX || M486 || MGEODEGX1 |
770 |
+ default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX |
771 |
+ |
772 |
+@@ -336,11 +644,11 @@ config X86_ALIGNMENT_16 |
773 |
+ |
774 |
+ config X86_INTEL_USERCOPY |
775 |
+ def_bool y |
776 |
+- depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2 |
777 |
++ 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 |
778 |
+ |
779 |
+ config X86_USE_PPRO_CHECKSUM |
780 |
+ def_bool y |
781 |
+- depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MATOM |
782 |
++ 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 |
783 |
+ |
784 |
+ config X86_USE_3DNOW |
785 |
+ def_bool y |
786 |
+@@ -360,26 +668,26 @@ config X86_USE_3DNOW |
787 |
+ config X86_P6_NOP |
788 |
+ def_bool y |
789 |
+ depends on X86_64 |
790 |
+- depends on (MCORE2 || MPENTIUM4 || MPSC) |
791 |
++ 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) |
792 |
+ |
793 |
+ config X86_TSC |
794 |
+ def_bool y |
795 |
+- 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 |
796 |
++ 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 |
797 |
+ |
798 |
+ config X86_CMPXCHG64 |
799 |
+ def_bool y |
800 |
+- depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586TSC || M586MMX || MATOM || MGEODE_LX || MGEODEGX1 || MK6 || MK7 || MK8 |
801 |
++ 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 |
802 |
+ |
803 |
+ # this should be set for all -march=.. options where the compiler |
804 |
+ # generates cmov. |
805 |
+ config X86_CMOV |
806 |
+ def_bool y |
807 |
+- depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX) |
808 |
++ 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) |
809 |
+ |
810 |
+ config X86_MINIMUM_CPU_FAMILY |
811 |
+ int |
812 |
+ default "64" if X86_64 |
813 |
+- default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8) |
814 |
++ 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) |
815 |
+ default "5" if X86_32 && X86_CMPXCHG64 |
816 |
+ default "4" |
817 |
+ |
818 |
+diff --git a/arch/x86/Makefile b/arch/x86/Makefile |
819 |
+index 9a85eae37b17..facf9a278fe3 100644 |
820 |
+--- a/arch/x86/Makefile |
821 |
++++ b/arch/x86/Makefile |
822 |
+@@ -113,11 +113,48 @@ else |
823 |
+ # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu) |
824 |
+ cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) |
825 |
+ cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) |
826 |
+- |
827 |
+- cflags-$(CONFIG_MCORE2) += \ |
828 |
+- $(call cc-option,-march=core2,$(call cc-option,-mtune=generic)) |
829 |
+- cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom) \ |
830 |
+- $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic)) |
831 |
++ cflags-$(CONFIG_MK8SSE3) += $(call cc-option,-march=k8-sse3) |
832 |
++ cflags-$(CONFIG_MK10) += $(call cc-option,-march=amdfam10) |
833 |
++ cflags-$(CONFIG_MBARCELONA) += $(call cc-option,-march=barcelona) |
834 |
++ cflags-$(CONFIG_MBOBCAT) += $(call cc-option,-march=btver1) |
835 |
++ cflags-$(CONFIG_MJAGUAR) += $(call cc-option,-march=btver2) |
836 |
++ cflags-$(CONFIG_MBULLDOZER) += $(call cc-option,-march=bdver1) |
837 |
++ cflags-$(CONFIG_MPILEDRIVER) += $(call cc-option,-march=bdver2) |
838 |
++ cflags-$(CONFIG_MPILEDRIVER) += $(call cc-option,-mno-tbm) |
839 |
++ cflags-$(CONFIG_MSTEAMROLLER) += $(call cc-option,-march=bdver3) |
840 |
++ cflags-$(CONFIG_MSTEAMROLLER) += $(call cc-option,-mno-tbm) |
841 |
++ cflags-$(CONFIG_MEXCAVATOR) += $(call cc-option,-march=bdver4) |
842 |
++ cflags-$(CONFIG_MEXCAVATOR) += $(call cc-option,-mno-tbm) |
843 |
++ cflags-$(CONFIG_MZEN) += $(call cc-option,-march=znver1) |
844 |
++ cflags-$(CONFIG_MZEN2) += $(call cc-option,-march=znver2) |
845 |
++ cflags-$(CONFIG_MZEN3) += $(call cc-option,-march=znver3) |
846 |
++ |
847 |
++ cflags-$(CONFIG_MNATIVE_INTEL) += $(call cc-option,-march=native) |
848 |
++ cflags-$(CONFIG_MNATIVE_AMD) += $(call cc-option,-march=native) |
849 |
++ cflags-$(CONFIG_MATOM) += $(call cc-option,-march=bonnell) |
850 |
++ cflags-$(CONFIG_MCORE2) += $(call cc-option,-march=core2) |
851 |
++ cflags-$(CONFIG_MNEHALEM) += $(call cc-option,-march=nehalem) |
852 |
++ cflags-$(CONFIG_MWESTMERE) += $(call cc-option,-march=westmere) |
853 |
++ cflags-$(CONFIG_MSILVERMONT) += $(call cc-option,-march=silvermont) |
854 |
++ cflags-$(CONFIG_MGOLDMONT) += $(call cc-option,-march=goldmont) |
855 |
++ cflags-$(CONFIG_MGOLDMONTPLUS) += $(call cc-option,-march=goldmont-plus) |
856 |
++ cflags-$(CONFIG_MSANDYBRIDGE) += $(call cc-option,-march=sandybridge) |
857 |
++ cflags-$(CONFIG_MIVYBRIDGE) += $(call cc-option,-march=ivybridge) |
858 |
++ cflags-$(CONFIG_MHASWELL) += $(call cc-option,-march=haswell) |
859 |
++ cflags-$(CONFIG_MBROADWELL) += $(call cc-option,-march=broadwell) |
860 |
++ cflags-$(CONFIG_MSKYLAKE) += $(call cc-option,-march=skylake) |
861 |
++ cflags-$(CONFIG_MSKYLAKEX) += $(call cc-option,-march=skylake-avx512) |
862 |
++ cflags-$(CONFIG_MCANNONLAKE) += $(call cc-option,-march=cannonlake) |
863 |
++ cflags-$(CONFIG_MICELAKE) += $(call cc-option,-march=icelake-client) |
864 |
++ cflags-$(CONFIG_MCASCADELAKE) += $(call cc-option,-march=cascadelake) |
865 |
++ cflags-$(CONFIG_MCOOPERLAKE) += $(call cc-option,-march=cooperlake) |
866 |
++ cflags-$(CONFIG_MTIGERLAKE) += $(call cc-option,-march=tigerlake) |
867 |
++ cflags-$(CONFIG_MSAPPHIRERAPIDS) += $(call cc-option,-march=sapphirerapids) |
868 |
++ cflags-$(CONFIG_MROCKETLAKE) += $(call cc-option,-march=rocketlake) |
869 |
++ cflags-$(CONFIG_MALDERLAKE) += $(call cc-option,-march=alderlake) |
870 |
++ cflags-$(CONFIG_GENERIC_CPU2) += $(call cc-option,-march=x86-64-v2) |
871 |
++ cflags-$(CONFIG_GENERIC_CPU3) += $(call cc-option,-march=x86-64-v3) |
872 |
++ cflags-$(CONFIG_GENERIC_CPU4) += $(call cc-option,-march=x86-64-v4) |
873 |
+ cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic) |
874 |
+ KBUILD_CFLAGS += $(cflags-y) |
875 |
+ |
876 |
+diff --git a/arch/x86/include/asm/vermagic.h b/arch/x86/include/asm/vermagic.h |
877 |
+index 75884d2cdec3..4e6a08d4c7e5 100644 |
878 |
+--- a/arch/x86/include/asm/vermagic.h |
879 |
++++ b/arch/x86/include/asm/vermagic.h |
880 |
+@@ -17,6 +17,48 @@ |
881 |
+ #define MODULE_PROC_FAMILY "586MMX " |
882 |
+ #elif defined CONFIG_MCORE2 |
883 |
+ #define MODULE_PROC_FAMILY "CORE2 " |
884 |
++#elif defined CONFIG_MNATIVE_INTEL |
885 |
++#define MODULE_PROC_FAMILY "NATIVE_INTEL " |
886 |
++#elif defined CONFIG_MNATIVE_AMD |
887 |
++#define MODULE_PROC_FAMILY "NATIVE_AMD " |
888 |
++#elif defined CONFIG_MNEHALEM |
889 |
++#define MODULE_PROC_FAMILY "NEHALEM " |
890 |
++#elif defined CONFIG_MWESTMERE |
891 |
++#define MODULE_PROC_FAMILY "WESTMERE " |
892 |
++#elif defined CONFIG_MSILVERMONT |
893 |
++#define MODULE_PROC_FAMILY "SILVERMONT " |
894 |
++#elif defined CONFIG_MGOLDMONT |
895 |
++#define MODULE_PROC_FAMILY "GOLDMONT " |
896 |
++#elif defined CONFIG_MGOLDMONTPLUS |
897 |
++#define MODULE_PROC_FAMILY "GOLDMONTPLUS " |
898 |
++#elif defined CONFIG_MSANDYBRIDGE |
899 |
++#define MODULE_PROC_FAMILY "SANDYBRIDGE " |
900 |
++#elif defined CONFIG_MIVYBRIDGE |
901 |
++#define MODULE_PROC_FAMILY "IVYBRIDGE " |
902 |
++#elif defined CONFIG_MHASWELL |
903 |
++#define MODULE_PROC_FAMILY "HASWELL " |
904 |
++#elif defined CONFIG_MBROADWELL |
905 |
++#define MODULE_PROC_FAMILY "BROADWELL " |
906 |
++#elif defined CONFIG_MSKYLAKE |
907 |
++#define MODULE_PROC_FAMILY "SKYLAKE " |
908 |
++#elif defined CONFIG_MSKYLAKEX |
909 |
++#define MODULE_PROC_FAMILY "SKYLAKEX " |
910 |
++#elif defined CONFIG_MCANNONLAKE |
911 |
++#define MODULE_PROC_FAMILY "CANNONLAKE " |
912 |
++#elif defined CONFIG_MICELAKE |
913 |
++#define MODULE_PROC_FAMILY "ICELAKE " |
914 |
++#elif defined CONFIG_MCASCADELAKE |
915 |
++#define MODULE_PROC_FAMILY "CASCADELAKE " |
916 |
++#elif defined CONFIG_MCOOPERLAKE |
917 |
++#define MODULE_PROC_FAMILY "COOPERLAKE " |
918 |
++#elif defined CONFIG_MTIGERLAKE |
919 |
++#define MODULE_PROC_FAMILY "TIGERLAKE " |
920 |
++#elif defined CONFIG_MSAPPHIRERAPIDS |
921 |
++#define MODULE_PROC_FAMILY "SAPPHIRERAPIDS " |
922 |
++#elif defined CONFIG_ROCKETLAKE |
923 |
++#define MODULE_PROC_FAMILY "ROCKETLAKE " |
924 |
++#elif defined CONFIG_MALDERLAKE |
925 |
++#define MODULE_PROC_FAMILY "ALDERLAKE " |
926 |
+ #elif defined CONFIG_MATOM |
927 |
+ #define MODULE_PROC_FAMILY "ATOM " |
928 |
+ #elif defined CONFIG_M686 |
929 |
+@@ -35,6 +77,30 @@ |
930 |
+ #define MODULE_PROC_FAMILY "K7 " |
931 |
+ #elif defined CONFIG_MK8 |
932 |
+ #define MODULE_PROC_FAMILY "K8 " |
933 |
++#elif defined CONFIG_MK8SSE3 |
934 |
++#define MODULE_PROC_FAMILY "K8SSE3 " |
935 |
++#elif defined CONFIG_MK10 |
936 |
++#define MODULE_PROC_FAMILY "K10 " |
937 |
++#elif defined CONFIG_MBARCELONA |
938 |
++#define MODULE_PROC_FAMILY "BARCELONA " |
939 |
++#elif defined CONFIG_MBOBCAT |
940 |
++#define MODULE_PROC_FAMILY "BOBCAT " |
941 |
++#elif defined CONFIG_MBULLDOZER |
942 |
++#define MODULE_PROC_FAMILY "BULLDOZER " |
943 |
++#elif defined CONFIG_MPILEDRIVER |
944 |
++#define MODULE_PROC_FAMILY "PILEDRIVER " |
945 |
++#elif defined CONFIG_MSTEAMROLLER |
946 |
++#define MODULE_PROC_FAMILY "STEAMROLLER " |
947 |
++#elif defined CONFIG_MJAGUAR |
948 |
++#define MODULE_PROC_FAMILY "JAGUAR " |
949 |
++#elif defined CONFIG_MEXCAVATOR |
950 |
++#define MODULE_PROC_FAMILY "EXCAVATOR " |
951 |
++#elif defined CONFIG_MZEN |
952 |
++#define MODULE_PROC_FAMILY "ZEN " |
953 |
++#elif defined CONFIG_MZEN2 |
954 |
++#define MODULE_PROC_FAMILY "ZEN2 " |
955 |
++#elif defined CONFIG_MZEN3 |
956 |
++#define MODULE_PROC_FAMILY "ZEN3 " |
957 |
+ #elif defined CONFIG_MELAN |
958 |
+ #define MODULE_PROC_FAMILY "ELAN " |
959 |
+ #elif defined CONFIG_MCRUSOE |
960 |
+-- |
961 |
+2.31.1 |
962 |
+ |