From patchwork Thu Nov 5 12:26:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ionela Voinescu X-Patchwork-Id: 11884285 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB57DC00A89 for ; Thu, 5 Nov 2020 12:27:53 +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 3F38B20756 for ; Thu, 5 Nov 2020 12:27:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JyAotNLR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F38B20756 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+linux-arm-kernel=archiver.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=s+OZjiDo+DgTaPs3J1JEqEgTS7nNUM9PdW0Ctal4Qh0=; b=JyAotNLRrqkgHs+17JfpMKer6O 3VO+wkUCg6X/GTwPKhl4pmj53O49TApvpo9DhEXKgmB9D/FptdHCWdlDlt9++ZYhJoBdb0Rr0rmDJ n/5/PJ1OeYtxgz0r8Tv8LFh8h3IhbCbKUyVn4k7nNmrwGQF6zyW553IRPTlckKwh+wTfSoKqbPf4H y0LAx43T5VQS19+mi4xWvoSqn0ONJW+Zhc9p87JlB9Hz5AF5xclv2DFLNXr8P2uAjrkb3KZnrr/Cp Rq2oWNysKv1VlpreVBPLWCxVnRTgn14P58FrQilIxHaBNoxz+y+WsFLK2FuQBEmfLQi0ftBwW0E03 M1wLJY1A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaeMM-00013F-2l; Thu, 05 Nov 2020 12:27:22 +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 1kaeMI-00011Y-Q0 for linux-arm-kernel@lists.infradead.org; Thu, 05 Nov 2020 12:27:20 +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 66D67142F; Thu, 5 Nov 2020 04:27:15 -0800 (PST) Received: from e108754-lin.cambridge.arm.com (e108754-lin.cambridge.arm.com [10.1.198.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id EAFEC3F719; Thu, 5 Nov 2020 04:27:13 -0800 (PST) From: Ionela Voinescu To: catalin.marinas@arm.com, sudeep.holla@arm.com, will@kernel.org Subject: [PATCH v3 0/3] arm64: cppc: add FFH support using AMUs Date: Thu, 5 Nov 2020 12:26:59 +0000 Message-Id: <20201105122702.13916-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-20201105_072719_015528_8987EA3B X-CRM114-Status: GOOD ( 12.56 ) 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, dietmar.eggemann@arm.com, linux-kernel@vger.kernel.org, valentin.schneider@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+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi guys, Sorry for the issues introduced and reported by 0day testing, and for taking a bit longer to sort them out. I hope I've done this in this version. The only ones I've not solved are the unused function warnings: arch/arm64/kernel/topology.c:140:1: warning: unused function 'store_corecnt' [-Wunused-function] COUNTER_READ_STORE(corecnt, 0); [..] arch/arm64/kernel/topology.c:141:1: warning: unused function 'store_constcnt' [-Wunused-function] COUNTER_READ_STORE(constcnt, 0); After the 3 patches are applied, these only happen for !CONFIG_ACPI_CPPC_LIB. Therefore I thought fixing these might not be worth the ifdef guarding required to fix it. Let me know if you think otherwise. v2 -> v3: - v2 can be found at [3] - Sorted out part of the issues flagged by 0day testing in patches 1/3 and 3/3. - This version is based on v5.10-rc2. RESEND v2: - Rebased and retested on v5.10-rc1. 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/ [3] https://lore.kernel.org/linux-arm-kernel/20201027163624.20747-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 | 8 ++ arch/arm64/include/asm/topology.h | 4 +- arch/arm64/kernel/cpufeature.c | 13 ++- arch/arm64/kernel/topology.c | 132 ++++++++++++++++++++++------ 4 files changed, 124 insertions(+), 33 deletions(-)