提交 74b2fc88 编写于 作者: B Borislav Petkov

dmaengine: idxd: Use cpu_feature_enabled()

When testing x86 feature bits, use cpu_feature_enabled() so that
build-disabled features can remain off, regardless of what CPUID says.

Fixes: 8e50d392 ("dmaengine: idxd: Add shared workqueue support")
Signed-off-by: NBorislav Petkov <bp@suse.de>
Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
Acked-By: NVinod Koul <vkoul@kernel.org>
Cc: <stable@vger.kernel.org>
上级 9a90ed06
...@@ -745,12 +745,12 @@ static int __init idxd_init_module(void) ...@@ -745,12 +745,12 @@ static int __init idxd_init_module(void)
* If the CPU does not support MOVDIR64B or ENQCMDS, there's no point in * If the CPU does not support MOVDIR64B or ENQCMDS, there's no point in
* enumerating the device. We can not utilize it. * enumerating the device. We can not utilize it.
*/ */
if (!boot_cpu_has(X86_FEATURE_MOVDIR64B)) { if (!cpu_feature_enabled(X86_FEATURE_MOVDIR64B)) {
pr_warn("idxd driver failed to load without MOVDIR64B.\n"); pr_warn("idxd driver failed to load without MOVDIR64B.\n");
return -ENODEV; return -ENODEV;
} }
if (!boot_cpu_has(X86_FEATURE_ENQCMD)) if (!cpu_feature_enabled(X86_FEATURE_ENQCMD))
pr_warn("Platform does not have ENQCMD(S) support.\n"); pr_warn("Platform does not have ENQCMD(S) support.\n");
else else
support_enqcmd = true; support_enqcmd = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册