pmu: armv7_a9_pmu_init() fails with -ENXIO

Sudeep Holla sudeep.holla at arm.com
Wed Oct 21 07:27:39 PDT 2015



On 21/10/15 14:46, Mason wrote:

[...]

>
> I also looked more closely at of_pmu_irq_cfg()
>
> platform_get_irq(pdev, 0); returns -6

Won't it return here ? Though you must first check why is that returning
error.

         irq = platform_get_irq(pdev, 0);
         if (irq >= 0 && irq_is_percpu(irq))
                 return 0;

> pdev->num_resources is 0 therefore...
>
> 	if (i == pdev->num_resources) {
> 		pmu->irq_affinity = irqs;
> 	} else {
> 		kfree(irqs);
> 		cpumask_setall(&pmu->supported_cpus);
> 	}
>
> pmu->irq_affinity gets set to an invalid pointer (0x00000010)
> and cpumask_setall() is not called.
>
> Something is not working as expected, right?
>

So you won't execute this in that case.

Sorry if I missed something, I briefly checked v4.2
Code have been changed and even moved since then.

-- 
Regards,
Sudeep



More information about the linux-arm-kernel mailing list