]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: x86/twofish - Switch to new Intel CPU model defines
authorTony Luck <tony.luck@intel.com>
Wed, 24 Apr 2024 18:14:58 +0000 (11:14 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 31 May 2024 09:12:21 +0000 (17:12 +0800)
New CPU #defines encode vendor and family as well as model.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/twofish_glue_3way.c

index 90454cf18e0defa2d0825c18a1c6d0466c14592a..1a1ecfa7f72afe196d2791abe5d5cb0df0fb9858 100644 (file)
@@ -5,6 +5,7 @@
  * Copyright (c) 2011 Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
  */
 
+#include <asm/cpu_device_id.h>
 #include <crypto/algapi.h>
 #include <crypto/twofish.h>
 #include <linux/crypto.h>
@@ -107,10 +108,10 @@ static bool is_blacklisted_cpu(void)
        if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
                return false;
 
-       if (boot_cpu_data.x86 == 0x06 &&
-               (boot_cpu_data.x86_model == 0x1c ||
-                boot_cpu_data.x86_model == 0x26 ||
-                boot_cpu_data.x86_model == 0x36)) {
+       switch (boot_cpu_data.x86_vfm) {
+       case INTEL_ATOM_BONNELL:
+       case INTEL_ATOM_BONNELL_MID:
+       case INTEL_ATOM_SALTWELL:
                /*
                 * On Atom, twofish-3way is slower than original assembler
                 * implementation. Twofish-3way trades off some performance in