* [PATCH] drivers/perf: arm-pmu: Fix handling of SPI lacking "interrupt-affinity" property
@ 2016-07-19 14:39 Marc Zyngier
2016-07-19 16:23 ` Will Deacon
2016-08-26 17:11 ` Kevin Hilman
0 siblings, 2 replies; 4+ messages in thread
From: Marc Zyngier @ 2016-07-19 14:39 UTC (permalink / raw)
To: linux-arm-kernel
Patch 19a469a58720 ("drivers/perf: arm-pmu: Handle per-interrupt
affinity mask") added support for partitionned PPI setups, but
inadvertently broke setups using SPIs without the "interrupt-affinity"
property (which is the case for UP platforms).
This patch restore the broken functionnality by testing whether the
interrupt is percpu or not instead of relying on the using_spi flag
that really means "SPI *and* interrupt-affinity property".
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: 19a469a58720 ("drivers/perf: arm-pmu: Handle per-interrupt affinity mask")
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
drivers/perf/arm_pmu.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c
index 2513365..9275e08 100644
--- a/drivers/perf/arm_pmu.c
+++ b/drivers/perf/arm_pmu.c
@@ -958,11 +958,12 @@ static int of_pmu_irq_cfg(struct arm_pmu *pmu)
/* If we didn't manage to parse anything, try the interrupt affinity */
if (cpumask_weight(&pmu->supported_cpus) == 0) {
- if (!using_spi) {
+ int irq = platform_get_irq(pdev, 0);
+
+ if (irq_is_percpu(irq)) {
/* If using PPIs, check the affinity of the partition */
- int ret, irq;
+ int ret;
- irq = platform_get_irq(pdev, 0);
ret = irq_get_percpu_devid_partition(irq, &pmu->supported_cpus);
if (ret) {
kfree(irqs);
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] drivers/perf: arm-pmu: Fix handling of SPI lacking "interrupt-affinity" property
2016-07-19 14:39 [PATCH] drivers/perf: arm-pmu: Fix handling of SPI lacking "interrupt-affinity" property Marc Zyngier
@ 2016-07-19 16:23 ` Will Deacon
2016-08-26 17:11 ` Kevin Hilman
1 sibling, 0 replies; 4+ messages in thread
From: Will Deacon @ 2016-07-19 16:23 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jul 19, 2016 at 03:39:02PM +0100, Marc Zyngier wrote:
> Patch 19a469a58720 ("drivers/perf: arm-pmu: Handle per-interrupt
> affinity mask") added support for partitionned PPI setups, but
> inadvertently broke setups using SPIs without the "interrupt-affinity"
> property (which is the case for UP platforms).
>
> This patch restore the broken functionnality by testing whether the
> interrupt is percpu or not instead of relying on the using_spi flag
> that really means "SPI *and* interrupt-affinity property".
>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Fixes: 19a469a58720 ("drivers/perf: arm-pmu: Handle per-interrupt affinity mask")
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> ---
> drivers/perf/arm_pmu.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Thanks, looks good to me:
Acked-by: Will Deacon <will.deacon@arm.com>
Catalin, can you pick this up, please?
Will
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] drivers/perf: arm-pmu: Fix handling of SPI lacking "interrupt-affinity" property
2016-07-19 14:39 [PATCH] drivers/perf: arm-pmu: Fix handling of SPI lacking "interrupt-affinity" property Marc Zyngier
2016-07-19 16:23 ` Will Deacon
@ 2016-08-26 17:11 ` Kevin Hilman
2016-08-30 17:27 ` Will Deacon
1 sibling, 1 reply; 4+ messages in thread
From: Kevin Hilman @ 2016-08-26 17:11 UTC (permalink / raw)
To: linux-arm-kernel
Hi Marc,
On Tue, Jul 19, 2016 at 9:39 AM, Marc Zyngier <marc.zyngier@arm.com> wrote:
> Patch 19a469a58720 ("drivers/perf: arm-pmu: Handle per-interrupt
> affinity mask") added support for partitionned PPI setups, but
> inadvertently broke setups using SPIs without the "interrupt-affinity"
> property (which is the case for UP platforms).
>
> This patch restore the broken functionnality by testing whether the
> interrupt is percpu or not instead of relying on the using_spi flag
> that really means "SPI *and* interrupt-affinity property".
>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Fixes: 19a469a58720 ("drivers/perf: arm-pmu: Handle per-interrupt affinity mask")
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
kernelci.org detected boot failures on bcm2835-rpi-b in mainline[1]
and was bisected down to this patch. I verified that reverting this
patch on top of mainline gets bcm2835-rpi-b booting again.
I haven't been closely tracking this change, but a quick glance and it
looks like this platform is possibly missing IRQ properties from its
PMU node? The DT for this platform simply has:
arm-pmu {
compatible = "arm,arm1176-pmu";
};
Kevin
[1] https://kernelci.org/boot/id/57bb4d9259b514895348b564/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] drivers/perf: arm-pmu: Fix handling of SPI lacking "interrupt-affinity" property
2016-08-26 17:11 ` Kevin Hilman
@ 2016-08-30 17:27 ` Will Deacon
0 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2016-08-30 17:27 UTC (permalink / raw)
To: linux-arm-kernel
Hi Kevin,
Thanks for reporting this.
On Fri, Aug 26, 2016 at 12:11:55PM -0500, Kevin Hilman wrote:
> On Tue, Jul 19, 2016 at 9:39 AM, Marc Zyngier <marc.zyngier@arm.com> wrote:
> > Patch 19a469a58720 ("drivers/perf: arm-pmu: Handle per-interrupt
> > affinity mask") added support for partitionned PPI setups, but
> > inadvertently broke setups using SPIs without the "interrupt-affinity"
> > property (which is the case for UP platforms).
> >
> > This patch restore the broken functionnality by testing whether the
> > interrupt is percpu or not instead of relying on the using_spi flag
> > that really means "SPI *and* interrupt-affinity property".
> >
> > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > Fixes: 19a469a58720 ("drivers/perf: arm-pmu: Handle per-interrupt affinity mask")
> > Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
>
> kernelci.org detected boot failures on bcm2835-rpi-b in mainline[1]
> and was bisected down to this patch. I verified that reverting this
> patch on top of mainline gets bcm2835-rpi-b booting again.
>
> I haven't been closely tracking this change, but a quick glance and it
> looks like this platform is possibly missing IRQ properties from its
> PMU node? The DT for this platform simply has:
>
> arm-pmu {
> compatible = "arm,arm1176-pmu";
> };
Stefan Wahren posted a fix for this, so I've queued it locally and plan
to send via Catalin:
http://lists.infradead.org/pipermail/linux-arm-kernel/2016-August/452475.html
Will
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-08-30 17:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-19 14:39 [PATCH] drivers/perf: arm-pmu: Fix handling of SPI lacking "interrupt-affinity" property Marc Zyngier
2016-07-19 16:23 ` Will Deacon
2016-08-26 17:11 ` Kevin Hilman
2016-08-30 17:27 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).