From patchwork Thu Oct 19 15:28:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 10017547 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0B4D5600CC for ; Thu, 19 Oct 2017 15:28:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC723287C0 for ; Thu, 19 Oct 2017 15:28:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF6D4288B2; Thu, 19 Oct 2017 15:28:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 78461287C0 for ; Thu, 19 Oct 2017 15:28:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GPIMMvcFrrHNaNwfZb67n7k9bztqQf4gnCuLYpJmPcs=; b=VcXZRkvxMM10wx p513oCZVrVQ4ZxNDK2iHMipMNNTlkksky8GzhGIFwBv3bCvZG+q9nAGaKdM9tHBfvQsGeFcnuJC9n z1+NfhVGkW46fTZGv2i/qVad3hY9TM9qs31Gqyhu91qbZMX53gE49WalVapMETCXvgXamTZ4ntdUq qBQGYot4Eqod2qtf/iYlxJclQ8nj3xvV8Ow8gYnoFRg54MMWxvCcX2wJILZeiygmFI271jRwzKYP2 f/8moEcXwHQd7wQPH7bEoSLh39Fg73OYFYmVqsYUmG0wsSn+xpJZ+nKkPokeIwHhNAJgn4V5htFj8 5ca7aMMkbiNiRwQcEmvQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e5Ckg-0007hV-EX; Thu, 19 Oct 2017 15:28:54 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e5Ckd-0007ef-30 for linux-arm-kernel@lists.infradead.org; Thu, 19 Oct 2017 15:28:52 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 56E281596; Thu, 19 Oct 2017 08:28:29 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 27C963F483; Thu, 19 Oct 2017 08:28:29 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 15DC61AE3BC9; Thu, 19 Oct 2017 16:28:35 +0100 (BST) Date: Thu, 19 Oct 2017 16:28:35 +0100 From: Will Deacon To: Mark Rutland Subject: Re: [PATCH v6 0/6] Add HiSilicon SoC uncore Performance Monitoring Unit driver Message-ID: <20171019152834.GB30652@arm.com> References: <1508411121-125691-1-git-send-email-zhangshaokun@hisilicon.com> <20171019122918.mk6wnnwn26krkre4@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171019122918.mk6wnnwn26krkre4@lakrids.cambridge.arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171019_082851_147333_8A431B31 X-CRM114-Status: GOOD ( 14.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-doc@vger.kernel.org, linuxarm@huawei.com, linux-kernel@vger.kernel.org, Shaokun Zhang , jonathan.cameron@huawei.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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) {