From patchwork Thu Jul 9 10:13:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 11654001 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 B7E3F14DD for ; Thu, 9 Jul 2020 10:15:51 +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 920ED20674 for ; Thu, 9 Jul 2020 10:15:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NAg7ceLj"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Wzb2c1z1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 920ED20674 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=178a0SVF/Mkc4ysTdJtFoI6bKbcQ34s5jg40542lr7k=; b=NAg7ceLjtfSRAjzGEP7hTJy3lP aUOzJm15hhvILv2nzvykW+epQL1sp6zt3JhLUBvtxC6l6lpXxSvyC18JAJczuASlR3prkmAvMY1GG Qy3+g77k/jgR4l36dG4YjUA4bPLOPWo57qs5b3cuyIG5Zov/V0URxJFvGWPAnwZOzmoE3OM/Q2ZRa 3yB0KLzQpFVAAKvQVsycRkMG82VAN7tneeL1PUGJrRt+Kgnuh69F/VjzQeu7dHMsVh5iwD+YTpRyL L322LfQ+aughdLDJvtnQBKvRyIS1FpyLNH6XuS6QRwzK3HfbH7hHT07yAsYgQapcEiYOhkKU6bsbe +q20nVKA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtTZD-0004Vk-0A; Thu, 09 Jul 2020 10:14:11 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtTZ9-0004UA-KW for linux-arm-kernel@lists.infradead.org; Thu, 09 Jul 2020 10:14:08 +0000 Received: by mail-pl1-x641.google.com with SMTP id d10so659791pll.3 for ; Thu, 09 Jul 2020 03:14:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t7zJbzd7I0qjlOh1AsM0WBkxDNAEKcLGWWurw0dHxg8=; b=Wzb2c1z1qzrLVrgXLiLFowpIvwPzkNoY4wUDZk5bFzC9C5jZRUCZDoI7DhRVwdiKf4 Yh/4b/7hKzqRD0HIFBH7U3BHCfn/mDEBDoOwwQwB9lhE51yBS8ZkU0oZZiTQqxdG2Wjf j9K+S5yx/XfkxgeFUN4B+hR0NfZQsulQwgIkiGV9v9Shdnj/NKMJeBiTJkUPN704jXi2 vUOSGlD75ObH5TpHEeD6mSrWh4Nb2M5MtgVr0hY/Gk6Va/ksCgW1Sz1bZyl6TLqxDZVh pDrMu1EKxma+h4gUhileiX4EH8frlCZkgB9N6GhCFZfY8NaWFTsPV0ePgQX6bxCqc9Lp yqpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t7zJbzd7I0qjlOh1AsM0WBkxDNAEKcLGWWurw0dHxg8=; b=b28S/6Wo2/qQQmghX1nsESkNSDck2TDWZiv0yD1EHnf5ZtwXY/84OM9kGpvoa8Bozd 3lPlCGfkVpYbv1KsR7Vttog5tVYW3BrL6UW1TOiGfYGpBm9uaPfjT1++21TisiIW3ptK eKwpzK85N0WiR/PnCOLVErfHBceDxX6Nhf9LIv3AL57Ll7Aeoyx8WZqSLR/Z88G3W4zX gwjIW1VYq6NNOpWKsjwElTIo+hb6rSrPPyWKzR3VJgc4rM3uSKAzf4MKnbRQ41Z426eR gOkZNYaRvpINVG16yIHNoAxhI69fuADljwieB3qLf96ZJd+S8gxu8rnbrx/JihtC+iU6 yryw== X-Gm-Message-State: AOAM530p6V1OjGd955ySO6+u1vZ865dSxG7QE7185R+EoBNOq1bfAGW3 JfHfwWEObynWZjc+Qc8gvfj2SQ== X-Google-Smtp-Source: ABdhPJx+nWnxi594yoD2CfrDxx754RW3BBZ0Apz2JK7s/LWAodsbqVutddC1PmDdT2gAarFJeCbD6Q== X-Received: by 2002:a17:90a:84:: with SMTP id a4mr9758381pja.110.1594289643321; Thu, 09 Jul 2020 03:14:03 -0700 (PDT) Received: from localhost ([122.172.40.201]) by smtp.gmail.com with ESMTPSA id fh12sm2026352pjb.5.2020.07.09.03.14.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jul 2020 03:14:02 -0700 (PDT) From: Viresh Kumar To: Ben Segall , Catalin Marinas , Dietmar Eggemann , Greg Kroah-Hartman , Ingo Molnar , Juri Lelli , Mel Gorman , Peter Zijlstra , "Rafael J. Wysocki" , "Rafael J. Wysocki" , Steven Rostedt , Sudeep Holla , Vincent Guittot , Viresh Kumar , Will Deacon Subject: [RFC 0/3] cpufreq: cppc: Add support for frequency invariance Date: Thu, 9 Jul 2020 15:43:32 +0530 Message-Id: X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200709_061407_788331_872B0A7C X-CRM114-Status: GOOD ( 13.07 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:641 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: Peter Puhov , Ionela Voinescu , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hello, CPPC cpufreq driver is used for ARM servers and this patch series tries to provide frequency invariance support for them. The same is also provided using a specific hardware extension, known as AMU (Activity Monitors Unit), but that is optional for platforms and at least few of them don't have it. This patchset allows multiple parts of the kernel to provide the same functionality, by registering with the topology core. This is tested with some hacks, as I didn't have access to the right hardware, on the ARM64 hikey board to check the overall functionality and that works fine. Ionela/Peter Puhov, it would be nice if you guys can give this a shot. This is based of my cpufreq/arm/linux-next branch (should work on linux-next too) + a cleanup patch [1] that i sent this morning. --- viresh [1] https://lore.kernel.org/lkml/a710fc4e4e0f1d2e561320130b99bcb5167d73b4.1594277563.git.viresh.kumar@linaro.org/ Viresh Kumar (3): arm64: topology: Add amu_counters_supported() helper topology: Provide generic implementation of arch_freq_counters_available() cpufreq: cppc: Add support for frequency invariance arch/arm64/include/asm/topology.h | 7 -- arch/arm64/kernel/topology.c | 165 +++++++++++++++--------------- drivers/base/arch_topology.c | 43 +++++++- drivers/cpufreq/cppc_cpufreq.c | 138 ++++++++++++++++++++++++- include/linux/arch_topology.h | 5 +- kernel/sched/core.c | 1 + 6 files changed, 263 insertions(+), 96 deletions(-)