Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp477690rdg; Thu, 12 Oct 2023 10:57:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEFEjyfBJCHlZJMmoUKoueiBMbKq1p/UuDNNXtW7jjXTjoAZ6rWz8l61KP5XDQkg78OzhxH X-Received: by 2002:a05:6a20:8416:b0:174:2d20:5414 with SMTP id c22-20020a056a20841600b001742d205414mr5439468pzd.49.1697133473862; Thu, 12 Oct 2023 10:57:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697133473; cv=none; d=google.com; s=arc-20160816; b=jUSYj3nlFuUZFWnBnKWU6RPC3tbxjS2YG2tYuZ00zOZnKHGjUhR98nAMy15VaXJPLO wPlmEwapSn4iNYKaoYledOdofjw1NGq0ZlUCemVHW/g/Aap8a0FY+HSIl9DD+5uIWQhW 2LFcgUIRH662ItzbvgjIzsVwzmU0VgmLuCmV8pfDPZuKl5p7jitz+HKfk3UuTEZhw9ho SnyawR1M+7uPmjQcjgxxDzGhqRkS2WEcPGeP1TxCoTGzzLPZ5s9jsbgc5mXD/cI/Rkz8 3sGIQnrOAVv/6R4viV++o+47Ga2x2YZdo6M0uMZclFNmpIreRh3ecIkgaWL9OOj9VMta yfyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=aOJDtrxPGTgwsjnVTtwsj44sT9bZCuzCaACKvoaEh5I=; fh=/5tleBjPDujrXIYss611tAyhfELId0etfY4oKm6i49Q=; b=JmWxxbYdgPU/KKAZFczDFKuJj1fwp5OOWrDkOZrdYaDqpe+YeFfACZzzrvFu4s1Xl3 J1Fl/YFMfqBupiH03Zc009vGrg+INDAVfaVUjAcYrXzFU1ZiL2P7PLLOPryfYyNZH2vA Qd44pRI8CxhcR9+/biycY+XsZ4PPmJj0V6UJHBTkT83/zaBHiJNzZOpUwTUxwbz3U/3Q XL4Yt3qeo87jI93dNgBFy/eMzNxYFu0zaxNNGrbGU/9EXsC7LoDbWweKhVtZgH8IEDnh Gf7AfEpfBI4ADrN8RDfCORjFIY8kwYMh1Tr3eUwZbRoKS70SB4e1gDI7vpaT69GHF0tz UH9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=uu8sZ+F+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id b14-20020a170903228e00b001bf741231f7si2915011plh.570.2023.10.12.10.57.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 10:57:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=uu8sZ+F+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 9836183D10D5; Thu, 12 Oct 2023 10:57:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379619AbjJLR5D (ORCPT + 99 others); Thu, 12 Oct 2023 13:57:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442029AbjJLR5A (ORCPT ); Thu, 12 Oct 2023 13:57:00 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3484CA for ; Thu, 12 Oct 2023 10:56:57 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-5a7c97d5d5aso18917297b3.3 for ; Thu, 12 Oct 2023 10:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1697133417; x=1697738217; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=aOJDtrxPGTgwsjnVTtwsj44sT9bZCuzCaACKvoaEh5I=; b=uu8sZ+F+Tlg4lloNczA/cg6+IxTQbgIzQHZIYLY3rwP4eVXqslIBy/TAVdxpGi4UJn dAkWcneZURScCPozFeJZ4w48siXBKojyWFJLkoM1i1pvvtfS+b0wI4iFA0mDTbuimIIX nhngemULdCTo2aMY5FlzzXBX/CKGPUJ66s2IVorF4HX9X2s/sjMmGoI9CiXrLROUHXPI sait+vikVO1+4l35EoUndcAWPhPINosGlCNiQBTxnLcg1E2Wml8BhdO/+hrdolPOUzgc +ccGYS2jerWhtWIJ6ZO+WYtyxW0r7cRc+xeJuaFm3wA1l6XygMGf1Dhjs2GxVkbQVNzG 8AAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697133417; x=1697738217; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aOJDtrxPGTgwsjnVTtwsj44sT9bZCuzCaACKvoaEh5I=; b=o4yYDpFvILU+NIGMEQCQAE1BrsTEJxSG0bF/idyqxyeSKwmAjQ5rcMu/VJBLNfgddv m9to+n01SiI1iCXDqlPJIGc4cc6090pXeySn0jKYUza4w1K7TTFAm+cNTCvPXQcs/hiR b883bGEK1H0946xQzuxY3WbyzefBfKsxzComfzlno7aaMLz6K2OPjuDwSq4VnkX3+/Wc 9UVNeET8LLzkzgPV0t2cpRPHu1Iko2z9XsNxWo/BAhMmeVADPDCpKPK14cTVayEdzE/B LojqZ9MSsv75XHTSiSAe9JFvase9PthgyzFjWkTqTM4yI5ejnEj1a7MPB90T78THyIqj bQmQ== X-Gm-Message-State: AOJu0Yw+OWNlS3e1HAgDx/Oyos/AiNZbc5dRIwGGQMbEIj/5pYhG23xl 5wfwmlzb8XsbhYN58wND7QPg4yyoR1l6 X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:6a89:babc:124b:e4e6]) (user=irogers job=sendgmr) by 2002:a81:af27:0:b0:5a7:b54e:bfc1 with SMTP id n39-20020a81af27000000b005a7b54ebfc1mr231194ywh.10.1697133416964; Thu, 12 Oct 2023 10:56:56 -0700 (PDT) Date: Thu, 12 Oct 2023 10:56:41 -0700 In-Reply-To: <20231012175645.1849503-1-irogers@google.com> Message-Id: <20231012175645.1849503-4-irogers@google.com> Mime-Version: 1.0 References: <20231012175645.1849503-1-irogers@google.com> X-Mailer: git-send-email 2.42.0.655.g421f12c284-goog Subject: [PATCH v2 3/7] perf arm-spe: Move PMU initialization from default config code From: Ian Rogers To: Suzuki K Poulose , Mike Leach , James Clark , Leo Yan , John Garry , Will Deacon , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.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 (morse.vger.email [0.0.0.0]); Thu, 12 Oct 2023 10:57:50 -0700 (PDT) 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; pmu->default_config = arm_spe_pmu_default_config(pmu); } else if (strstarts(pmu->name, HISI_PTT_PMU_NAME)) { pmu->selectable = true; diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c index 9cc3d6dcb849..08a76734ccd2 100644 --- a/tools/perf/arch/arm64/util/arm-spe.c +++ b/tools/perf/arch/arm64/util/arm-spe.c @@ -516,8 +516,5 @@ struct perf_event_attr attr->sample_period = 4096; } - arm_spe_pmu->selectable = true; - arm_spe_pmu->is_uncore = false; - return attr; } -- 2.42.0.655.g421f12c284-goog