All of lore.kernel.org
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 0/6] Add HiSilicon SoC uncore Performance Monitoring Unit driver
Date: Thu, 19 Oct 2017 16:28:35 +0100	[thread overview]
Message-ID: <20171019152834.GB30652@arm.com> (raw)
In-Reply-To: <20171019122918.mk6wnnwn26krkre4@lakrids.cambridge.arm.com>

On Thu, Oct 19, 2017 at 01:29:18PM +0100, Mark Rutland wrote:
> Will, are you happy to queue this?
> 
> There's a minor fixup [1] needed in patch 2, but otherwise this looks
> good to me, and builds cleanly.
> 
> I've pushed out a branch [2] with that fix folded in, in case that's
> easier for you. Otherwise, feel free to pick these up with my Ack.

I'm just running some build tests on these. I also tweaked your fix slightly
-- can you check the diff below please?

Will

--->8

diff --git a/drivers/perf/hisilicon/hisi_uncore_pmu.c b/drivers/perf/hisilicon/hisi_uncore_pmu.c
index 2bff43f0736b..c74542af4acf 100644
--- a/drivers/perf/hisilicon/hisi_uncore_pmu.c
+++ b/drivers/perf/hisilicon/hisi_uncore_pmu.c
@@ -69,15 +69,18 @@ static bool hisi_validate_event_group(struct perf_event *event)
 	/* Include count for the event */
 	int counters = 1;
 
-	/*
-	 * We must NOT create groups containing mixed PMUs, although
-	 * software events are acceptable
-	 */
-	if (leader->pmu != event->pmu && !is_software_event(leader))
-		return false;
+	if (!is_software_event(leader)) {
+		/*
+		 * We must NOT create groups containing mixed PMUs, although
+		 * software events are acceptable
+		 */
+		if (leader->pmu != event->pmu)
+			return false;
 
-	/* Increment counter for the leader */
-	counters++;
+		/* Increment counter for the leader */
+		if (leader != event)
+			counters++;
+	}
 
 	list_for_each_entry(sibling, &event->group_leader->sibling_list,
 			    group_entry) {

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>,
	jonathan.cameron@huawei.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	linuxarm@huawei.com
Subject: Re: [PATCH v6 0/6] Add HiSilicon SoC uncore Performance Monitoring Unit driver
Date: Thu, 19 Oct 2017 16:28:35 +0100	[thread overview]
Message-ID: <20171019152834.GB30652@arm.com> (raw)
In-Reply-To: <20171019122918.mk6wnnwn26krkre4@lakrids.cambridge.arm.com>

On Thu, Oct 19, 2017 at 01:29:18PM +0100, Mark Rutland wrote:
> Will, are you happy to queue this?
> 
> There's a minor fixup [1] needed in patch 2, but otherwise this looks
> good to me, and builds cleanly.
> 
> I've pushed out a branch [2] with that fix folded in, in case that's
> easier for you. Otherwise, feel free to pick these up with my Ack.

I'm just running some build tests on these. I also tweaked your fix slightly
-- can you check the diff below please?

Will

--->8

diff --git a/drivers/perf/hisilicon/hisi_uncore_pmu.c b/drivers/perf/hisilicon/hisi_uncore_pmu.c
index 2bff43f0736b..c74542af4acf 100644
--- a/drivers/perf/hisilicon/hisi_uncore_pmu.c
+++ b/drivers/perf/hisilicon/hisi_uncore_pmu.c
@@ -69,15 +69,18 @@ static bool hisi_validate_event_group(struct perf_event *event)
 	/* Include count for the event */
 	int counters = 1;
 
-	/*
-	 * We must NOT create groups containing mixed PMUs, although
-	 * software events are acceptable
-	 */
-	if (leader->pmu != event->pmu && !is_software_event(leader))
-		return false;
+	if (!is_software_event(leader)) {
+		/*
+		 * We must NOT create groups containing mixed PMUs, although
+		 * software events are acceptable
+		 */
+		if (leader->pmu != event->pmu)
+			return false;
 
-	/* Increment counter for the leader */
-	counters++;
+		/* Increment counter for the leader */
+		if (leader != event)
+			counters++;
+	}
 
 	list_for_each_entry(sibling, &event->group_leader->sibling_list,
 			    group_entry) {

  reply	other threads:[~2017-10-19 15:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-19 11:05 [PATCH v6 0/6] Add HiSilicon SoC uncore Performance Monitoring Unit driver Shaokun Zhang
2017-10-19 11:05 ` Shaokun Zhang
2017-10-19 11:05 ` [PATCH v6 1/6] Documentation: perf: hisi: Documentation for HiSilicon SoC PMU driver Shaokun Zhang
2017-10-19 11:05   ` Shaokun Zhang
2017-10-19 11:05 ` [PATCH v6 2/6] perf: hisi: Add support for HiSilicon SoC uncore " Shaokun Zhang
2017-10-19 11:05   ` Shaokun Zhang
2017-10-19 11:22   ` Mark Rutland
2017-10-19 11:22     ` Mark Rutland
2017-10-19 11:05 ` [PATCH v6 3/6] perf: hisi: Add support for HiSilicon SoC L3C " Shaokun Zhang
2017-10-19 11:05   ` Shaokun Zhang
2017-10-19 11:05 ` [PATCH v6 4/6] perf: hisi: Add support for HiSilicon SoC HHA " Shaokun Zhang
2017-10-19 11:05   ` Shaokun Zhang
2017-10-19 11:05 ` [PATCH v6 5/6] perf: hisi: Add support for HiSilicon SoC DDRC " Shaokun Zhang
2017-10-19 11:05   ` Shaokun Zhang
2017-10-19 11:05 ` [PATCH v6 6/6] arm64: MAINTAINERS: hisi: Add HiSilicon SoC PMU support Shaokun Zhang
2017-10-19 11:05   ` Shaokun Zhang
2017-10-19 12:29 ` [PATCH v6 0/6] Add HiSilicon SoC uncore Performance Monitoring Unit driver Mark Rutland
2017-10-19 12:29   ` Mark Rutland
2017-10-19 15:28   ` Will Deacon [this message]
2017-10-19 15:28     ` Will Deacon
2017-10-19 15:32     ` Mark Rutland
2017-10-19 15:32       ` Mark Rutland
2017-10-20  1:56       ` Zhangshaokun
2017-10-20  1:56         ` Zhangshaokun

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=20171019152834.GB30652@arm.com \
    --to=will.deacon@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.