linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
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: Thu, 30 Mar 2017 15:18:44 +0530	[thread overview]
Message-ID: <58DCD47C.2010501@gmail.com> (raw)
In-Reply-To: <20170321165252.GA29116@leverpostej>



On Tuesday 21 March 2017 10:22 PM, Mark Rutland wrote:
> +static int hisi_hw_perf_event_init(struct perf_event *event)
> >+{
> >+	struct hw_perf_event *hwc = &event->hw;
> >+	struct hisi_pmu *hisi_pmu = to_hisi_pmu(event->pmu);
> >+	struct device *dev = hisi_pmu->dev;
>> +
>> >+	/*
>> >+	 * 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

Thanks,
Anurup

> [...]
>

  parent reply	other threads:[~2017-03-30  9:48 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 [this message]
2017-03-30 10:46     ` Mark Rutland
2017-03-31 14:13       ` Anurup M
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=58DCD47C.2010501@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).