Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp1056797rwl; Fri, 4 Nov 2022 09:16:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ZX5POTHT1E2G50OCimW+cvnFWUpq6TfHu1ZkW+oqfp75f8RRWJl1Zz9j3rL47pp7nD4PJ X-Received: by 2002:aa7:c7d1:0:b0:461:2a82:497e with SMTP id o17-20020aa7c7d1000000b004612a82497emr37035025eds.267.1667578591809; Fri, 04 Nov 2022 09:16:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667578591; cv=none; d=google.com; s=arc-20160816; b=owzUGMo88tMR43wZOdUpOlqHeA/b5+jYcccxfmw8Cb0Mg1MaQeBV4aa2yTbzJ50pdP B9V+pZl2uom4Ww2HxvKaQcVpbj1kngsnDeWRowGUEl2Etf7uH7yY4ppoXfQEuu/rwfHE 30uOvP0fW4+sQ6aiRXnUH/l/BTGoPm3/pchJJpFc34qK4/I6nXsrSEeky4MmTm2imWfl dER/hF/akH4pZxAjziYajDW4jXXjuMymnqxXb3+72qKxOqxylB/xdwzneUgyzSe+xh+Y sJltQUqiCLnqH1+g6glPdtHafrk0n9sgHtGGxcBKzN1NnDO6XYlCvwBT1migMNhGnskD jt7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=nbh4kYtAszd2WFH06dmd+kkJjoRcl20JJM5emroag08=; b=RBI967ZtjIzCT6/CIP8HveS/6IXK641GL9XqThReaFgtrTN7zVwymJOTRnV43fAH9G Kh5ciNM+JiKDl4gG7o0gWT5ZU83OZ0sdcyIIMEYEx+szU4VBrFNpM/T+QuSftk7jEPox hjIr6nhIxAfb7fRAAkO9P0kHsKxap6AxJoUMvp7yXk65z58IwuD5lsvd7kLotvCM8vcS sErMdX2p8UtQpCI8LGdGdFO0BIFzElZrPZFtXtS2BXgIp/H218U+dPp6s8mQZtTLurrG x0bbdDDHtCJBi9B5xB8PHRkq37FPrF1j5592gZbBLLsGblipDdGeK7uyLXAXQ5nRkjxE K47w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fy20-20020a170906b7d400b0078d484e0e79si4176431ejb.481.2022.11.04.09.16.05; Fri, 04 Nov 2022 09:16:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231328AbiKDPzk (ORCPT + 96 others); Fri, 4 Nov 2022 11:55:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231827AbiKDPzZ (ORCPT ); Fri, 4 Nov 2022 11:55:25 -0400 Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61DB7303DE; Fri, 4 Nov 2022 08:55:25 -0700 (PDT) Received: by mail-oi1-f170.google.com with SMTP id r76so5549396oie.13; Fri, 04 Nov 2022 08:55:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nbh4kYtAszd2WFH06dmd+kkJjoRcl20JJM5emroag08=; b=w8+XoRPoYdUI32UFboAgxt8QAXevzgE3bSJZ4GfcXzIulYjGWG85JonQNcwQfIa49n 7UQwpsCKxVV7NrzeOW9IYHB9lN3dZVPtIOrB4kskypfU3bJjCIGAQSe5yX84t9+Ch1ue m1vY2vy0sXRbl6oIsv+2KL31sbaWgxbUMsBC7uZZIXw6worzZdRXsq5sZdbDjlLV1eT5 3GCRmvxb9EDPHOpqhf1N4Weg2xi/zaeLFpCfHdiMcZ8ulb35Wd+Wkd/IJNNw3sBA0MRQ 56VjZvT1BszXpF6gcg0Ts5JTV2YzHcQ4JXLssMnD4BHOGkWcpyB8us5PgmBDtire3ICv IGXg== X-Gm-Message-State: ACrzQf1CdJt3nqci1YGvnG0a0cbpXKQTWh4ngXodaF8qFHwfJVoYVeBQ jFElJqlGnHOASlQVAAh8zg== X-Received: by 2002:a05:6808:11c1:b0:353:f1a5:207a with SMTP id p1-20020a05680811c100b00353f1a5207amr27451988oiv.183.1667577324586; Fri, 04 Nov 2022 08:55:24 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id cg27-20020a056830631b00b00661b019accbsm1588176otb.3.2022.11.04.08.55.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 08:55:24 -0700 (PDT) Received: (nullmailer pid 1880410 invoked by uid 1000); Fri, 04 Nov 2022 15:55:18 -0000 From: Rob Herring Date: Fri, 04 Nov 2022 10:55:01 -0500 Subject: [PATCH v3 1/8] perf: arm_spe: Use feature numbering for PMSEVFR_EL1 defines MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20220825-arm-spe-v8-7-v3-1-87682f78caac@kernel.org> References: <20220825-arm-spe-v8-7-v3-0-87682f78caac@kernel.org> In-Reply-To: <20220825-arm-spe-v8-7-v3-0-87682f78caac@kernel.org> To: Namhyung Kim , Will Deacon , Arnaldo Carvalho de Melo , Jiri Olsa , Peter Zijlstra , Alexander Shishkin , Mark Rutland , Catalin Marinas , Marc Zyngier , Oliver Upton , Ingo Molnar , Suzuki K Poulose , James Morse , Alexandru Elisei Cc: kvmarm@lists.linux.dev, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, James Clark , Mark Brown , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu X-Mailer: b4 0.11.0-dev X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Similar to commit 121a8fc088f1 ("arm64/sysreg: Use feature numbering for PMU and SPE revisions") use feature numbering instead of architecture versions for the PMSEVFR_EL1 Res0 defines. Tested-by: James Clark Signed-off-by: Rob Herring --- v3: - No change v2: - New patch --- arch/arm64/include/asm/sysreg.h | 6 +++--- drivers/perf/arm_spe_pmu.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 7d301700d1a9..9a4cf12e3e16 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -294,11 +294,11 @@ #define SYS_PMSFCR_EL1_ST_SHIFT 18 #define SYS_PMSEVFR_EL1 sys_reg(3, 0, 9, 9, 5) -#define SYS_PMSEVFR_EL1_RES0_8_2 \ +#define PMSEVFR_EL1_RES0_IMP \ (GENMASK_ULL(47, 32) | GENMASK_ULL(23, 16) | GENMASK_ULL(11, 8) |\ BIT_ULL(6) | BIT_ULL(4) | BIT_ULL(2) | BIT_ULL(0)) -#define SYS_PMSEVFR_EL1_RES0_8_3 \ - (SYS_PMSEVFR_EL1_RES0_8_2 & ~(BIT_ULL(18) | BIT_ULL(17) | BIT_ULL(11))) +#define PMSEVFR_EL1_RES0_V1P1 \ + (PMSEVFR_EL1_RES0_IMP & ~(BIT_ULL(18) | BIT_ULL(17) | BIT_ULL(11))) #define SYS_PMSLATFR_EL1 sys_reg(3, 0, 9, 9, 6) #define SYS_PMSLATFR_EL1_MINLAT_SHIFT 0 diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c index 00e3a637f7b6..65cf93dcc8ee 100644 --- a/drivers/perf/arm_spe_pmu.c +++ b/drivers/perf/arm_spe_pmu.c @@ -677,11 +677,11 @@ static u64 arm_spe_pmsevfr_res0(u16 pmsver) { switch (pmsver) { case ID_AA64DFR0_EL1_PMSVer_IMP: - return SYS_PMSEVFR_EL1_RES0_8_2; + return PMSEVFR_EL1_RES0_IMP; case ID_AA64DFR0_EL1_PMSVer_V1P1: /* Return the highest version we support in default */ default: - return SYS_PMSEVFR_EL1_RES0_8_3; + return PMSEVFR_EL1_RES0_V1P1; } } -- b4 0.11.0-dev