All of lore.kernel.org
 help / color / mirror / Atom feed
From: sudeep.holla@arm.com (Sudeep Holla)
To: linux-arm-kernel@lists.infradead.org
Subject: pmu: armv7_a9_pmu_init() fails with -ENXIO
Date: Wed, 21 Oct 2015 15:27:39 +0100	[thread overview]
Message-ID: <5627A0DB.5030304@arm.com> (raw)
In-Reply-To: <56279753.5000107@free.fr>



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

  reply	other threads:[~2015-10-21 14:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21 13:01 pmu: armv7_a9_pmu_init() fails with -ENXIO Mason
2015-10-21 13:46 ` Mason
2015-10-21 14:27   ` Sudeep Holla [this message]
2015-10-21 15:44     ` Mason
2015-10-21 16:26       ` Sudeep Holla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5627A0DB.5030304@arm.com \
    --to=sudeep.holla@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.