Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp14471940rwb; Mon, 28 Nov 2022 01:06:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf6kVmB+6PxjCv4MyWxHYUAS1L5P0Df+3C7tOW8i6Bh61jGmXP0+tAuRLArGPyYJATy5VU/d X-Received: by 2002:a63:65c1:0:b0:46f:ef65:f6a8 with SMTP id z184-20020a6365c1000000b0046fef65f6a8mr28931112pgb.398.1669626399927; Mon, 28 Nov 2022 01:06:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669626399; cv=none; d=google.com; s=arc-20160816; b=fg3zPEXtOHo8o0f11tsfEQ6sT8L3mwLNjkP134Si82X/IKiVuojEh7TDcTNBtV8wpe +GIt+/HQS5KBZ9szi+gNopEEmPAHjVGh+JanZdlkufhIMGfWkcm6gNVmjR4JoozSbv8R lVlpiLA1fDhbTrw4elypZ1x2r6uTvi6KIb7fkIcLIvQCgzF/XsNbwNPPUe1sjn7AUEyR 4ZABzLnnFwS+yOboG+Bqbdt0ehzWILzUuPzxCPZ7J0x+B4X5yX6ktpHkdoTPQyyDk89B p3Ln+NLb0WazrMN3bjVb7edy6vX9CMMZzYGsq7k0IGQEafsAWRuHbwEvgF3iPVTLBO2u sA5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=RG9FZBaBHqb08G/qOELjyNtdLyYQtpqPhBl2WZyyO90=; b=E/MmAk7w1bNDA8rSEc4g29iwmrWeS1PlBiUBPoZIpmE5RcnQ7Q62IhmVw58nYz+scP HBPhoorMo/rsPM24vSGJflQ06AXtLgIQ8jn2f240Tk4IGtptQ7ysa51A6ZkKr+oFOmzi DbSiim5Eg0LxE3WWiXACUBGBvEItvwmiUYWfVz546CEyS2slpCUWcW2PcHS6jusFU/SQ CQ1wg8Lv9w0VCYHu4n/RYAuZPrNq9jzmNMp/RVN+LJ5nGH6CYEVQwQ5CpXxIek7ik8of m+K9RThFpgh5k5aReJXlbl0YYf0YA/qUi69F8TPoQ+/JdY2SHA/zDJ7i94anj0EjwGED 3/+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kqaJW06w; 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 b13-20020a63340d000000b00477a7823142si12906834pga.866.2022.11.28.01.06.29; Mon, 28 Nov 2022 01:06:39 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kqaJW06w; 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 S230132AbiK1I2u (ORCPT + 83 others); Mon, 28 Nov 2022 03:28:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229825AbiK1I2r (ORCPT ); Mon, 28 Nov 2022 03:28:47 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 272DD10FF8; Mon, 28 Nov 2022 00:28:47 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B65FC6102E; Mon, 28 Nov 2022 08:28:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 184B7C433D6; Mon, 28 Nov 2022 08:28:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669624126; bh=3p79nJ+zB3/JmzYtOKp6XIkx9TsUKniU8Gj9TStdBew=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=kqaJW06wCwHo6mqLe0HHQumrm2b3wbBN67vprpQTFmdA1SO4tex74dn1Uj9o/dVwH HMxuYAhx03O8yN80GRl4die6c7ER5RHqWSMLcvLWQ7CAwOIbWAiHIK+lzCPsOfb+RP 2PDuyteNHR1I9IlIE5ga2PHItt6pNlsVMkPnkPi6W92xQhzRB8f43otxVfBtsGyoh6 wvBlBifR+yBN2HXywfB3F+ao3mK2NiQfXdkB9XpqryUMeZmlfiIFGGOkVila4GH86u zwaQOOEQ5e1mOVpBGYM2p/DLvQ3hdZPM127rU5UJ7L+TLtXlD0o9ro6F4grvz9QqmM 080lbKCzSiEow== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1ozZVL-008xbQ-NH; Mon, 28 Nov 2022 08:28:43 +0000 Date: Mon, 28 Nov 2022 08:28:43 +0000 Message-ID: <86pmd7mqis.wl-maz@kernel.org> From: Marc Zyngier To: Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, will@kernel.org, Arnaldo Carvalho de Melo , Mark Rutland , 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 In-Reply-To: <60767243-2f3e-a7aa-06e1-674e43f18e9c@arm.com> References: <20221128025449.39085-1-anshuman.khandual@arm.com> <60767243-2f3e-a7aa-06e1-674e43f18e9c@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: anshuman.khandual@arm.com, linux-arm-kernel@lists.infradead.org, will@kernel.org, acme@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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, 28 Nov 2022 03:06:15 +0000, Anshuman Khandual wrote: > > > > On 11/28/22 08:24, 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 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; > > -- > > + Marc Zyngier > > There are some KVM related pmuver not-implemented check as well, should they be > replaced in this patch or rather in a separate patch ? > > arch/arm64/kvm/pmu-emul.c: if (pmu->pmuver == 0 || pmu->pmuver == ID_AA64DFR0_EL1_PMUVer_IMP_DEF) > arch/arm64/kvm/pmu-emul.c: if (pmu->pmuver == 0 || > arch/arm64/kvm/pmu-emul.c: pmu->pmuver == ID_AA64DFR0_EL1_PMUVer_IMP_DEF) Separate patch please, as I have a large KVM PMU rework already queued. Thanks, M. -- Without deviation from the norm, progress is not possible.