From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1905C74A52 for ; Thu, 11 Jul 2019 11:46:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A33DC216C8 for ; Thu, 11 Jul 2019 11:46:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Cl1mEUzn"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="afpQhiDA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A33DC216C8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:MIME-Version:Message-ID:Date:From:To: Subject:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=0EzN2dsDPGyiRxEUsi55lPXl3tWGrWMiNrWrYLKmwcA=; b=Cl1mEUznbdc1Ez yt17XmOAVjPfEGBBIi2HNDKM/uIr9yWxQ6cCDhkN2kUpkkUpT9XDhYlFw2E7jS+QHvCzW85ItE0hi M6qxCTcGauEcd3sHsW/R2tPWfIRA8szJsVhrIvyYBbGmxMvQwgHFNmJvofR9RggWwsRIYlFF5bAT5 wfFwKNItYH0NCn6YpEdKQdPTXCbMfOOKIpWPSobfg2k6QJTDmtOg8kVpc1L+R33XV/8C0yydywyxk 0bn28rtTH+T3U6+KsOUh4e3EpPZh/a1BZTP7K1BkSgN3ksIFs36Mjrl0TrTyoQYd6OfuC/mIb5u/e PRNE07t7uDQN2O6V19YA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hlXX5-0004nA-Fn; Thu, 11 Jul 2019 11:46:39 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hlXX2-0004mq-Su for linux-arm-kernel@lists.infradead.org; Thu, 11 Jul 2019 11:46:38 +0000 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 244232166E; Thu, 11 Jul 2019 11:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562845596; bh=c6uq2Cld5UwtOUYU/02m2YyBr91lNIX9fhKderDH840=; h=Subject:To:Cc:From:Date:From; b=afpQhiDACPZw9OuZRqxMPHLXEhtwDoGcofW6TlxzVkh1Ckv6FOnJhN/cT/Wl6PTD6 o8jHM0mL1CDwNfaEqsPWDrglsx/hpjPWnFkL9guC7b5JBmIYhODYIZGas8+CGuiEsU iMQMxx9+ihphD5GdB3PNoOgD+GZ9dxWF04iNHuYQ= Subject: Patch "perf pmu: Fix uncore PMU alias list for ARM64" has been added to the 5.1-stable tree To: 1560521283-73314-2-git-send-email-john.garry@huawei.com, acme@redhat.com, alexander.shishkin@linux.intel.com, ben@decadent.org.uk, brueckner@linux.ibm.com, gregkh@linuxfoundation.org, john.garry@huawei.com, jolsa@redhat.com, kan.liang@linux.intel.com, linux-arm-kernel@lists.infradead.org, linuxarm@huawei.com, mark.rutland@arm.com, mathieu.poirier@linaro.org, namhyung@kernel.org, peterz@infradead.org, tmricht@linux.ibm.com, will.deacon@arm.com, zhangshaokun@hisilicon.com From: Date: Thu, 11 Jul 2019 13:45:42 +0200 Message-ID: <1562845542150111@kroah.com> MIME-Version: 1.0 X-stable: commit X-Patchwork-Hint: ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190711_044636_964761_FAA7E61D X-CRM114-Status: GOOD ( 12.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stable-commits@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is a note to let you know that I've just added the patch titled perf pmu: Fix uncore PMU alias list for ARM64 to the 5.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: perf-pmu-fix-uncore-pmu-alias-list-for-arm64.patch and it can be found in the queue-5.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From 599ee18f0740d7661b8711249096db94c09bc508 Mon Sep 17 00:00:00 2001 From: John Garry Date: Fri, 14 Jun 2019 22:07:59 +0800 Subject: perf pmu: Fix uncore PMU alias list for ARM64 From: John Garry commit 599ee18f0740d7661b8711249096db94c09bc508 upstream. In commit 292c34c10249 ("perf pmu: Fix core PMU alias list for X86 platform"), we fixed the issue of CPU events being aliased to uncore events. Fix this same issue for ARM64, since the said commit left the (broken) behaviour untouched for ARM64. Signed-off-by: John Garry Cc: Alexander Shishkin Cc: Ben Hutchings Cc: Hendrik Brueckner Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Thomas Richter Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Cc: stable@vger.kernel.org Fixes: 292c34c10249 ("perf pmu: Fix core PMU alias list for X86 platform") Link: http://lkml.kernel.org/r/1560521283-73314-2-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- tools/perf/util/pmu.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c @@ -709,9 +709,7 @@ static void pmu_add_cpu_aliases(struct l { int i; struct pmu_events_map *map; - struct pmu_event *pe; const char *name = pmu->name; - const char *pname; map = perf_pmu__find_map(pmu); if (!map) @@ -722,28 +720,26 @@ static void pmu_add_cpu_aliases(struct l */ i = 0; while (1) { + const char *cpu_name = is_arm_pmu_core(name) ? name : "cpu"; + struct pmu_event *pe = &map->table[i++]; + const char *pname = pe->pmu ? pe->pmu : cpu_name; - pe = &map->table[i++]; if (!pe->name) { if (pe->metric_group || pe->metric_name) continue; break; } - if (!is_arm_pmu_core(name)) { - pname = pe->pmu ? pe->pmu : "cpu"; + /* + * uncore alias may be from different PMU + * with common prefix + */ + if (pmu_is_uncore(name) && + !strncmp(pname, name, strlen(pname))) + goto new_alias; - /* - * uncore alias may be from different PMU - * with common prefix - */ - if (pmu_is_uncore(name) && - !strncmp(pname, name, strlen(pname))) - goto new_alias; - - if (strcmp(pname, name)) - continue; - } + if (strcmp(pname, name)) + continue; new_alias: /* need type casts to override 'const' */ Patches currently in stable-queue which might be from john.garry@huawei.com are queue-5.1/perf-pmu-fix-uncore-pmu-alias-list-for-arm64.patch _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel