Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp743675rdb; Fri, 6 Oct 2023 19:14:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFyvknN7wSmB7P0S47jiX3D9te/2/aMdut5M2uBp9lUlEqKDfFgQQitjWly03jQ4cQmappU X-Received: by 2002:a05:6a20:7f96:b0:131:b3fa:eaaa with SMTP id d22-20020a056a207f9600b00131b3faeaaamr11654751pzj.61.1696644881590; Fri, 06 Oct 2023 19:14:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696644881; cv=none; d=google.com; s=arc-20160816; b=vxKCpJwRZH7F8Hr6LE7cHfgYZz/Cd9pYb0nxdr5Ya+VMiCWH6cyVVm2RCIB1prwDDY DfAXbjGZmuggp7/2jrrsgti2pIMGn4zwsxCDoU/Yier8nwpaKc6+iG/KkaTUFnxQsNZH WTdbjJCX3wWt791ulFdkPibMr9sTIVyR258J2jwQ0LBvtJ4/MWnVbFBcSmagdBuBfUIf Jj72q+rfH/FBOCSE9v1AcyFngyWwzZiapZbHDrPthhm+tRmn8i2i1sDTqoCiBZ81zcHS q+OgraNzc3RebZjNCGgEzjKWheNQSvUgwtUjXGObW0049EuGiXXbbUc/mBnuqBqXvWjH 0BXg== 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=Pvm9pouxrmYpafgNbDUzq8jjG9nkQlQXFZB/wFYV4ZY=; fh=/5tleBjPDujrXIYss611tAyhfELId0etfY4oKm6i49Q=; b=v46R9MjsEEEs8+uG3vfIA49NRi84pbHrcUc2KMNtAMFOX1qflKuGvojRxbQ5lMQAxi l5O29t/CD49a5I7HogcB3QfjsDButGci6VTaXzqp8ROcjRv+amHL8o8q2dF2A8+kuJjQ j5OJG+9pz7TLjBJtBs4vxkZnLzE2qDQr5mQrrYB84luDvX4z9ZhmZLP+ToBF0+vKUZu6 gCGbnqfupLRrzsTzOixjsqLoDmtT0hpBkdNF4bF6zMdqGdOm2OFHXZoLPaAallAc9jEl 9qe0CWhxeyCyQQPmGm8CDXHeSjlBPC//lvyb9QvMAelcfpHku6qvMaHgiQWGVS3WNco0 xM+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=gIt3Ep8w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id w8-20020a056a0014c800b0068fac3509a9si2681330pfu.350.2023.10.06.19.14.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 19:14:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=gIt3Ep8w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 00C5F82C464C; Fri, 6 Oct 2023 19:14:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234109AbjJGCOC (ORCPT + 99 others); Fri, 6 Oct 2023 22:14:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234096AbjJGCN4 (ORCPT ); Fri, 6 Oct 2023 22:13:56 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FAE2DE for ; Fri, 6 Oct 2023 19:13:54 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-d81e9981ff4so3545416276.3 for ; Fri, 06 Oct 2023 19:13:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696644833; x=1697249633; 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=Pvm9pouxrmYpafgNbDUzq8jjG9nkQlQXFZB/wFYV4ZY=; b=gIt3Ep8wQrLm5/xI11pGeuKoRgXc+4+1ky3tENwptnfMrV8Dnhm3eUn1Neff+jr1ht nBrZOdSRuch7YtiJZveOIztjN0qXG2QNjG4D/2Tfg4Sd0asjIbseR0Oah4fLyeMSY48S YjBwRKLA297NCyCDHgpE6s8X7N/0ObtaPH37elx4oPFSpgPEUoHJXBX4LZnKt4wsx4On 27bm+ZfEJoxBXe3SB7+49GKV8Zq+8mclPXthEw9fZa46wA3Vdu138lDMb8C0fs4OkOnj iXfNjPP8zqpIpu0nSJWP72ij6NxLspjEyzc5fxRiG2DySZRC5e09/vnediUEpzY2KV8B Ui+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696644833; x=1697249633; 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=Pvm9pouxrmYpafgNbDUzq8jjG9nkQlQXFZB/wFYV4ZY=; b=vTPqKV2lG67NxYkHtJSxUDNXD10V6CI/giRbg5gH3s+BAFVwUZx0Z7AYb0u5zlAbl6 Kb2qU6ex8Rym1Sv5xU7FzYOzXNZm9gdcJpXosheYrJXCNCYTJdRIJUetw/IuW4zT1V8y 9z1WyS0WfVEInoKgniDlV8ltRDMk7AGpMdBKc8uUHJ8NHU3BYBZHm7rC5qnIMQYOYBhc jgiyg2eJTRNerpK8xvqg9IvQlrmRjMS4LkCtQJS/Jv0IV5Q/Pxc/AMKYjX7mbbDkndeV ghWpa7/4d+4JZhIxGlb1ke06D1OuwOzSlJk16Z6dnGQ0E71qcb+OzOuAMBd8HPKfUJ06 +ZZQ== X-Gm-Message-State: AOJu0YzQ7bqD/KOkvTmYYzWB+O4oZDAA8BpwT/pjUign6LFDFmndTrJC KWTR73B0BlPfxwRCHGPi3JlSXK1FxE3n X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:7031:b36b:6c77:bfd0]) (user=irogers job=sendgmr) by 2002:a25:d313:0:b0:d7b:92d7:5629 with SMTP id e19-20020a25d313000000b00d7b92d75629mr166217ybf.8.1696644833466; Fri, 06 Oct 2023 19:13:53 -0700 (PDT) Date: Fri, 6 Oct 2023 19:13:22 -0700 In-Reply-To: <20231007021326.4156714-1-irogers@google.com> Message-Id: <20231007021326.4156714-4-irogers@google.com> Mime-Version: 1.0 References: <20231007021326.4156714-1-irogers@google.com> X-Mailer: git-send-email 2.42.0.609.gbb76f46606-goog Subject: [PATCH v1 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=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Fri, 06 Oct 2023 19:14:38 -0700 (PDT) Avoid setting PMU values in arm_spe_pmu_default_config, move to perf_pmu__arch_init. Signed-off-by: Ian Rogers --- 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.609.gbb76f46606-goog