kernel: Only set one CPU in the default IRQ affinity mask

On ARM, IRQs are executed on the first CPU inside the affinity mask, so
setting an affinity mask with more than one CPU set is deceptive and
causes issues with pm_qos. To fix this, only set the CPU0 bit inside the
affinity mask, since that's where IRQs will run by default.

This is a follow-up to "kernel: Don't allow IRQ affinity masks to have
more than one CPU".

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
fourteen
Sultan Alsawaf 4 years ago committed by Jenna
parent 13b48b7bcc
commit 59e9010741
  1. 2
      kernel/irq/irqdesc.c

@ -43,7 +43,7 @@ static void __init init_irq_default_affinity(void)
if (!cpumask_available(irq_default_affinity)) if (!cpumask_available(irq_default_affinity))
zalloc_cpumask_var(&irq_default_affinity, GFP_NOWAIT); zalloc_cpumask_var(&irq_default_affinity, GFP_NOWAIT);
if (cpumask_empty(irq_default_affinity)) if (cpumask_empty(irq_default_affinity))
cpumask_setall(irq_default_affinity); cpumask_set_cpu(0, irq_default_affinity);
} }
#else #else
static void __init init_irq_default_affinity(void) static void __init init_irq_default_affinity(void)

Loading…
Cancel
Save