Skip to content

Commit 74b2fc8

Browse files
committed
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: 8e50d39 ("dmaengine: idxd: Add shared workqueue support") Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Acked-By: Vinod Koul <[email protected]> Cc: <[email protected]>
1 parent 9a90ed0 commit 74b2fc8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/dma/idxd/init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,12 +745,12 @@ static int __init idxd_init_module(void)
745745
* If the CPU does not support MOVDIR64B or ENQCMDS, there's no point in
746746
* enumerating the device. We can not utilize it.
747747
*/
748-
if (!boot_cpu_has(X86_FEATURE_MOVDIR64B)) {
748+
if (!cpu_feature_enabled(X86_FEATURE_MOVDIR64B)) {
749749
pr_warn("idxd driver failed to load without MOVDIR64B.\n");
750750
return -ENODEV;
751751
}
752752

753-
if (!boot_cpu_has(X86_FEATURE_ENQCMD))
753+
if (!cpu_feature_enabled(X86_FEATURE_ENQCMD))
754754
pr_warn("Platform does not have ENQCMD(S) support.\n");
755755
else
756756
support_enqcmd = true;

0 commit comments

Comments
 (0)