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: 235131 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp1260139ilg; Thu, 9 Jul 2020 03:14:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkaVE1VSB7MtgYStSjXDioBwYVWaWdakl/td7zf2hmVp7iGV6A8nfNFx1UcjA53z+0J6/L X-Received: by 2002:aa7:da56:: with SMTP id w22mr73595750eds.124.1594289649551; Thu, 09 Jul 2020 03:14:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594289649; cv=none; d=google.com; s=arc-20160816; b=nAoGFgpFFDZNjxIBt8ljUvAlFy75CyHrH+1IeYsaRHEtXkp9U/HX8afrLUKCpkt/f+ b9eNyVsOdgnSRv2LZO8ZA1SYpCoxbog8D6romsJdoD9FmFSgZp39Hve0fPEpqk3MZ/bD p4mqfXkpFbUl7qnOcLYgc7oQ//3Z+sfyXXqHmL89ZsJB3iogAvYMUahzJSuOzAZfwkH8 yhtCA1rKwfjaAWyHkDN1f0hMfhGsMHTee4zyldspqqzr6Gg3kad/XGV3htC138rP3Ejd kJ8vHaDkciU7um0ddoKd5YQyvcXsPOthwyenbKOAsErZh7WQPwTYUGOeAk4MNHUlcVdh I8gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=t7zJbzd7I0qjlOh1AsM0WBkxDNAEKcLGWWurw0dHxg8=; b=h9BEGkvUkDTwzEfI0/IR0E04jVlWu4tvdJGw0plkWzn0BipfDWPqh0W8Mb2FkC6AI4 4lHgb9mL4rwb3feVA0fnUmEKmHyeawrXI3wFepfruDvnuvUN/nGVK27pHU7QY1xjVuMf RARKmmFCfYrp9NUd67cJ2vCR2IvROnR2gFooS6WsITxovy3CGExqywABYAwRVo+AuAaa e+GuI5yy7V4E9KVZ+Ui70nWnk8ZuZYTBrDQX6NsuQkvb6uGJ760CwQbT9dRCs1uZjo7s weDRTTiHsenM/wMXPBXdXhNNivuugERm6H3Xysgg0yhX23ujv1AhhloWqQxSHUMAUHSJ lYqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Wzb2c1z1; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk28si1596294edb.425.2020.07.09.03.14.09; Thu, 09 Jul 2020 03:14:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Wzb2c1z1; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726443AbgGIKOH (ORCPT + 10 others); Thu, 9 Jul 2020 06:14:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726315AbgGIKOF (ORCPT ); Thu, 9 Jul 2020 06:14:05 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B97BAC061A0B for ; Thu, 9 Jul 2020 03:14:05 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id gc9so904304pjb.2 for ; Thu, 09 Jul 2020 03:14:05 -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=OkS1crpehOtIOcbDlOtun/A+5qXC2oudYhj8r31XP7DyF0KJytzIQXY4IF+R0gG1Vl 6QoJb5rCi7I5zsfNiipPHmIrRZo1Q+kmdEYe7ruyMsTIH+O4E7Vw0JMhqU8IA65H0Adc 6CtmSG1DDDVe7sIfzgr5qZUw9+gEo2fyeOWLz/47PEcQNIucXETBM172+nX98I3r8iWE vzQifX4j38I9Hzm+P/0LEP/5Xz61mpvCbpHg7hhkJcuSV/Izz+FhlNx/w0ylxnvk5QaO VmkHcPL2GZ4txrzQvD5G5gLOysya8gf8nVtKyLj4kTQ83ZZGsotg7Z5H8XSZn+3H/Skc 2QBg== X-Gm-Message-State: AOAM530WpSMT6e3ohINidtqUl+tb1dIaTG6zVXfPVtdSwnvVd/M0hUYI 5KTT0bkRtrRImdrjXfcKQKdSY25yp2k= 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 Cc: Ionela Voinescu , Peter Puhov , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org 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 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.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(-) -- 2.25.0.rc1.19.g042ed3e048af