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)
committerArnd Bergmann <arnd@arndb.de>
Thu, 15 Oct 2015 15:10:15 +0000 (17:10 +0200)
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.

Cc: <stable@vger.kernel.org> # 4.2+
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/bus/arm-ccn.c

index cc322fbde9af69c78f85b359253ea5d8d32f3588..7082c7268845639399d9ceab44471937011e1705 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;
        }