From patchwork Mon Feb 17 16:20:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 11386863 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 EB4B61580 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 CD02C24670 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=GXfnyk+5mxcLxh7DS10kpV2zW4ajtTvIlfSvgF1m6HE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ZUrc/zOfKSEWUnFzTMl0FAm7RHbpOlmU5Lcu3FS5skr8W5u6zJrOygJSIz0XA24Zt IXGyj7XmaesV6wHgObRRBZjhVeQUlSAl7XU05DUBhCd6Zej3Y12LJoLSUd+3fVHMW5 b3ZsIiTrGkVq3JWEK3Yh06BWUVdIhV6VFv4WbyOo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728692AbgBQQUr (ORCPT ); Mon, 17 Feb 2020 11:20:47 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:54966 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728476AbgBQQUr (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: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description; bh=bJnoUKgVIb6mtplglvS+byAU4SeZA8CY+LwJLXnSv9Q=; b=V8Gn2+nNEW0XD7O/RskUVtUmAc 5wOo0wKXc5QuWC8OTHgzcElE3z3DtOzZfXmqnanL8KD+0Y2q1YJrxMeGAZFGYEYlgnHPry06/IZyq h0DQsINTAXRbx8AFw0stk3d06FMhkDQ/VnaZUwpO/XeCr5r5dVlbHpBvABw//guL5EL3+Ipwh2Hes Wf7Cw0C5BzVCxyOkQGkGxctdRDfFPcuEZqv5VqMw9XR5gBt46Y3xI+mT4CSAgTAOoGzO+ahrEJqtT M8lUiHFr5TM3POASvq+jzypM0Z4pOv+Oj6tSnE6s6j7EKxlMAbfHJADB99ygREBwLIzUwimFrmJ2d SKFfodKg==; 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 1j3j8X-000420-QT; Mon, 17 Feb 2020 16:20:46 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92.3) (envelope-from ) id 1j3j8V-000fod-QO; Mon, 17 Feb 2020 17:20:43 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , Jonathan Corbet , Amit Daniel Kachhap , Daniel Lezcano , Viresh Kumar , Javi Merino , linux-pm@vger.kernel.org Subject: [PATCH v2 01/24] docs: thermal: convert cpu-idle-cooling.rst to ReST Date: Mon, 17 Feb 2020 17:20:19 +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 Despite being named with .rst extension, this file doesn't match the ReST standard. It actually causes a crash at Sphinx: Sphinx parallel build error: docutils.utils.SystemMessage: /devel/v4l/docs/Documentation/driver-api/thermal/cpu-idle-cooling.rst:69: (SEVERE/4) Unexpected section title. Add needed markups for it to be properly parsed. While here, add it to the thermal index.rst. Signed-off-by: Mauro Carvalho Chehab --- .../driver-api/thermal/cpu-idle-cooling.rst | 18 ++++++++++++------ Documentation/driver-api/thermal/index.rst | 1 + 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Documentation/driver-api/thermal/cpu-idle-cooling.rst b/Documentation/driver-api/thermal/cpu-idle-cooling.rst index 9f0016ee4cfb..357d2f023605 100644 --- a/Documentation/driver-api/thermal/cpu-idle-cooling.rst +++ b/Documentation/driver-api/thermal/cpu-idle-cooling.rst @@ -1,3 +1,9 @@ +.. SPDX-License-Identifier: GPL-2.0 + +================ +CPU Idle Cooling +================ + Situation: ---------- @@ -45,7 +51,7 @@ idle state target residency, we lead to dropping the static and the dynamic leakage for this period (modulo the energy needed to enter this state). So the sustainable power with idle cycles has a linear relation with the OPP’s sustainable power and can be computed with a -coefficient similar to: +coefficient similar to:: Power(IdleCycle) = Coef x Power(OPP) @@ -136,7 +142,7 @@ Power considerations -------------------- When we reach the thermal trip point, we have to sustain a specified -power for a specific temperature but at this time we consume: +power for a specific temperature but at this time we consume:: Power = Capacitance x Voltage^2 x Frequency x Utilisation @@ -145,7 +151,7 @@ wrong in the system setup). The ‘Capacitance’ and ‘Utilisation’ are a fixed value, ‘Voltage’ and the ‘Frequency’ are fixed artificially because we don’t want to change the OPP. We can group the ‘Capacitance’ and the ‘Utilisation’ into a single term which is the -‘Dynamic Power Coefficient (Cdyn)’ Simplifying the above, we have: +‘Dynamic Power Coefficient (Cdyn)’ Simplifying the above, we have:: Pdyn = Cdyn x Voltage^2 x Frequency @@ -154,7 +160,7 @@ in order to target the sustainable power defined in the device tree. So with the idle injection mechanism, we want an average power (Ptarget) resulting in an amount of time running at full power on a specific OPP and idle another amount of time. That could be put in a -equation: +equation:: P(opp)target = ((Trunning x (P(opp)running) + (Tidle x P(opp)idle)) / (Trunning + Tidle) @@ -165,7 +171,7 @@ equation: At this point if we know the running period for the CPU, that gives us the idle injection we need. Alternatively if we have the idle -injection duration, we can compute the running duration with: +injection duration, we can compute the running duration with:: Trunning = Tidle / ((P(opp)running / P(opp)target) - 1) @@ -188,7 +194,7 @@ However, in this demonstration we ignore three aspects: target residency, otherwise we end up consuming more energy and potentially invert the mitigation effect -So the final equation is: +So the final equation is:: Trunning = (Tidle - Twakeup ) x (((P(opp)dyn + P(opp)static ) - P(opp)target) / P(opp)target ) diff --git a/Documentation/driver-api/thermal/index.rst b/Documentation/driver-api/thermal/index.rst index 5ba61d19c6ae..4cb0b9b6bfb8 100644 --- a/Documentation/driver-api/thermal/index.rst +++ b/Documentation/driver-api/thermal/index.rst @@ -8,6 +8,7 @@ Thermal :maxdepth: 1 cpu-cooling-api + cpu-idle-cooling sysfs-api power_allocator 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: 11386849 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 B1E751580 for ; Mon, 17 Feb 2020 16:20:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 92AC12467A 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=1581956449; bh=oSAwJuwZZke99vm8rocsC6A/BaGIh2GI4Jpuuu+iYYY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=QiIatB92VuA78FDnwds5zvKsl6VHuepNpgPLbQ7aFhOzah7SchSm3rddBXrdB1gzO kGeZm5NfYYfNgzzQhPmWLekdBEO8i7k5chfwPFNWtHBfl5ydUaO+O9s0Xp6dW2D8KC nlKzwonE/RWa5xe0dSk2U7WVLvfOusMPa/tOd2TY= 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: 11386859 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 A5812139A 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 86A6924670 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: 11386861 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 3DD17159A 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 1F3B524673 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:35 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: 11386871 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 3631C139A for ; Mon, 17 Feb 2020 16:20:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0DD21227BF for ; Mon, 17 Feb 2020 16:20:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581956456; bh=+kQWxUlZFb3eujYdi0+FSk8vyk8VwKL5jr9omATOppY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=mtvLrSS1+HPL2Jwhat32nhmUjECqnCozAu8r6y0JJEC1hadiC/IQEF48//06ldoaO MdbcuDXA9fytmWO0p7NP2I2eyz+VMHnJFraUB/B4PzkPEEbF3tnekMD9bR8DtwzRQK HyvkbOZk37VaJ+PtJlcpceVlDKNrEjvz4/t4f7yE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729125AbgBQQUz (ORCPT ); Mon, 17 Feb 2020 11:20:55 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:55368 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729021AbgBQQUw (ORCPT ); Mon, 17 Feb 2020 11:20:52 -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=eKGr+SzBvJriuzc15mOH1CYYgTYnW9bXfV94KX7bnC8=; b=Q6Iq4L331Xpeld1KgX7bqPN7Wh STvcmg5ZB/lqgtPFMcto+KKETrVEmso44Bh6S/xcSxbTbn6jHxmctUHDGmgfQmLGP8u5sbx4F9B9e ELfQwvIFYiNWjnEFctySOYD1Z9dsjtrg5ys4FZgMT9l5mgTIrJHK4qLhG55qQmx14vsa8HEttQpOH ympkjgw75YT25CphmtqhH55wvXBHNpsQ2wGzFCfXete/V5J9I0l6mzYLJz5O6BUUWgisPhiNg4Fid D0+6L0YcNLv0c1Taqkvnoqf9n96Viz55awJrVHPVqu4wpxbsKgGmllwWWDeCM9KPh/gMyhFX1Rnog qaVqvBWg==; 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-00042G-9T; 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-000fpv-BL; 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 17/24] docs: cpu-freq: convert cpu-drivers.txt to ReST Date: Mon, 17 Feb 2020 17:20:35 +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; - Add a document title, based on the original contents of cpu-freq/index.txt; - Use lists where needed; - Comment out the existing text-only index; - Adjust some title marks; - Add table markups; - Add notes markups; - Mark literal blocks as such; - use ``foo`` for literal texts; - Some whitespace fixes and new line breaks; - Add it to cpu-freq/index.rst. Signed-off-by: Mauro Carvalho Chehab --- .../{cpu-drivers.txt => cpu-drivers.rst} | 129 +++++++++--------- Documentation/cpu-freq/index.rst | 1 + 2 files changed, 64 insertions(+), 66 deletions(-) rename Documentation/cpu-freq/{cpu-drivers.txt => cpu-drivers.rst} (72%) diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.rst similarity index 72% rename from Documentation/cpu-freq/cpu-drivers.txt rename to Documentation/cpu-freq/cpu-drivers.rst index 6e353d00cdc6..a697278ce190 100644 --- a/Documentation/cpu-freq/cpu-drivers.txt +++ b/Documentation/cpu-freq/cpu-drivers.rst @@ -1,35 +1,27 @@ - CPU frequency and voltage scaling code in the Linux(TM) kernel +.. SPDX-License-Identifier: GPL-2.0 +=============================================== +How to Implement a new CPUFreq Processor Driver +=============================================== - L i n u x C P U F r e q +Authors: - C P U D r i v e r s - - information for developers - + - Dominik Brodowski + - Rafael J. Wysocki + - Viresh Kumar +.. Contents - Dominik Brodowski - 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. What To Do? -1.1 Initialization -1.2 Per-CPU Initialization -1.3 verify -1.4 target/target_index or setpolicy? -1.5 target/target_index -1.6 setpolicy -1.7 get_intermediate and target_intermediate -2. Frequency Table Helpers + 1. What To Do? + 1.1 Initialization + 1.2 Per-CPU Initialization + 1.3 verify + 1.4 target/target_index or setpolicy? + 1.5 target/target_index + 1.6 setpolicy + 1.7 get_intermediate and target_intermediate + 2. Frequency Table Helpers @@ -49,7 +41,7 @@ function check whether this kernel runs on the right CPU and the right chipset. If so, register a struct cpufreq_driver with the CPUfreq core using cpufreq_register_driver() -What shall this struct cpufreq_driver contain? +What shall this struct cpufreq_driver contain? .name - The name of this driver. @@ -108,37 +100,42 @@ Whenever a new CPU is registered with the device model, or after the cpufreq driver registers itself, the per-policy initialization function cpufreq_driver.init is called if no cpufreq policy existed for the CPU. Note that the .init() and .exit() routines are called only once for the -policy and not for each CPU managed by the policy. It takes a struct -cpufreq_policy *policy as argument. What to do now? +policy and not for each CPU managed by the policy. It takes a ``struct +cpufreq_policy *policy`` as argument. What to do now? If necessary, activate the CPUfreq support on your CPU. Then, the driver must fill in the following values: -policy->cpuinfo.min_freq _and_ -policy->cpuinfo.max_freq - the minimum and maximum frequency - (in kHz) which is supported by - this CPU -policy->cpuinfo.transition_latency the time it takes on this CPU to - switch between two frequencies in - nanoseconds (if appropriate, else - specify CPUFREQ_ETERNAL) - -policy->cur The current operating frequency of - this CPU (if appropriate) -policy->min, -policy->max, -policy->policy and, if necessary, -policy->governor must contain the "default policy" for - this CPU. A few moments later, - cpufreq_driver.verify and either - cpufreq_driver.setpolicy or - cpufreq_driver.target/target_index is called - with these values. -policy->cpus Update this with the masks of the - (online + offline) CPUs that do DVFS - along with this CPU (i.e. that share - clock/voltage rails with it). ++-----------------------------------+--------------------------------------+ +|policy->cpuinfo.min_freq _and_ | | +|policy->cpuinfo.max_freq | the minimum and maximum frequency | +| | (in kHz) which is supported by | +| | this CPU | ++-----------------------------------+--------------------------------------+ +|policy->cpuinfo.transition_latency | the time it takes on this CPU to | +| | switch between two frequencies in | +| | nanoseconds (if appropriate, else | +| | specify CPUFREQ_ETERNAL) | ++-----------------------------------+--------------------------------------+ +|policy->cur | The current operating frequency of | +| | this CPU (if appropriate) | ++-----------------------------------+--------------------------------------+ +|policy->min, | | +|policy->max, | | +|policy->policy and, if necessary, | | +|policy->governor | must contain the "default policy" for| +| | this CPU. A few moments later, | +| | cpufreq_driver.verify and either | +| | cpufreq_driver.setpolicy or | +| | cpufreq_driver.target/target_index is| +| | called with these values. | ++-----------------------------------+--------------------------------------+ +|policy->cpus | Update this with the masks of the | +| | (online + offline) CPUs that do DVFS | +| | along with this CPU (i.e. that share| +| | clock/voltage rails with it). | ++-----------------------------------+--------------------------------------+ For setting some of these values (cpuinfo.min[max]_freq, policy->min[max]), the frequency table helpers might be helpful. See the section 2 for more information @@ -151,8 +148,8 @@ on them. When the user decides a new policy (consisting of "policy,governor,min,max") shall be set, this policy must be validated so that incompatible values can be corrected. For verifying these -values cpufreq_verify_within_limits(struct cpufreq_policy *policy, -unsigned int min_freq, unsigned int max_freq) function might be helpful. +values cpufreq_verify_within_limits(``struct cpufreq_policy *policy``, +``unsigned int min_freq``, ``unsigned int max_freq``) function might be helpful. See section 2 for details on frequency table helpers. You need to make sure that at least one valid frequency (or operating @@ -163,7 +160,7 @@ policy->max first, and only if this is no solution, decrease policy->min. 1.4 target or target_index or setpolicy or fast_switch? ------------------------------------------------------- -Most cpufreq drivers or even most cpu frequency scaling algorithms +Most cpufreq drivers or even most cpu frequency scaling algorithms only allow the CPU frequency to be set to predefined fixed values. For these, you use the ->target(), ->target_index() or ->fast_switch() callbacks. @@ -175,8 +172,8 @@ limits on their own. These shall use the ->setpolicy() callback. 1.5. target/target_index ------------------------ -The target_index call has two arguments: struct cpufreq_policy *policy, -and unsigned int index (into the exposed frequency table). +The target_index call has two arguments: ``struct cpufreq_policy *policy``, +and ``unsigned int`` index (into the exposed frequency table). The CPUfreq driver must set the new frequency when called here. The actual frequency must be determined by freq_table[index].frequency. @@ -184,9 +181,9 @@ actual frequency must be determined by freq_table[index].frequency. It should always restore to earlier frequency (i.e. policy->restore_freq) in case of errors, even if we switched to intermediate frequency earlier. -Deprecated: +Deprecated ---------- -The target call has three arguments: struct cpufreq_policy *policy, +The target call has three arguments: ``struct cpufreq_policy *policy``, unsigned int target_frequency, unsigned int relation. The CPUfreq driver must set the new frequency when called here. The @@ -210,14 +207,14 @@ Not all drivers are expected to implement it, as sleeping from within this callback isn't allowed. This callback must be highly optimized to do switching as fast as possible. -This function has two arguments: struct cpufreq_policy *policy and -unsigned int target_frequency. +This function has two arguments: ``struct cpufreq_policy *policy`` and +``unsigned int target_frequency``. 1.7 setpolicy ------------- -The setpolicy call only takes a struct cpufreq_policy *policy as +The setpolicy call only takes a ``struct cpufreq_policy *policy`` as argument. You need to set the lower limit of the in-processor or in-chipset dynamic frequency switching to policy->min, the upper limit to policy->max, and -if supported- select a performance-oriented @@ -278,10 +275,10 @@ table. cpufreq_for_each_valid_entry(pos, table) - iterates over all entries, excluding CPUFREQ_ENTRY_INVALID frequencies. -Use arguments "pos" - a cpufreq_frequency_table * as a loop cursor and -"table" - the cpufreq_frequency_table * you want to iterate over. +Use arguments "pos" - a ``cpufreq_frequency_table *`` as a loop cursor and +"table" - the ``cpufreq_frequency_table *`` you want to iterate over. -For example: +For example:: struct cpufreq_frequency_table *pos, *driver_freq_table; diff --git a/Documentation/cpu-freq/index.rst b/Documentation/cpu-freq/index.rst index 8babc5a212dd..1ab3fff53956 100644 --- a/Documentation/cpu-freq/index.rst +++ b/Documentation/cpu-freq/index.rst @@ -16,6 +16,7 @@ Author: Dominik Brodowski amd-powernow core + cpu-drivers Mailing List ------------ From patchwork Mon Feb 17 16:20:36 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: 11386855 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 BEF151580 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 9FEEC2465D for ; Mon, 17 Feb 2020 16:20:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581956450; bh=FX48Z1Ik5WVd82CgE3i3aHXeVaoGspBecf6PJmoTDmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=KtyqQh9Mm2MVbJU+RKdDXvyWmmJVbUJkP/9lxuQlBt85kriSUlJMoDDaqWPLrGwEi JnLkeWqX/cRxv/Z6jMCGQT9CYP1sIdar6dg+ev3qiHq2eWBM9RmiW4dsoNyA2xDwQa pHlpOoRgSonSGNoiHxhTSgmQ75OWkBLo5Nc85S0k= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728567AbgBQQUs (ORCPT ); Mon, 17 Feb 2020 11:20:48 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:54980 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728595AbgBQQUr (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=pENrwyQGCHPWk+g+UqB2N09eq+FHO8Q3ndgRkaIJy9U=; b=if92APgiWWGXM8hhz4IaBL4aHN zHGIFA/aqE+RIP2rF699sP/uDX7uO/S2ef01vR2PIXxilAxU/Xr3gTZv80iXl6/aeSogc/U8r1KFk lcWMxgAUNRxcdoq8gG21TpINMo8KfC3rRNS96j2ZPCjdodwiVqlRxmkN/ce40KKzmSMz6fgUSif4l ma85VdpTDBGnf7sfeZhY6EL8OY00R2t5ZrrzVySva5nN+KQErHTFJBDT8tq799RlfKL7jq9n08rOI 5+a/mrA7fJAQDR3XLs6uox7K/n/F2e8FnQfjoPbO5NPNVclQBxupg2dyCX474rQGhulzw6vRLFrVM FLAYx6kQ==; 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-00042H-9T; 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-000fq0-Ct; 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 18/24] docs: cpu-freq: convert cpufreq-nforce2.txt to ReST Date: Mon, 17 Feb 2020 17:20:36 +0100 Message-Id: <11b5000d757b77393170edafc02e2c96d9516a52.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 table markups; - Add notes markups; - Add it to cpu-freq/index.rst. Signed-off-by: Mauro Carvalho Chehab --- ...cpufreq-nforce2.txt => cpufreq-nforce2.rst} | 18 ++++++++++++++---- Documentation/cpu-freq/index.rst | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) rename Documentation/cpu-freq/{cpufreq-nforce2.txt => cpufreq-nforce2.rst} (55%) diff --git a/Documentation/cpu-freq/cpufreq-nforce2.txt b/Documentation/cpu-freq/cpufreq-nforce2.rst similarity index 55% rename from Documentation/cpu-freq/cpufreq-nforce2.txt rename to Documentation/cpu-freq/cpufreq-nforce2.rst index babce1315026..aa0ef768a92e 100644 --- a/Documentation/cpu-freq/cpufreq-nforce2.txt +++ b/Documentation/cpu-freq/cpufreq-nforce2.rst @@ -1,3 +1,8 @@ +.. SPDX-License-Identifier: GPL-2.0 + +================================= +nVidia nForce2 Platform Specifics +================================= The cpufreq-nforce2 driver changes the FSB on nVidia nForce2 platforms. @@ -6,14 +11,19 @@ can be controlled independently from the PCI/AGP clock. The module has two options: - fid: multiplier * 10 (for example 8.5 = 85) - min_fsb: minimum FSB + ======= ====================================== + fid multiplier * 10 (for example 8.5 = 85) + min_fsb minimum FSB + ======= ====================================== If not set, fid is calculated from the current CPU speed and the FSB. min_fsb defaults to FSB at boot time - 50 MHz. -IMPORTANT: The available range is limited downwards! - Also the minimum available FSB can differ, for systems +.. Important:: + + The available range is limited downwards! + + Also the minimum available FSB can differ, for systems booting with 200 MHz, 150 should always work. diff --git a/Documentation/cpu-freq/index.rst b/Documentation/cpu-freq/index.rst index 1ab3fff53956..3fa69e6614f6 100644 --- a/Documentation/cpu-freq/index.rst +++ b/Documentation/cpu-freq/index.rst @@ -17,6 +17,7 @@ Author: Dominik Brodowski amd-powernow core cpu-drivers + cpufreq-nforce2 Mailing List ------------ From patchwork Mon Feb 17 16:20:37 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: 11386873 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 5F3C0159A for ; Mon, 17 Feb 2020 16:20:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3EAFE24680 for ; Mon, 17 Feb 2020 16:20:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581956456; bh=YoUDnme6ZhOeyE6o5qv1tql4wkcsHSN4WhqRofzhtNY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=gpaBxZpjPxiDTeZp5Z11wm9JFft+dLxmFWABWyTdStcKJlwky5howMkQbY43q6iDD SbpzN/VEgbtwQvRdDq0PDkhsV4sLzNW6Zag3M1SH53VRTAIxytySv7+FmAbThKEq6B aBxZVtUn+cwNQNgW+su5JXR3gevQGggNejVcUjLU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729141AbgBQQUz (ORCPT ); Mon, 17 Feb 2020 11:20:55 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:55400 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728650AbgBQQUw (ORCPT ); Mon, 17 Feb 2020 11:20:52 -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=us6g+pLPgZnPltIkGwqckqzYPJOrfV1h6bZ6PwDN8Os=; b=C2wSJw/HTd66nJe1+s6lriAanZ 5Duv6+4jKhE7Huz3MwT4rAc8TPbgGC4TGHybq8ayVIwtzXRF7fl2bi2YZy6sP//fR5oepOE066d+0 /dh6FePuJ1NBTcVfIyJ/G5owRO+aUaoFFqdZUo8n2plIA4urDtONpaOCYpUc9LkG31JGf1mklKO9B BJCClVr9HzUA4iSaDR1vCDm9hCSpyeFe7oai2kxC4P6k89B0F5wAaL4KVTwof28HBtaJj1AEWeRt/ m8v8SAe850IRKhIQmycm657t7e80xUdpcMh5BsPAz7pwbEgGSfNwOJhZQvAUoOfOBHa99qPfhqkuN O/F3qiwQ==; 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-00042I-BP; 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-000fq5-Dl; 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 19/24] docs: cpu-freq: convert cpufreq-stats.txt to ReST Date: Mon, 17 Feb 2020 17:20:37 +0100 Message-Id: <75c274d922cc211b717e117f4b982c9b67820373.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; - Use lists where needed; - Comment out the existing text-only index; - Adjust some title marks; - Use bold on some places; - 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 --- .../{cpufreq-stats.txt => cpufreq-stats.rst} | 121 ++++++++++-------- Documentation/cpu-freq/index.rst | 1 + 2 files changed, 66 insertions(+), 56 deletions(-) rename Documentation/cpu-freq/{cpufreq-stats.txt => cpufreq-stats.rst} (53%) diff --git a/Documentation/cpu-freq/cpufreq-stats.txt b/Documentation/cpu-freq/cpufreq-stats.rst similarity index 53% rename from Documentation/cpu-freq/cpufreq-stats.txt rename to Documentation/cpu-freq/cpufreq-stats.rst index 14378cecb172..9ad695b1c7db 100644 --- a/Documentation/cpu-freq/cpufreq-stats.txt +++ b/Documentation/cpu-freq/cpufreq-stats.rst @@ -1,21 +1,23 @@ +.. SPDX-License-Identifier: GPL-2.0 - CPU frequency and voltage scaling statistics in the Linux(TM) kernel +========================================== +General Description of sysfs CPUFreq Stats +========================================== +information for users - L i n u x c p u f r e q - s t a t s d r i v e r - - information for users - +Author: Venkatesh Pallipadi +.. Contents - Venkatesh Pallipadi - -Contents -1. Introduction -2. Statistics Provided (with example) -3. Configuring cpufreq-stats + 1. Introduction + 2. Statistics Provided (with example) + 3. Configuring cpufreq-stats 1. Introduction +=============== cpufreq-stats is a driver that provides CPU frequency statistics for each CPU. These statistics are provided in /sysfs as a bunch of read_only interfaces. This @@ -28,8 +30,10 @@ that may be running on your CPU. So, it will work with any cpufreq_driver. 2. Statistics Provided (with example) +===================================== cpufreq stats provides following statistics (explained in detail below). + - time_in_state - total_trans - trans_table @@ -39,53 +43,57 @@ All the statistics will be from the time the stats driver has been inserted statistic is done. Obviously, stats driver will not have any information about the frequency transitions before the stats driver insertion. --------------------------------------------------------------------------------- -:/sys/devices/system/cpu/cpu0/cpufreq/stats # ls -l -total 0 -drwxr-xr-x 2 root root 0 May 14 16:06 . -drwxr-xr-x 3 root root 0 May 14 15:58 .. ---w------- 1 root root 4096 May 14 16:06 reset --r--r--r-- 1 root root 4096 May 14 16:06 time_in_state --r--r--r-- 1 root root 4096 May 14 16:06 total_trans --r--r--r-- 1 root root 4096 May 14 16:06 trans_table --------------------------------------------------------------------------------- +:: + + :/sys/devices/system/cpu/cpu0/cpufreq/stats # ls -l + total 0 + drwxr-xr-x 2 root root 0 May 14 16:06 . + drwxr-xr-x 3 root root 0 May 14 15:58 .. + --w------- 1 root root 4096 May 14 16:06 reset + -r--r--r-- 1 root root 4096 May 14 16:06 time_in_state + -r--r--r-- 1 root root 4096 May 14 16:06 total_trans + -r--r--r-- 1 root root 4096 May 14 16:06 trans_table + +- **reset** -- reset Write-only attribute that can be used to reset the stat counters. This can be useful for evaluating system behaviour under different governors without the need for a reboot. -- time_in_state +- **time_in_state** + This gives the amount of time spent in each of the frequencies supported by this CPU. The cat output will have "