]> git.hungrycats.org Git - linux/commitdiff
bus: arm-ccn: Fix irq affinity setting on CPU migration
authorPawel Moll <pawel.moll@arm.com>
Thu, 15 Oct 2015 13:32:46 +0000 (14:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Nov 2015 22:37:33 +0000 (14:37 -0800)
commit a0bcbe969f564d1ec08658170dda72a1b7e9053a upstream.

When PMU context is migrating between CPUs, interrupt affinity is set as
well. Only this should not happen when the CCN interrupt is not being
used at all (the driver is using a hrtimer tick instead).

Fixed now.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bus/arm-ccn.c

index 7d9879e166cf4c4346402cb353ef3cd002483740..395cb7f9f5a4e15da1e944ad3c4017aab6ec8dbc 100644 (file)
@@ -1188,7 +1188,8 @@ static int arm_ccn_pmu_cpu_notifier(struct notifier_block *nb,
                        break;
                perf_pmu_migrate_context(&dt->pmu, cpu, target);
                cpumask_set_cpu(target, &dt->cpu);
-               WARN_ON(irq_set_affinity(ccn->irq, &dt->cpu) != 0);
+               if (ccn->irq)
+                       WARN_ON(irq_set_affinity(ccn->irq, &dt->cpu) != 0);
        default:
                break;
        }