Skip to content

Commit 054efb6

Browse files
suryasaimadhuIngo Molnar
authored andcommitted
x86/cpufeature: Remove cpu_has_xmm2
Signed-off-by: Borislav Petkov <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 906bf7f commit 054efb6

File tree

6 files changed

+6
-7
lines changed

6 files changed

+6
-7
lines changed

arch/x86/crypto/poly1305_glue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static struct shash_alg alg = {
179179

180180
static int __init poly1305_simd_mod_init(void)
181181
{
182-
if (!cpu_has_xmm2)
182+
if (!boot_cpu_has(X86_FEATURE_XMM2))
183183
return -ENODEV;
184184

185185
#ifdef CONFIG_AS_AVX2

arch/x86/crypto/serpent_sse2_glue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ static struct crypto_alg serpent_algs[10] = { {
600600

601601
static int __init serpent_sse2_init(void)
602602
{
603-
if (!cpu_has_xmm2) {
603+
if (!boot_cpu_has(X86_FEATURE_XMM2)) {
604604
printk(KERN_INFO "SSE2 instructions are not detected.\n");
605605
return -ENODEV;
606606
}

arch/x86/include/asm/cpufeature.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ extern const char * const x86_bug_flags[NBUGINTS*32];
125125
#define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC)
126126
#define cpu_has_fxsr boot_cpu_has(X86_FEATURE_FXSR)
127127
#define cpu_has_xmm boot_cpu_has(X86_FEATURE_XMM)
128-
#define cpu_has_xmm2 boot_cpu_has(X86_FEATURE_XMM2)
129128
#define cpu_has_aes boot_cpu_has(X86_FEATURE_AES)
130129
#define cpu_has_avx boot_cpu_has(X86_FEATURE_AVX)
131130
#define cpu_has_avx2 boot_cpu_has(X86_FEATURE_AVX2)

arch/x86/kernel/cpu/amd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ static void init_amd(struct cpuinfo_x86 *c)
750750
if (c->x86 >= 0xf)
751751
set_cpu_cap(c, X86_FEATURE_K8);
752752

753-
if (cpu_has_xmm2) {
753+
if (cpu_has(c, X86_FEATURE_XMM2)) {
754754
/* MFENCE stops RDTSC speculation */
755755
set_cpu_cap(c, X86_FEATURE_MFENCE_RDTSC);
756756
}

arch/x86/kernel/cpu/intel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ static void init_intel(struct cpuinfo_x86 *c)
456456
set_cpu_cap(c, X86_FEATURE_ARCH_PERFMON);
457457
}
458458

459-
if (cpu_has_xmm2)
459+
if (cpu_has(c, X86_FEATURE_XMM2))
460460
set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
461461

462462
if (boot_cpu_has(X86_FEATURE_DS)) {

arch/x86/lib/usercopy_32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ unsigned long __copy_from_user_ll_nocache(void *to, const void __user *from,
612612
{
613613
stac();
614614
#ifdef CONFIG_X86_INTEL_USERCOPY
615-
if (n > 64 && cpu_has_xmm2)
615+
if (n > 64 && static_cpu_has(X86_FEATURE_XMM2))
616616
n = __copy_user_zeroing_intel_nocache(to, from, n);
617617
else
618618
__copy_user_zeroing(to, from, n);
@@ -629,7 +629,7 @@ unsigned long __copy_from_user_ll_nocache_nozero(void *to, const void __user *fr
629629
{
630630
stac();
631631
#ifdef CONFIG_X86_INTEL_USERCOPY
632-
if (n > 64 && cpu_has_xmm2)
632+
if (n > 64 && static_cpu_has(X86_FEATURE_XMM2))
633633
n = __copy_user_intel_nocache(to, from, n);
634634
else
635635
__copy_user(to, from, n);

0 commit comments

Comments
 (0)