Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2460218rdg; Mon, 16 Oct 2023 05:26:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE7GLHAsuMxth9ooLm0gt+dTH/cX54pInRkqhz4zLoJq6gXxJ2aIfX1Vy7h2XZHdk2aPSYx X-Received: by 2002:a05:6358:2786:b0:142:f1d5:ef89 with SMTP id l6-20020a056358278600b00142f1d5ef89mr40061499rwb.5.1697459198367; Mon, 16 Oct 2023 05:26:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697459198; cv=none; d=google.com; s=arc-20160816; b=HMNucRlHav7drA7IylrQ0FKvbgR4IcwVfSxI9dpDn4Pe2dHSLAVsudBMFUPX2eIIx3 NxmeMFc5NZHsa5gKrLO50NS3kXd9kMKNnBLbSpvPhSjGQN+J30X07GPk1S19p0j/CVbh siJa2hc2KiaubW8AG9DbiqIuW/AMkDDAbzcEovDC1QuS+zTt+AZGxC1XwPYiyPJ1e999 ON/VB4w2Sh5lG+o/L72ASdkKCdaNfVygjVFyCWlnzc3Ph2/pTskbgdap1n48ne7rGkeL xlLzGxIL5uzUf5WAqnjoB7Pj5ugBmDghhc9mUT22B0FHrhjxU62HhDO915gh48mQwaoo l7aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kmn6/sIgRo7SY0ymPqgTtwfMgrfA0Y3BP4S+nWa7vE0=; fh=Uh54Nct4djG7Y58mxT3KIp542JEiXNR/giM+5802e/E=; b=VBBz72oI/mxRF7zTkh42Guz72gdvG4kRwMjApZUwlhWhJthN/iSL0sZlASa3TXOPuP dOVOdFh5clfYVMIc4vdS1GG1Sb2fpB/xQ7lytS7+c/vep++tuIhgsdxVIGP01RHnmF8S BRIK2yOJ8AGJviBDsSlj5OszCSwS3q3trTFUWjX4mlkHyB1oLtO6Yq39bZzWIBisbqFC Uw9vhWY3Pg7TzlpH7mjJe/ZmFzL+cTtFyUL3/eXwGen6WuS79VZ8X5woqEgrMwuICltD 0JHmML/IUizNHHMrgReAU/PZW7XPXWiHBrSq3O2IXdLvCEKIVJKoOcg1dFw5D2w5Pbxe R6BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="P0/RpHBT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id i191-20020a639dc8000000b0056c0e3c77f7si9034707pgd.805.2023.10.16.05.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 05:26:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="P0/RpHBT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id BF50C8075028; Mon, 16 Oct 2023 05:26:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233046AbjJPM02 (ORCPT + 99 others); Mon, 16 Oct 2023 08:26:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230017AbjJPM00 (ORCPT ); Mon, 16 Oct 2023 08:26:26 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAD09AB for ; Mon, 16 Oct 2023 05:26:24 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-27cf7ef0ef4so3671208a91.0 for ; Mon, 16 Oct 2023 05:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697459184; x=1698063984; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=kmn6/sIgRo7SY0ymPqgTtwfMgrfA0Y3BP4S+nWa7vE0=; b=P0/RpHBTxIy91mHQ6+UqC1YBBX6ZKtla+4FqL0LAOU2vRTAM3oLIv6bMQuOQmMuaWf wX9pcR86OUuHVWIq8v4tZRwl/AdeK+A8aC9MzfVYxfcI1I2mGNDj7mkCMTwiXye++/Nr 7yaeo0WOGLLtMjrUjVEhL9v44f4sEKIDBkwLXZJjZw3/okbrHoh6Bjq6pCXVyC3Su8kS LplqiCzO3AKl7l5QvQUq+BrKDEM+gQOTqjXWkTut38S9Swc/joJ2OK1v2NT/niFvZGh4 4yJQAlMIrTx1krUrnAfkku5Lo9K4u/C44C/4qLKiLAHM/IK5wi6Ud9Do5HhxM1pqk8lv s6eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697459184; x=1698063984; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kmn6/sIgRo7SY0ymPqgTtwfMgrfA0Y3BP4S+nWa7vE0=; b=TI8PuABmjGCS7A3My3e61e5v7UJZT5wyFF2tBFl+zWruA58ReQtvO0O1s7/HCRDZby b546FfA9uzfNCzu5/apaZSW10SuCfBTchTZDOKkprKPmVlKr0PmdA4iqqz2TckrQAW5b S/hdmDR5olUsP14S5ndmsRJPYKVENDe9OqusBX+G3VPx0VyQll85XWEJtluaWeFqGnU5 aB7JR4p9Bib9+gDC7xHljxY05edjXK/W8f6OcUNuWnPTK3IRrKmRpbqPbDJ/lMblLfEr hDKpOsYiFim6e1YaYmiA6SMGudtHdHC1FjS6j2NVNRBm874HFYkks0fvl/3LgdLnEXSF q76A== X-Gm-Message-State: AOJu0YxdR8ONdA0Woon8oceMo5OyJcHw1g2WiGkUiAPsGaGN07qn/NDY su1xQXjwrXw9hdv4wGEhe2wiKQ== X-Received: by 2002:a17:90b:1289:b0:27d:694f:195d with SMTP id fw9-20020a17090b128900b0027d694f195dmr4527726pjb.6.1697459184104; Mon, 16 Oct 2023 05:26:24 -0700 (PDT) Received: from leoy-huanghe.lan ([98.98.49.160]) by smtp.gmail.com with ESMTPSA id 6-20020a630806000000b0056c2f1a2f6bsm5673189pgi.41.2023.10.16.05.26.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 05:26:22 -0700 (PDT) Date: Mon, 16 Oct 2023 20:26:15 +0800 From: Leo Yan To: Ian Rogers Cc: Suzuki K Poulose , Mike Leach , James Clark , John Garry , Will Deacon , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Thomas Richter , Ravi Bangoria , Kajol Jain , Jing Zhang , Kan Liang , Yang Jihong , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/7] perf arm-spe: Move PMU initialization from default config code Message-ID: <20231016122615.GG928468@leoy-huanghe.lan> References: <20231012175645.1849503-1-irogers@google.com> <20231012175645.1849503-4-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231012175645.1849503-4-irogers@google.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 16 Oct 2023 05:26:36 -0700 (PDT) On Thu, Oct 12, 2023 at 10:56:41AM -0700, Ian Rogers wrote: > Avoid setting PMU values in arm_spe_pmu_default_config, move to > perf_pmu__arch_init. > > Signed-off-by: Ian Rogers > Reviewed-by: Adrian Hunter > --- > tools/perf/arch/arm/util/pmu.c | 2 ++ > tools/perf/arch/arm64/util/arm-spe.c | 3 --- > 2 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/tools/perf/arch/arm/util/pmu.c b/tools/perf/arch/arm/util/pmu.c > index d55d2b15f2e6..f25f68f84a94 100644 > --- a/tools/perf/arch/arm/util/pmu.c > +++ b/tools/perf/arch/arm/util/pmu.c > @@ -23,6 +23,8 @@ void perf_pmu__arch_init(struct perf_pmu *pmu __maybe_unused) > pmu->default_config = cs_etm_get_default_config(pmu); > #if defined(__aarch64__) > } else if (strstarts(pmu->name, ARM_SPE_PMU_NAME)) { > + pmu->selectable = true; > + pmu->is_uncore = false; Arm SPE is not an uncore PMU event. Arm SPE driver registers sysfs node 'cpumask', thus it misleads the pmu_is_uncore() function and it returns 'true' for Arm SPE event. Here we need to explictly set false to correct the 'is_uncore' flag. I did test on my machine, the changes work well for Arm SPE event. Tested-by: Leo Yan