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 165E0C74A35 for ; Thu, 11 Jul 2019 11:47:39 +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 DF45D2171F for ; Thu, 11 Jul 2019 11:47:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gXCKCXyU"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="NEiq3Sp6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF45D2171F 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=W/22ZoQ7w/4HG+jD5A/Xs4ftkEUtjiDo+XVN3tX5Vto=; b=gXCKCXyUzdWpUJ WBPS4tIHa6o0wIIgQLw3uqGgwNEYj2i+p37K6eWwaJsbHE2i8vdWKmKdsiBz0YNeTsLd2EnQftCZX RlgBz4iy25YYsR6Euxt006nZitIQlpGwMni3r+cSZipQhq/sImffuZrXCAF5eIc5nsoTAFtMbGPMT e6P1A8qRTgBReA71RyYiwwr+O8jwnu23ttjSNjibRTSK/5mkTFG4WJgyTBc7Arn4tdzUosp2d5Zef um+J8pi97UtVzy7XTyRZZHzhsOdxMxNTLbNzwuHR7Wg7BFow4p3WfH8TQJt8ecMyezdFEGS1pyBZW Cp+NSdb4N0BUkczg4v6w==; 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 1hlXY2-00052W-0K; Thu, 11 Jul 2019 11:47:38 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hlXXy-00052C-UY for linux-arm-kernel@lists.infradead.org; Thu, 11 Jul 2019 11:47:36 +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 2F4892166E; Thu, 11 Jul 2019 11:47:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562845654; bh=tc/IOWP5K6rxZNhqWPvYtApLblz7tVOX4uUtP4LSEck=; h=Subject:To:Cc:From:Date:From; b=NEiq3Sp6yQIcGnjhy/bt7nZm7kuGkCamrTabdneiX2VyVgHU1YHbDjBWWMjhw+yte 77L+SjXvp36lZ7I0ZoCT+4lgs8545KwOm0JXSphxJkug53A3Y34J9YaTiCsC0DU4wc L+sy0LPaCQnLyO8Veqtrw7cI2HYR6quaNNR+r3qk= Subject: Patch "perf pmu: Fix uncore PMU alias list for ARM64" has been added to the 5.2-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:59 +0200 Message-ID: <15628455595263@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_044735_237052_581C6B07 X-CRM114-Status: GOOD ( 12.17 ) 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.2-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.2 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.2/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