From patchwork Tue Dec 15 11:16:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 11974561 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=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 2E7D9C4361B for ; Tue, 15 Dec 2020 11:18:48 +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 DD6A222255 for ; Tue, 15 Dec 2020 11:18:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DD6A222255 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+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: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=BK6PqWncOcDL66rWlYy2cr/qI4TWRJaKeIrN+b8wbB8=; b=MukMoP1owNlJzqC3MMOl57938F G0hHTEpJGpxljheAFAtlSs/TKnaB2zfAVwvYMNLjPRbqpF8bAyInWstMV+22t/u6Rcp+M3yDoVEfR Z3KJGmj8XXBazH4CgQzXwEb3/slcrVUsvePmKV5OpVW4oK8dkizgOE8YyOGyz/ers8zoXQBb8xsbJ mHYxXsWsG6etpAe/hwigHSGXSJVWgWgO99Os4lSkRgSHEicNqPvke4xDJAT/ci22inuQD3kO8N0ZW UlSZ4lxbTuJSuxG1o+fiHI9Bj9krnvZEoKAYm0l91UUetGPc2B3LKqAPTgaJmw7pV99IC3WO5XsOw XX7VRc1g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kp8Kj-0005Ms-5q; Tue, 15 Dec 2020 11:17:33 +0000 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kp8Kf-0005Lj-VD for linux-arm-kernel@lists.infradead.org; Tue, 15 Dec 2020 11:17:31 +0000 Received: by mail-pj1-x1044.google.com with SMTP id lb18so1016352pjb.5 for ; Tue, 15 Dec 2020 03:17:27 -0800 (PST) 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=znqjVcIUohDW9byeGOeLaaO4J3p/ISagnyXoutieqQM=; b=ejEKIWte6vShA1V5GcY+GH0Mrck0B5OCU2WR6/iX4Ky7NJzg4Opv+uxsU5ACKWlQZY CPU6dQ58qPSRzfHCIT8bkrUKVz4Qnsr6eSIEmrV8w2fcqFfhvJw4+s/Od+gNcBS4t05Y oe0xWb9ecbp7DJQxjRRnL4o7NNr4gD7tjFG9BsUTExjgaDbnF4d/6eEBMQzrTC4V2+yA N2IaqjrgHKsnBqCev9jG7WmYC9ZcAhlzI+Vw/cDu0fGyLXzuHCJaeZrX+oOeVXz+mvVZ l4yQWaUM1b8xgnQNHtvNkL1x2zpbXW7cCGE/n33gechYhxpnAlfIKzeqLuZNpjoq3kbW paJg== 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=znqjVcIUohDW9byeGOeLaaO4J3p/ISagnyXoutieqQM=; b=dtDceD0dKR7OO2pqfODxrAp9Np/pU+WvhXFc8YL+4tpgq9AQImsuFOp9PFI3fJJs73 JyU4qChTYCaGA7oUZWGAo45WYhwqRNgQZyBkKCWkKKG9OvpPeOD5GKOVNhX+BGVvhGiZ XWLgUMobwqkHc2/FdPlpmDBZkilpuzdO8MGY0WjNR3SbAlA9jbiK6B5Zp+bIbWQfY0k2 Y+o6q319vzzYS6/MNWSjpiiNmAKfC/ta/nBoZyJ1DbFVkOaSWnLLj9CEcJaGhtFniAAM 3nW1tFnZIBe5AhwpVYVUiuM8XVjvAxZMD8O+q7YSMn+Y+ECN3VPJ63bqHP3YmJcj/cAx YIKQ== X-Gm-Message-State: AOAM530OBreJ+G/VYrKFwteqrDGngT5Pb739NHmM9RGgdU1IduzunJi7 sdOrxMuOJXJ1nPCZ+Igx87ApFw== X-Google-Smtp-Source: ABdhPJyQGdP/zFJ+DNvgHPRi6JX9qraZ+XeSeuKDm/MOq8nFWxRk5VkZ0WX3+S5ZQJ4nqi15SfsZ1Q== X-Received: by 2002:a17:90a:77c2:: with SMTP id e2mr3347228pjs.224.1608031046305; Tue, 15 Dec 2020 03:17:26 -0800 (PST) Received: from localhost ([122.172.20.109]) by smtp.gmail.com with ESMTPSA id n127sm24278414pfd.143.2020.12.15.03.17.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Dec 2020 03:17:25 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Ionela Voinescu Subject: [RFC V2 0/2] cpufreq: cppc: Add support for frequency invariance Date: Tue, 15 Dec 2020 16:46:34 +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-20201215_061730_285394_B5179EE9 X-CRM114-Status: GOOD ( 14.55 ) 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: Vincent Guittot , linux-pm@vger.kernel.org, Viresh Kumar , linux-kernel@vger.kernel.org, Peter Puhov , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.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. 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 pm/linux-next and patches [1] and [2] which I sent recently to cleanup arm64 topology stuff. Changes since V1: - The interface for setting the callbacks is improved, so different parts looking to provide their callbacks don't need to think about each other. - Moved to per-cpu storage for storing the callback related data, AMU counters have higher priority with this. --- viresh [1] https://lore.kernel.org/lkml/7a171f710cdc0f808a2bfbd7db839c0d265527e7.1607579234.git.viresh.kumar@linaro.org/ [2] https://lore.kernel.org/lkml/5ffc7b9ed03c6301ac2f710f609282959491b526.1608010334.git.viresh.kumar@linaro.org/ Viresh Kumar (2): topology: Allow multiple entities to provide sched_freq_tick() callback cpufreq: cppc: Add support for frequency invariance arch/arm64/include/asm/topology.h | 8 +- arch/arm64/kernel/topology.c | 89 +++++++++---------- drivers/base/arch_topology.c | 56 +++++++++++- drivers/cpufreq/cppc_cpufreq.c | 140 +++++++++++++++++++++++++++++- include/linux/arch_topology.h | 14 ++- kernel/sched/core.c | 1 + 6 files changed, 244 insertions(+), 64 deletions(-)