Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7524797rwl; Tue, 10 Jan 2023 01:49:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXvS64BrMunC7tTL7Hri/y5jNEUC0ya/5hmGZLDEfu+VlgMEKErNbwefRXYB/ifZCCJkOXOB X-Received: by 2002:a17:90a:9917:b0:227:25e1:c61d with SMTP id b23-20020a17090a991700b0022725e1c61dmr3522594pjp.26.1673344149718; Tue, 10 Jan 2023 01:49:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673344149; cv=none; d=google.com; s=arc-20160816; b=rwHY6S3D8gksHOq6DoY5ZME2+vbaAIkWCjD+xN5tLNbS0VHp3diODwYIdNCU1Jpn7N D45MCTZRo3c62/WekpqGjJQmqCO7WcYg4ncFRn4vLjrFvN16ZOwIkAhqApdPlNIHrEZE SBzXDUEPId6JW/wGMwbwvO1F2vcVAlw4NxpBPzEmhgrqIKSahR6o61m7gPpx7qDODrZP swCNHGuuj4Dc1UsHYPhvaJfX9P+uSsgI50LM9j+tt6R76lzkyq5BCdyUqXzYkx7HbcQ9 X7vf/pLGNQpTebvvoyC9Hp+AwJGPlp3z7Vq2XHrWWLGLVkKaTzbVkYdogdhoPrPXVO9o +nsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=RJ7p280Do3aCUTwpxTTtPvsmyv6C2qQ9xYZigcc6BPE=; b=mdzkonu/0r2BrC+la6TLEohThiT5q/p6iDl/1Mf6ifGkSNspIQRAZTHK2IHh8A6SFB eFeRJfhDR7Lb+o1SiLdAbGIIFKZoVXTy2Fsul0bs+wdaRFfckT7K8kBy2ISCbfmbZrx8 XkbY/fjHYmye39Q7V9OoO0DMW8jRxHAvGl4R3MWVCHwJdQ6zEfmovaSlSM7EZ8ley/Lo /H0z63ZOvA3KhHcjxo7PQSv4i7tN+n7On7Jxw3xR+MR6YpkVtnI2+CnC1K4IajXA10j0 LJp7I6M2QrNz1VkkIrL55N9ZhvPDFA0CgWKYQ5oX+LPB6FapDIYhm4KhHudOn4yL5TvV j47w== 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iq2-20020a17090afb4200b00214021e87d1si13937760pjb.173.2023.01.10.01.49.02; Tue, 10 Jan 2023 01:49:09 -0800 (PST) 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231354AbjAJJAQ (ORCPT + 53 others); Tue, 10 Jan 2023 04:00:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231240AbjAJI6N (ORCPT ); Tue, 10 Jan 2023 03:58:13 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5921C68786; Tue, 10 Jan 2023 00:54:37 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E1557165C; Tue, 10 Jan 2023 00:55:13 -0800 (PST) Received: from [10.162.42.6] (unknown [10.162.42.6]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 513603F587; Tue, 10 Jan 2023 00:54:25 -0800 (PST) Message-ID: <895daf8d-3303-ac70-16ab-76bead23d389@arm.com> Date: Tue, 10 Jan 2023 14:24:22 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v4 6/8] perf: arm_spe: Support new SPEv1.2/v8.7 'not taken' event Content-Language: en-US To: Rob Herring , Peter Zijlstra , Will Deacon , Mark Rutland , Catalin Marinas , Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Oliver Upton , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim Cc: Mark Brown , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-perf-users@vger.kernel.org, James Clark References: <20220825-arm-spe-v8-7-v4-0-327f860daf28@kernel.org> <20220825-arm-spe-v8-7-v4-6-327f860daf28@kernel.org> From: Anshuman Khandual In-Reply-To: <20220825-arm-spe-v8-7-v4-6-327f860daf28@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham 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 On 1/10/23 00:56, Rob Herring wrote: > Arm SPEv1.2 (Armv8.7/v9.2) adds a new event, 'not taken', in bit 6 of > the PMSEVFR_EL1 register. Update arm_spe_pmsevfr_res0() to support the > additional event. > > Tested-by: James Clark > Signed-off-by: Rob Herring Reviewed-by: Anshuman Khandual > --- > v4: > - Rebase on v6.2-rc1 > v3: > - No change > v2: > - Update for v6.1 sysreg generated header changes > --- > arch/arm64/include/asm/sysreg.h | 2 ++ > drivers/perf/arm_spe_pmu.c | 4 +++- > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h > index db269eda7c1c..fc8787727792 100644 > --- a/arch/arm64/include/asm/sysreg.h > +++ b/arch/arm64/include/asm/sysreg.h > @@ -221,6 +221,8 @@ > BIT_ULL(6) | BIT_ULL(4) | BIT_ULL(2) | BIT_ULL(0)) > #define PMSEVFR_EL1_RES0_V1P1 \ > (PMSEVFR_EL1_RES0_IMP & ~(BIT_ULL(18) | BIT_ULL(17) | BIT_ULL(11))) > +#define PMSEVFR_EL1_RES0_V1P2 \ > + (PMSEVFR_EL1_RES0_V1P1 & ~BIT_ULL(6)) > > /* Buffer error reporting */ > #define PMBSR_EL1_FAULT_FSC_SHIFT PMBSR_EL1_MSS_SHIFT > diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c > index af6d3867c3e7..82f67e941bc4 100644 > --- a/drivers/perf/arm_spe_pmu.c > +++ b/drivers/perf/arm_spe_pmu.c > @@ -677,9 +677,11 @@ static u64 arm_spe_pmsevfr_res0(u16 pmsver) > case ID_AA64DFR0_EL1_PMSVer_IMP: > return PMSEVFR_EL1_RES0_IMP; > case ID_AA64DFR0_EL1_PMSVer_V1P1: > + return PMSEVFR_EL1_RES0_V1P1; > + case ID_AA64DFR0_EL1_PMSVer_V1P2: > /* Return the highest version we support in default */ > default: > - return PMSEVFR_EL1_RES0_V1P1; > + return PMSEVFR_EL1_RES0_V1P2; > } > } > >