mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
genirq: Respect NUMA node affinity in setup_irq_irq affinity()
We respect node affinity of devices already in the irq descriptor allocation, but we ignore it for the initial interrupt affinity setup, so the interrupt might be routed to a different node. Restrict the default affinity mask to the node on which the irq descriptor is allocated. [ tglx: Massaged changelog ] Signed-off-by: Prarit Bhargava <[email protected]> Acked-by: Neil Horman <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: David Rientjes <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
f3f79e38d5
commit
241fc640be
1 changed files with 8 additions and 1 deletions
|
|
@ -282,7 +282,7 @@ setup_affinity(unsigned int irq, struct irq_desc *desc, struct cpumask *mask)
|
|||
{
|
||||
struct irq_chip *chip = irq_desc_get_chip(desc);
|
||||
struct cpumask *set = irq_default_affinity;
|
||||
int ret;
|
||||
int ret, node = desc->irq_data.node;
|
||||
|
||||
/* Excludes PER_CPU and NO_BALANCE interrupts */
|
||||
if (!irq_can_set_affinity(irq))
|
||||
|
|
@ -301,6 +301,13 @@ setup_affinity(unsigned int irq, struct irq_desc *desc, struct cpumask *mask)
|
|||
}
|
||||
|
||||
cpumask_and(mask, cpu_online_mask, set);
|
||||
if (node != NUMA_NO_NODE) {
|
||||
const struct cpumask *nodemask = cpumask_of_node(node);
|
||||
|
||||
/* make sure at least one of the cpus in nodemask is online */
|
||||
if (cpumask_intersects(mask, nodemask))
|
||||
cpumask_and(mask, mask, nodemask);
|
||||
}
|
||||
ret = chip->irq_set_affinity(&desc->irq_data, mask, false);
|
||||
switch (ret) {
|
||||
case IRQ_SET_MASK_OK:
|
||||
|
|
|
|||
Loading…
Reference in a new issue