From patchwork Mon Jan 28 16:55:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Quentin Perret X-Patchwork-Id: 10784051 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C0A91922 for ; Mon, 28 Jan 2019 16:55:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADD572B8B8 for ; Mon, 28 Jan 2019 16:55:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1ADB2B8C6; Mon, 28 Jan 2019 16:55:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4B5922B8B8 for ; Mon, 28 Jan 2019 16:55:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.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=D5OZEwk0yVpWSxJfioau6rPiRQIcvZkbchq39rOHtes=; b=k4KO4Fao8nOzJf 1a85CAq1LN/ZWyheMbOWBoDN2J53AbuUG3Mw5d23QhIJWsWBqFjp4agPpJ+H9EsFCeNjQPr7BM5gD FKbK4HYX6sNPWIAHozcU7N2lpw97gfsK3OsoRQARTVIERZJkBylKcWphTsirER3TvYl1s1dqDAc1U r+q5sXMI6F7PZo1WZSAMvQwRYmQEH+0vJaNluMbTpce+IiQan0kvB8iWFK5jgt6acfZmd8DHN6Chu 8A5SCopBgKs4C8ZAvFOI4iT7thi1ndzdNJpI1qJdXfaAbh46oKNOFvsyr9g7vGhrYIyTOqSl8xoAK 9Hdjic0Y+p/JkF2K5Fpg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goAC7-0007uI-AL; Mon, 28 Jan 2019 16:55:35 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goAC4-0007t5-PX for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2019 16:55:34 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6FDBBEBD; Mon, 28 Jan 2019 08:55:30 -0800 (PST) Received: from queper01-lin.cambridge.arm.com (queper01-lin.cambridge.arm.com [10.1.195.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C16DC3F59C; Mon, 28 Jan 2019 08:55:27 -0800 (PST) From: Quentin Perret To: rjw@rjwysocki.net, viresh.kumar@linaro.org, sudeep.holla@arm.com, liviu.dudau@arm.com, lorenzo.pieralisi@arm.com, robh+dt@kernel.org, mark.rutland@arm.com, nm@ti.com, sboyd@kernel.org Subject: [PATCH 0/7] Register an Energy Model for Arm reference platforms Date: Mon, 28 Jan 2019 16:55:15 +0000 Message-Id: <20190128165522.31749-1-quentin.perret@arm.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_085532_885400_1264F869 X-CRM114-Status: GOOD ( 12.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, quentin.perret@arm.com, mka@chromium.org, dietmar.eggemann@arm.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Energy Model (EM) framework feeds interested subsystems (the scheduler/EAS as of now) with power costs provided by drivers. Yet, no driver is actually doing that upstream yet. This series updates a set of CPUFreq drivers and DT files in order to register power costs in the EM framework for some of the Arm reference platforms for EAS: Hikey960, Juno and TC2. The series is split as follows: * Patch 01 introduces in PM_OPP a helper function which estimates the CPU power using the P=CV²f equation also used by IPA. It should be noted that this introduces duplicate code with IPA, which will eventually be fixed by migrating IPA to using PM_EM. The ideal plan would be to do so later, in a separate patch series. I would indeed prefer to keep the thermal and CPUFreq discussion separate at this stage, if deemed acceptable. * Patches 02-04 make use of that PM_OPP helper function from the following CPUFreq drivers: cpufreq-dt, scpi-cpufreq and arm_big_little. * Patch 05 modifies the SCMI cpufreq driver to pass the power costs obtained from firmware to PM_EM. * Patches 06-07 provide the dynamic-power-coefficient values for Juno and TC2. Thanks, Quentin Dietmar Eggemann (3): cpufreq: arm_big_little: Register an Energy Model arm64: dts: juno: Add cpu dynamic-power-coefficient information arm: dts: vexpress-v2p-ca15_a7: Add cpu dynamic-power-coefficient information Quentin Perret (4): PM / OPP: Introduce a power estimation helper cpufreq: dt: Register an Energy Model cpufreq: scpi: Register an Energy Model cpufreq: scmi: Register an Energy Model arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts | 5 ++ arch/arm64/boot/dts/arm/juno-r2.dts | 6 +++ arch/arm64/boot/dts/arm/juno.dts | 6 +++ drivers/cpufreq/arm_big_little.c | 10 ++++ drivers/cpufreq/cpufreq-dt.c | 7 ++- drivers/cpufreq/scmi-cpufreq.c | 36 ++++++++++++- drivers/cpufreq/scpi-cpufreq.c | 8 ++- drivers/opp/of.c | 60 ++++++++++++++++++++++ include/linux/pm_opp.h | 5 ++ 9 files changed, 140 insertions(+), 3 deletions(-)