ARM CCN driver fixes
cover ARM CCN driver fixes
Hello Arnd, Kevin, Olof,
Here are two tiny CCN driver fixes. The first bug was known for a while now, but never caused any issue, so the patch wasn't critical.
The second one removes a spurious warning that has been observed last week, thus is cc-ed to stable.
Both can wait till the next merge window, unless you're willing to push them out as late fixes in this cycle.
Cheers!
Pawel
Pawel Moll (2):
bus: arm-ccn: Handle correctly no-more-cpus case
bus: arm-ccn: Fix irq affinity setting on CPU migration
drivers/bus/arm-ccn.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
2.1.4
PATCH 1/2 bus: arm-ccn: Handle correctly no-more-cpus case
When migrating events the driver picks another cpu using cpumask_any_but() function, which returns value >= nr_cpu_ids when there is none available, not a negative value as the code assumed. Fixed now.
--- drivers/bus/arm-ccn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/arm-ccn.c +1 -1
@@ -1184,7 +1184,7 @@ static int arm_ccn_pmu_cpu_notifier(struct notifier_block *nb,if (!cpumask_test_and_clear_cpu (cpu, &dt->cpu))break ; target =cpumask_any_but (cpu_online_mask, cpu); -if (target <0 ) +if (target >= nr_cpu_ids)break ;perf_pmu_migrate_context (&dt->pmu, cpu, target);cpumask_set_cpu (target, &dt->cpu);
Signature · 1 line
2.1.4
PATCH 2/2 bus: arm-ccn: Fix irq affinity setting on CPU migration
In reply to Pawel MollWhen 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.
--- drivers/bus/arm-ccn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/bus/arm-ccn.c +2 -1
@@ -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 ; }
Signature · 1 line
2.1.4
Arnd Bergmann
Appliedcover ARM CCN driver fixes
In reply to Pawel MollQuoted 11 lines · On Thursday 15 October 2015 14:32:44 Pawel Moll wrote:
Hello Arnd, Kevin, Olof,
Here are two tiny CCN driver fixes. The first bug was known for a while now, but never caused any issue, so the patch wasn't critical.
The second one removes a spurious warning that has been observed last week, thus is cc-ed to stable.
Both can wait till the next merge window, unless you're willing to push them out as late fixes in this cycle.
Applied both to fixes, thanks!
ARnd