From patchwork Mon Feb 17 16:20:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 212832 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 1FEB9C3402A for ; Mon, 17 Feb 2020 16:20:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EAF9A24654 for ; Mon, 17 Feb 2020 16:20:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581956450; bh=oSAwJuwZZke99vm8rocsC6A/BaGIh2GI4Jpuuu+iYYY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=PfzMdvIK4l3t/aUBxfo062ndo7/xl4CJn7EQ05s4LODzHJ68f9Zc+FnS/f0h/YD4R O61jDiAkBhEnZYNMOj3x0PZ8VS7nDZVLI0RQ4NkcNyz+mYUaTORDDVkRvIMLo2b9Ae LHtRei6YElJ+htCh4tq8RarCIwfrVNbuetJjuWos= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728836AbgBQQUs (ORCPT ); Mon, 17 Feb 2020 11:20:48 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:54984 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728602AbgBQQUr (ORCPT ); Mon, 17 Feb 2020 11:20:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=K50znw7T2d7ZLRRT/oJYwAV1nhjr/eNbyg/t950G8S8=; b=ZrcpYoaBUU5wE68Qol76U7axVb N8WaDAIkWm1DmDmhXq7Usu+VgGCpsxddGPgANHDWFlB62qmc1ZPb8Tv3QLId1hyQLTWPq1torn3r6 3y0wu98eCbqhXbw+wJEa1vHjXGlQWdWltz43hddoTVNYScd+ZYPhTa8pxs3tr5YpcRKwO9uo0hVK5 y0UjF8cpYWGelX6BjVOahV++qmYGnGVoj8toTWUERh9IADTtQ0XLBVx0zA3drvtN2hWxgtv/S5qsB ddup/9hbNI/4twqR7WXGZGH3+su74iq8YgAppg1Cop7PL/ii+xJpM8FUcdtChtCJCP5wVcZZKIwKk Mkd5HpGA==; Received: from ip-109-41-129-189.web.vodafone.de ([109.41.129.189] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3j8Y-00042D-2n; Mon, 17 Feb 2020 16:20:46 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92.3) (envelope-from ) id 1j3j8W-000fpg-8O; Mon, 17 Feb 2020 17:20:44 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , Jonathan Corbet , "Rafael J. Wysocki" , Viresh Kumar , linux-pm@vger.kernel.org Subject: [PATCH v2 14/24] docs: cpu-freq: convert index.txt to ReST Date: Mon, 17 Feb 2020 17:20:32 +0100 Message-Id: <7a89b0c82520d340d3c7f45bfd52ee9e6e23dbdf.1581956285.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org most of the stuff there can be re-used with ReST format, but we need to add an empty TOC and remove the existing entries, as the following conversion patches will be re-adding them, as they're converted. Signed-off-by: Mauro Carvalho Chehab --- Documentation/cpu-freq/index.rst | 35 ++++++++++++++++++++ Documentation/cpu-freq/index.txt | 56 -------------------------------- Documentation/index.rst | 1 + 3 files changed, 36 insertions(+), 56 deletions(-) create mode 100644 Documentation/cpu-freq/index.rst delete mode 100644 Documentation/cpu-freq/index.txt diff --git a/Documentation/cpu-freq/index.rst b/Documentation/cpu-freq/index.rst new file mode 100644 index 000000000000..1bff3dfddd23 --- /dev/null +++ b/Documentation/cpu-freq/index.rst @@ -0,0 +1,35 @@ +.. SPDX-License-Identifier: GPL-2.0 + +============================================================================== +Linux CPUFreq - CPU frequency and voltage scaling code in the Linux(TM) kernel +============================================================================== + +Author: Dominik Brodowski + + Clock scaling allows you to change the clock speed of the CPUs on the + fly. This is a nice method to save battery power, because the lower + the clock speed, the less power the CPU consumes. + + +.. toctree:: + :maxdepth: 1 + +Mailing List +------------ +There is a CPU frequency changing CVS commit and general list where +you can report bugs, problems or submit patches. To post a message, +send an email to linux-pm@vger.kernel.org. + +Links +----- +the FTP archives: +* ftp://ftp.linux.org.uk/pub/linux/cpufreq/ + +how to access the CVS repository: +* http://cvs.arm.linux.org.uk/ + +the CPUFreq Mailing list: +* http://vger.kernel.org/vger-lists.html#linux-pm + +Clock and voltage scaling for the SA-1100: +* http://www.lartmaker.nl/projects/scaling diff --git a/Documentation/cpu-freq/index.txt b/Documentation/cpu-freq/index.txt deleted file mode 100644 index c15e75386a05..000000000000 --- a/Documentation/cpu-freq/index.txt +++ /dev/null @@ -1,56 +0,0 @@ - CPU frequency and voltage scaling code in the Linux(TM) kernel - - - L i n u x C P U F r e q - - - - - Dominik Brodowski - - - - Clock scaling allows you to change the clock speed of the CPUs on the - fly. This is a nice method to save battery power, because the lower - the clock speed, the less power the CPU consumes. - - - -Documents in this directory: ----------------------------- - -amd-powernow.txt - AMD powernow driver specific file. - -core.txt - General description of the CPUFreq core and - of CPUFreq notifiers. - -cpu-drivers.txt - How to implement a new cpufreq processor driver. - -cpufreq-nforce2.txt - nVidia nForce2 platform specific file. - -cpufreq-stats.txt - General description of sysfs cpufreq stats. - -index.txt - File index, Mailing list and Links (this document) - -pcc-cpufreq.txt - PCC cpufreq driver specific file. - - -Mailing List ------------- -There is a CPU frequency changing CVS commit and general list where -you can report bugs, problems or submit patches. To post a message, -send an email to linux-pm@vger.kernel.org. - -Links ------ -the FTP archives: -* ftp://ftp.linux.org.uk/pub/linux/cpufreq/ - -how to access the CVS repository: -* http://cvs.arm.linux.org.uk/ - -the CPUFreq Mailing list: -* http://vger.kernel.org/vger-lists.html#linux-pm - -Clock and voltage scaling for the SA-1100: -* http://www.lartmaker.nl/projects/scaling diff --git a/Documentation/index.rst b/Documentation/index.rst index e99d0bd2589d..4cf37ad1cd1d 100644 --- a/Documentation/index.rst +++ b/Documentation/index.rst @@ -99,6 +99,7 @@ needed). accounting/index block/index cdrom/index + cpu-freq/index ide/index fb/index fpga/index From patchwork Mon Feb 17 16:20:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 212831 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 D23E7C34031 for ; Mon, 17 Feb 2020 16:20:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A70032465D for ; Mon, 17 Feb 2020 16:20:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581956451; bh=DhvH2HDDBA6dOWvJaW6zuGlf7URyPdl7Iyg01bc1q+A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=B0f51FHMbtb76aCmIa1k+OHxuzyl8JTrnXJ6bKyon2tS1QxFtqOJ3UadUVhDN0PN2 dbbvtDmv0A7OXODuNjTNfjq2aU1VvEgYostrApb74NP+j0rmlBHd9fJVHJOV9py6Jd tXgRbeOIIslhIiTeXyEjngACE+5VydpsvX6y/PZo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728764AbgBQQUs (ORCPT ); Mon, 17 Feb 2020 11:20:48 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:54976 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728543AbgBQQUr (ORCPT ); Mon, 17 Feb 2020 11:20:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=WOmy0+QMckhdBzIIN5N8aTIEyoanTMoTBxTpT7pGGt4=; b=huK7I9hhDe7HhUFZwPp1c1UBu2 D0Lm6ATDem2jUeAtxLA0b89zENifzaqGIplTVQQQPIRMCcT+K2BBQJ4Y7lQNOXQf4NNlX7FKWslRY +3VtsowHd/VXi0l+unvLai/D8/m2lyx1PzfKn4uKXwVoCy/VsUl50MUASDDYOPeovvKhp49F90a3O KoPMhg1/PksC8BqRov01NEVjjUjJHEADSS4l5glw/TpqUTtaTXmnG+WKu+OK7kGdwtqB8GQ0v2xPi QuNNOcRb0PzZMItizAGQNxR6oZEzvqfxO/Ct2lTcR9nkd+pIDwatkn4p0S0E5y6gxRicfswo3kmDV 5/YG6XjQ==; Received: from ip-109-41-129-189.web.vodafone.de ([109.41.129.189] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3j8Y-00042F-8I; Mon, 17 Feb 2020 16:20:46 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92.3) (envelope-from ) id 1j3j8W-000fpl-9P; Mon, 17 Feb 2020 17:20:44 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , Jonathan Corbet , "Rafael J. Wysocki" , Viresh Kumar , linux-pm@vger.kernel.org Subject: [PATCH v2 15/24] docs: cpu-freq: convert amd-powernow.txt to ReST Date: Mon, 17 Feb 2020 17:20:33 +0100 Message-Id: <63e8b6ba6110901079916cbbfb804ca100eab46d.1581956285.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org - Add a SPDX header; - Add a document title, based on the original contents of cpu-freq/index.txt; - some whitespace fixes and new line breaks; - Add it to cpu-freq/index.rst. Signed-off-by: Mauro Carvalho Chehab --- .../cpu-freq/{amd-powernow.txt => amd-powernow.rst} | 12 ++++++++++-- Documentation/cpu-freq/index.rst | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) rename Documentation/cpu-freq/{amd-powernow.txt => amd-powernow.rst} (89%) diff --git a/Documentation/cpu-freq/amd-powernow.txt b/Documentation/cpu-freq/amd-powernow.rst similarity index 89% rename from Documentation/cpu-freq/amd-powernow.txt rename to Documentation/cpu-freq/amd-powernow.rst index 254da155fa47..4a53612b62a2 100644 --- a/Documentation/cpu-freq/amd-powernow.txt +++ b/Documentation/cpu-freq/amd-powernow.rst @@ -1,3 +1,9 @@ +.. SPDX-License-Identifier: GPL-2.0 + +============================= +AMD PowerNow Driver Specifics +============================= + PowerNow! and Cool'n'Quiet are AMD names for frequency management capabilities in AMD processors. As the hardware @@ -23,16 +29,18 @@ not supply these tables. 7th Generation: powernow-k7: Athlon, Duron, Geode. 8th Generation: powernow-k8: Athlon, Athlon 64, Opteron, Sempron. + Documentation on this functionality in 8th generation processors is available in the "BIOS and Kernel Developer's Guide", publication -26094, in chapter 9, available for download from www.amd.com. +26094, in chapter 9, available for download from www.amd.com. BIOS supplied data, for powernow-k7 and for powernow-k8, may be from either the PSB table or from ACPI objects. The ACPI support is only available if the kernel config sets CONFIG_ACPI_PROCESSOR. The powernow-k8 driver will attempt to use ACPI if so configured, and fall back to PST if that fails. + The powernow-k7 driver will try to use the PSB support first, and fall back to ACPI if the PSB support fails. A module parameter, -acpi_force, is provided to force ACPI support to be used instead +acpi_force, is provided to force ACPI support to be used instead of PSB support. diff --git a/Documentation/cpu-freq/index.rst b/Documentation/cpu-freq/index.rst index 1bff3dfddd23..6f7c2a024447 100644 --- a/Documentation/cpu-freq/index.rst +++ b/Documentation/cpu-freq/index.rst @@ -14,6 +14,8 @@ Author: Dominik Brodowski .. toctree:: :maxdepth: 1 + amd-powernow + Mailing List ------------ There is a CPU frequency changing CVS commit and general list where From patchwork Mon Feb 17 16:20:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 212830 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 470E3C34030 for ; Mon, 17 Feb 2020 16:20:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1DFFE227BF for ; Mon, 17 Feb 2020 16:20:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581956452; bh=9Mli4VlLwD2vLWTivcyaxXYgVyieqFNicdZqSlvF0xI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=VUdFuRqhx+ltcjYYmn1XWzZm06k1Jq1iDK3ZdL9nP9KyyPcX40ULs+qGjCXUyY2yx aQfTe8AxUuxwrUlq2aamchFxGLw4YiHvodFRzpbTqg5tkmIM2JyBn0NRfa/IpaHDyT f+CkLIeeO+1uKCn+gKPCqrmnTmotu8Aj+lgMrqc8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728476AbgBQQUr (ORCPT ); Mon, 17 Feb 2020 11:20:47 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:54974 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728567AbgBQQUr (ORCPT ); Mon, 17 Feb 2020 11:20:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=5fMHhLhtfxXOaPgcU7lG8IGkd6p13B5INTE+xMyZ9go=; b=lzXOBgAvMAStWUbm5UoDKjzdKF 19U+BgIFZpJt1A3cTJfEXojBHvicJN6KZLzcYn/oUHYfd2twbkklm2rmvS5ca2TptfnKXmsdQRwLh ORFDCJXxWei1cThGOjmkh+r+P4a7KkSEB9YZ2Or/xNQpc9q3J6tuA9wX2R3MDdY30RzQ37l0BQ9fw R8wjV04kO1vg0or9V0rb6cl7Ovxp4T7RzpdjTf1fDS92QVZPLbvWvnyXR0+ssVKEJC/sQTi5VQ+/Z ASbhnvlwNxPFwEJHojR/3puXzjvhYYTIXQDEAoN/o5jPwifFvFVS4DYCWdwpbCsMCb+JsokWUzsko Ij+aBwyQ==; Received: from ip-109-41-129-189.web.vodafone.de ([109.41.129.189] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3j8Y-00042E-8M; Mon, 17 Feb 2020 16:20:46 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92.3) (envelope-from ) id 1j3j8W-000fpq-AM; Mon, 17 Feb 2020 17:20:44 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , Jonathan Corbet , "Rafael J. Wysocki" , Viresh Kumar , linux-pm@vger.kernel.org Subject: [PATCH v2 16/24] docs: cpu-freq: convert core.txt to ReST Date: Mon, 17 Feb 2020 17:20:34 +0100 Message-Id: X-Mailer: git-send-email 2.24.1 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org - Add a SPDX header; - Adjust the document title, based on the original contents of cpu-freq/index.txt; - Use lists where needed; - Comment out the existing text-only index; - use ``foo`` to mark a literal expression with asterisk; - Adjust some title marks; - Add table markups; - Add notes markups; - Some whitespace fixes and new line breaks; - Add it to cpu-freq/index.rst. Signed-off-by: Mauro Carvalho Chehab --- Documentation/cpu-freq/{core.txt => core.rst} | 65 ++++++++++--------- Documentation/cpu-freq/index.rst | 1 + 2 files changed, 34 insertions(+), 32 deletions(-) rename Documentation/cpu-freq/{core.txt => core.rst} (69%) diff --git a/Documentation/cpu-freq/core.txt b/Documentation/cpu-freq/core.rst similarity index 69% rename from Documentation/cpu-freq/core.txt rename to Documentation/cpu-freq/core.rst index ed577d9c154b..33cb90bd1d8f 100644 --- a/Documentation/cpu-freq/core.txt +++ b/Documentation/cpu-freq/core.rst @@ -1,31 +1,23 @@ - CPU frequency and voltage scaling code in the Linux(TM) kernel +.. SPDX-License-Identifier: GPL-2.0 +============================================================= +General description of the CPUFreq core and CPUFreq notifiers +============================================================= - L i n u x C P U F r e q +Authors: + - Dominik Brodowski + - David Kimdon + - Rafael J. Wysocki + - Viresh Kumar - C P U F r e q C o r e +.. Contents: - - Dominik Brodowski - David Kimdon - Rafael J. Wysocki - Viresh Kumar - - - - Clock scaling allows you to change the clock speed of the CPUs on the - fly. This is a nice method to save battery power, because the lower - the clock speed, the less power the CPU consumes. - - -Contents: ---------- -1. CPUFreq core and interfaces -2. CPUFreq notifiers -3. CPUFreq Table Generation with Operating Performance Point (OPP) + 1. CPUFreq core and interfaces + 2. CPUFreq notifiers + 3. CPUFreq Table Generation with Operating Performance Point (OPP) 1. General Information -======================= +====================== The CPUFreq core code is located in drivers/cpufreq/cpufreq.c. This cpufreq code offers a standardized interface for the CPUFreq @@ -63,7 +55,7 @@ The phase is specified in the second argument to the notifier. The phase is CPUFREQ_CREATE_POLICY when the policy is first created and it is CPUFREQ_REMOVE_POLICY when the policy is removed. -The third argument, a void *pointer, points to a struct cpufreq_policy +The third argument, a ``void *pointer``, points to a struct cpufreq_policy consisting of several values, including min, max (the lower and upper frequencies (in kHz) of the new policy). @@ -80,10 +72,13 @@ CPUFREQ_POSTCHANGE. The third argument is a struct cpufreq_freqs with the following values: -cpu - number of the affected CPU -old - old frequency -new - new frequency -flags - flags of the cpufreq driver + +===== =========================== +cpu number of the affected CPU +old old frequency +new new frequency +flags flags of the cpufreq driver +===== =========================== 3. CPUFreq Table Generation with Operating Performance Point (OPP) ================================================================== @@ -94,9 +89,12 @@ dev_pm_opp_init_cpufreq_table - the OPP layer's internal information about the available frequencies into a format readily providable to cpufreq. - WARNING: Do not use this function in interrupt context. + .. Warning:: + + Do not use this function in interrupt context. + + Example:: - Example: soc_pm_init() { /* Do things */ @@ -106,7 +104,10 @@ dev_pm_opp_init_cpufreq_table - /* Do other things */ } - NOTE: This function is available only if CONFIG_CPU_FREQ is enabled in - addition to CONFIG_PM_OPP. + .. note:: -dev_pm_opp_free_cpufreq_table - Free up the table allocated by dev_pm_opp_init_cpufreq_table + This function is available only if CONFIG_CPU_FREQ is enabled in + addition to CONFIG_PM_OPP. + +dev_pm_opp_free_cpufreq_table + Free up the table allocated by dev_pm_opp_init_cpufreq_table diff --git a/Documentation/cpu-freq/index.rst b/Documentation/cpu-freq/index.rst index 6f7c2a024447..8babc5a212dd 100644 --- a/Documentation/cpu-freq/index.rst +++ b/Documentation/cpu-freq/index.rst @@ -15,6 +15,7 @@ Author: Dominik Brodowski :maxdepth: 1 amd-powernow + core Mailing List ------------ From patchwork Mon Feb 17 16:20:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 212829 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 EDBAFC3403D for ; Mon, 17 Feb 2020 16:20:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BAFE6227BF for ; Mon, 17 Feb 2020 16:20:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581956457; bh=2VkSt+i/ceAmRbb7r0Z7CfMPO40e2ED8vWxBa+oZDNM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=CBUdnZYLHRfuddcABf+iz+OZq5ULu0FdRHry7veZKnpjfPFYnVZTa+xlb4bIbF/kd jtb+mum1dCiQgy3S5oeBllcQmvconjClbtACj1LQVDGGgxFa7JX99a1Wer4zHzbe7r 1ZWhiP/fbLvgKYpL335wFw9mjoT1ABXA6TODb0Bs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729242AbgBQQU4 (ORCPT ); Mon, 17 Feb 2020 11:20:56 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:55358 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728789AbgBQQUv (ORCPT ); Mon, 17 Feb 2020 11:20:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=jLWQhdjlNUCvPW2x0jtz8CREosgEHwxuovRUzRlgqDg=; b=hsSIlzNJdpuYMfFdAgTlQr4cMW OBEQozCh2VV0JPvYBKObSHXd2OnmJ15hhPh06NffSd7dVkESle6A6+56gBRO8AoQWPk2DUTxFqgD3 rfhwg5p4XjO6+z2Pdv3GU4I6as2jlXa7SZtuFFTYEblb4q3ppiU8+ZVjcJUcP5dkE6vImtbM+fFWx lYizYDJaZ1ySNMPoRyAS7qtQq7WAPi9VqFa75qWUN7Ya/jIq+E0ZzUMYrIe0peLvV5lyiK1ZmIRYR cIP+1MKPMaPlofi/rUkhF0Zyj6CWm8bHkeH46zFGQ6sP+Z32/jGfF5+mLWpQgmNMx5Noz8tuIQFD5 Y5jc6IeA==; Received: from tmo-109-126.customers.d1-online.com ([80.187.109.126] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3j8Y-00042J-Cn; Mon, 17 Feb 2020 16:20:51 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92.3) (envelope-from ) id 1j3j8W-000fqA-Ef; Mon, 17 Feb 2020 17:20:44 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , Jonathan Corbet , "Rafael J. Wysocki" , Viresh Kumar , linux-pm@vger.kernel.org Subject: [PATCH v2 20/24] docs: cpu-freq: convert pcc-cpufreq.txt to ReST Date: Mon, 17 Feb 2020 17:20:38 +0100 Message-Id: <63ed3462eb3083290d9bc41332ab45524a71b3d9.1581956285.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org - Add a SPDX header; - Add a document title, based on the original contents of cpu-freq/index.txt; - Add copyright symbol; - Remove a c-like comment, adding the useful info not covered by the SPDX and document title headers as text; - Comment out the existing text-only index; - Mark literal blocks as such; - Some whitespace fixes and new line breaks; - Add it to cpu-freq/index.rst. Signed-off-by: Mauro Carvalho Chehab --- Documentation/cpu-freq/index.rst | 1 + .../{pcc-cpufreq.txt => pcc-cpufreq.rst} | 86 ++++++++----------- 2 files changed, 38 insertions(+), 49 deletions(-) rename Documentation/cpu-freq/{pcc-cpufreq.txt => pcc-cpufreq.rst} (80%) diff --git a/Documentation/cpu-freq/index.rst b/Documentation/cpu-freq/index.rst index d12ef0bb78a5..fb2db2eb7eaf 100644 --- a/Documentation/cpu-freq/index.rst +++ b/Documentation/cpu-freq/index.rst @@ -19,6 +19,7 @@ Author: Dominik Brodowski cpu-drivers cpufreq-nforce2 cpufreq-stats + pcc-cpufreq Mailing List ------------ diff --git a/Documentation/cpu-freq/pcc-cpufreq.txt b/Documentation/cpu-freq/pcc-cpufreq.rst similarity index 80% rename from Documentation/cpu-freq/pcc-cpufreq.txt rename to Documentation/cpu-freq/pcc-cpufreq.rst index 9e3c3b33514c..6fd891f757a7 100644 --- a/Documentation/cpu-freq/pcc-cpufreq.txt +++ b/Documentation/cpu-freq/pcc-cpufreq.rst @@ -1,45 +1,29 @@ -/* - * pcc-cpufreq.txt - PCC interface documentation - * - * Copyright (C) 2009 Red Hat, Matthew Garrett - * Copyright (C) 2009 Hewlett-Packard Development Company, L.P. - * Nagananda Chumbalkar - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or NON - * INFRINGEMENT. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 675 Mass Ave, Cambridge, MA 02139, USA. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - */ +.. SPDX-License-Identifier: GPL-2.0 +.. include:: +========================================================= +Processor Clocking Control (PCC) CPUFreq Driver Specifics +========================================================= - Processor Clocking Control Driver - --------------------------------- +Copyright |copy| 2009 Red Hat, Matthew Garrett -Contents: ---------- -1. Introduction -1.1 PCC interface -1.1.1 Get Average Frequency -1.1.2 Set Desired Frequency -1.2 Platforms affected -2. Driver and /sys details -2.1 scaling_available_frequencies -2.2 cpuinfo_transition_latency -2.3 cpuinfo_cur_freq -2.4 related_cpus -3. Caveats +Copyright |copy| 2009 Hewlett-Packard Development Company, L.P., +Nagananda Chumbalkar + + +.. Contents: + + 1. Introduction + 1.1 PCC interface + 1.1.1 Get Average Frequency + 1.1.2 Set Desired Frequency + 1.2 Platforms affected + 2. Driver and /sys details + 2.1 scaling_available_frequencies + 2.2 cpuinfo_transition_latency + 2.3 cpuinfo_cur_freq + 2.4 related_cpus + 3. Caveats 1. Introduction: ---------------- @@ -140,7 +124,9 @@ Internally, there is no need for the driver to convert the "target" frequency to a corresponding P-state. The VERSION number for the driver will be of the format v.xy.ab. -eg: 1.00.02 +eg:: + + 1.00.02 ----- -- | | | -- this will increase with bug fixes/enhancements to the driver @@ -168,21 +154,21 @@ A) Often cpuinfo_cur_freq will show a value different than what is declared in the scaling_available_frequencies or scaling_cur_freq, or scaling_max_freq. This is due to "turbo boost" available on recent Intel processors. If certain conditions are met the BIOS can achieve a slightly higher speed than requested -by OSPM. An example: +by OSPM. An example:: -scaling_cur_freq : 2933000 -cpuinfo_cur_freq : 3196000 + scaling_cur_freq : 2933000 + cpuinfo_cur_freq : 3196000 B) There is a round-off error associated with the cpuinfo_cur_freq value. Since the driver obtains the current frequency as a "percentage" (%) of the nominal frequency from the BIOS, sometimes, the values displayed by -scaling_cur_freq and cpuinfo_cur_freq may not match. An example: +scaling_cur_freq and cpuinfo_cur_freq may not match. An example:: -scaling_cur_freq : 1600000 -cpuinfo_cur_freq : 1583000 + scaling_cur_freq : 1600000 + cpuinfo_cur_freq : 1583000 In this example, the nominal frequency is 2933 MHz. The driver obtains the -current frequency, cpuinfo_cur_freq, as 54% of the nominal frequency: +current frequency, cpuinfo_cur_freq, as 54% of the nominal frequency:: 54% of 2933 MHz = 1583 MHz @@ -193,8 +179,10 @@ corresponds to the frequency of the P0 P-state. ----------------- The related_cpus field is identical to affected_cpus. -affected_cpus : 4 -related_cpus : 4 +:: + + affected_cpus : 4 + related_cpus : 4 Currently, the PCC driver does not evaluate _PSD. The platforms that support PCC do not implement SW_ALL. So OSPM doesn't need to perform any coordination