linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: slash.tmp@free.fr (Mason)
To: linux-arm-kernel@lists.infradead.org
Subject: pmu: armv7_a9_pmu_init() fails with -ENXIO
Date: Wed, 21 Oct 2015 15:01:05 +0200	[thread overview]
Message-ID: <56278C91.8050605@free.fr> (raw)

Hello,

On my (dual-core) system, armv7_a9_pmu_init() fails with -ENXIO
(I'm running v4.2)

[    0.090148] cpu=4 nr_cpu_ids=2
[    0.090164] armv7_a9_pmu_init: ret=-6
[    0.090171] hw perfevents: failed to probe PMU!
[    0.090175] hw perfevents: failed to register PMU devices!

armv7_a9_pmu_init() eventually calls generic_exec_single()
which fails this test:

	if ((unsigned)cpu >= nr_cpu_ids || !cpu_online(cpu))

cpu = 4 looks fishy, doesn't it?
<grasping@straws> I'm wondering if commit 0e3038d18adce or
commit cc88116da0d18 might be related at all?

The value 4 comes from smp_call_function_any()

  /* Any online will do: smp_call_function_single handles nr_cpu_ids. */
  cpu = cpumask_any_and(mask, cpu_online_mask);

mask = &arm_pmu->supported_cpus
p arm_pmu->supported_cpus
$3 = {bits = {0}}

/**
 * cpumask_next_and - get the next cpu in *src1p & *src2p
 * @n: the cpu prior to the place to search (ie. return will be > @n)
 * @src1p: the first cpumask pointer
 * @src2p: the second cpumask pointer
 *
 * Returns >= nr_cpu_ids if no further cpus set in both.
 */

Shouldn't cpu_pmu->supported_cpus be cpu_present_mask or cpu_possible_mask?
Shouldn't armv7pmu_init() set arm_pmu->supported_cpus?

Regards.

             reply	other threads:[~2015-10-21 13:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21 13:01 Mason [this message]
2015-10-21 13:46 ` pmu: armv7_a9_pmu_init() fails with -ENXIO Mason
2015-10-21 14:27   ` Sudeep Holla
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=56278C91.8050605@free.fr \
    --to=slash.tmp@free.fr \
    --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 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).