forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-11-22 f743a7adbd6e230d66a6206fa115b59fec2d88eb
kernel/drivers/infiniband/hw/hfi1/sdma.c
....@@ -853,14 +853,13 @@
853853 {
854854 struct sdma_rht_node *rht_node;
855855 struct sdma_engine *sde = NULL;
856
- const struct cpumask *current_mask = &current->cpus_allowed;
857856 unsigned long cpu_id;
858857
859858 /*
860859 * To ensure that always the same sdma engine(s) will be
861860 * selected make sure the process is pinned to this CPU only.
862861 */
863
- if (cpumask_weight(current_mask) != 1)
862
+ if (current->nr_cpus_allowed != 1)
864863 goto out;
865864
866865 cpu_id = smp_processor_id();