* [PATCH 0/2] ARM CCN driver fixes
@ 2015-10-15 13:32 Pawel Moll
2015-10-15 13:32 ` [PATCH 1/2] bus: arm-ccn: Handle correctly no-more-cpus case Pawel Moll
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Pawel Moll @ 2015-10-15 13:32 UTC (permalink / raw)
To: linux-arm-kernel
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(-)
--
2.1.4
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] bus: arm-ccn: Handle correctly no-more-cpus case
2015-10-15 13:32 [PATCH 0/2] ARM CCN driver fixes Pawel Moll
@ 2015-10-15 13:32 ` Pawel Moll
2015-10-15 13:32 ` [PATCH 2/2] bus: arm-ccn: Fix irq affinity setting on CPU migration Pawel Moll
2015-10-15 15:10 ` [PATCH 0/2] ARM CCN driver fixes Arnd Bergmann
2 siblings, 0 replies; 4+ messages in thread
From: Pawel Moll @ 2015-10-15 13:32 UTC (permalink / raw)
To: linux-arm-kernel
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.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
---
drivers/bus/arm-ccn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c
index 7d9879e..cc322fb 100644
--- a/drivers/bus/arm-ccn.c
+++ b/drivers/bus/arm-ccn.c
@@ -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);
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] bus: arm-ccn: Fix irq affinity setting on CPU migration
2015-10-15 13:32 [PATCH 0/2] ARM CCN driver fixes Pawel Moll
2015-10-15 13:32 ` [PATCH 1/2] bus: arm-ccn: Handle correctly no-more-cpus case Pawel Moll
@ 2015-10-15 13:32 ` Pawel Moll
2015-10-15 15:10 ` [PATCH 0/2] ARM CCN driver fixes Arnd Bergmann
2 siblings, 0 replies; 4+ messages in thread
From: Pawel Moll @ 2015-10-15 13:32 UTC (permalink / raw)
To: linux-arm-kernel
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>
---
drivers/bus/arm-ccn.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c
index cc322fb..7082c72 100644
--- a/drivers/bus/arm-ccn.c
+++ b/drivers/bus/arm-ccn.c
@@ -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;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 0/2] ARM CCN driver fixes
2015-10-15 13:32 [PATCH 0/2] ARM CCN driver fixes Pawel Moll
2015-10-15 13:32 ` [PATCH 1/2] bus: arm-ccn: Handle correctly no-more-cpus case Pawel Moll
2015-10-15 13:32 ` [PATCH 2/2] bus: arm-ccn: Fix irq affinity setting on CPU migration Pawel Moll
@ 2015-10-15 15:10 ` Arnd Bergmann
2 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2015-10-15 15:10 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-15 15:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-15 13:32 [PATCH 0/2] ARM CCN driver fixes Pawel Moll
2015-10-15 13:32 ` [PATCH 1/2] bus: arm-ccn: Handle correctly no-more-cpus case Pawel Moll
2015-10-15 13:32 ` [PATCH 2/2] bus: arm-ccn: Fix irq affinity setting on CPU migration Pawel Moll
2015-10-15 15:10 ` [PATCH 0/2] ARM CCN driver fixes Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox