From: anurupvasu@gmail.com (Anurup M)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 07/11] drivers: perf: hisi: Add support for Hisilicon SoC event counters
Date: Fri, 31 Mar 2017 19:43:20 +0530 [thread overview]
Message-ID: <58DE6400.8030900@gmail.com> (raw)
In-Reply-To: <20170330104607.GC16211@leverpostej>
On Thursday 30 March 2017 04:16 PM, Mark Rutland wrote:
>>>>> + /*
>>>>> > >>>+ * We must NOT create groups containing mixed PMUs, although
>>>>> > >>>+ * software events are acceptable
>>>>> > >>>+ */
>>>>> > >>>+ if (event->group_leader->pmu != event->pmu &&
>>>>> > >>>+ !is_software_event(event->group_leader))
>>>>> > >>>+ return -EINVAL;
>>>>> > >>>+
>>>>> > >>>+ list_for_each_entry(sibling, &event->group_leader->sibling_list,
>>>>> > >>>+ group_entry)
>>>>> > >>>+ if (sibling->pmu != event->pmu && !is_software_event(sibling))
>>>>> > >>>+ return -EINVAL;
>>> > >Please also check the number of counters.
>> >
>> >Sorry, I could not follow this comment correctly. Could you please explain ?
>> >I check the available counters and update used mask in pmu_add -->
>> >get_event_index
> What I meant was that here we should ensure that a group does not
> contain more events than can fit into counters.
>
> For example, if the HW had two counters, we should reject any group with
> more than two events. Such groups can never be scheduled, and make no
> sense.
I have referred drivers/bus/arm-cci.c and could find validate_group and
validate_event functions,
which create a fake_pmu to check the available counters for the events
in the group.
Is that the same way which is expected here? Please comment.
Thanks,
Anurup
> Thanks,
> Mark.
next prev parent reply other threads:[~2017-03-31 14:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 6:28 [PATCH v6 07/11] drivers: perf: hisi: Add support for Hisilicon SoC event counters Anurup M
2017-03-21 16:52 ` Mark Rutland
2017-03-24 10:18 ` Anurup M
2017-03-24 11:57 ` Mark Rutland
2017-03-27 6:34 ` Anurup M
2017-03-30 9:48 ` Anurup M
2017-03-30 10:46 ` Mark Rutland
2017-03-31 14:13 ` Anurup M [this message]
2017-03-31 14:23 ` Mark Rutland
2017-03-31 15:04 ` Anurup M
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=58DE6400.8030900@gmail.com \
--to=anurupvasu@gmail.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 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).