From patchwork Fri Oct 2 09:55:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ionela Voinescu X-Patchwork-Id: 11813055 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4E502112E for ; Fri, 2 Oct 2020 09:56:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0EC5C206DD for ; Fri, 2 Oct 2020 09:56:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PJDKLDCx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0EC5C206DD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=DxihMJIy1nX9rHh7onkgM4GnCKf5jmDsCIDfBJ+K5ik=; b=PJDKLDCxh1/bf57JLbRSOvlBom Dv4Irv1tu05ii2VcmXc0x70wJCQIZdp+zP+jyJv471EFryDoJe2YW+Txc48DLdosA4ycU4c/xVHkK xcSkGMPEYu4C4CIVIl0iqR5mnL71mgpurIS45fKUMhHIlcLXFDwYyivdrj5N9Eq5PImS0nF27Ckl8 mHOwUC3BRtyLZEeJ8a1xpvzHYyLtFJ+78PRx1zJWvuWwLW45WG3huBBcO3suaYa9/GzpUy9YbSFVB k6jYlRWoPI1iov34gmmJ5Cn8AfJq4ewZq9npVWJuNJKXSW3K+/qI5YDuDhWEUz3u1MAos4T3h/cN2 2OM1wRaQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOHn9-0000Og-Vb; Fri, 02 Oct 2020 09:55:56 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOHn7-0000NV-4X for linux-arm-kernel@lists.infradead.org; Fri, 02 Oct 2020 09:55:54 +0000 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 0A29F31B; Fri, 2 Oct 2020 02:55:48 -0700 (PDT) Received: from e108754-lin.cambridge.arm.com (unknown [10.1.199.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 92F893F73B; Fri, 2 Oct 2020 02:55:46 -0700 (PDT) From: Ionela Voinescu To: catalin.marinas@arm.com, will@kernel.org, sudeep.holla@arm.com Subject: [PATCH v2 0/3] arm64: cppc: add FFH support using AMUs Date: Fri, 2 Oct 2020 10:55:29 +0100 Message-Id: <20201002095532.6445-1-ionela.voinescu@arm.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201002_055553_226902_A013AA9E X-CRM114-Status: GOOD ( 12.29 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [217.140.110.172 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: souvik.chakravarty@arm.com, viresh.kumar@linaro.org, valentin.schneider@arm.com, linux-kernel@vger.kernel.org, dietmar.eggemann@arm.com, ionela.voinescu@arm.com, morten.rasmussen@arm.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This series adds support for CPPC's delivered and reference performance counters through the FFH methods by using the AMU equivalent core and constant cycle counters. This support is added in patch 3/3, while the first 2 patches generalise the existing AMU counter read and validation functionality to be reused for this usecase. The specification that drove this implementation can be found at [1], chapter 3.2. v1 -> v2: - v1 can be found at [2] - The previous patch 1/4 was removed and a get_cpu_with_amu_feat() function was introduced instead, in 3/3, as suggested by Catalin. Given that most checks for the presence of AMUs is done at CPU level, followed by other validation, this implementation works better than the one initially introduced in v1/->patch 1/4. - Fixed warning reported by 0-day kernel test robot. - All build tests and FVP tests at [2] were re-run for this version. - This version is based on linux-next/20201001. [1] https://documentation-service.arm.com/static/5f106ad60daa596235e80081 [2] https://lore.kernel.org/lkml/20200826130309.28027-1-ionela.voinescu@arm.com/ Thank you, Ionela. Ionela Voinescu (3): arm64: wrap and generalise counter read functions arm64: split counter validation function arm64: implement CPPC FFH support using AMUs arch/arm64/include/asm/cpufeature.h | 11 +++ arch/arm64/include/asm/topology.h | 2 + arch/arm64/kernel/cpufeature.c | 8 +- arch/arm64/kernel/topology.c | 132 ++++++++++++++++++++++------ 4 files changed, 121 insertions(+), 32 deletions(-) base-commit: d39294091fee6b89d9c4a683bb19441b25098330