]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
x86/cpu/AMD: Remove now unused definition of MFENCE_RDTSC feature
authorElena Reshetova <elena.reshetova@intel.com>
Thu, 4 Jan 2018 07:43:33 +0000 (23:43 -0800)
committerKirtikar Kashyap <kirtikar.kashyap@oracle.com>
Fri, 12 Jan 2018 18:19:59 +0000 (10:19 -0800)
With the switch to using LFENCE_RDTSC on AMD platforms there is no longer
a need for the MFENCE_RDTSC feature.  Remove its usage and definition.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Orabug: 27340445
CVE: CVE-2017-5753

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
Conflicts:
Patch refers to arch/x86/include/asm/cpufeatures.h
Code base has   arch/x86/include/asm/cpufeature.h
Patch references X86_FEATURE_MFENCE_RDTSC in arch/x86/include/asm/msr.h
Code base references it in:
arch/x86/include/asm/barrier.h
arch/x86/um/asm/barrier.h

Reviewed-by: John Haxby <john.haxby@oracle.com>
Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
arch/x86/include/asm/barrier.h
arch/x86/include/asm/cpufeature.h
arch/x86/um/asm/barrier.h

index 5c9b03b681a96d7f4e8f43b2011656320aa4cfd1..9a186bf55e26fb2690007f4d535534be3ff1cf08 100644 (file)
@@ -93,8 +93,7 @@ do {                                                                  \
  */
 static __always_inline void rdtsc_barrier(void)
 {
-       alternative_2("", "mfence", X86_FEATURE_MFENCE_RDTSC,
-                         "lfence", X86_FEATURE_LFENCE_RDTSC);
+       alternative("", "lfence", X86_FEATURE_LFENCE_RDTSC);
 }
 #include <asm-generic/barrier.h>
 
index e42510d0bb186bc27bf82c250c94b4820befa6e9..edf4c963f26ec61f59b82b50b0cb0a33e4fb4b61 100644 (file)
@@ -97,7 +97,7 @@
 #define X86_FEATURE_SYSCALL32  ( 3*32+14) /* "" syscall in ia32 userspace */
 #define X86_FEATURE_SYSENTER32 ( 3*32+15) /* "" sysenter in ia32 userspace */
 #define X86_FEATURE_REP_GOOD   ( 3*32+16) /* rep microcode works well */
-#define X86_FEATURE_MFENCE_RDTSC ( 3*32+17) /* "" Mfence synchronizes RDTSC */
+
 #define X86_FEATURE_LFENCE_RDTSC ( 3*32+18) /* "" Lfence synchronizes RDTSC */
 /* free, was #define X86_FEATURE_11AP  ( 3*32+19) * "" Bad local APIC aka 11AP */
 #define X86_FEATURE_NOPL       ( 3*32+20) /* The NOPL (0F 1F) instructions */
index 7e8a1a6504356159bd1b604b53de4ed194ddd19c..1f8fa123a043bf28f757ff54b62b5716bd6cee7a 100644 (file)
@@ -53,8 +53,7 @@
  */
 static inline void rdtsc_barrier(void)
 {
-       alternative_2("", "mfence", X86_FEATURE_MFENCE_RDTSC,
-                         "lfence", X86_FEATURE_LFENCE_RDTSC);
+       alternative("", "lfence", X86_FEATURE_LFENCE_RDTSC);
 }
 
 #endif