Skip to content

Commit ce4d72f

Browse files
committed
Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fpu changes from Ingo Molnar: "There are two main areas of changes: - Rework of the extended FPU state code to robustify the kernel's usage of cpuid provided xstate sizes - and related changes (Dave Hansen)" - math emulation enhancements: new modern FPU instructions support, with testcases, plus cleanups (Denys Vlasnko)" * 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits) x86/fpu: Fixup uninitialized feature_name warning x86/fpu/math-emu: Add support for FISTTP instructions x86/fpu/math-emu, selftests: Add test for FISTTP instructions x86/fpu/math-emu: Add support for FCMOVcc insns x86/fpu/math-emu: Add support for F[U]COMI[P] insns x86/fpu/math-emu: Remove define layer for undocumented opcodes x86/fpu/math-emu, selftests: Add tests for FCMOV and FCOMI insns x86/fpu/math-emu: Remove !NO_UNDOC_CODE x86/fpu: Check CPU-provided sizes against struct declarations x86/fpu: Check to ensure increasing-offset xstate offsets x86/fpu: Correct and check XSAVE xstate size calculations x86/fpu: Add C structures for AVX-512 state components x86/fpu: Rework YMM definition x86/fpu/mpx: Rework MPX 'xstate' types x86/fpu: Add xfeature_enabled() helper instead of test_bit() x86/fpu: Remove 'xfeature_nr' x86/fpu: Rework XSTATE_* macros to remove magic '2' x86/fpu: Rename XFEATURES_NR_MAX x86/fpu: Rename XSAVE macros x86/fpu: Remove partial LWP support definitions ...
2 parents 0f25f2c + 158ecc3 commit ce4d72f

33 files changed

Lines changed: 1374 additions & 243 deletions

arch/x86/crypto/camellia_aesni_avx2_glue.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,8 @@ static int __init camellia_aesni_init(void)
567567
return -ENODEV;
568568
}
569569

570-
if (!cpu_has_xfeatures(XSTATE_SSE | XSTATE_YMM, &feature_name)) {
570+
if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM,
571+
&feature_name)) {
571572
pr_info("CPU feature '%s' is not supported.\n", feature_name);
572573
return -ENODEV;
573574
}

arch/x86/crypto/camellia_aesni_avx_glue.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,8 @@ static int __init camellia_aesni_init(void)
559559
return -ENODEV;
560560
}
561561

562-
if (!cpu_has_xfeatures(XSTATE_SSE | XSTATE_YMM, &feature_name)) {
562+
if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM,
563+
&feature_name)) {
563564
pr_info("CPU feature '%s' is not supported.\n", feature_name);
564565
return -ENODEV;
565566
}

arch/x86/crypto/cast5_avx_glue.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,8 @@ static int __init cast5_init(void)
469469
{
470470
const char *feature_name;
471471

472-
if (!cpu_has_xfeatures(XSTATE_SSE | XSTATE_YMM, &feature_name)) {
472+
if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM,
473+
&feature_name)) {
473474
pr_info("CPU feature '%s' is not supported.\n", feature_name);
474475
return -ENODEV;
475476
}

arch/x86/crypto/cast6_avx_glue.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,8 @@ static int __init cast6_init(void)
591591
{
592592
const char *feature_name;
593593

594-
if (!cpu_has_xfeatures(XSTATE_SSE | XSTATE_YMM, &feature_name)) {
594+
if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM,
595+
&feature_name)) {
595596
pr_info("CPU feature '%s' is not supported.\n", feature_name);
596597
return -ENODEV;
597598
}

arch/x86/crypto/chacha20_glue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ static int __init chacha20_simd_mod_init(void)
130130

131131
#ifdef CONFIG_AS_AVX2
132132
chacha20_use_avx2 = cpu_has_avx && cpu_has_avx2 &&
133-
cpu_has_xfeatures(XSTATE_SSE | XSTATE_YMM, NULL);
133+
cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL);
134134
#endif
135135
return crypto_register_alg(&alg);
136136
}

arch/x86/crypto/poly1305_glue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static int __init poly1305_simd_mod_init(void)
184184

185185
#ifdef CONFIG_AS_AVX2
186186
poly1305_use_avx2 = cpu_has_avx && cpu_has_avx2 &&
187-
cpu_has_xfeatures(XSTATE_SSE | XSTATE_YMM, NULL);
187+
cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL);
188188
alg.descsize = sizeof(struct poly1305_simd_desc_ctx);
189189
if (poly1305_use_avx2)
190190
alg.descsize += 10 * sizeof(u32);

arch/x86/crypto/serpent_avx2_glue.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,8 @@ static int __init init(void)
542542
pr_info("AVX2 instructions are not detected.\n");
543543
return -ENODEV;
544544
}
545-
if (!cpu_has_xfeatures(XSTATE_SSE | XSTATE_YMM, &feature_name)) {
545+
if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM,
546+
&feature_name)) {
546547
pr_info("CPU feature '%s' is not supported.\n", feature_name);
547548
return -ENODEV;
548549
}

arch/x86/crypto/serpent_avx_glue.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,8 @@ static int __init serpent_init(void)
597597
{
598598
const char *feature_name;
599599

600-
if (!cpu_has_xfeatures(XSTATE_SSE | XSTATE_YMM, &feature_name)) {
600+
if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM,
601+
&feature_name)) {
601602
pr_info("CPU feature '%s' is not supported.\n", feature_name);
602603
return -ENODEV;
603604
}

arch/x86/crypto/sha1_ssse3_glue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static struct shash_alg alg = {
121121
#ifdef CONFIG_AS_AVX
122122
static bool __init avx_usable(void)
123123
{
124-
if (!cpu_has_xfeatures(XSTATE_SSE | XSTATE_YMM, NULL)) {
124+
if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL)) {
125125
if (cpu_has_avx)
126126
pr_info("AVX detected but unusable.\n");
127127
return false;

arch/x86/crypto/sha256_ssse3_glue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ static struct shash_alg algs[] = { {
130130
#ifdef CONFIG_AS_AVX
131131
static bool __init avx_usable(void)
132132
{
133-
if (!cpu_has_xfeatures(XSTATE_SSE | XSTATE_YMM, NULL)) {
133+
if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL)) {
134134
if (cpu_has_avx)
135135
pr_info("AVX detected but unusable.\n");
136136
return false;

0 commit comments

Comments
 (0)