Skip to content
Snippets Groups Projects
Unverified Commit 09135a1c authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!192 x86/apic/vector: Fix ordering in vector assignment

Merge Pull Request from: @CTC-XiboWang 
 
This PR is cherry-pick from upstream "x86/apic/vector: Fix ordering in vector assignment"

Upstream patch:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/x86/kernel/apic?id=190113b4c6531c8e09b31d5235f9b5175cbb0f72 
 
Link:https://gitee.com/openeuler/kernel/pulls/192

 
Reviewed-by: default avatarLaibin Qiu <qiulaibin@huawei.com>
Reviewed-by: default avatarJun Tian <jun.j.tian@intel.com>
Signed-off-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parents 8ad0934c ed49ea9e
No related branches found
No related tags found
No related merge requests found
......@@ -274,20 +274,24 @@ static int assign_irq_vector_any_locked(struct irq_data *irqd)
const struct cpumask *affmsk = irq_data_get_affinity_mask(irqd);
int node = irq_data_get_node(irqd);
if (node == NUMA_NO_NODE)
goto all;
/* Try the intersection of @affmsk and node mask */
cpumask_and(vector_searchmask, cpumask_of_node(node), affmsk);
if (!assign_vector_locked(irqd, vector_searchmask))
return 0;
/* Try the node mask */
if (!assign_vector_locked(irqd, cpumask_of_node(node)))
return 0;
all:
if (node != NUMA_NO_NODE) {
/* Try the intersection of @affmsk and node mask */
cpumask_and(vector_searchmask, cpumask_of_node(node), affmsk);
if (!assign_vector_locked(irqd, vector_searchmask))
return 0;
}
/* Try the full affinity mask */
cpumask_and(vector_searchmask, affmsk, cpu_online_mask);
if (!assign_vector_locked(irqd, vector_searchmask))
return 0;
if (node != NUMA_NO_NODE) {
/* Try the node mask */
if (!assign_vector_locked(irqd, cpumask_of_node(node)))
return 0;
}
/* Try the full online mask */
return assign_vector_locked(irqd, cpu_online_mask);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment