Also, move update_linux.sh to tools/scripts/
Change-Id: Ib23a1a4d9ecad00665f2aca083d4c02f3de283fd
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5293
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
Reviewed-by: Srivatsa S. Bhat <srivatsab@vmware.com>
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
Summary: Linux API header files |
| 2 | 2 |
Name: linux-api-headers |
| 3 |
-Version: 4.4.137 |
|
| 3 |
+Version: 4.4.138 |
|
| 4 | 4 |
Release: 1%{?dist}
|
| 5 | 5 |
License: GPLv2 |
| 6 | 6 |
URL: http://www.kernel.org/ |
| ... | ... |
@@ -8,7 +8,7 @@ Group: System Environment/Kernel |
| 8 | 8 |
Vendor: VMware, Inc. |
| 9 | 9 |
Distribution: Photon |
| 10 | 10 |
Source0: http://www.kernel.org/pub/linux/kernel/v4.x/linux-%{version}.tar.xz
|
| 11 |
-%define sha1 linux=05b18bc780fb6f534dbf47825945b4e6eca15143 |
|
| 11 |
+%define sha1 linux=f1d6778e011fb07d7d4df12262f790f053e78e27 |
|
| 12 | 12 |
BuildArch: noarch |
| 13 | 13 |
# From SPECS/linux and used by linux-esx only |
| 14 | 14 |
# It provides f*xattrat syscalls |
| ... | ... |
@@ -29,6 +29,8 @@ find /%{buildroot}%{_includedir} \( -name .install -o -name ..install.cmd \) -de
|
| 29 | 29 |
%defattr(-,root,root) |
| 30 | 30 |
%{_includedir}/*
|
| 31 | 31 |
%changelog |
| 32 |
+* Mon Jun 25 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.4.138-1 |
|
| 33 |
+- Update to version 4.4.138 |
|
| 32 | 34 |
* Wed Jun 13 2018 Alexey Makhalov <amakhalov@vmware.com> 4.4.137-1 |
| 33 | 35 |
- Update to version 4.4.137 |
| 34 | 36 |
* Mon May 21 2018 Bo Gan <ganb@vmware.com> 4.4.131-2 |
| ... | ... |
@@ -1,15 +1,15 @@ |
| 1 | 1 |
%global security_hardening none |
| 2 | 2 |
Summary: Kernel |
| 3 | 3 |
Name: linux-esx |
| 4 |
-Version: 4.4.137 |
|
| 5 |
-Release: 2%{?dist}
|
|
| 4 |
+Version: 4.4.138 |
|
| 5 |
+Release: 1%{?dist}
|
|
| 6 | 6 |
License: GPLv2 |
| 7 | 7 |
URL: http://www.kernel.org/ |
| 8 | 8 |
Group: System Environment/Kernel |
| 9 | 9 |
Vendor: VMware, Inc. |
| 10 | 10 |
Distribution: Photon |
| 11 | 11 |
Source0: http://www.kernel.org/pub/linux/kernel/v4.x/linux-%{version}.tar.xz
|
| 12 |
-%define sha1 linux=05b18bc780fb6f534dbf47825945b4e6eca15143 |
|
| 12 |
+%define sha1 linux=f1d6778e011fb07d7d4df12262f790f053e78e27 |
|
| 13 | 13 |
Source1: config-esx |
| 14 | 14 |
Patch0: double-tcp_mem-limits.patch |
| 15 | 15 |
Patch1: linux-4.4-sysctl-sched_weighted_cpuload_uses_rla.patch |
| ... | ... |
@@ -65,8 +65,6 @@ Patch67: 0169-x86-syscall-Clear-unused-extra-registers-on-syscall-.patch |
| 65 | 65 |
# Add more Spectre-v2 mitigations (IBPB/IBRS) |
| 66 | 66 |
Patch201: 0001-x86-cpufeature-Move-some-of-the-scattered-feature-bi.patch |
| 67 | 67 |
Patch202: 0002-x86-cpufeature-Cleanup-get_cpu_cap.patch |
| 68 |
-Patch203: 0003-x86-Remove-unused-function-cpu_has_ht_siblings.patch |
|
| 69 |
-Patch204: 0004-x86-cpufeature-Remove-unused-and-seldomly-used-cpu_h.patch |
|
| 70 | 68 |
Patch205: 0005-x86-cpu-Provide-a-config-option-to-disable-static_cp.patch |
| 71 | 69 |
Patch206: 0006-x86-fpu-Add-an-XSTATE_OP-macro.patch |
| 72 | 70 |
Patch207: 0007-x86-fpu-Get-rid-of-xstate_fault.patch |
| ... | ... |
@@ -253,8 +251,6 @@ The Linux package contains the Linux kernel doc files |
| 253 | 253 |
|
| 254 | 254 |
%patch201 -p1 |
| 255 | 255 |
%patch202 -p1 |
| 256 |
-%patch203 -p1 |
|
| 257 |
-%patch204 -p1 |
|
| 258 | 256 |
%patch205 -p1 |
| 259 | 257 |
%patch206 -p1 |
| 260 | 258 |
%patch207 -p1 |
| ... | ... |
@@ -443,6 +439,8 @@ ln -sf linux-%{uname_r}.cfg /boot/photon.cfg
|
| 443 | 443 |
/usr/src/linux-headers-%{uname_r}
|
| 444 | 444 |
|
| 445 | 445 |
%changelog |
| 446 |
+* Mon Jun 25 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.4.138-1 |
|
| 447 |
+- Update to version 4.4.138 |
|
| 446 | 448 |
* Thu Jun 14 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.4.137-2 |
| 447 | 449 |
- Add more spectre mitigations (IBPB/IBRS) and support for SSBD. |
| 448 | 450 |
* Wed Jun 13 2018 Alexey Makhalov <amakhalov@vmware.com> 4.4.137-1 |
| ... | ... |
@@ -1,15 +1,15 @@ |
| 1 | 1 |
%global security_hardening none |
| 2 | 2 |
Summary: Kernel |
| 3 | 3 |
Name: linux |
| 4 |
-Version: 4.4.137 |
|
| 5 |
-Release: 2%{?kat_build:.%kat_build}%{?dist}
|
|
| 4 |
+Version: 4.4.138 |
|
| 5 |
+Release: 1%{?kat_build:.%kat_build}%{?dist}
|
|
| 6 | 6 |
License: GPLv2 |
| 7 | 7 |
URL: http://www.kernel.org/ |
| 8 | 8 |
Group: System Environment/Kernel |
| 9 | 9 |
Vendor: VMware, Inc. |
| 10 | 10 |
Distribution: Photon |
| 11 | 11 |
Source0: http://www.kernel.org/pub/linux/kernel/v4.x/%{name}-%{version}.tar.xz
|
| 12 |
-%define sha1 linux=05b18bc780fb6f534dbf47825945b4e6eca15143 |
|
| 12 |
+%define sha1 linux=f1d6778e011fb07d7d4df12262f790f053e78e27 |
|
| 13 | 13 |
Source1: config |
| 14 | 14 |
%define ena_version 1.1.3 |
| 15 | 15 |
Source2: https://github.com/amzn/amzn-drivers/archive/ena_linux_1.1.3.tar.gz |
| ... | ... |
@@ -65,8 +65,6 @@ Patch67: 0169-x86-syscall-Clear-unused-extra-registers-on-syscall-.patch |
| 65 | 65 |
# Add more Spectre-v2 mitigations (IBPB/IBRS) |
| 66 | 66 |
Patch201: 0001-x86-cpufeature-Move-some-of-the-scattered-feature-bi.patch |
| 67 | 67 |
Patch202: 0002-x86-cpufeature-Cleanup-get_cpu_cap.patch |
| 68 |
-Patch203: 0003-x86-Remove-unused-function-cpu_has_ht_siblings.patch |
|
| 69 |
-Patch204: 0004-x86-cpufeature-Remove-unused-and-seldomly-used-cpu_h.patch |
|
| 70 | 68 |
Patch205: 0005-x86-cpu-Provide-a-config-option-to-disable-static_cp.patch |
| 71 | 69 |
Patch206: 0006-x86-fpu-Add-an-XSTATE_OP-macro.patch |
| 72 | 70 |
Patch207: 0007-x86-fpu-Get-rid-of-xstate_fault.patch |
| ... | ... |
@@ -285,8 +283,6 @@ This package contains the 'perf' performance analysis tools for Linux kernel. |
| 285 | 285 |
|
| 286 | 286 |
%patch201 -p1 |
| 287 | 287 |
%patch202 -p1 |
| 288 |
-%patch203 -p1 |
|
| 289 |
-%patch204 -p1 |
|
| 290 | 288 |
%patch205 -p1 |
| 291 | 289 |
%patch206 -p1 |
| 292 | 290 |
%patch207 -p1 |
| ... | ... |
@@ -543,6 +539,8 @@ ln -sf %{name}-%{uname_r}.cfg /boot/photon.cfg
|
| 543 | 543 |
/usr/share/perf-core |
| 544 | 544 |
|
| 545 | 545 |
%changelog |
| 546 |
+* Mon Jun 25 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.4.138-1 |
|
| 547 |
+- Update to version 4.4.138 |
|
| 546 | 548 |
* Thu Jun 14 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 4.4.137-2 |
| 547 | 549 |
- Add more spectre mitigations (IBPB/IBRS) and support for SSBD. |
| 548 | 550 |
* Wed Jun 13 2018 Alexey Makhalov <amakhalov@vmware.com> 4.4.137-1 |
| 549 | 551 |
deleted file mode 100644 |
| ... | ... |
@@ -1,40 +0,0 @@ |
| 1 |
-From be043dd01d7ea355d1cbd483849a28b52362be15 Mon Sep 17 00:00:00 2001 |
|
| 2 |
-From: Juergen Gross <jgross@suse.com> |
|
| 3 |
-Date: Thu, 14 Jun 2018 14:56:01 -0700 |
|
| 4 |
-Subject: [PATCH 003/103] x86: Remove unused function cpu_has_ht_siblings() |
|
| 5 |
- |
|
| 6 |
-commit ed29210cd6a67425026e78aa298fa434e11a74e3 upstream |
|
| 7 |
- |
|
| 8 |
-It is used nowhere. |
|
| 9 |
- |
|
| 10 |
-Signed-off-by: Juergen Gross <jgross@suse.com> |
|
| 11 |
-Link: http://lkml.kernel.org/r/1447761943-770-1-git-send-email-jgross@suse.com |
|
| 12 |
-Signed-off-by: Thomas Gleixner <tglx@linutronix.de> |
|
| 13 |
-Signed-off-by: Srivatsa S. Bhat <srivatsa@csail.mit.edu> |
|
| 14 |
- arch/x86/include/asm/smp.h | 9 --------- |
|
| 15 |
- 1 file changed, 9 deletions(-) |
|
| 16 |
- |
|
| 17 |
-diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h |
|
| 18 |
-index 222a6a3..a438c55 100644 |
|
| 19 |
-+++ b/arch/x86/include/asm/smp.h |
|
| 20 |
-@@ -21,15 +21,6 @@ |
|
| 21 |
- extern int smp_num_siblings; |
|
| 22 |
- extern unsigned int num_processors; |
|
| 23 |
- |
|
| 24 |
--static inline bool cpu_has_ht_siblings(void) |
|
| 25 |
--{
|
|
| 26 |
-- bool has_siblings = false; |
|
| 27 |
--#ifdef CONFIG_SMP |
|
| 28 |
-- has_siblings = cpu_has_ht && smp_num_siblings > 1; |
|
| 29 |
--#endif |
|
| 30 |
-- return has_siblings; |
|
| 31 |
--} |
|
| 32 |
-- |
|
| 33 |
- DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_sibling_map); |
|
| 34 |
- DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_core_map); |
|
| 35 |
- /* cpus sharing the last level cache: */ |
|
| 36 |
-2.7.4 |
|
| 37 |
- |
| 38 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,527 +0,0 @@ |
| 1 |
-From ad1992d099dd2acef343d466d0e40a630b33fff1 Mon Sep 17 00:00:00 2001 |
|
| 2 |
-From: Borislav Petkov <bp@suse.de> |
|
| 3 |
-Date: Thu, 14 Jun 2018 14:56:01 -0700 |
|
| 4 |
-Subject: [PATCH 004/103] x86/cpufeature: Remove unused and seldomly used |
|
| 5 |
- cpu_has_xx macros |
|
| 6 |
- |
|
| 7 |
-commit 362f924b64ba0f4be2ee0cb697690c33d40be721 upstream |
|
| 8 |
- |
|
| 9 |
-Those are stupid and code should use static_cpu_has_safe() or |
|
| 10 |
-boot_cpu_has() instead. Kill the least used and unused ones. |
|
| 11 |
- |
|
| 12 |
-The remaining ones need more careful inspection before a conversion can |
|
| 13 |
-happen. On the TODO. |
|
| 14 |
- |
|
| 15 |
-Signed-off-by: Borislav Petkov <bp@suse.de> |
|
| 16 |
-Link: http://lkml.kernel.org/r/1449481182-27541-4-git-send-email-bp@alien8.de |
|
| 17 |
-Cc: David Sterba <dsterba@suse.com> |
|
| 18 |
-Cc: Herbert Xu <herbert@gondor.apana.org.au> |
|
| 19 |
-Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> |
|
| 20 |
-Cc: Matt Mackall <mpm@selenic.com> |
|
| 21 |
-Cc: Chris Mason <clm@fb.com> |
|
| 22 |
-Cc: Josef Bacik <jbacik@fb.com> |
|
| 23 |
-Signed-off-by: Thomas Gleixner <tglx@linutronix.de> |
|
| 24 |
-Signed-off-by: Srivatsa S. Bhat <srivatsa@csail.mit.edu> |
|
| 25 |
- arch/x86/crypto/chacha20_glue.c | 2 +- |
|
| 26 |
- arch/x86/crypto/crc32c-intel_glue.c | 2 +- |
|
| 27 |
- arch/x86/include/asm/cmpxchg_32.h | 2 +- |
|
| 28 |
- arch/x86/include/asm/cmpxchg_64.h | 2 +- |
|
| 29 |
- arch/x86/include/asm/cpufeature.h | 37 ++++------------------------- |
|
| 30 |
- arch/x86/include/asm/xor_32.h | 2 +- |
|
| 31 |
- arch/x86/kernel/cpu/amd.c | 4 ++-- |
|
| 32 |
- arch/x86/kernel/cpu/common.c | 4 +++- |
|
| 33 |
- arch/x86/kernel/cpu/intel.c | 3 ++- |
|
| 34 |
- arch/x86/kernel/cpu/intel_cacheinfo.c | 6 ++--- |
|
| 35 |
- arch/x86/kernel/cpu/mtrr/generic.c | 2 +- |
|
| 36 |
- arch/x86/kernel/cpu/mtrr/main.c | 2 +- |
|
| 37 |
- arch/x86/kernel/cpu/perf_event_amd.c | 4 ++-- |
|
| 38 |
- arch/x86/kernel/cpu/perf_event_amd_uncore.c | 11 +++++---- |
|
| 39 |
- arch/x86/kernel/fpu/init.c | 4 ++-- |
|
| 40 |
- arch/x86/kernel/hw_breakpoint.c | 6 +++-- |
|
| 41 |
- arch/x86/kernel/smpboot.c | 2 +- |
|
| 42 |
- arch/x86/kernel/vm86_32.c | 4 +++- |
|
| 43 |
- arch/x86/mm/setup_nx.c | 4 ++-- |
|
| 44 |
- drivers/char/hw_random/via-rng.c | 5 ++-- |
|
| 45 |
- drivers/crypto/padlock-aes.c | 2 +- |
|
| 46 |
- drivers/crypto/padlock-sha.c | 2 +- |
|
| 47 |
- drivers/iommu/intel_irq_remapping.c | 2 +- |
|
| 48 |
- fs/btrfs/disk-io.c | 2 +- |
|
| 49 |
- 24 files changed, 48 insertions(+), 68 deletions(-) |
|
| 50 |
- |
|
| 51 |
-diff --git a/arch/x86/crypto/chacha20_glue.c b/arch/x86/crypto/chacha20_glue.c |
|
| 52 |
-index 722bace..8baaff5 100644 |
|
| 53 |
-+++ b/arch/x86/crypto/chacha20_glue.c |
|
| 54 |
-@@ -125,7 +125,7 @@ static struct crypto_alg alg = {
|
|
| 55 |
- |
|
| 56 |
- static int __init chacha20_simd_mod_init(void) |
|
| 57 |
- {
|
|
| 58 |
-- if (!cpu_has_ssse3) |
|
| 59 |
-+ if (!boot_cpu_has(X86_FEATURE_SSSE3)) |
|
| 60 |
- return -ENODEV; |
|
| 61 |
- |
|
| 62 |
- #ifdef CONFIG_AS_AVX2 |
|
| 63 |
-diff --git a/arch/x86/crypto/crc32c-intel_glue.c b/arch/x86/crypto/crc32c-intel_glue.c |
|
| 64 |
-index 81a595d..0e98716 100644 |
|
| 65 |
-+++ b/arch/x86/crypto/crc32c-intel_glue.c |
|
| 66 |
-@@ -257,7 +257,7 @@ static int __init crc32c_intel_mod_init(void) |
|
| 67 |
- if (!x86_match_cpu(crc32c_cpu_id)) |
|
| 68 |
- return -ENODEV; |
|
| 69 |
- #ifdef CONFIG_X86_64 |
|
| 70 |
-- if (cpu_has_pclmulqdq) {
|
|
| 71 |
-+ if (boot_cpu_has(X86_FEATURE_PCLMULQDQ)) {
|
|
| 72 |
- alg.update = crc32c_pcl_intel_update; |
|
| 73 |
- alg.finup = crc32c_pcl_intel_finup; |
|
| 74 |
- alg.digest = crc32c_pcl_intel_digest; |
|
| 75 |
-diff --git a/arch/x86/include/asm/cmpxchg_32.h b/arch/x86/include/asm/cmpxchg_32.h |
|
| 76 |
-index f7e1429..e4959d0 100644 |
|
| 77 |
-+++ b/arch/x86/include/asm/cmpxchg_32.h |
|
| 78 |
-@@ -109,6 +109,6 @@ static inline u64 __cmpxchg64_local(volatile u64 *ptr, u64 old, u64 new) |
|
| 79 |
- |
|
| 80 |
- #endif |
|
| 81 |
- |
|
| 82 |
--#define system_has_cmpxchg_double() cpu_has_cx8 |
|
| 83 |
-+#define system_has_cmpxchg_double() boot_cpu_has(X86_FEATURE_CX8) |
|
| 84 |
- |
|
| 85 |
- #endif /* _ASM_X86_CMPXCHG_32_H */ |
|
| 86 |
-diff --git a/arch/x86/include/asm/cmpxchg_64.h b/arch/x86/include/asm/cmpxchg_64.h |
|
| 87 |
-index 1af9469..caa23a3 100644 |
|
| 88 |
-+++ b/arch/x86/include/asm/cmpxchg_64.h |
|
| 89 |
-@@ -18,6 +18,6 @@ static inline void set_64bit(volatile u64 *ptr, u64 val) |
|
| 90 |
- cmpxchg_local((ptr), (o), (n)); \ |
|
| 91 |
- }) |
|
| 92 |
- |
|
| 93 |
--#define system_has_cmpxchg_double() cpu_has_cx16 |
|
| 94 |
-+#define system_has_cmpxchg_double() boot_cpu_has(X86_FEATURE_CX16) |
|
| 95 |
- |
|
| 96 |
- #endif /* _ASM_X86_CMPXCHG_64_H */ |
|
| 97 |
-diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h |
|
| 98 |
-index 17e6c25..1b1c0ef 100644 |
|
| 99 |
-+++ b/arch/x86/include/asm/cpufeature.h |
|
| 100 |
-@@ -398,58 +398,29 @@ extern const char * const x86_bug_flags[NBUGINTS*32]; |
|
| 101 |
- #define setup_force_cpu_bug(bit) setup_force_cpu_cap(bit) |
|
| 102 |
- |
|
| 103 |
- #define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU) |
|
| 104 |
--#define cpu_has_de boot_cpu_has(X86_FEATURE_DE) |
|
| 105 |
- #define cpu_has_pse boot_cpu_has(X86_FEATURE_PSE) |
|
| 106 |
- #define cpu_has_tsc boot_cpu_has(X86_FEATURE_TSC) |
|
| 107 |
- #define cpu_has_pge boot_cpu_has(X86_FEATURE_PGE) |
|
| 108 |
- #define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC) |
|
| 109 |
--#define cpu_has_sep boot_cpu_has(X86_FEATURE_SEP) |
|
| 110 |
--#define cpu_has_mtrr boot_cpu_has(X86_FEATURE_MTRR) |
|
| 111 |
--#define cpu_has_mmx boot_cpu_has(X86_FEATURE_MMX) |
|
| 112 |
- #define cpu_has_fxsr boot_cpu_has(X86_FEATURE_FXSR) |
|
| 113 |
- #define cpu_has_xmm boot_cpu_has(X86_FEATURE_XMM) |
|
| 114 |
- #define cpu_has_xmm2 boot_cpu_has(X86_FEATURE_XMM2) |
|
| 115 |
--#define cpu_has_xmm3 boot_cpu_has(X86_FEATURE_XMM3) |
|
| 116 |
--#define cpu_has_ssse3 boot_cpu_has(X86_FEATURE_SSSE3) |
|
| 117 |
- #define cpu_has_aes boot_cpu_has(X86_FEATURE_AES) |
|
| 118 |
- #define cpu_has_avx boot_cpu_has(X86_FEATURE_AVX) |
|
| 119 |
- #define cpu_has_avx2 boot_cpu_has(X86_FEATURE_AVX2) |
|
| 120 |
--#define cpu_has_ht boot_cpu_has(X86_FEATURE_HT) |
|
| 121 |
--#define cpu_has_nx boot_cpu_has(X86_FEATURE_NX) |
|
| 122 |
--#define cpu_has_xstore boot_cpu_has(X86_FEATURE_XSTORE) |
|
| 123 |
--#define cpu_has_xstore_enabled boot_cpu_has(X86_FEATURE_XSTORE_EN) |
|
| 124 |
--#define cpu_has_xcrypt boot_cpu_has(X86_FEATURE_XCRYPT) |
|
| 125 |
--#define cpu_has_xcrypt_enabled boot_cpu_has(X86_FEATURE_XCRYPT_EN) |
|
| 126 |
--#define cpu_has_ace2 boot_cpu_has(X86_FEATURE_ACE2) |
|
| 127 |
--#define cpu_has_ace2_enabled boot_cpu_has(X86_FEATURE_ACE2_EN) |
|
| 128 |
--#define cpu_has_phe boot_cpu_has(X86_FEATURE_PHE) |
|
| 129 |
--#define cpu_has_phe_enabled boot_cpu_has(X86_FEATURE_PHE_EN) |
|
| 130 |
--#define cpu_has_pmm boot_cpu_has(X86_FEATURE_PMM) |
|
| 131 |
--#define cpu_has_pmm_enabled boot_cpu_has(X86_FEATURE_PMM_EN) |
|
| 132 |
--#define cpu_has_ds boot_cpu_has(X86_FEATURE_DS) |
|
| 133 |
--#define cpu_has_pebs boot_cpu_has(X86_FEATURE_PEBS) |
|
| 134 |
- #define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLUSH) |
|
| 135 |
--#define cpu_has_bts boot_cpu_has(X86_FEATURE_BTS) |
|
| 136 |
- #define cpu_has_gbpages boot_cpu_has(X86_FEATURE_GBPAGES) |
|
| 137 |
- #define cpu_has_arch_perfmon boot_cpu_has(X86_FEATURE_ARCH_PERFMON) |
|
| 138 |
- #define cpu_has_pat boot_cpu_has(X86_FEATURE_PAT) |
|
| 139 |
--#define cpu_has_xmm4_1 boot_cpu_has(X86_FEATURE_XMM4_1) |
|
| 140 |
--#define cpu_has_xmm4_2 boot_cpu_has(X86_FEATURE_XMM4_2) |
|
| 141 |
- #define cpu_has_x2apic boot_cpu_has(X86_FEATURE_X2APIC) |
|
| 142 |
- #define cpu_has_xsave boot_cpu_has(X86_FEATURE_XSAVE) |
|
| 143 |
--#define cpu_has_xsaveopt boot_cpu_has(X86_FEATURE_XSAVEOPT) |
|
| 144 |
- #define cpu_has_xsaves boot_cpu_has(X86_FEATURE_XSAVES) |
|
| 145 |
- #define cpu_has_osxsave boot_cpu_has(X86_FEATURE_OSXSAVE) |
|
| 146 |
- #define cpu_has_hypervisor boot_cpu_has(X86_FEATURE_HYPERVISOR) |
|
| 147 |
--#define cpu_has_pclmulqdq boot_cpu_has(X86_FEATURE_PCLMULQDQ) |
|
| 148 |
--#define cpu_has_perfctr_core boot_cpu_has(X86_FEATURE_PERFCTR_CORE) |
|
| 149 |
--#define cpu_has_perfctr_nb boot_cpu_has(X86_FEATURE_PERFCTR_NB) |
|
| 150 |
--#define cpu_has_perfctr_l2 boot_cpu_has(X86_FEATURE_PERFCTR_L2) |
|
| 151 |
--#define cpu_has_cx8 boot_cpu_has(X86_FEATURE_CX8) |
|
| 152 |
--#define cpu_has_cx16 boot_cpu_has(X86_FEATURE_CX16) |
|
| 153 |
--#define cpu_has_eager_fpu boot_cpu_has(X86_FEATURE_EAGER_FPU) |
|
| 154 |
--#define cpu_has_topoext boot_cpu_has(X86_FEATURE_TOPOEXT) |
|
| 155 |
--#define cpu_has_bpext boot_cpu_has(X86_FEATURE_BPEXT) |
|
| 156 |
-+/* |
|
| 157 |
-+ * Do not add any more of those clumsy macros - use static_cpu_has_safe() for |
|
| 158 |
-+ * fast paths and boot_cpu_has() otherwise! |
|
| 159 |
-+ */ |
|
| 160 |
- |
|
| 161 |
- #if __GNUC__ >= 4 |
|
| 162 |
- extern void warn_pre_alternatives(void); |
|
| 163 |
-diff --git a/arch/x86/include/asm/xor_32.h b/arch/x86/include/asm/xor_32.h |
|
| 164 |
-index 5a08bc8..c54beb4 100644 |
|
| 165 |
-+++ b/arch/x86/include/asm/xor_32.h |
|
| 166 |
-@@ -553,7 +553,7 @@ do { \
|
|
| 167 |
- if (cpu_has_xmm) { \
|
|
| 168 |
- xor_speed(&xor_block_pIII_sse); \ |
|
| 169 |
- xor_speed(&xor_block_sse_pf64); \ |
|
| 170 |
-- } else if (cpu_has_mmx) { \
|
|
| 171 |
-+ } else if (boot_cpu_has(X86_FEATURE_MMX)) { \
|
|
| 172 |
- xor_speed(&xor_block_pII_mmx); \ |
|
| 173 |
- xor_speed(&xor_block_p5_mmx); \ |
|
| 174 |
- } else { \
|
|
| 175 |
-diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c |
|
| 176 |
-index 4bf9e77..f4fb8f5 100644 |
|
| 177 |
-+++ b/arch/x86/kernel/cpu/amd.c |
|
| 178 |
-@@ -304,7 +304,7 @@ static void amd_get_topology(struct cpuinfo_x86 *c) |
|
| 179 |
- int cpu = smp_processor_id(); |
|
| 180 |
- |
|
| 181 |
- /* get information required for multi-node processors */ |
|
| 182 |
-- if (cpu_has_topoext) {
|
|
| 183 |
-+ if (boot_cpu_has(X86_FEATURE_TOPOEXT)) {
|
|
| 184 |
- u32 eax, ebx, ecx, edx; |
|
| 185 |
- |
|
| 186 |
- cpuid(0x8000001e, &eax, &ebx, &ecx, &edx); |
|
| 187 |
-@@ -954,7 +954,7 @@ static bool cpu_has_amd_erratum(struct cpuinfo_x86 *cpu, const int *erratum) |
|
| 188 |
- |
|
| 189 |
- void set_dr_addr_mask(unsigned long mask, int dr) |
|
| 190 |
- {
|
|
| 191 |
-- if (!cpu_has_bpext) |
|
| 192 |
-+ if (!boot_cpu_has(X86_FEATURE_BPEXT)) |
|
| 193 |
- return; |
|
| 194 |
- |
|
| 195 |
- switch (dr) {
|
|
| 196 |
-diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c |
|
| 197 |
-index 9004dfc..5b6e43b 100644 |
|
| 198 |
-+++ b/arch/x86/kernel/cpu/common.c |
|
| 199 |
-@@ -1541,7 +1541,9 @@ void cpu_init(void) |
|
| 200 |
- |
|
| 201 |
- printk(KERN_INFO "Initializing CPU#%d\n", cpu); |
|
| 202 |
- |
|
| 203 |
-- if (cpu_feature_enabled(X86_FEATURE_VME) || cpu_has_tsc || cpu_has_de) |
|
| 204 |
-+ if (cpu_feature_enabled(X86_FEATURE_VME) || |
|
| 205 |
-+ cpu_has_tsc || |
|
| 206 |
-+ boot_cpu_has(X86_FEATURE_DE)) |
|
| 207 |
- cr4_clear_bits(X86_CR4_VME|X86_CR4_PVI|X86_CR4_TSD|X86_CR4_DE); |
|
| 208 |
- |
|
| 209 |
- load_current_idt(); |
|
| 210 |
-diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c |
|
| 211 |
-index 209ac1e..565648b 100644 |
|
| 212 |
-+++ b/arch/x86/kernel/cpu/intel.c |
|
| 213 |
-@@ -445,7 +445,8 @@ static void init_intel(struct cpuinfo_x86 *c) |
|
| 214 |
- |
|
| 215 |
- if (cpu_has_xmm2) |
|
| 216 |
- set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC); |
|
| 217 |
-- if (cpu_has_ds) {
|
|
| 218 |
-+ |
|
| 219 |
-+ if (boot_cpu_has(X86_FEATURE_DS)) {
|
|
| 220 |
- unsigned int l1; |
|
| 221 |
- rdmsr(MSR_IA32_MISC_ENABLE, l1, l2); |
|
| 222 |
- if (!(l1 & (1<<11))) |
|
| 223 |
-diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c |
|
| 224 |
-index b4ca91c..3fa7231 100644 |
|
| 225 |
-+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c |
|
| 226 |
-@@ -591,7 +591,7 @@ cpuid4_cache_lookup_regs(int index, struct _cpuid4_info_regs *this_leaf) |
|
| 227 |
- unsigned edx; |
|
| 228 |
- |
|
| 229 |
- if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) {
|
|
| 230 |
-- if (cpu_has_topoext) |
|
| 231 |
-+ if (boot_cpu_has(X86_FEATURE_TOPOEXT)) |
|
| 232 |
- cpuid_count(0x8000001d, index, &eax.full, |
|
| 233 |
- &ebx.full, &ecx.full, &edx); |
|
| 234 |
- else |
|
| 235 |
-@@ -637,7 +637,7 @@ static int find_num_cache_leaves(struct cpuinfo_x86 *c) |
|
| 236 |
- void init_amd_cacheinfo(struct cpuinfo_x86 *c) |
|
| 237 |
- {
|
|
| 238 |
- |
|
| 239 |
-- if (cpu_has_topoext) {
|
|
| 240 |
-+ if (boot_cpu_has(X86_FEATURE_TOPOEXT)) {
|
|
| 241 |
- num_cache_leaves = find_num_cache_leaves(c); |
|
| 242 |
- } else if (c->extended_cpuid_level >= 0x80000006) {
|
|
| 243 |
- if (cpuid_edx(0x80000006) & 0xf000) |
|
| 244 |
-@@ -809,7 +809,7 @@ static int __cache_amd_cpumap_setup(unsigned int cpu, int index, |
|
| 245 |
- struct cacheinfo *this_leaf; |
|
| 246 |
- int i, sibling; |
|
| 247 |
- |
|
| 248 |
-- if (cpu_has_topoext) {
|
|
| 249 |
-+ if (boot_cpu_has(X86_FEATURE_TOPOEXT)) {
|
|
| 250 |
- unsigned int apicid, nshared, first, last; |
|
| 251 |
- |
|
| 252 |
- this_leaf = this_cpu_ci->info_list + index; |
|
| 253 |
-diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c |
|
| 254 |
-index b5624fa..136ae86 100644 |
|
| 255 |
-+++ b/arch/x86/kernel/cpu/mtrr/generic.c |
|
| 256 |
-@@ -349,7 +349,7 @@ static void get_fixed_ranges(mtrr_type *frs) |
|
| 257 |
- |
|
| 258 |
- void mtrr_save_fixed_ranges(void *info) |
|
| 259 |
- {
|
|
| 260 |
-- if (cpu_has_mtrr) |
|
| 261 |
-+ if (boot_cpu_has(X86_FEATURE_MTRR)) |
|
| 262 |
- get_fixed_ranges(mtrr_state.fixed_ranges); |
|
| 263 |
- } |
|
| 264 |
- |
|
| 265 |
-diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c |
|
| 266 |
-index fa77ac8..f924f41 100644 |
|
| 267 |
-+++ b/arch/x86/kernel/cpu/mtrr/main.c |
|
| 268 |
-@@ -682,7 +682,7 @@ void __init mtrr_bp_init(void) |
|
| 269 |
- |
|
| 270 |
- phys_addr = 32; |
|
| 271 |
- |
|
| 272 |
-- if (cpu_has_mtrr) {
|
|
| 273 |
-+ if (boot_cpu_has(X86_FEATURE_MTRR)) {
|
|
| 274 |
- mtrr_if = &generic_mtrr_ops; |
|
| 275 |
- size_or_mask = SIZE_OR_MASK_BITS(36); |
|
| 276 |
- size_and_mask = 0x00f00000; |
|
| 277 |
-diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/kernel/cpu/perf_event_amd.c |
|
| 278 |
-index 1cee5d2..3ea177c 100644 |
|
| 279 |
-+++ b/arch/x86/kernel/cpu/perf_event_amd.c |
|
| 280 |
-@@ -160,7 +160,7 @@ static inline int amd_pmu_addr_offset(int index, bool eventsel) |
|
| 281 |
- if (offset) |
|
| 282 |
- return offset; |
|
| 283 |
- |
|
| 284 |
-- if (!cpu_has_perfctr_core) |
|
| 285 |
-+ if (!boot_cpu_has(X86_FEATURE_PERFCTR_CORE)) |
|
| 286 |
- offset = index; |
|
| 287 |
- else |
|
| 288 |
- offset = index << 1; |
|
| 289 |
-@@ -652,7 +652,7 @@ static __initconst const struct x86_pmu amd_pmu = {
|
|
| 290 |
- |
|
| 291 |
- static int __init amd_core_pmu_init(void) |
|
| 292 |
- {
|
|
| 293 |
-- if (!cpu_has_perfctr_core) |
|
| 294 |
-+ if (!boot_cpu_has(X86_FEATURE_PERFCTR_CORE)) |
|
| 295 |
- return 0; |
|
| 296 |
- |
|
| 297 |
- switch (boot_cpu_data.x86) {
|
|
| 298 |
-diff --git a/arch/x86/kernel/cpu/perf_event_amd_uncore.c b/arch/x86/kernel/cpu/perf_event_amd_uncore.c |
|
| 299 |
-index cc6cedb..4974274 100644 |
|
| 300 |
-+++ b/arch/x86/kernel/cpu/perf_event_amd_uncore.c |
|
| 301 |
-@@ -523,10 +523,10 @@ static int __init amd_uncore_init(void) |
|
| 302 |
- if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD) |
|
| 303 |
- goto fail_nodev; |
|
| 304 |
- |
|
| 305 |
-- if (!cpu_has_topoext) |
|
| 306 |
-+ if (!boot_cpu_has(X86_FEATURE_TOPOEXT)) |
|
| 307 |
- goto fail_nodev; |
|
| 308 |
- |
|
| 309 |
-- if (cpu_has_perfctr_nb) {
|
|
| 310 |
-+ if (boot_cpu_has(X86_FEATURE_PERFCTR_NB)) {
|
|
| 311 |
- amd_uncore_nb = alloc_percpu(struct amd_uncore *); |
|
| 312 |
- if (!amd_uncore_nb) {
|
|
| 313 |
- ret = -ENOMEM; |
|
| 314 |
-@@ -540,7 +540,7 @@ static int __init amd_uncore_init(void) |
|
| 315 |
- ret = 0; |
|
| 316 |
- } |
|
| 317 |
- |
|
| 318 |
-- if (cpu_has_perfctr_l2) {
|
|
| 319 |
-+ if (boot_cpu_has(X86_FEATURE_PERFCTR_L2)) {
|
|
| 320 |
- amd_uncore_l2 = alloc_percpu(struct amd_uncore *); |
|
| 321 |
- if (!amd_uncore_l2) {
|
|
| 322 |
- ret = -ENOMEM; |
|
| 323 |
-@@ -583,10 +583,11 @@ fail_online: |
|
| 324 |
- |
|
| 325 |
- /* amd_uncore_nb/l2 should have been freed by cleanup_cpu_online */ |
|
| 326 |
- amd_uncore_nb = amd_uncore_l2 = NULL; |
|
| 327 |
-- if (cpu_has_perfctr_l2) |
|
| 328 |
-+ |
|
| 329 |
-+ if (boot_cpu_has(X86_FEATURE_PERFCTR_L2)) |
|
| 330 |
- perf_pmu_unregister(&amd_l2_pmu); |
|
| 331 |
- fail_l2: |
|
| 332 |
-- if (cpu_has_perfctr_nb) |
|
| 333 |
-+ if (boot_cpu_has(X86_FEATURE_PERFCTR_NB)) |
|
| 334 |
- perf_pmu_unregister(&amd_nb_pmu); |
|
| 335 |
- if (amd_uncore_l2) |
|
| 336 |
- free_percpu(amd_uncore_l2); |
|
| 337 |
-diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c |
|
| 338 |
-index 1011c05b..42a0b87 100644 |
|
| 339 |
-+++ b/arch/x86/kernel/fpu/init.c |
|
| 340 |
-@@ -12,7 +12,7 @@ |
|
| 341 |
- */ |
|
| 342 |
- static void fpu__init_cpu_ctx_switch(void) |
|
| 343 |
- {
|
|
| 344 |
-- if (!cpu_has_eager_fpu) |
|
| 345 |
-+ if (!boot_cpu_has(X86_FEATURE_EAGER_FPU)) |
|
| 346 |
- stts(); |
|
| 347 |
- else |
|
| 348 |
- clts(); |
|
| 349 |
-@@ -288,7 +288,7 @@ static void __init fpu__init_system_ctx_switch(void) |
|
| 350 |
- current_thread_info()->status = 0; |
|
| 351 |
- |
|
| 352 |
- /* Auto enable eagerfpu for xsaveopt */ |
|
| 353 |
-- if (cpu_has_xsaveopt && eagerfpu != DISABLE) |
|
| 354 |
-+ if (boot_cpu_has(X86_FEATURE_XSAVEOPT) && eagerfpu != DISABLE) |
|
| 355 |
- eagerfpu = ENABLE; |
|
| 356 |
- |
|
| 357 |
- if (xfeatures_mask & XFEATURE_MASK_EAGER) {
|
|
| 358 |
-diff --git a/arch/x86/kernel/hw_breakpoint.c b/arch/x86/kernel/hw_breakpoint.c |
|
| 359 |
-index 50a3fad..2bcfb5f 100644 |
|
| 360 |
-+++ b/arch/x86/kernel/hw_breakpoint.c |
|
| 361 |
-@@ -300,6 +300,10 @@ static int arch_build_bp_info(struct perf_event *bp) |
|
| 362 |
- return -EINVAL; |
|
| 363 |
- if (bp->attr.bp_addr & (bp->attr.bp_len - 1)) |
|
| 364 |
- return -EINVAL; |
|
| 365 |
-+ |
|
| 366 |
-+ if (!boot_cpu_has(X86_FEATURE_BPEXT)) |
|
| 367 |
-+ return -EOPNOTSUPP; |
|
| 368 |
-+ |
|
| 369 |
- /* |
|
| 370 |
- * It's impossible to use a range breakpoint to fake out |
|
| 371 |
- * user vs kernel detection because bp_len - 1 can't |
|
| 372 |
-@@ -307,8 +311,6 @@ static int arch_build_bp_info(struct perf_event *bp) |
|
| 373 |
- * breakpoints, then we'll have to check for kprobe-blacklisted |
|
| 374 |
- * addresses anywhere in the range. |
|
| 375 |
- */ |
|
| 376 |
-- if (!cpu_has_bpext) |
|
| 377 |
-- return -EOPNOTSUPP; |
|
| 378 |
- info->mask = bp->attr.bp_len - 1; |
|
| 379 |
- info->len = X86_BREAKPOINT_LEN_1; |
|
| 380 |
- } |
|
| 381 |
-diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c |
|
| 382 |
-index 48ca932..1f7aefc 100644 |
|
| 383 |
-+++ b/arch/x86/kernel/smpboot.c |
|
| 384 |
-@@ -295,7 +295,7 @@ do { \
|
|
| 385 |
- |
|
| 386 |
- static bool match_smt(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o) |
|
| 387 |
- {
|
|
| 388 |
-- if (cpu_has_topoext) {
|
|
| 389 |
-+ if (boot_cpu_has(X86_FEATURE_TOPOEXT)) {
|
|
| 390 |
- int cpu1 = c->cpu_index, cpu2 = o->cpu_index; |
|
| 391 |
- |
|
| 392 |
- if (c->phys_proc_id == o->phys_proc_id && |
|
| 393 |
-diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c |
|
| 394 |
-index af57736..d6d64a5 100644 |
|
| 395 |
-+++ b/arch/x86/kernel/vm86_32.c |
|
| 396 |
-@@ -357,8 +357,10 @@ static long do_sys_vm86(struct vm86plus_struct __user *user_vm86, bool plus) |
|
| 397 |
- tss = &per_cpu(cpu_tss, get_cpu()); |
|
| 398 |
- /* make room for real-mode segments */ |
|
| 399 |
- tsk->thread.sp0 += 16; |
|
| 400 |
-- if (cpu_has_sep) |
|
| 401 |
-+ |
|
| 402 |
-+ if (static_cpu_has_safe(X86_FEATURE_SEP)) |
|
| 403 |
- tsk->thread.sysenter_cs = 0; |
|
| 404 |
-+ |
|
| 405 |
- load_sp0(tss, &tsk->thread); |
|
| 406 |
- put_cpu(); |
|
| 407 |
- |
|
| 408 |
-diff --git a/arch/x86/mm/setup_nx.c b/arch/x86/mm/setup_nx.c |
|
| 409 |
-index 90555bf..92e2eac 100644 |
|
| 410 |
-+++ b/arch/x86/mm/setup_nx.c |
|
| 411 |
-@@ -31,7 +31,7 @@ early_param("noexec", noexec_setup);
|
|
| 412 |
- |
|
| 413 |
- void x86_configure_nx(void) |
|
| 414 |
- {
|
|
| 415 |
-- if (cpu_has_nx && !disable_nx) |
|
| 416 |
-+ if (boot_cpu_has(X86_FEATURE_NX) && !disable_nx) |
|
| 417 |
- __supported_pte_mask |= _PAGE_NX; |
|
| 418 |
- else |
|
| 419 |
- __supported_pte_mask &= ~_PAGE_NX; |
|
| 420 |
-@@ -39,7 +39,7 @@ void x86_configure_nx(void) |
|
| 421 |
- |
|
| 422 |
- void __init x86_report_nx(void) |
|
| 423 |
- {
|
|
| 424 |
-- if (!cpu_has_nx) {
|
|
| 425 |
-+ if (!boot_cpu_has(X86_FEATURE_NX)) {
|
|
| 426 |
- printk(KERN_NOTICE "Notice: NX (Execute Disable) protection " |
|
| 427 |
- "missing in CPU!\n"); |
|
| 428 |
- } else {
|
|
| 429 |
-diff --git a/drivers/char/hw_random/via-rng.c b/drivers/char/hw_random/via-rng.c |
|
| 430 |
-index 0c98a9d..44ce806 100644 |
|
| 431 |
-+++ b/drivers/char/hw_random/via-rng.c |
|
| 432 |
-@@ -140,7 +140,7 @@ static int via_rng_init(struct hwrng *rng) |
|
| 433 |
- * RNG configuration like it used to be the case in this |
|
| 434 |
- * register */ |
|
| 435 |
- if ((c->x86 == 6) && (c->x86_model >= 0x0f)) {
|
|
| 436 |
-- if (!cpu_has_xstore_enabled) {
|
|
| 437 |
-+ if (!boot_cpu_has(X86_FEATURE_XSTORE_EN)) {
|
|
| 438 |
- pr_err(PFX "can't enable hardware RNG " |
|
| 439 |
- "if XSTORE is not enabled\n"); |
|
| 440 |
- return -ENODEV; |
|
| 441 |
-@@ -200,8 +200,9 @@ static int __init mod_init(void) |
|
| 442 |
- {
|
|
| 443 |
- int err; |
|
| 444 |
- |
|
| 445 |
-- if (!cpu_has_xstore) |
|
| 446 |
-+ if (!boot_cpu_has(X86_FEATURE_XSTORE)) |
|
| 447 |
- return -ENODEV; |
|
| 448 |
-+ |
|
| 449 |
- pr_info("VIA RNG detected\n");
|
|
| 450 |
- err = hwrng_register(&via_rng); |
|
| 451 |
- if (err) {
|
|
| 452 |
-diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c |
|
| 453 |
-index da2d677..97a3646 100644 |
|
| 454 |
-+++ b/drivers/crypto/padlock-aes.c |
|
| 455 |
-@@ -515,7 +515,7 @@ static int __init padlock_init(void) |
|
| 456 |
- if (!x86_match_cpu(padlock_cpu_id)) |
|
| 457 |
- return -ENODEV; |
|
| 458 |
- |
|
| 459 |
-- if (!cpu_has_xcrypt_enabled) {
|
|
| 460 |
-+ if (!boot_cpu_has(X86_FEATURE_XCRYPT_EN)) {
|
|
| 461 |
- printk(KERN_NOTICE PFX "VIA PadLock detected, but not enabled. Hmm, strange...\n"); |
|
| 462 |
- return -ENODEV; |
|
| 463 |
- } |
|
| 464 |
-diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c |
|
| 465 |
-index 4e154c9..8c5f906 100644 |
|
| 466 |
-+++ b/drivers/crypto/padlock-sha.c |
|
| 467 |
-@@ -540,7 +540,7 @@ static int __init padlock_init(void) |
|
| 468 |
- struct shash_alg *sha1; |
|
| 469 |
- struct shash_alg *sha256; |
|
| 470 |
- |
|
| 471 |
-- if (!x86_match_cpu(padlock_sha_ids) || !cpu_has_phe_enabled) |
|
| 472 |
-+ if (!x86_match_cpu(padlock_sha_ids) || !boot_cpu_has(X86_FEATURE_PHE_EN)) |
|
| 473 |
- return -ENODEV; |
|
| 474 |
- |
|
| 475 |
- /* Register the newly added algorithm module if on * |
|
| 476 |
-diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c |
|
| 477 |
-index e9b241b..ac59692 100644 |
|
| 478 |
-+++ b/drivers/iommu/intel_irq_remapping.c |
|
| 479 |
-@@ -753,7 +753,7 @@ static inline void set_irq_posting_cap(void) |
|
| 480 |
- * should have X86_FEATURE_CX16 support, this has been confirmed |
|
| 481 |
- * with Intel hardware guys. |
|
| 482 |
- */ |
|
| 483 |
-- if ( cpu_has_cx16 ) |
|
| 484 |
-+ if (boot_cpu_has(X86_FEATURE_CX16)) |
|
| 485 |
- intel_irq_remap_ops.capability |= 1 << IRQ_POSTING_CAP; |
|
| 486 |
- |
|
| 487 |
- for_each_iommu(iommu, drhd) |
|
| 488 |
-diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c |
|
| 489 |
-index 208b3f5..7efd70b 100644 |
|
| 490 |
-+++ b/fs/btrfs/disk-io.c |
|
| 491 |
-@@ -923,7 +923,7 @@ static int check_async_write(struct inode *inode, unsigned long bio_flags) |
|
| 492 |
- if (bio_flags & EXTENT_BIO_TREE_LOG) |
|
| 493 |
- return 0; |
|
| 494 |
- #ifdef CONFIG_X86 |
|
| 495 |
-- if (cpu_has_xmm4_2) |
|
| 496 |
-+ if (static_cpu_has_safe(X86_FEATURE_XMM4_2)) |
|
| 497 |
- return 0; |
|
| 498 |
- #endif |
|
| 499 |
- return 1; |
|
| 500 |
-2.7.4 |
|
| 501 |
- |
| ... | ... |
@@ -386,7 +386,7 @@ index 5ce8759..f62e872 100644 |
| 386 | 386 |
-#define X86_FEATURE_EXTD_APICID ( 3*32+26) /* has extended APICID (8 bits) */ |
| 387 | 387 |
-#define X86_FEATURE_AMD_DCM ( 3*32+27) /* multi-node processor */ |
| 388 | 388 |
-#define X86_FEATURE_APERFMPERF ( 3*32+28) /* APERFMPERF */ |
| 389 |
--#define X86_FEATURE_EAGER_FPU ( 3*32+29) /* "eagerfpu" Non lazy FPU restore */ |
|
| 389 |
+-/* free, was #define X86_FEATURE_EAGER_FPU ( 3*32+29) * "eagerfpu" Non lazy FPU restore */ |
|
| 390 | 390 |
-#define X86_FEATURE_NONSTOP_TSC_S3 ( 3*32+30) /* TSC doesn't stop in S3 state */ |
| 391 | 391 |
- |
| 392 | 392 |
-/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ |
| ... | ... |
@@ -691,7 +691,7 @@ index 0000000..5dab071 |
| 691 | 691 |
+#define X86_FEATURE_EXTD_APICID ( 3*32+26) /* has extended APICID (8 bits) */ |
| 692 | 692 |
+#define X86_FEATURE_AMD_DCM ( 3*32+27) /* multi-node processor */ |
| 693 | 693 |
+#define X86_FEATURE_APERFMPERF ( 3*32+28) /* APERFMPERF */ |
| 694 |
-+#define X86_FEATURE_EAGER_FPU ( 3*32+29) /* "eagerfpu" Non lazy FPU restore */ |
|
| 694 |
++/* free, was #define X86_FEATURE_EAGER_FPU ( 3*32+29) * "eagerfpu" Non lazy FPU restore */ |
|
| 695 | 695 |
+#define X86_FEATURE_NONSTOP_TSC_S3 ( 3*32+30) /* TSC doesn't stop in S3 state */ |
| 696 | 696 |
+ |
| 697 | 697 |
+/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ |
| ... | ... |
@@ -219,16 +219,10 @@ index f62e872..b60598c 100644 |
| 219 | 219 |
|
| 220 | 220 |
#define MAX_CPU_FEATURES (NCAPINTS * 32) |
| 221 | 221 |
diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h |
| 222 |
-index f9c14ab..36e2d47 100644 |
|
| 222 |
+index 94e7570..ec2aedb 100644 |
|
| 223 | 223 |
--- a/arch/x86/include/asm/fpu/internal.h |
| 224 | 224 |
+++ b/arch/x86/include/asm/fpu/internal.h |
| 225 |
-@@ -58,22 +58,22 @@ extern void fpu__resume_cpu(void); |
|
| 226 |
- */ |
|
| 227 |
- static __always_inline __pure bool use_eager_fpu(void) |
|
| 228 |
- {
|
|
| 229 |
-- return static_cpu_has_safe(X86_FEATURE_EAGER_FPU); |
|
| 230 |
-+ return static_cpu_has(X86_FEATURE_EAGER_FPU); |
|
| 231 |
- } |
|
| 225 |
+@@ -64,17 +64,17 @@ static __always_inline __pure bool use_eager_fpu(void) |
|
| 232 | 226 |
|
| 233 | 227 |
static __always_inline __pure bool use_xsaveopt(void) |
| 234 | 228 |
{
|
| ... | ... |
@@ -249,7 +243,7 @@ index f9c14ab..36e2d47 100644 |
| 249 | 249 |
} |
| 250 | 250 |
|
| 251 | 251 |
/* |
| 252 |
-@@ -300,7 +300,7 @@ static inline void copy_xregs_to_kernel_booting(struct xregs_state *xstate) |
|
| 252 |
+@@ -301,7 +301,7 @@ static inline void copy_xregs_to_kernel_booting(struct xregs_state *xstate) |
|
| 253 | 253 |
|
| 254 | 254 |
WARN_ON(system_state != SYSTEM_BOOTING); |
| 255 | 255 |
|
| ... | ... |
@@ -258,7 +252,7 @@ index f9c14ab..36e2d47 100644 |
| 258 | 258 |
XSTATE_OP(XSAVES, xstate, lmask, hmask, err); |
| 259 | 259 |
else |
| 260 | 260 |
XSTATE_OP(XSAVE, xstate, lmask, hmask, err); |
| 261 |
-@@ -322,7 +322,7 @@ static inline void copy_kernel_to_xregs_booting(struct xregs_state *xstate) |
|
| 261 |
+@@ -323,7 +323,7 @@ static inline void copy_kernel_to_xregs_booting(struct xregs_state *xstate) |
|
| 262 | 262 |
|
| 263 | 263 |
WARN_ON(system_state != SYSTEM_BOOTING); |
| 264 | 264 |
|
| ... | ... |
@@ -267,7 +261,7 @@ index f9c14ab..36e2d47 100644 |
| 267 | 267 |
XSTATE_OP(XRSTORS, xstate, lmask, hmask, err); |
| 268 | 268 |
else |
| 269 | 269 |
XSTATE_OP(XRSTOR, xstate, lmask, hmask, err); |
| 270 |
-@@ -460,7 +460,7 @@ static inline void copy_kernel_to_fpregs(union fpregs_state *fpstate) |
|
| 270 |
+@@ -461,7 +461,7 @@ static inline void copy_kernel_to_fpregs(union fpregs_state *fpstate) |
|
| 271 | 271 |
* pending. Clear the x87 state here by setting it to fixed values. |
| 272 | 272 |
* "m" is a random variable that should be in L1. |
| 273 | 273 |
*/ |
| 274 | 274 |
new file mode 100755 |
| ... | ... |
@@ -0,0 +1,18 @@ |
| 0 |
+#! /bin/sh |
|
| 1 |
+ |
|
| 2 |
+specs="linux-api-headers/linux-api-headers.spec linux/linux.spec linux/linux-esx.spec" |
|
| 3 |
+ |
|
| 4 |
+tarball_url=`curl -s https://www.kernel.org | grep -Eo 'https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.[0-9]*.tar.xz'` |
|
| 5 |
+tarball=$(basename $tarball_url) |
|
| 6 |
+version=`echo $tarball | sed 's/linux-//; s/.tar.xz//'` |
|
| 7 |
+echo latest linux version: $version |
|
| 8 |
+test -f stage/SOURCES/$tarball && echo up to date && exit 0 |
|
| 9 |
+$(cd stage/SOURCES && wget $tarball_url) |
|
| 10 |
+sha1=`sha1sum stage/SOURCES/$tarball | awk '{print $1}'`
|
|
| 11 |
+changelog_entry=$(echo "`date +"%a %b %d %Y"` `git config user.name` <`git config user.email`> $version-1") |
|
| 12 |
+for spec in $specs; do |
|
| 13 |
+ sed -i '/^Version:/ s/4.4.[0-9]*/'$version'/' SPECS/$spec |
|
| 14 |
+ sed -i '/^Release:/ s/[0-9]*%/1%/' SPECS/$spec |
|
| 15 |
+ sed -i '/^%define sha1 linux/ s/=[0-9a-f]*$/='$sha1'/' SPECS/$spec |
|
| 16 |
+ sed -i '/^%changelog/a* '"$changelog_entry"'\n- Update to version '"$version"'' SPECS/$spec |
|
| 17 |
+done |
| 0 | 18 |
deleted file mode 100755 |
| ... | ... |
@@ -1,18 +0,0 @@ |
| 1 |
-#! /bin/sh |
|
| 2 |
- |
|
| 3 |
-specs="linux-api-headers/linux-api-headers.spec linux/linux.spec linux/linux-esx.spec" |
|
| 4 |
- |
|
| 5 |
-tarball_url=`curl -s https://www.kernel.org | grep -Eo 'https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.[0-9]*.tar.xz'` |
|
| 6 |
-tarball=$(basename $tarball_url) |
|
| 7 |
-version=`echo $tarball | sed 's/linux-//; s/.tar.xz//'` |
|
| 8 |
-echo latest linux version: $version |
|
| 9 |
-test -f stage/SOURCES/$tarball && echo up to date && exit 0 |
|
| 10 |
-$(cd stage/SOURCES && wget $tarball_url) |
|
| 11 |
-sha1=`sha1sum stage/SOURCES/$tarball | awk '{print $1}'`
|
|
| 12 |
-changelog_entry=$(echo "`date +"%a %b %d %Y"` `git config user.name` <`git config user.email`> $version-1") |
|
| 13 |
-for spec in $specs; do |
|
| 14 |
- sed -i '/^Version:/ s/4.4.[0-9]*/'$version'/' SPECS/$spec |
|
| 15 |
- sed -i '/^Release:/ s/[0-9]*%/1%/' SPECS/$spec |
|
| 16 |
- sed -i '/^%define sha1 linux/ s/=[0-9a-f]*$/='$sha1'/' SPECS/$spec |
|
| 17 |
- sed -i '/^%changelog/a* '"$changelog_entry"'\n- Update to version '"$version"'' SPECS/$spec |
|
| 18 |
-done |