crypto: x86/crc32c-intel Exclude low performance CRC32C instruction CPUs

Low performance CRC32C instruction CPUs expect to use the driver
crc32c-generic. So remove these CPUs support from crc32c-intel.

Signed-off-by: leoliu-oc <leoliu-oc@zhaoxin.com>
This commit is contained in:
leoliu-oc 2023-12-27 21:04:57 +08:00
parent c3818f3513
commit 464c248ffc
1 changed files with 5 additions and 0 deletions

View File

@ -224,6 +224,11 @@ static int __init crc32c_intel_mod_init(void)
{
if (!x86_match_cpu(crc32c_cpu_id))
return -ENODEV;
/* Don't merit use low performance CRC32C instruction */
if (boot_cpu_has(X86_FEATURE_CRC32C_LOW_PERF))
return -ENODEV;
#ifdef CONFIG_X86_64
if (boot_cpu_has(X86_FEATURE_PCLMULQDQ)) {
alg.update = crc32c_pcl_intel_update;