Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp14748873rwb; Mon, 28 Nov 2022 04:42:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf4DdKf00Km6lxKUUI9Mm0v5GKjI+5biAWV7T11uWK6kyR/ojgbZOLBeTe/DMTbGuA2AHz1T X-Received: by 2002:aa7:dbca:0:b0:458:3f65:4e42 with SMTP id v10-20020aa7dbca000000b004583f654e42mr47463734edt.39.1669639334668; Mon, 28 Nov 2022 04:42:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669639334; cv=none; d=google.com; s=arc-20160816; b=lC0nNeP12RidqHbYqQG0K8zmAWak0MKEtLJFaWWy2VrwpRhztkiu1Tq3OtcWO4ij+6 +PcmURA4pUzlmLI1GPV27/r+O0hPQQB/Ouxh1+JLOs/K8AREz5ioEUk8aQmUAQxspIoI y4uhz9iAwOMQbzQKBpfb6K3+3KmOm2SJnt8Tk5ABH4H7e65hIT68BOjRssbV+fwk0wnb En/oS5f4WcFShRIx+X1i8EJR51Xwjw0SNe8zIjwvysh3YXqHnlSzMYsejYPHcTQkTwIG 9h6BmbCXfrAaEj+bmiKEIrGgUTzZ5mrV3t+0UfJ++WCKKdlQIaGum6DCac5JGwUyy45O LVqw== 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; bh=NQjSesCBInpXkyb2iaSFHRslkNFd0pZCpDDBN35gG1s=; b=vL4fyaMv48ufKZn6ccUoLgd8FUn7VeLFmjEdh71NK89A7U0YElHWtwUrWUaY5BL3Gs zJ3zEexHBzTIVK+ccy0UnpAg3hc/kDVI/DogoPtNK89pBWJEUdfeOasER8VnMHAneADd KPTu/Hfx1E21q/ay0eyxXlelyjSruMCsalAcB0XmuCp3JA2/82xmiuA3F3bKLmEkgae7 WdFef7JjhKveROlTzU3iklv3ot2/p4ie1jlgI5CSCYSJ/LAXCAScJ48RE5eGFw0AwZLC EAG8Y7tGe8gbTTOCS5Q4oe/XDf2gZmWJKabPkBLk81upcjzdKsmlEGMDOGkfhLJ1bRId bwnw== 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 dm19-20020a170907949300b0078db70cc9b8si10648521ejc.606.2022.11.28.04.41.55; Mon, 28 Nov 2022 04:42:14 -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 S231391AbiK1MPn (ORCPT + 84 others); Mon, 28 Nov 2022 07:15:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231387AbiK1MPW (ORCPT ); Mon, 28 Nov 2022 07:15:22 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E27E128E12; Mon, 28 Nov 2022 04:07:21 -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 4D97CD6E; Mon, 28 Nov 2022 04:06:34 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.7.109]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7DBFD3F73B; Mon, 28 Nov 2022 04:06:26 -0800 (PST) Date: Mon, 28 Nov 2022 12:06:23 +0000 From: Mark Rutland To: Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, will@kernel.org, Arnaldo Carvalho de Melo , Catalin Marinas , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64/perf: Replace PMU version number '0' with ID_AA64DFR0_EL1_PMUVer_NI Message-ID: References: <20221128025449.39085-1-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221128025449.39085-1-anshuman.khandual@arm.com> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,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 Mon, Nov 28, 2022 at 08:24:49AM +0530, Anshuman Khandual wrote: > __armv8pmu_probe_pmu() returns if detected PMU is either not implemented or > implementation defined. Extracted ID_AA64DFR0_EL1_PMUVer value, when PMU is > not implemented is '0' which can be replaced with ID_AA64DFR0_EL1_PMUVer_NI > defined as '0b0000'. > > Cc: Arnaldo Carvalho de Melo > Cc: Mark Rutland > Cc: Will Deacon > Cc: Catalin Marinas > Cc: linux-perf-users@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Signed-off-by: Anshuman Khandual This looks fine to me, so: Acked-by: Mark Rutland I'll leave it to Will to pick this as his convenience. Mark. > --- > This applies on v6.1-rc6 > > arch/arm64/kernel/perf_event.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c > index 85a3aaefc0fb..b638f584b4dd 100644 > --- a/arch/arm64/kernel/perf_event.c > +++ b/arch/arm64/kernel/perf_event.c > @@ -1188,7 +1188,8 @@ static void __armv8pmu_probe_pmu(void *info) > dfr0 = read_sysreg(id_aa64dfr0_el1); > pmuver = cpuid_feature_extract_unsigned_field(dfr0, > ID_AA64DFR0_EL1_PMUVer_SHIFT); > - if (pmuver == ID_AA64DFR0_EL1_PMUVer_IMP_DEF || pmuver == 0) > + if (pmuver == ID_AA64DFR0_EL1_PMUVer_IMP_DEF || > + pmuver == ID_AA64DFR0_EL1_PMUVer_NI) > return; > > cpu_pmu->pmuver = pmuver; > -- > 2.25.1 >