From patchwork Fri May 14 09:53:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ionela Voinescu X-Patchwork-Id: 12257315 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=-17.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 0F113C433ED for ; Fri, 14 May 2021 09:56:50 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 CA4686127A for ; Fri, 14 May 2021 09:56:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CA4686127A 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XYJyWu2Qyjvki1NpdmZMDnMkksirzR6EIsUuM4iXY0A=; b=aVu/AoxL4HwFsBJ7wWTuYoytf 1sMUup4QDvpevXUyAUQIDfxMWs7A7rexnrDMSeaMazEKX04ClHYBtqQL2bcNKjEND7Y+3yADu8Igo 9VoFxjPBTdu90khmv9Rm7okC4MydIpkRAofRILXwk+7/6ZK7L7KaZo6dq1cbhdGyzfU5VNZfFYzfF V+ZHLWwL7ZwxoiK+e6kshOEBqZmLSHV9I02JxwNOGM2d7NSxe+Xh/Xk6A+ACMqlO5KUShjhXO51Ra 5uIOhWIxDJl1qzs+0zskqolALxG/BHCqvTjLcsXzqoaNhRg0lOJXFGYDcBWizyDz9q3NUkBncDLNn aQwJ6nXyA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhUXE-007hMa-Ie; Fri, 14 May 2021 09:55:08 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhUWi-007hGw-41 for linux-arm-kernel@desiato.infradead.org; Fri, 14 May 2021 09:54:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=PaSn9Lje1QryfS77ttg0MFxUptCuTQikiQayYU6rHDI=; b=ihpS/UI/jlJx2z/W5Sqi6LtQ2P qhItBKCulNChpTa/wOr/M69td09IeitgP3lpcXZy9T4TuZ5Q88YD24Hui75bkL1gerWwIjmnndySS U/FgrN6cwgQ5SObhOvTZ/fhu5rEL74Nxac9nzZXyRCSF988YFaB2o6h7oko+VS0DGCHQMU6NyIUOf rd1B71Xrqf3U5Kz/VHJZgsNFpjluuvFwxWpwnYZ1Ah9Sog/WJ4m4n1vcVjAbdYObsEf3639JODLMI l8srizhAwG8dj3/3C/B/JLD82G1fUf2QfyhmqYDs8l+uzaND2z0mWMY5eMGDRP/GXjGUNJd9boSy/ ThqxhOFw==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhUWf-00BsSN-J5 for linux-arm-kernel@lists.infradead.org; Fri, 14 May 2021 09:54:34 +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 0185D1763; Fri, 14 May 2021 02:54:33 -0700 (PDT) Received: from e108754-lin.cambridge.arm.com (unknown [10.1.195.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 656E43F719; Fri, 14 May 2021 02:54:31 -0700 (PDT) From: Ionela Voinescu To: Sudeep Holla , "Rafael J . Wysocki" , Thomas Gleixner , Ingo Molnar , Giovanni Gherdovich , Catalin Marinas , Will Deacon , Valentin Schneider Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] arm64, topology: enable use of init_cpu_capacity_cppc() Date: Fri, 14 May 2021 10:53:39 +0100 Message-Id: <20210514095339.12979-4-ionela.voinescu@arm.com> X-Mailer: git-send-email 2.29.2.dirty In-Reply-To: <20210514095339.12979-1-ionela.voinescu@arm.com> References: <20210514095339.12979-1-ionela.voinescu@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210514_025433_691551_14A9C3EB X-CRM114-Status: UNSURE ( 8.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now that the arch topology driver provides a method of setting CPU capacity values based on information on highest performance from CPPC, use this functionality on arm64 platforms. Signed-off-by: Ionela Voinescu Cc: Catalin Marinas Cc: Will Deacon Acked-by: Catalin Marinas --- arch/arm64/include/asm/topology.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/include/asm/topology.h b/arch/arm64/include/asm/topology.h index ec2db3419c41..c6ae6b55789c 100644 --- a/arch/arm64/include/asm/topology.h +++ b/arch/arm64/include/asm/topology.h @@ -24,6 +24,10 @@ void update_freq_counters_refs(void); #define arch_scale_freq_capacity topology_get_freq_scale #define arch_scale_freq_invariant topology_scale_freq_invariant +#ifdef CONFIG_ACPI_CPPC_LIB +#define arch_init_invariance_cppc init_cpu_capacity_cppc +#endif + /* Replace task scheduler's default cpu-invariant accounting */ #define arch_scale_cpu_capacity topology_get_cpu_scale