* Re: [PATCH v4 16/26] docs: Fix more broken references
From: Miguel Ojeda @ 2018-06-15 16:41 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Linux Doc Mailing List, Jonathan Corbet, Mauro Carvalho Chehab,
linux-kernel, linux-clk, devicetree, linux-pm, dri-devel,
linux-arm-kernel, linux-mmc, linux-samsung-soc,
Network Development, linux-usb, linux-rockchip, linux-hwmon,
intel-wired-lan, alsa-devel, linux-fsdevel, linux-mediatek
In-Reply-To: <48f1131d560eba1d0758e3a7714593f1d878d3de.1529079120.git.mchehab+samsung@kernel.org>
On Fri, Jun 15, 2018 at 6:30 PM, Mauro Carvalho Chehab
<mchehab+samsung@kernel.org> wrote:
> As we move stuff around, some doc references are broken. Fix some of
> them via this script:
> ./scripts/documentation-file-ref-check --fix
>
> Manually checked that produced results are valid.
>
> Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
> Acked-by: Takashi Iwai <tiwai@suse.de>
> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Acked-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> ---
> .../bindings/clock/st/st,clkgen.txt | 8 ++++----
> .../devicetree/bindings/clock/ti/gate.txt | 2 +-
> .../bindings/clock/ti/interface.txt | 2 +-
> .../bindings/cpufreq/cpufreq-mediatek.txt | 2 +-
> .../bindings/devfreq/rk3399_dmc.txt | 2 +-
> .../bindings/gpu/arm,mali-midgard.txt | 2 +-
> .../bindings/gpu/arm,mali-utgard.txt | 2 +-
> .../devicetree/bindings/mfd/mt6397.txt | 2 +-
> .../devicetree/bindings/mfd/sun6i-prcm.txt | 2 +-
> .../bindings/mmc/exynos-dw-mshc.txt | 2 +-
> .../devicetree/bindings/net/dsa/ksz.txt | 2 +-
> .../devicetree/bindings/net/dsa/mt7530.txt | 2 +-
> .../devicetree/bindings/power/fsl,imx-gpc.txt | 2 +-
> .../bindings/power/wakeup-source.txt | 2 +-
> .../devicetree/bindings/usb/rockchip,dwc3.txt | 2 +-
> Documentation/hwmon/ina2xx | 2 +-
> Documentation/maintainer/pull-requests.rst | 2 +-
> Documentation/translations/ko_KR/howto.rst | 2 +-
> MAINTAINERS | 20 +++++++++----------
> drivers/net/ethernet/intel/Kconfig | 8 ++++----
> drivers/soundwire/stream.c | 8 ++++----
> fs/Kconfig.binfmt | 2 +-
> fs/binfmt_misc.c | 2 +-
> 23 files changed, 41 insertions(+), 41 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/clock/st/st,clkgen.txt b/Documentation/devicetree/bindings/clock/st/st,clkgen.txt
> index 7364953d0d0b..45ac19bfa0a9 100644
> --- a/Documentation/devicetree/bindings/clock/st/st,clkgen.txt
> +++ b/Documentation/devicetree/bindings/clock/st/st,clkgen.txt
> @@ -31,10 +31,10 @@ This binding uses the common clock binding[1].
> Each subnode should use the binding described in [2]..[7]
>
> [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
> -[3] Documentation/devicetree/bindings/clock/st,clkgen-mux.txt
> -[4] Documentation/devicetree/bindings/clock/st,clkgen-pll.txt
> -[7] Documentation/devicetree/bindings/clock/st,quadfs.txt
> -[8] Documentation/devicetree/bindings/clock/st,flexgen.txt
> +[3] Documentation/devicetree/bindings/clock/st/st,clkgen-mux.txt
> +[4] Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt
> +[7] Documentation/devicetree/bindings/clock/st/st,quadfs.txt
> +[8] Documentation/devicetree/bindings/clock/st/st,flexgen.txt
>
>
> Required properties:
> diff --git a/Documentation/devicetree/bindings/clock/ti/gate.txt b/Documentation/devicetree/bindings/clock/ti/gate.txt
> index 03f8fdee62a7..56d603c1f716 100644
> --- a/Documentation/devicetree/bindings/clock/ti/gate.txt
> +++ b/Documentation/devicetree/bindings/clock/ti/gate.txt
> @@ -10,7 +10,7 @@ will be controlled instead and the corresponding hw-ops for
> that is used.
>
> [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
> -[2] Documentation/devicetree/bindings/clock/gate-clock.txt
> +[2] Documentation/devicetree/bindings/clock/gpio-gate-clock.txt
> [3] Documentation/devicetree/bindings/clock/ti/clockdomain.txt
>
> Required properties:
> diff --git a/Documentation/devicetree/bindings/clock/ti/interface.txt b/Documentation/devicetree/bindings/clock/ti/interface.txt
> index 3111a409fea6..3f4704040140 100644
> --- a/Documentation/devicetree/bindings/clock/ti/interface.txt
> +++ b/Documentation/devicetree/bindings/clock/ti/interface.txt
> @@ -9,7 +9,7 @@ companion clock finding (match corresponding functional gate
> clock) and hardware autoidle enable / disable.
>
> [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
> -[2] Documentation/devicetree/bindings/clock/gate-clock.txt
> +[2] Documentation/devicetree/bindings/clock/gpio-gate-clock.txt
>
> Required properties:
> - compatible : shall be one of:
> diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
> index d36f07e0a2bb..0551c78619de 100644
> --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
> +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
> @@ -8,7 +8,7 @@ Required properties:
> "intermediate" - A parent of "cpu" clock which is used as "intermediate" clock
> source (usually MAINPLL) when the original CPU PLL is under
> transition and not stable yet.
> - Please refer to Documentation/devicetree/bindings/clk/clock-bindings.txt for
> + Please refer to Documentation/devicetree/bindings/clock/clock-bindings.txt for
> generic clock consumer properties.
> - operating-points-v2: Please refer to Documentation/devicetree/bindings/opp/opp.txt
> for detail.
> diff --git a/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt b/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt
> index d6d2833482c9..fc2bcbe26b1e 100644
> --- a/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt
> +++ b/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt
> @@ -12,7 +12,7 @@ Required properties:
> - clocks: Phandles for clock specified in "clock-names" property
> - clock-names : The name of clock used by the DFI, must be
> "pclk_ddr_mon";
> -- operating-points-v2: Refer to Documentation/devicetree/bindings/power/opp.txt
> +- operating-points-v2: Refer to Documentation/devicetree/bindings/opp/opp.txt
> for details.
> - center-supply: DMC supply node.
> - status: Marks the node enabled/disabled.
> diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
> index 039219df05c5..18a2cde2e5f3 100644
> --- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
> @@ -34,7 +34,7 @@ Optional properties:
> - mali-supply : Phandle to regulator for the Mali device. Refer to
> Documentation/devicetree/bindings/regulator/regulator.txt for details.
>
> -- operating-points-v2 : Refer to Documentation/devicetree/bindings/power/opp.txt
> +- operating-points-v2 : Refer to Documentation/devicetree/bindings/opp/opp.txt
> for details.
>
>
> diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt
> index c1f65d1dac1d..63cd91176a68 100644
> --- a/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt
> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt
> @@ -44,7 +44,7 @@ Optional properties:
>
> - memory-region:
> Memory region to allocate from, as defined in
> - Documentation/devicetree/bindi/reserved-memory/reserved-memory.txt
> + Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
>
> - mali-supply:
> Phandle to regulator for the Mali device, as defined in
> diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt b/Documentation/devicetree/bindings/mfd/mt6397.txt
> index d1df77f4d655..0ebd08af777d 100644
> --- a/Documentation/devicetree/bindings/mfd/mt6397.txt
> +++ b/Documentation/devicetree/bindings/mfd/mt6397.txt
> @@ -12,7 +12,7 @@ MT6397/MT6323 is a multifunction device with the following sub modules:
> It is interfaced to host controller using SPI interface by a proprietary hardware
> called PMIC wrapper or pwrap. MT6397/MT6323 MFD is a child device of pwrap.
> See the following for pwarp node definitions:
> -Documentation/devicetree/bindings/soc/pwrap.txt
> +Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
>
> This document describes the binding for MFD device and its sub module.
>
> diff --git a/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt b/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt
> index dd2c06540485..4d21ffdb0fc1 100644
> --- a/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt
> +++ b/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt
> @@ -9,7 +9,7 @@ Required properties:
>
> The prcm node may contain several subdevices definitions:
> - see Documentation/devicetree/clk/sunxi.txt for clock devices
> - - see Documentation/devicetree/reset/allwinner,sunxi-clock-reset.txt for reset
> + - see Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt for reset
> controller devices
>
>
> diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
> index a58c173b7ab9..0419a63f73a0 100644
> --- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
> +++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
> @@ -62,7 +62,7 @@ Required properties for a slot (Deprecated - Recommend to use one slot per host)
> rest of the gpios (depending on the bus-width property) are the data lines in
> no particular order. The format of the gpio specifier depends on the gpio
> controller.
> -(Deprecated - Refer to Documentation/devicetree/binding/pinctrl/samsung-pinctrl.txt)
> +(Deprecated - Refer to Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt)
>
> Example:
>
> diff --git a/Documentation/devicetree/bindings/net/dsa/ksz.txt b/Documentation/devicetree/bindings/net/dsa/ksz.txt
> index fd23904ac68e..a700943218ca 100644
> --- a/Documentation/devicetree/bindings/net/dsa/ksz.txt
> +++ b/Documentation/devicetree/bindings/net/dsa/ksz.txt
> @@ -6,7 +6,7 @@ Required properties:
> - compatible: For external switch chips, compatible string must be exactly one
> of: "microchip,ksz9477"
>
> -See Documentation/devicetree/bindings/dsa/dsa.txt for a list of additional
> +See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional
> required and optional properties.
>
> Examples:
> diff --git a/Documentation/devicetree/bindings/net/dsa/mt7530.txt b/Documentation/devicetree/bindings/net/dsa/mt7530.txt
> index a9bc27b93ee3..aa3527f71fdc 100644
> --- a/Documentation/devicetree/bindings/net/dsa/mt7530.txt
> +++ b/Documentation/devicetree/bindings/net/dsa/mt7530.txt
> @@ -31,7 +31,7 @@ Required properties for the child nodes within ports container:
> - phy-mode: String, must be either "trgmii" or "rgmii" for port labeled
> "cpu".
>
> -See Documentation/devicetree/bindings/dsa/dsa.txt for a list of additional
> +See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional
> required, optional properties and how the integrated switch subnodes must
> be specified.
>
> diff --git a/Documentation/devicetree/bindings/power/fsl,imx-gpc.txt b/Documentation/devicetree/bindings/power/fsl,imx-gpc.txt
> index b31d6bbeee16..726ec2875223 100644
> --- a/Documentation/devicetree/bindings/power/fsl,imx-gpc.txt
> +++ b/Documentation/devicetree/bindings/power/fsl,imx-gpc.txt
> @@ -14,7 +14,7 @@ Required properties:
> datasheet
> - interrupts: Should contain one interrupt specifier for the GPC interrupt
> - clocks: Must contain an entry for each entry in clock-names.
> - See Documentation/devicetree/bindings/clocks/clock-bindings.txt for details.
> + See Documentation/devicetree/bindings/clock/clock-bindings.txt for details.
> - clock-names: Must include the following entries:
> - ipg
>
> diff --git a/Documentation/devicetree/bindings/power/wakeup-source.txt b/Documentation/devicetree/bindings/power/wakeup-source.txt
> index 5d254ab13ebf..cfd74659fbed 100644
> --- a/Documentation/devicetree/bindings/power/wakeup-source.txt
> +++ b/Documentation/devicetree/bindings/power/wakeup-source.txt
> @@ -22,7 +22,7 @@ List of legacy properties and respective binding document
> 3. "has-tpo" Documentation/devicetree/bindings/rtc/rtc-opal.txt
> 4. "linux,wakeup" Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt
> Documentation/devicetree/bindings/mfd/tc3589x.txt
> - Documentation/devicetree/bindings/input/ads7846.txt
> + Documentation/devicetree/bindings/input/touchscreen/ads7846.txt
> 5. "linux,keypad-wakeup" Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt
> 6. "linux,input-wakeup" Documentation/devicetree/bindings/input/samsung-keypad.txt
> 7. "nvidia,wakeup-source" Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt
> diff --git a/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt b/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt
> index 50a31536e975..252a05c5d976 100644
> --- a/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt
> +++ b/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt
> @@ -16,7 +16,7 @@ A child node must exist to represent the core DWC3 IP block. The name of
> the node is not important. The content of the node is defined in dwc3.txt.
>
> Phy documentation is provided in the following places:
> -Documentation/devicetree/bindings/phy/rockchip,dwc3-usb-phy.txt
> +Documentation/devicetree/bindings/phy/qcom-dwc3-usb-phy.txt
>
> Example device nodes:
>
> diff --git a/Documentation/hwmon/ina2xx b/Documentation/hwmon/ina2xx
> index cfd31d94c872..72d16f08e431 100644
> --- a/Documentation/hwmon/ina2xx
> +++ b/Documentation/hwmon/ina2xx
> @@ -53,7 +53,7 @@ bus supply voltage.
>
> The shunt value in micro-ohms can be set via platform data or device tree at
> compile-time or via the shunt_resistor attribute in sysfs at run-time. Please
> -refer to the Documentation/devicetree/bindings/i2c/ina2xx.txt for bindings
> +refer to the Documentation/devicetree/bindings/hwmon/ina2xx.txt for bindings
> if the device tree is used.
>
> Additionally ina226 supports update_interval attribute as described in
> diff --git a/Documentation/maintainer/pull-requests.rst b/Documentation/maintainer/pull-requests.rst
> index a19db3458b56..22b271de0304 100644
> --- a/Documentation/maintainer/pull-requests.rst
> +++ b/Documentation/maintainer/pull-requests.rst
> @@ -41,7 +41,7 @@ named ``char-misc-next``, you would be using the following command::
>
> that will create a signed tag called ``char-misc-4.15-rc1`` based on the
> last commit in the ``char-misc-next`` branch, and sign it with your gpg key
> -(see :ref:`Documentation/maintainer/configure_git.rst <configuregit>`).
> +(see :ref:`Documentation/maintainer/configure-git.rst <configuregit>`).
>
> Linus will only accept pull requests based on a signed tag. Other
> maintainers may differ.
> diff --git a/Documentation/translations/ko_KR/howto.rst b/Documentation/translations/ko_KR/howto.rst
> index 624654bdcd8a..a8197e072599 100644
> --- a/Documentation/translations/ko_KR/howto.rst
> +++ b/Documentation/translations/ko_KR/howto.rst
> @@ -160,7 +160,7 @@ mtk.manpages@gmail.com의 메인테이너에게 보낼 것을 권장한다.
> 독특한 행동에 관하여 흔히 있는 오해들과 혼란들을 해소하고 있기
> 때문이다.
>
> - :ref:`Documentation/process/stable_kernel_rules.rst <stable_kernel_rules>`
> + :ref:`Documentation/process/stable-kernel-rules.rst <stable_kernel_rules>`
> 이 문서는 안정적인 커널 배포가 이루어지는 규칙을 설명하고 있으며
> 여러분들이 이러한 배포들 중 하나에 변경을 하길 원한다면
> 무엇을 해야 하는지를 설명한다.
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 09554034be46..5871dd5060f6 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -4513,7 +4513,7 @@ DRM DRIVER FOR ILITEK ILI9225 PANELS
> M: David Lechner <david@lechnology.com>
> S: Maintained
> F: drivers/gpu/drm/tinydrm/ili9225.c
> -F: Documentation/devicetree/bindings/display/ili9225.txt
> +F: Documentation/devicetree/bindings/display/ilitek,ili9225.txt
>
> DRM DRIVER FOR INTEL I810 VIDEO CARDS
> S: Orphan / Obsolete
> @@ -4599,13 +4599,13 @@ DRM DRIVER FOR SITRONIX ST7586 PANELS
> M: David Lechner <david@lechnology.com>
> S: Maintained
> F: drivers/gpu/drm/tinydrm/st7586.c
> -F: Documentation/devicetree/bindings/display/st7586.txt
> +F: Documentation/devicetree/bindings/display/sitronix,st7586.txt
>
> DRM DRIVER FOR SITRONIX ST7735R PANELS
> M: David Lechner <david@lechnology.com>
> S: Maintained
> F: drivers/gpu/drm/tinydrm/st7735r.c
> -F: Documentation/devicetree/bindings/display/st7735r.txt
> +F: Documentation/devicetree/bindings/display/sitronix,st7735r.txt
>
> DRM DRIVER FOR TDFX VIDEO CARDS
> S: Orphan / Obsolete
> @@ -4824,7 +4824,7 @@ M: Eric Anholt <eric@anholt.net>
> S: Supported
> F: drivers/gpu/drm/v3d/
> F: include/uapi/drm/v3d_drm.h
> -F: Documentation/devicetree/bindings/display/brcm,bcm-v3d.txt
> +F: Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> T: git git://anongit.freedesktop.org/drm/drm-misc
>
> DRM DRIVERS FOR VC4
> @@ -5735,7 +5735,7 @@ M: Madalin Bucur <madalin.bucur@nxp.com>
> L: netdev@vger.kernel.org
> S: Maintained
> F: drivers/net/ethernet/freescale/fman
> -F: Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> +F: Documentation/devicetree/bindings/net/fsl-fman.txt
>
> FREESCALE QORIQ PTP CLOCK DRIVER
> M: Yangbo Lu <yangbo.lu@nxp.com>
> @@ -7425,7 +7425,7 @@ M: Linus Walleij <linus.walleij@linaro.org>
> L: linux-iio@vger.kernel.org
> S: Maintained
> F: drivers/iio/gyro/mpu3050*
> -F: Documentation/devicetree/bindings/iio/gyroscope/inv,mpu3050.txt
> +F: Documentation/devicetree/bindings/iio/gyroscope/invensense,mpu3050.txt
>
> IOC3 ETHERNET DRIVER
> M: Ralf Baechle <ralf@linux-mips.org>
> @@ -8700,7 +8700,7 @@ M: Guenter Roeck <linux@roeck-us.net>
> L: linux-hwmon@vger.kernel.org
> S: Maintained
> F: Documentation/hwmon/max6697
> -F: Documentation/devicetree/bindings/i2c/max6697.txt
> +F: Documentation/devicetree/bindings/hwmon/max6697.txt
> F: drivers/hwmon/max6697.c
> F: include/linux/platform_data/max6697.h
>
> @@ -9080,7 +9080,7 @@ M: Martin Donnelly <martin.donnelly@ge.com>
> M: Martyn Welch <martyn.welch@collabora.co.uk>
> S: Maintained
> F: drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
> -F: Documentation/devicetree/bindings/video/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt
> +F: Documentation/devicetree/bindings/display/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt
>
> MEGARAID SCSI/SAS DRIVERS
> M: Kashyap Desai <kashyap.desai@broadcom.com>
> @@ -10728,7 +10728,7 @@ PARALLEL LCD/KEYPAD PANEL DRIVER
> M: Willy Tarreau <willy@haproxy.com>
> M: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
> S: Odd Fixes
> -F: Documentation/misc-devices/lcd-panel-cgram.txt
> +F: Documentation/auxdisplay/lcd-panel-cgram.txt
> F: drivers/misc/panel.c
>
For Documentation/auxdisplay/lcd-panel-cgram.txt:
Acked-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
> PARALLEL PORT SUBSYSTEM
> @@ -13291,7 +13291,7 @@ M: Vinod Koul <vkoul@kernel.org>
> L: alsa-devel@alsa-project.org (moderated for non-subscribers)
> T: git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
> S: Supported
> -F: Documentation/sound/alsa/compress_offload.txt
> +F: Documentation/sound/designs/compress-offload.rst
> F: include/sound/compress_driver.h
> F: include/uapi/sound/compress_*
> F: sound/core/compress_offload.c
> diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig
> index 14d287bed33c..1ab613eb5796 100644
> --- a/drivers/net/ethernet/intel/Kconfig
> +++ b/drivers/net/ethernet/intel/Kconfig
> @@ -33,7 +33,7 @@ config E100
> to identify the adapter.
>
> More specific information on configuring the driver is in
> - <file:Documentation/networking/e100.txt>.
> + <file:Documentation/networking/e100.rst>.
>
> To compile this driver as a module, choose M here. The module
> will be called e100.
> @@ -49,7 +49,7 @@ config E1000
> <http://support.intel.com>
>
> More specific information on configuring the driver is in
> - <file:Documentation/networking/e1000.txt>.
> + <file:Documentation/networking/e1000.rst>.
>
> To compile this driver as a module, choose M here. The module
> will be called e1000.
> @@ -94,7 +94,7 @@ config IGB
> <http://support.intel.com>
>
> More specific information on configuring the driver is in
> - <file:Documentation/networking/e1000.txt>.
> + <file:Documentation/networking/e1000.rst>.
>
> To compile this driver as a module, choose M here. The module
> will be called igb.
> @@ -130,7 +130,7 @@ config IGBVF
> <http://support.intel.com>
>
> More specific information on configuring the driver is in
> - <file:Documentation/networking/e1000.txt>.
> + <file:Documentation/networking/e1000.rst>.
>
> To compile this driver as a module, choose M here. The module
> will be called igbvf.
> diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
> index 8974a0fcda1b..4b5e250e8615 100644
> --- a/drivers/soundwire/stream.c
> +++ b/drivers/soundwire/stream.c
> @@ -1291,7 +1291,7 @@ static int _sdw_prepare_stream(struct sdw_stream_runtime *stream)
> *
> * @stream: Soundwire stream
> *
> - * Documentation/soundwire/stream.txt explains this API in detail
> + * Documentation/driver-api/soundwire/stream.rst explains this API in detail
> */
> int sdw_prepare_stream(struct sdw_stream_runtime *stream)
> {
> @@ -1348,7 +1348,7 @@ static int _sdw_enable_stream(struct sdw_stream_runtime *stream)
> *
> * @stream: Soundwire stream
> *
> - * Documentation/soundwire/stream.txt explains this API in detail
> + * Documentation/driver-api/soundwire/stream.rst explains this API in detail
> */
> int sdw_enable_stream(struct sdw_stream_runtime *stream)
> {
> @@ -1400,7 +1400,7 @@ static int _sdw_disable_stream(struct sdw_stream_runtime *stream)
> *
> * @stream: Soundwire stream
> *
> - * Documentation/soundwire/stream.txt explains this API in detail
> + * Documentation/driver-api/soundwire/stream.rst explains this API in detail
> */
> int sdw_disable_stream(struct sdw_stream_runtime *stream)
> {
> @@ -1456,7 +1456,7 @@ static int _sdw_deprepare_stream(struct sdw_stream_runtime *stream)
> *
> * @stream: Soundwire stream
> *
> - * Documentation/soundwire/stream.txt explains this API in detail
> + * Documentation/driver-api/soundwire/stream.rst explains this API in detail
> */
> int sdw_deprepare_stream(struct sdw_stream_runtime *stream)
> {
> diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
> index 57a27c42b5ac..56df483de619 100644
> --- a/fs/Kconfig.binfmt
> +++ b/fs/Kconfig.binfmt
> @@ -168,7 +168,7 @@ config BINFMT_MISC
> will automatically feed it to the correct interpreter.
>
> You can do other nice things, too. Read the file
> - <file:Documentation/binfmt_misc.txt> to learn how to use this
> + <file:Documentation/admin-guide/binfmt-misc.rst> to learn how to use this
> feature, <file:Documentation/admin-guide/java.rst> for information about how
> to include Java support. and <file:Documentation/admin-guide/mono.rst> for
> information about how to include Mono-based .NET support.
> diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
> index 4de191563261..4b5fff31ef27 100644
> --- a/fs/binfmt_misc.c
> +++ b/fs/binfmt_misc.c
> @@ -4,7 +4,7 @@
> * Copyright (C) 1997 Richard Günther
> *
> * binfmt_misc detects binaries via a magic or filename extension and invokes
> - * a specified wrapper. See Documentation/binfmt_misc.txt for more details.
> + * a specified wrapper. See Documentation/admin-guide/binfmt-misc.rst for more details.
> */
>
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> --
> 2.17.1
>
^ permalink raw reply
* [PATCH v4 26/26] fix a series of Documentation/ broken file name references
From: Mauro Carvalho Chehab @ 2018-06-15 16:30 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Mauro Carvalho Chehab, linux-kernel,
Harry Wei, Vinod Koul, Dan Williams, Darren Hart, Andy Shevchenko,
David S. Miller, Luis de Bethencourt, Salah Triki, Mike Marshall,
Martin Brandenburg, Rafael J. Wysocki, Pavel Machek, Len Brown,
linux-kernel, dmaengine, platform-driver-x86, sparclinux, devel,
linux-pm
In-Reply-To: <cover.1529079119.git.mchehab+samsung@kernel.org>
As files move around, their previous links break. Fix the
references for them.
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
Documentation/translations/zh_CN/io_ordering.txt | 2 +-
drivers/dma/dmaengine.c | 2 +-
drivers/platform/x86/Kconfig | 2 +-
drivers/sbus/char/oradax.c | 2 +-
fs/befs/ChangeLog | 2 +-
fs/orangefs/orangefs-sysfs.c | 2 +-
include/linux/platform_data/sc18is602.h | 2 +-
kernel/power/main.c | 5 +++--
8 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/Documentation/translations/zh_CN/io_ordering.txt b/Documentation/translations/zh_CN/io_ordering.txt
index e592daf4e014..1f8127bdd415 100644
--- a/Documentation/translations/zh_CN/io_ordering.txt
+++ b/Documentation/translations/zh_CN/io_ordering.txt
@@ -1,4 +1,4 @@
-Chinese translated version of Documentation/io_orderings.txt
+Chinese translated version of Documentation/io_ordering.txt
If you have any comment or update to the content, please contact the
original document maintainer directly. However, if you have a problem
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index b451354735d3..08ba8473a284 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -38,7 +38,7 @@
* Each device has a channels list, which runs unlocked but is never modified
* once the device is registered, it's just setup by the driver.
*
- * See Documentation/dmaengine.txt for more details
+ * See Documentation/driver-api/dmaengine for more details
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index f27cb186437d..ac4d48830415 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -1052,7 +1052,7 @@ config SAMSUNG_LAPTOP
function keys, wireless LED, LCD backlight level.
It may also provide some sysfs files described in
- <file:Documentation/ABI/testing/sysfs-platform-samsung-laptop>
+ <file:Documentation/ABI/testing/sysfs-driver-samsung-laptop>
To compile this driver as a module, choose M here: the module
will be called samsung-laptop.
diff --git a/drivers/sbus/char/oradax.c b/drivers/sbus/char/oradax.c
index 1754f55e2fac..524f9ea62e52 100644
--- a/drivers/sbus/char/oradax.c
+++ b/drivers/sbus/char/oradax.c
@@ -30,7 +30,7 @@
* the recommended way for applications to use the coprocessor, and
* the driver interface is not intended for general use.
*
- * See Documentation/sparc/oradax/oracle_dax.txt for more details.
+ * See Documentation/sparc/oradax/oracle-dax.txt for more details.
*/
#include <linux/uaccess.h>
diff --git a/fs/befs/ChangeLog b/fs/befs/ChangeLog
index 16f2dfe8c2f7..aff7eec8f327 100644
--- a/fs/befs/ChangeLog
+++ b/fs/befs/ChangeLog
@@ -389,7 +389,7 @@ Version 0.4 (2001-10-28)
(fs/nls/Config.in)
* Added Configure.help entries for CONFIG_BEFS_FS and CONFIG_DEBUG_BEFS
- (Documentation/Configure.help)
+ (currently at fs/befs/Kconfig)
2001-08-??
==========
diff --git a/fs/orangefs/orangefs-sysfs.c b/fs/orangefs/orangefs-sysfs.c
index 079a465796f3..dd28079f518c 100644
--- a/fs/orangefs/orangefs-sysfs.c
+++ b/fs/orangefs/orangefs-sysfs.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * Documentation/ABI/stable/orangefs-sysfs:
+ * Documentation/ABI/stable/sysfs-fs-orangefs:
*
* What: /sys/fs/orangefs/perf_counter_reset
* Date: June 2015
diff --git a/include/linux/platform_data/sc18is602.h b/include/linux/platform_data/sc18is602.h
index 997b06634152..18602cab7799 100644
--- a/include/linux/platform_data/sc18is602.h
+++ b/include/linux/platform_data/sc18is602.h
@@ -7,7 +7,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * For further information, see the Documentation/spi/sc18is602 file.
+ * For further information, see the Documentation/spi/spi-sc18is602 file.
*/
/**
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 705c2366dafe..d9706da10930 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -455,8 +455,9 @@ struct kobject *power_kobj;
* state - control system sleep states.
*
* show() returns available sleep state labels, which may be "mem", "standby",
- * "freeze" and "disk" (hibernation). See Documentation/power/states.txt for a
- * description of what they mean.
+ * "freeze" and "disk" (hibernation).
+ * See Documentation/admin-guide/pm/sleep-states.rst for a description of
+ * what they mean.
*
* store() accepts one of those strings, translates it into the proper
* enumerated value, and initiates a suspend transition.
--
2.17.1
^ permalink raw reply related
* [PATCH v4 21/26] devicetree: fix some bindings file names
From: Mauro Carvalho Chehab @ 2018-06-15 16:30 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: Mauro Carvalho Chehab, Mauro Carvalho Chehab, linux-kernel,
Sebastian Reichel, Rob Herring, Mark Rutland, linux-pm,
devicetree
In-Reply-To: <cover.1529079119.git.mchehab+samsung@kernel.org>
There were some file movements that changed the location for
some DT bindings. Fix them with:
scripts/documentation-file-ref-check --fix
After manually checking if the new file makes sense.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
Documentation/devicetree/bindings/power/supply/ab8500/btemp.txt | 2 +-
.../devicetree/bindings/power/supply/ab8500/chargalg.txt | 2 +-
.../devicetree/bindings/power/supply/ab8500/charger.txt | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/power/supply/ab8500/btemp.txt b/Documentation/devicetree/bindings/power/supply/ab8500/btemp.txt
index 0ba1bcc7f33a..f181e46d8e07 100644
--- a/Documentation/devicetree/bindings/power/supply/ab8500/btemp.txt
+++ b/Documentation/devicetree/bindings/power/supply/ab8500/btemp.txt
@@ -13,4 +13,4 @@ Required Properties:
};
For information on battery specific node, Ref:
-Documentation/devicetree/bindings/power_supply/ab8500/fg.txt
+Documentation/devicetree/bindings/power/supply/ab8500/fg.txt
diff --git a/Documentation/devicetree/bindings/power/supply/ab8500/chargalg.txt b/Documentation/devicetree/bindings/power/supply/ab8500/chargalg.txt
index ef5328371122..56636f927203 100644
--- a/Documentation/devicetree/bindings/power/supply/ab8500/chargalg.txt
+++ b/Documentation/devicetree/bindings/power/supply/ab8500/chargalg.txt
@@ -13,4 +13,4 @@ ab8500_chargalg {
};
For information on battery specific node, Ref:
-Documentation/devicetree/bindings/power_supply/ab8500/fg.txt
+Documentation/devicetree/bindings/power/supply/ab8500/fg.txt
diff --git a/Documentation/devicetree/bindings/power/supply/ab8500/charger.txt b/Documentation/devicetree/bindings/power/supply/ab8500/charger.txt
index 6bdbb08ea9e0..24ada03e07b4 100644
--- a/Documentation/devicetree/bindings/power/supply/ab8500/charger.txt
+++ b/Documentation/devicetree/bindings/power/supply/ab8500/charger.txt
@@ -22,4 +22,4 @@ Required Properties:
};
For information on battery specific node, Ref:
-Documentation/devicetree/bindings/power_supply/ab8500/fg.txt
+Documentation/devicetree/bindings/power/supply/ab8500/fg.txt
--
2.17.1
^ permalink raw reply related
* [PATCH v4 16/26] docs: Fix more broken references
From: Mauro Carvalho Chehab @ 2018-06-15 16:30 UTC (permalink / raw)
To: Linux Doc Mailing List, Jonathan Corbet
Cc: linux-hwmon, devicetree, alsa-devel, linux-samsung-soc, linux-pm,
netdev, linux-usb, linux-mmc, linux-kernel, dri-devel,
Mauro Carvalho Chehab, linux-rockchip, linux-mediatek,
intel-wired-lan, Mauro Carvalho Chehab, linux-fsdevel, linux-clk,
linux-arm-kernel
In-Reply-To: <cover.1529079119.git.mchehab+samsung@kernel.org>
As we move stuff around, some doc references are broken. Fix some of
them via this script:
./scripts/documentation-file-ref-check --fix
Manually checked that produced results are valid.
Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
.../bindings/clock/st/st,clkgen.txt | 8 ++++----
.../devicetree/bindings/clock/ti/gate.txt | 2 +-
.../bindings/clock/ti/interface.txt | 2 +-
.../bindings/cpufreq/cpufreq-mediatek.txt | 2 +-
.../bindings/devfreq/rk3399_dmc.txt | 2 +-
.../bindings/gpu/arm,mali-midgard.txt | 2 +-
.../bindings/gpu/arm,mali-utgard.txt | 2 +-
.../devicetree/bindings/mfd/mt6397.txt | 2 +-
.../devicetree/bindings/mfd/sun6i-prcm.txt | 2 +-
.../bindings/mmc/exynos-dw-mshc.txt | 2 +-
.../devicetree/bindings/net/dsa/ksz.txt | 2 +-
.../devicetree/bindings/net/dsa/mt7530.txt | 2 +-
.../devicetree/bindings/power/fsl,imx-gpc.txt | 2 +-
.../bindings/power/wakeup-source.txt | 2 +-
.../devicetree/bindings/usb/rockchip,dwc3.txt | 2 +-
Documentation/hwmon/ina2xx | 2 +-
Documentation/maintainer/pull-requests.rst | 2 +-
Documentation/translations/ko_KR/howto.rst | 2 +-
MAINTAINERS | 20 +++++++++----------
drivers/net/ethernet/intel/Kconfig | 8 ++++----
drivers/soundwire/stream.c | 8 ++++----
fs/Kconfig.binfmt | 2 +-
fs/binfmt_misc.c | 2 +-
23 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/Documentation/devicetree/bindings/clock/st/st,clkgen.txt b/Documentation/devicetree/bindings/clock/st/st,clkgen.txt
index 7364953d0d0b..45ac19bfa0a9 100644
--- a/Documentation/devicetree/bindings/clock/st/st,clkgen.txt
+++ b/Documentation/devicetree/bindings/clock/st/st,clkgen.txt
@@ -31,10 +31,10 @@ This binding uses the common clock binding[1].
Each subnode should use the binding described in [2]..[7]
[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
-[3] Documentation/devicetree/bindings/clock/st,clkgen-mux.txt
-[4] Documentation/devicetree/bindings/clock/st,clkgen-pll.txt
-[7] Documentation/devicetree/bindings/clock/st,quadfs.txt
-[8] Documentation/devicetree/bindings/clock/st,flexgen.txt
+[3] Documentation/devicetree/bindings/clock/st/st,clkgen-mux.txt
+[4] Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt
+[7] Documentation/devicetree/bindings/clock/st/st,quadfs.txt
+[8] Documentation/devicetree/bindings/clock/st/st,flexgen.txt
Required properties:
diff --git a/Documentation/devicetree/bindings/clock/ti/gate.txt b/Documentation/devicetree/bindings/clock/ti/gate.txt
index 03f8fdee62a7..56d603c1f716 100644
--- a/Documentation/devicetree/bindings/clock/ti/gate.txt
+++ b/Documentation/devicetree/bindings/clock/ti/gate.txt
@@ -10,7 +10,7 @@ will be controlled instead and the corresponding hw-ops for
that is used.
[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
-[2] Documentation/devicetree/bindings/clock/gate-clock.txt
+[2] Documentation/devicetree/bindings/clock/gpio-gate-clock.txt
[3] Documentation/devicetree/bindings/clock/ti/clockdomain.txt
Required properties:
diff --git a/Documentation/devicetree/bindings/clock/ti/interface.txt b/Documentation/devicetree/bindings/clock/ti/interface.txt
index 3111a409fea6..3f4704040140 100644
--- a/Documentation/devicetree/bindings/clock/ti/interface.txt
+++ b/Documentation/devicetree/bindings/clock/ti/interface.txt
@@ -9,7 +9,7 @@ companion clock finding (match corresponding functional gate
clock) and hardware autoidle enable / disable.
[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
-[2] Documentation/devicetree/bindings/clock/gate-clock.txt
+[2] Documentation/devicetree/bindings/clock/gpio-gate-clock.txt
Required properties:
- compatible : shall be one of:
diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
index d36f07e0a2bb..0551c78619de 100644
--- a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
+++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
@@ -8,7 +8,7 @@ Required properties:
"intermediate" - A parent of "cpu" clock which is used as "intermediate" clock
source (usually MAINPLL) when the original CPU PLL is under
transition and not stable yet.
- Please refer to Documentation/devicetree/bindings/clk/clock-bindings.txt for
+ Please refer to Documentation/devicetree/bindings/clock/clock-bindings.txt for
generic clock consumer properties.
- operating-points-v2: Please refer to Documentation/devicetree/bindings/opp/opp.txt
for detail.
diff --git a/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt b/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt
index d6d2833482c9..fc2bcbe26b1e 100644
--- a/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt
+++ b/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt
@@ -12,7 +12,7 @@ Required properties:
- clocks: Phandles for clock specified in "clock-names" property
- clock-names : The name of clock used by the DFI, must be
"pclk_ddr_mon";
-- operating-points-v2: Refer to Documentation/devicetree/bindings/power/opp.txt
+- operating-points-v2: Refer to Documentation/devicetree/bindings/opp/opp.txt
for details.
- center-supply: DMC supply node.
- status: Marks the node enabled/disabled.
diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
index 039219df05c5..18a2cde2e5f3 100644
--- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
@@ -34,7 +34,7 @@ Optional properties:
- mali-supply : Phandle to regulator for the Mali device. Refer to
Documentation/devicetree/bindings/regulator/regulator.txt for details.
-- operating-points-v2 : Refer to Documentation/devicetree/bindings/power/opp.txt
+- operating-points-v2 : Refer to Documentation/devicetree/bindings/opp/opp.txt
for details.
diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt
index c1f65d1dac1d..63cd91176a68 100644
--- a/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt
@@ -44,7 +44,7 @@ Optional properties:
- memory-region:
Memory region to allocate from, as defined in
- Documentation/devicetree/bindi/reserved-memory/reserved-memory.txt
+ Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
- mali-supply:
Phandle to regulator for the Mali device, as defined in
diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt b/Documentation/devicetree/bindings/mfd/mt6397.txt
index d1df77f4d655..0ebd08af777d 100644
--- a/Documentation/devicetree/bindings/mfd/mt6397.txt
+++ b/Documentation/devicetree/bindings/mfd/mt6397.txt
@@ -12,7 +12,7 @@ MT6397/MT6323 is a multifunction device with the following sub modules:
It is interfaced to host controller using SPI interface by a proprietary hardware
called PMIC wrapper or pwrap. MT6397/MT6323 MFD is a child device of pwrap.
See the following for pwarp node definitions:
-Documentation/devicetree/bindings/soc/pwrap.txt
+Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
This document describes the binding for MFD device and its sub module.
diff --git a/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt b/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt
index dd2c06540485..4d21ffdb0fc1 100644
--- a/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt
+++ b/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt
@@ -9,7 +9,7 @@ Required properties:
The prcm node may contain several subdevices definitions:
- see Documentation/devicetree/clk/sunxi.txt for clock devices
- - see Documentation/devicetree/reset/allwinner,sunxi-clock-reset.txt for reset
+ - see Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt for reset
controller devices
diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
index a58c173b7ab9..0419a63f73a0 100644
--- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
+++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
@@ -62,7 +62,7 @@ Required properties for a slot (Deprecated - Recommend to use one slot per host)
rest of the gpios (depending on the bus-width property) are the data lines in
no particular order. The format of the gpio specifier depends on the gpio
controller.
-(Deprecated - Refer to Documentation/devicetree/binding/pinctrl/samsung-pinctrl.txt)
+(Deprecated - Refer to Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt)
Example:
diff --git a/Documentation/devicetree/bindings/net/dsa/ksz.txt b/Documentation/devicetree/bindings/net/dsa/ksz.txt
index fd23904ac68e..a700943218ca 100644
--- a/Documentation/devicetree/bindings/net/dsa/ksz.txt
+++ b/Documentation/devicetree/bindings/net/dsa/ksz.txt
@@ -6,7 +6,7 @@ Required properties:
- compatible: For external switch chips, compatible string must be exactly one
of: "microchip,ksz9477"
-See Documentation/devicetree/bindings/dsa/dsa.txt for a list of additional
+See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional
required and optional properties.
Examples:
diff --git a/Documentation/devicetree/bindings/net/dsa/mt7530.txt b/Documentation/devicetree/bindings/net/dsa/mt7530.txt
index a9bc27b93ee3..aa3527f71fdc 100644
--- a/Documentation/devicetree/bindings/net/dsa/mt7530.txt
+++ b/Documentation/devicetree/bindings/net/dsa/mt7530.txt
@@ -31,7 +31,7 @@ Required properties for the child nodes within ports container:
- phy-mode: String, must be either "trgmii" or "rgmii" for port labeled
"cpu".
-See Documentation/devicetree/bindings/dsa/dsa.txt for a list of additional
+See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional
required, optional properties and how the integrated switch subnodes must
be specified.
diff --git a/Documentation/devicetree/bindings/power/fsl,imx-gpc.txt b/Documentation/devicetree/bindings/power/fsl,imx-gpc.txt
index b31d6bbeee16..726ec2875223 100644
--- a/Documentation/devicetree/bindings/power/fsl,imx-gpc.txt
+++ b/Documentation/devicetree/bindings/power/fsl,imx-gpc.txt
@@ -14,7 +14,7 @@ Required properties:
datasheet
- interrupts: Should contain one interrupt specifier for the GPC interrupt
- clocks: Must contain an entry for each entry in clock-names.
- See Documentation/devicetree/bindings/clocks/clock-bindings.txt for details.
+ See Documentation/devicetree/bindings/clock/clock-bindings.txt for details.
- clock-names: Must include the following entries:
- ipg
diff --git a/Documentation/devicetree/bindings/power/wakeup-source.txt b/Documentation/devicetree/bindings/power/wakeup-source.txt
index 5d254ab13ebf..cfd74659fbed 100644
--- a/Documentation/devicetree/bindings/power/wakeup-source.txt
+++ b/Documentation/devicetree/bindings/power/wakeup-source.txt
@@ -22,7 +22,7 @@ List of legacy properties and respective binding document
3. "has-tpo" Documentation/devicetree/bindings/rtc/rtc-opal.txt
4. "linux,wakeup" Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt
Documentation/devicetree/bindings/mfd/tc3589x.txt
- Documentation/devicetree/bindings/input/ads7846.txt
+ Documentation/devicetree/bindings/input/touchscreen/ads7846.txt
5. "linux,keypad-wakeup" Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt
6. "linux,input-wakeup" Documentation/devicetree/bindings/input/samsung-keypad.txt
7. "nvidia,wakeup-source" Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt
diff --git a/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt b/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt
index 50a31536e975..252a05c5d976 100644
--- a/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt
+++ b/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt
@@ -16,7 +16,7 @@ A child node must exist to represent the core DWC3 IP block. The name of
the node is not important. The content of the node is defined in dwc3.txt.
Phy documentation is provided in the following places:
-Documentation/devicetree/bindings/phy/rockchip,dwc3-usb-phy.txt
+Documentation/devicetree/bindings/phy/qcom-dwc3-usb-phy.txt
Example device nodes:
diff --git a/Documentation/hwmon/ina2xx b/Documentation/hwmon/ina2xx
index cfd31d94c872..72d16f08e431 100644
--- a/Documentation/hwmon/ina2xx
+++ b/Documentation/hwmon/ina2xx
@@ -53,7 +53,7 @@ bus supply voltage.
The shunt value in micro-ohms can be set via platform data or device tree at
compile-time or via the shunt_resistor attribute in sysfs at run-time. Please
-refer to the Documentation/devicetree/bindings/i2c/ina2xx.txt for bindings
+refer to the Documentation/devicetree/bindings/hwmon/ina2xx.txt for bindings
if the device tree is used.
Additionally ina226 supports update_interval attribute as described in
diff --git a/Documentation/maintainer/pull-requests.rst b/Documentation/maintainer/pull-requests.rst
index a19db3458b56..22b271de0304 100644
--- a/Documentation/maintainer/pull-requests.rst
+++ b/Documentation/maintainer/pull-requests.rst
@@ -41,7 +41,7 @@ named ``char-misc-next``, you would be using the following command::
that will create a signed tag called ``char-misc-4.15-rc1`` based on the
last commit in the ``char-misc-next`` branch, and sign it with your gpg key
-(see :ref:`Documentation/maintainer/configure_git.rst <configuregit>`).
+(see :ref:`Documentation/maintainer/configure-git.rst <configuregit>`).
Linus will only accept pull requests based on a signed tag. Other
maintainers may differ.
diff --git a/Documentation/translations/ko_KR/howto.rst b/Documentation/translations/ko_KR/howto.rst
index 624654bdcd8a..a8197e072599 100644
--- a/Documentation/translations/ko_KR/howto.rst
+++ b/Documentation/translations/ko_KR/howto.rst
@@ -160,7 +160,7 @@ mtk.manpages@gmail.com의 메인테이너에게 보낼 것을 권장한다.
독특한 행동에 관하여 흔히 있는 오해들과 혼란들을 해소하고 있기
때문이다.
- :ref:`Documentation/process/stable_kernel_rules.rst <stable_kernel_rules>`
+ :ref:`Documentation/process/stable-kernel-rules.rst <stable_kernel_rules>`
이 문서는 안정적인 커널 배포가 이루어지는 규칙을 설명하고 있으며
여러분들이 이러한 배포들 중 하나에 변경을 하길 원한다면
무엇을 해야 하는지를 설명한다.
diff --git a/MAINTAINERS b/MAINTAINERS
index 09554034be46..5871dd5060f6 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4513,7 +4513,7 @@ DRM DRIVER FOR ILITEK ILI9225 PANELS
M: David Lechner <david@lechnology.com>
S: Maintained
F: drivers/gpu/drm/tinydrm/ili9225.c
-F: Documentation/devicetree/bindings/display/ili9225.txt
+F: Documentation/devicetree/bindings/display/ilitek,ili9225.txt
DRM DRIVER FOR INTEL I810 VIDEO CARDS
S: Orphan / Obsolete
@@ -4599,13 +4599,13 @@ DRM DRIVER FOR SITRONIX ST7586 PANELS
M: David Lechner <david@lechnology.com>
S: Maintained
F: drivers/gpu/drm/tinydrm/st7586.c
-F: Documentation/devicetree/bindings/display/st7586.txt
+F: Documentation/devicetree/bindings/display/sitronix,st7586.txt
DRM DRIVER FOR SITRONIX ST7735R PANELS
M: David Lechner <david@lechnology.com>
S: Maintained
F: drivers/gpu/drm/tinydrm/st7735r.c
-F: Documentation/devicetree/bindings/display/st7735r.txt
+F: Documentation/devicetree/bindings/display/sitronix,st7735r.txt
DRM DRIVER FOR TDFX VIDEO CARDS
S: Orphan / Obsolete
@@ -4824,7 +4824,7 @@ M: Eric Anholt <eric@anholt.net>
S: Supported
F: drivers/gpu/drm/v3d/
F: include/uapi/drm/v3d_drm.h
-F: Documentation/devicetree/bindings/display/brcm,bcm-v3d.txt
+F: Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
T: git git://anongit.freedesktop.org/drm/drm-misc
DRM DRIVERS FOR VC4
@@ -5735,7 +5735,7 @@ M: Madalin Bucur <madalin.bucur@nxp.com>
L: netdev@vger.kernel.org
S: Maintained
F: drivers/net/ethernet/freescale/fman
-F: Documentation/devicetree/bindings/powerpc/fsl/fman.txt
+F: Documentation/devicetree/bindings/net/fsl-fman.txt
FREESCALE QORIQ PTP CLOCK DRIVER
M: Yangbo Lu <yangbo.lu@nxp.com>
@@ -7425,7 +7425,7 @@ M: Linus Walleij <linus.walleij@linaro.org>
L: linux-iio@vger.kernel.org
S: Maintained
F: drivers/iio/gyro/mpu3050*
-F: Documentation/devicetree/bindings/iio/gyroscope/inv,mpu3050.txt
+F: Documentation/devicetree/bindings/iio/gyroscope/invensense,mpu3050.txt
IOC3 ETHERNET DRIVER
M: Ralf Baechle <ralf@linux-mips.org>
@@ -8700,7 +8700,7 @@ M: Guenter Roeck <linux@roeck-us.net>
L: linux-hwmon@vger.kernel.org
S: Maintained
F: Documentation/hwmon/max6697
-F: Documentation/devicetree/bindings/i2c/max6697.txt
+F: Documentation/devicetree/bindings/hwmon/max6697.txt
F: drivers/hwmon/max6697.c
F: include/linux/platform_data/max6697.h
@@ -9080,7 +9080,7 @@ M: Martin Donnelly <martin.donnelly@ge.com>
M: Martyn Welch <martyn.welch@collabora.co.uk>
S: Maintained
F: drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
-F: Documentation/devicetree/bindings/video/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt
+F: Documentation/devicetree/bindings/display/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt
MEGARAID SCSI/SAS DRIVERS
M: Kashyap Desai <kashyap.desai@broadcom.com>
@@ -10728,7 +10728,7 @@ PARALLEL LCD/KEYPAD PANEL DRIVER
M: Willy Tarreau <willy@haproxy.com>
M: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
S: Odd Fixes
-F: Documentation/misc-devices/lcd-panel-cgram.txt
+F: Documentation/auxdisplay/lcd-panel-cgram.txt
F: drivers/misc/panel.c
PARALLEL PORT SUBSYSTEM
@@ -13291,7 +13291,7 @@ M: Vinod Koul <vkoul@kernel.org>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
S: Supported
-F: Documentation/sound/alsa/compress_offload.txt
+F: Documentation/sound/designs/compress-offload.rst
F: include/sound/compress_driver.h
F: include/uapi/sound/compress_*
F: sound/core/compress_offload.c
diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig
index 14d287bed33c..1ab613eb5796 100644
--- a/drivers/net/ethernet/intel/Kconfig
+++ b/drivers/net/ethernet/intel/Kconfig
@@ -33,7 +33,7 @@ config E100
to identify the adapter.
More specific information on configuring the driver is in
- <file:Documentation/networking/e100.txt>.
+ <file:Documentation/networking/e100.rst>.
To compile this driver as a module, choose M here. The module
will be called e100.
@@ -49,7 +49,7 @@ config E1000
<http://support.intel.com>
More specific information on configuring the driver is in
- <file:Documentation/networking/e1000.txt>.
+ <file:Documentation/networking/e1000.rst>.
To compile this driver as a module, choose M here. The module
will be called e1000.
@@ -94,7 +94,7 @@ config IGB
<http://support.intel.com>
More specific information on configuring the driver is in
- <file:Documentation/networking/e1000.txt>.
+ <file:Documentation/networking/e1000.rst>.
To compile this driver as a module, choose M here. The module
will be called igb.
@@ -130,7 +130,7 @@ config IGBVF
<http://support.intel.com>
More specific information on configuring the driver is in
- <file:Documentation/networking/e1000.txt>.
+ <file:Documentation/networking/e1000.rst>.
To compile this driver as a module, choose M here. The module
will be called igbvf.
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index 8974a0fcda1b..4b5e250e8615 100644
--- a/drivers/soundwire/stream.c
+++ b/drivers/soundwire/stream.c
@@ -1291,7 +1291,7 @@ static int _sdw_prepare_stream(struct sdw_stream_runtime *stream)
*
* @stream: Soundwire stream
*
- * Documentation/soundwire/stream.txt explains this API in detail
+ * Documentation/driver-api/soundwire/stream.rst explains this API in detail
*/
int sdw_prepare_stream(struct sdw_stream_runtime *stream)
{
@@ -1348,7 +1348,7 @@ static int _sdw_enable_stream(struct sdw_stream_runtime *stream)
*
* @stream: Soundwire stream
*
- * Documentation/soundwire/stream.txt explains this API in detail
+ * Documentation/driver-api/soundwire/stream.rst explains this API in detail
*/
int sdw_enable_stream(struct sdw_stream_runtime *stream)
{
@@ -1400,7 +1400,7 @@ static int _sdw_disable_stream(struct sdw_stream_runtime *stream)
*
* @stream: Soundwire stream
*
- * Documentation/soundwire/stream.txt explains this API in detail
+ * Documentation/driver-api/soundwire/stream.rst explains this API in detail
*/
int sdw_disable_stream(struct sdw_stream_runtime *stream)
{
@@ -1456,7 +1456,7 @@ static int _sdw_deprepare_stream(struct sdw_stream_runtime *stream)
*
* @stream: Soundwire stream
*
- * Documentation/soundwire/stream.txt explains this API in detail
+ * Documentation/driver-api/soundwire/stream.rst explains this API in detail
*/
int sdw_deprepare_stream(struct sdw_stream_runtime *stream)
{
diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
index 57a27c42b5ac..56df483de619 100644
--- a/fs/Kconfig.binfmt
+++ b/fs/Kconfig.binfmt
@@ -168,7 +168,7 @@ config BINFMT_MISC
will automatically feed it to the correct interpreter.
You can do other nice things, too. Read the file
- <file:Documentation/binfmt_misc.txt> to learn how to use this
+ <file:Documentation/admin-guide/binfmt-misc.rst> to learn how to use this
feature, <file:Documentation/admin-guide/java.rst> for information about how
to include Java support. and <file:Documentation/admin-guide/mono.rst> for
information about how to include Mono-based .NET support.
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index 4de191563261..4b5fff31ef27 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -4,7 +4,7 @@
* Copyright (C) 1997 Richard Günther
*
* binfmt_misc detects binaries via a magic or filename extension and invokes
- * a specified wrapper. See Documentation/binfmt_misc.txt for more details.
+ * a specified wrapper. See Documentation/admin-guide/binfmt-misc.rst for more details.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
--
2.17.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related
* [PATCH] devfreq: rk3399_dmc: Fix duplicated opp table on reload.
From: Enric Balletbo i Serra @ 2018-06-15 15:12 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel, Chanwoo Choi, Kyungmin Park, MyungJoo Ham, linux-pm
The opp table is not removed when the driver is unloaded neither when
there is an error within probe, so if the driver is reloaded the opp
core shows the following warning:
rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
200000000, volt: 900000, enabled: 1. New: freq: 200000000,
volt: 900000, enabled: 1
rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
400000000, volt: 900000, enabled: 1. New: freq: 400000000,
volt: 900000, enabled: 1
rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
666000000, volt: 900000, enabled: 1. New: freq: 666000000,
volt: 900000, enabled: 1
rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
800000000, volt: 900000, enabled: 1. New: freq: 800000000,
volt: 900000, enabled: 1
rk3399-dmc-freq dmc: _opp_add: duplicate OPPs detected. Existing: freq:
928000000, volt: 900000, enabled: 1. New: freq: 928000000,
volt: 900000, enabled: 1
This patch fixes the error path in the probe function and adds a .remove
function to properly cleanup the opp table on unloading.
Fixes: 5a893e31a636c (PM / devfreq: rockchip: add devfreq driver for rk3399 dmc)
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
drivers/devfreq/rk3399_dmc.c | 31 +++++++++++++++++++++++++++----
1 file changed, 27 insertions(+), 4 deletions(-)
diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
index d5c03e5abe13..e795ad2b3f6b 100644
--- a/drivers/devfreq/rk3399_dmc.c
+++ b/drivers/devfreq/rk3399_dmc.c
@@ -375,8 +375,10 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev)
data->rate = clk_get_rate(data->dmc_clk);
opp = devfreq_recommended_opp(dev, &data->rate, 0);
- if (IS_ERR(opp))
- return PTR_ERR(opp);
+ if (IS_ERR(opp)) {
+ ret = PTR_ERR(opp);
+ goto err_free_opp;
+ }
data->rate = dev_pm_opp_get_freq(opp);
data->volt = dev_pm_opp_get_voltage(opp);
@@ -388,13 +390,33 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev)
&rk3399_devfreq_dmc_profile,
DEVFREQ_GOV_SIMPLE_ONDEMAND,
&data->ondemand_data);
- if (IS_ERR(data->devfreq))
- return PTR_ERR(data->devfreq);
+ if (IS_ERR(data->devfreq)) {
+ ret = PTR_ERR(data->devfreq);
+ goto err_free_opp;
+ }
+
devm_devfreq_register_opp_notifier(dev, data->devfreq);
data->dev = dev;
platform_set_drvdata(pdev, data);
+ return 0;
+
+err_free_opp:
+ dev_pm_opp_of_remove_table(&pdev->dev);
+ return ret;
+}
+
+static int rk3399_dmcfreq_remove(struct platform_device *pdev)
+{
+ struct rk3399_dmcfreq *dmcfreq = dev_get_drvdata(&pdev->dev);
+
+ /*
+ * Before remove the opp table we need to unregister the opp notifier.
+ */
+ devm_devfreq_unregister_opp_notifier(dmcfreq->dev, dmcfreq->devfreq);
+ dev_pm_opp_of_remove_table(dmcfreq->dev);
+
return 0;
}
@@ -406,6 +428,7 @@ MODULE_DEVICE_TABLE(of, rk3399dmc_devfreq_of_match);
static struct platform_driver rk3399_dmcfreq_driver = {
.probe = rk3399_dmcfreq_probe,
+ .remove = rk3399_dmcfreq_remove,
.driver = {
.name = "rk3399-dmc-freq",
.pm = &rk3399_dmcfreq_pm,
--
2.17.1
^ permalink raw reply related
* Re: [PATCH v4 1/2] dt-bindings: cpufreq: Introduce QCOM CPUFREQ FW bindings
From: Sudeep Holla @ 2018-06-15 13:27 UTC (permalink / raw)
To: Amit Kucheria, Taniya Das
Cc: Sudeep Holla, LKML, Linux PM list, Rafael J. Wysocki,
Viresh Kumar, Stephen Boyd, Rajendra Nayak,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Rob Herring, Saravana Kannan
In-Reply-To: <CAHLCerMCM1qf1MJ3bz+ZwBQMjshKSCWKXjHCiuqxJTDBdauamQ@mail.gmail.com>
On 15/06/18 12:59, Amit Kucheria wrote:
> On Thu, Jun 14, 2018 at 9:24 PM, Taniya Das <tdas@codeaurora.org> wrote:
>
[...]
>>
>> Yes I do understand the intent of mapping the whole register space, but as
>> per the HW specs these 3 registers would be the only ones required for now.
>> I do not think this hardware engine has any information on the power
>> numbers.
>
> "For now" - I think this is exactly the point that Sudeep is trying to make.
>
> A future version of the HW engine, or more likely, a firmware
> revision, will make more functionality available. Say, this needs
> access to another register or two. This will require changing the DT
> bindings. Instead, if you map the entire address space, you can just
> add offsets to the new registers.
>
> So in this case, I think you should define the following addresses
> (size 0x1400) for the two frequency domains
>
> 0x17d43000, 0x1400 (power cluster)
> 0x17d45800, 0x1400 (perf cluster)
>
> And in the driver simply add offsets as follows:
>
> #define ENABLE_OFFSET 0x0
> #define LUT_OFFSET 0x110
> #define PERF_DESIRED_OFFSET 0x920
>
> This will allow you add any new registers in the future w/o modifying
> the DT binding and reduce qcom_cpu_resources_init() to a handful of
> lines since you no longer need so many OF string matches, and
> devm_ioremap()s.
>
Thanks Amit for such nice and detailed explanation. I was lazy to write
in such details, but was hoping Taniya to understand the point. Anyways
thanks again for doing this.
--
Regards,
Sudeep
^ permalink raw reply
* Re: [PATCH v4 1/2] dt-bindings: cpufreq: Introduce QCOM CPUFREQ FW bindings
From: Sudeep Holla @ 2018-06-15 13:23 UTC (permalink / raw)
To: Taniya Das, linux-kernel, linux-pm
Cc: Sudeep Holla, Rafael J. Wysocki, Viresh Kumar, Stephen Boyd,
Rajendra Nayak, devicetree, robh, skannan
In-Reply-To: <bc6dc152-7def-fc1d-4535-11a44fd64310@codeaurora.org>
On 14/06/18 19:24, Taniya Das wrote:
> Hello Sudeep,
>
> Thanks for your comments.
>
> On 6/14/2018 4:17 PM, Sudeep Holla wrote:
>>
>>
>> On 13/06/18 19:13, Taniya Das wrote:
>>> Hello Sudeep,
>>>
>>> Thanks for review comments.
>>>
>>> On 6/13/2018 4:56 PM, Sudeep Holla wrote:
>>>>
>>>>
>>
>> [...]
>>
>>>> You are bit inconsistent on the wordings. Some places you refer this as
>>>> hardware engine. If so, please drop all references to firmware/FW. If
>>>> it's firmware then update accordingly.
>>>>
>>>
>>> It is a hardware engine which has a firmware to take care of the
>>> managing the frequency request from OS. That is reason to refer it as a
>>> firmware.
>>>
>>
>> Yes I did guess that initially, but I failed to understand when
>> different bindings were posted to deal with devfreq and cpufreq with the
>> same firmware. Ideally if it's the firmware you are talking to, place
>> all these under /firmware node and align all those with single binding.
>>
>
> The OS is not aware of the firmware and OS only knows about the hardware
> engine and has to put forward it's request to the hardware engine using
> the "Perf" state register in both devfreq & cpufreq. So would it be
> still required to put under the /firmware node?
>
Ah ok, then remove any references to firmware other than stating its
presence in the introduction. E.g. you have "Add cpufreq firmware device
bindings ...". So this is definitely not firmware binding. You are just
presenting the h/w as is and you need to deal with change of firmware in
DT and OS agnostic way.
>> Is there anything else that this firmware deals with ? If so all those
>> need to be put in one place.
>>
>
> We deal only with the CPU frequency and L3 frequency(devfreq).
>
OK
>>>>> +Properties:
>>>>> +- compatible
>>>>> + Usage: required
>>>>> + Value type: <string>
>>>>> + Definition: must be "qcom,cpufreq-fw".
>>>>> +
>>>>> +* Property qcom,freq-domain
>>>>> +Devices supporting freq-domain must set their "qcom,freq-domain"
>>>>> property with
>>>>> +phandle to a freq_domain_table in their DT node.
>>>>> +
>>>>> +* Frequency Domain Table Node
>>>>> +
>>>>> +This describes the frequency domain belonging to a device.
>>>>> +This node can have following properties:
>>>>> +
>>>>> +- reg
>>>>> + Usage: required
>>>>> + Value type: <prop-encoded-array>
>>>>> + Definition: Addresses and sizes for the memory of the perf
>>>>> + , lut and enable bases.
>>>>> + perf - indicates the base address for the desired
>>>>> + performance state to be set.
>>>>> + lut - indicates the look up table base address for the
>>>>> + cpufreq driver to read frequencies.
>>>>> + enable - indicates the enable register for firmware.
>>>>
>>>>
>>>> You still didn't answer my earlier question.
>>>>
>>>> OS might touch one or 2 registers in lots of IP blocks. I am not sure
>>>> why those are any different from these. Are you trying to align with
>>>> any
>>>> other bindings or specification. Are you trying to make this binding
>>>> generic here ? I understand if it was trying to generalize the firmware
>>>> interface, but you also state it's a hardware engine. So I fail to see
>>>> the need for such specificity here. Why not define the whole IP block
>>>> and the driver knows where to access these specific ones as they are
>>>> specific to this hardware block. In that way if you decide to add more
>>>> data, it's extensible easily without the need for patching DT.
>>>>
>>>
>>> Sorry Sudeep I missed replying to your earlier query.
>>> The High level OS(HLOS) would require to access only these specific
>>> registers from this IP block and just mapping the whole block(huge
>>> region) is unnecessary from the OS point of View. As of now it is a
>>> generic binding for all using this IP block to manage frequency
>>> requests. The OS would only have to know the frequencies supported i.e
>>> to read the lookup table registers and put across the OS request using
>>> the performance state register.
>>>
>>
>> I am not sure if you need to defining bindings to save OSPM IO mapping.
>> In-fact you may be adding more mapping unnecessarily. The mappings are
>> page aligned and spiting the registers and mapping them individually may
>> result in more mappings.
>>
>> I just need to know the rational for such specific choice of registers.
>> I assume it's aligned to some other standard specifications like CPPC
>> though not identical.
>>
>
> I am not sure of the query but there is no other register that the OS is
> required to use other than the ones defined here.
>
The point is ever IP on the SoC may have 100s to 1000s of registers that
may or may not be used by OS. That's about to the OS to decide and you
just need to provide the hardware view to anyone using the device tree.
It *should not* _just_ represent what you think OS(Linux in particular)
"for now"
>>>> Eg. Suppose you need some information on power curve for EAS energy
>>>> model, I really hate to update DT for that or even do a mix with DT
>>>> just
>>>> because f/w is no longer modifiable.
>>>>
>>>
>>> For now we are safe.
>>>
>>
>> What do you mean by that ?
>
> I meant here was currently there is no such known case where the f/w is
> no longer modifiable and we need to extend device tree bindings.
>
>> It should be easily extensible is what I am
>> trying to say. You can add more info and alter the information in the
>> driver with compatibles if you keep the register info as minimum as
>> possible. For now, you have enable, set and lut registers. What if you
>> want to provide power numbers ?
>>
>
> Yes I do understand the intent of mapping the whole register space, but
> as per the HW specs these 3 registers would be the only ones required
> for now. I do not think this hardware engine has any information on the
> power numbers.
>
That's fine. So on this platform DT, will you list only the registers
touched by the OS for all the IP ? I am sure that will not be the case.
--
Regards,
Sudeep
^ permalink raw reply
* Re: [PATCH v4 1/2] dt-bindings: cpufreq: Introduce QCOM CPUFREQ FW bindings
From: Amit Kucheria @ 2018-06-15 13:07 UTC (permalink / raw)
To: Taniya Das
Cc: Rafael J. Wysocki, Viresh Kumar, LKML, Linux PM list,
Stephen Boyd, Rajendra Nayak,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Rob Herring, Saravana Kannan
In-Reply-To: <1528801355-18719-2-git-send-email-tdas@codeaurora.org>
On Tue, Jun 12, 2018 at 2:02 PM, Taniya Das <tdas@codeaurora.org> wrote:
> Add QCOM cpufreq firmware device bindings for Qualcomm Technology Inc's
> SoCs. This is required for managing the cpu frequency transitions which are
> controlled by firmware.
>
> Signed-off-by: Taniya Das <tdas@codeaurora.org>
> + qcom,cpufreq-fw {
> + compatible = "qcom,cpufreq-fw";
> +
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + freq_domain_table0 : freq_table0 {
> + reg = <0x17d43920 0x4>, <0x17d43110 0x500>,
> + <0x17d41000 0x4>;
Changing the enable address to 0x17d43000 would make this a working
example, I think.
> + reg-names = "perf", "lut", "enable";
> + };
> +
> + freq_domain_table1 : freq_table1 {
> + reg = <0x17d46120 0x4>, <0x17d45910 0x500>,
> + <0x17d45800 0x4> ;
> + reg-names = "perf", "lut", "enable";
> + };
> + };
^ permalink raw reply
* Re: [PATCH v4 2/2] cpufreq: qcom-fw: Add support for QCOM cpufreq FW driver
From: Amit Kucheria @ 2018-06-15 12:02 UTC (permalink / raw)
To: Taniya Das
Cc: Rafael J. Wysocki, Viresh Kumar, LKML, Linux PM list,
Stephen Boyd, Rajendra Nayak,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Rob Herring, Saravana Kannan
In-Reply-To: <1528801355-18719-3-git-send-email-tdas@codeaurora.org>
On Tue, Jun 12, 2018 at 2:02 PM, Taniya Das <tdas@codeaurora.org> wrote:
> The CPUfreq FW present in some QCOM chipsets offloads the steps necessary
> for changing the frequency of CPUs. The driver implements the cpufreq
> driver interface for this firmware.
>
> Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
> Signed-off-by: Taniya Das <tdas@codeaurora.org>
> ---
> drivers/cpufreq/Kconfig.arm | 9 +
> drivers/cpufreq/Makefile | 1 +
> drivers/cpufreq/qcom-cpufreq-fw.c | 336 ++++++++++++++++++++++++++++++++++++++
> 3 files changed, 346 insertions(+)
> create mode 100644 drivers/cpufreq/qcom-cpufreq-fw.c
>
> diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
> index 52f5f1a..2683716 100644
> --- a/drivers/cpufreq/Kconfig.arm
> +++ b/drivers/cpufreq/Kconfig.arm
> @@ -312,3 +312,12 @@ config ARM_PXA2xx_CPUFREQ
> This add the CPUFreq driver support for Intel PXA2xx SOCs.
>
> If in doubt, say N.
> +
> +config ARM_QCOM_CPUFREQ_FW
> + bool "QCOM CPUFreq FW driver"
> + help
> + Support for the CPUFreq FW driver.
> + The CPUfreq FW preset in some QCOM chipsets offloads the steps
s/preset/present
> + necessary for changing the frequency of CPUs. The driver
I'd rephrase this a bit to address Sudeep's comment. Something like:
"Some QCOM chipsets have a HW engine to offload the steps necessary
for changing the frequency of the CPUs. Firmware loaded in this engine
exposes a programming interface to the high-level OS. This driver
exposes a cpufreq abstraction for this HW engine. Say Y ....."
> + implements the cpufreq driver interface for this firmware.
> + Say Y if you want to support CPUFreq FW.
> diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
> index fb4a2ec..34691a2 100644
> --- a/drivers/cpufreq/Makefile
> +++ b/drivers/cpufreq/Makefile
> @@ -86,6 +86,7 @@ obj-$(CONFIG_ARM_TEGRA124_CPUFREQ) += tegra124-cpufreq.o
> obj-$(CONFIG_ARM_TEGRA186_CPUFREQ) += tegra186-cpufreq.o
> obj-$(CONFIG_ARM_TI_CPUFREQ) += ti-cpufreq.o
> obj-$(CONFIG_ARM_VEXPRESS_SPC_CPUFREQ) += vexpress-spc-cpufreq.o
> +obj-$(CONFIG_ARM_QCOM_CPUFREQ_FW) += qcom-cpufreq-fw.o
>
<snip>
> +static const struct of_device_id match_table[] = {
> + { .compatible = "qcom,cpufreq-fw" },
> + {}
> +};
> +
> +static struct platform_driver qcom_cpufreq_fw_driver = {
> + .probe = qcom_cpufreq_fw_driver_probe,
> + .driver = {
> + .name = "qcom-cpufreq-fw",
> + .of_match_table = match_table,
> + .owner = THIS_MODULE,
> + },
> +};
> +
> +static int __init qcom_cpufreq_fw_init(void)
> +{
> + return platform_driver_register(&qcom_cpufreq_fw_driver);
> +}
> +subsys_initcall(qcom_cpufreq_fw_init);
> +
> +MODULE_DESCRIPTION("QCOM CPU Frequency FW");
This can be a bit more descriptive, e.g.
"QCOM firmware-based CPU Frequency driver"
> +MODULE_LICENSE("GPL v2");
> --
> Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member
> of the Code Aurora Forum, hosted by the Linux Foundation.
>
^ permalink raw reply
* Re: [PATCH v4 1/2] dt-bindings: cpufreq: Introduce QCOM CPUFREQ FW bindings
From: Amit Kucheria @ 2018-06-15 11:59 UTC (permalink / raw)
To: Taniya Das
Cc: Sudeep Holla, LKML, Linux PM list, Rafael J. Wysocki,
Viresh Kumar, Stephen Boyd, Rajendra Nayak,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Rob Herring, Saravana Kannan
In-Reply-To: <bc6dc152-7def-fc1d-4535-11a44fd64310@codeaurora.org>
On Thu, Jun 14, 2018 at 9:24 PM, Taniya Das <tdas@codeaurora.org> wrote:
>>> Sorry Sudeep I missed replying to your earlier query.
>>> The High level OS(HLOS) would require to access only these specific
>>> registers from this IP block and just mapping the whole block(huge
>>> region) is unnecessary from the OS point of View. As of now it is a
>>> generic binding for all using this IP block to manage frequency
>>> requests. The OS would only have to know the frequencies supported i.e
>>> to read the lookup table registers and put across the OS request using
>>> the performance state register.
>>>
>>
>> I am not sure if you need to defining bindings to save OSPM IO mapping.
>> In-fact you may be adding more mapping unnecessarily. The mappings are
>> page aligned and spiting the registers and mapping them individually may
>> result in more mappings.
>>
>> I just need to know the rational for such specific choice of registers.
>> I assume it's aligned to some other standard specifications like CPPC
>> though not identical.
>>
>
> I am not sure of the query but there is no other register that the OS is
> required to use other than the ones defined here.
>
>>>> Eg. Suppose you need some information on power curve for EAS energy
>>>> model, I really hate to update DT for that or even do a mix with DT just
>>>> because f/w is no longer modifiable.
>>>>
>>>
>>> For now we are safe.
>>>
>>
>> What do you mean by that ?
>
>
> I meant here was currently there is no such known case where the f/w is no
> longer modifiable and we need to extend device tree bindings.
>
>> It should be easily extensible is what I am
>> trying to say. You can add more info and alter the information in the
>> driver with compatibles if you keep the register info as minimum as
>> possible. For now, you have enable, set and lut registers. What if you
>> want to provide power numbers ?
>>
>
> Yes I do understand the intent of mapping the whole register space, but as
> per the HW specs these 3 registers would be the only ones required for now.
> I do not think this hardware engine has any information on the power
> numbers.
"For now" - I think this is exactly the point that Sudeep is trying to make.
A future version of the HW engine, or more likely, a firmware
revision, will make more functionality available. Say, this needs
access to another register or two. This will require changing the DT
bindings. Instead, if you map the entire address space, you can just
add offsets to the new registers.
So in this case, I think you should define the following addresses
(size 0x1400) for the two frequency domains
0x17d43000, 0x1400 (power cluster)
0x17d45800, 0x1400 (perf cluster)
And in the driver simply add offsets as follows:
#define ENABLE_OFFSET 0x0
#define LUT_OFFSET 0x110
#define PERF_DESIRED_OFFSET 0x920
This will allow you add any new registers in the future w/o modifying
the DT binding and reduce qcom_cpu_resources_init() to a handful of
lines since you no longer need so many OF string matches, and
devm_ioremap()s.
Regards,
Amit
^ permalink raw reply
* [PATCH] PM / devfreq: Fix devfreq_add_device() when drivers are built as modules.
From: Enric Balletbo i Serra @ 2018-06-15 10:04 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel, Chanwoo Choi, Kyungmin Park, MyungJoo Ham, linux-pm
When the devfreq driver and the governor driver are built as modules,
the call to devfreq_add_device() fails because the governor driver is
not loaded at the time the devfreq driver loads. The devfreq driver has
a build dependency on the governor but also should have a runtime
dependency. We need to make sure that the governor driver is loaded
before the devfreq driver.
This patch fixes this bug in devfreq_add_device(). First tries to find
the governor, and then, if was not found, it requests the module and
tries again.
Fixes: 1b5c1be2c88e (PM / devfreq: map devfreq drivers to governor using name)
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
drivers/devfreq/devfreq.c | 36 +++++++++++++++++++++++++++++++-----
1 file changed, 31 insertions(+), 5 deletions(-)
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index fe2af6aa88fc..1d917f043e30 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -11,6 +11,7 @@
*/
#include <linux/kernel.h>
+#include <linux/kmod.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/err.h>
@@ -648,10 +649,35 @@ struct devfreq *devfreq_add_device(struct device *dev,
governor = find_devfreq_governor(devfreq->governor_name);
if (IS_ERR(governor)) {
- dev_err(dev, "%s: Unable to find governor for the device\n",
- __func__);
- err = PTR_ERR(governor);
- goto err_init;
+ list_del(&devfreq->node);
+ mutex_unlock(&devfreq_list_lock);
+
+ /*
+ * If the governor is not found, then request the module and
+ * try again. This can happen when both drivers (the governor
+ * driver and the driver that calls devfreq_add_device) are
+ * built as modules.
+ */
+ if (!strncmp(devfreq->governor_name,
+ DEVFREQ_GOV_SIMPLE_ONDEMAND, DEVFREQ_NAME_LEN))
+ err = request_module("governor_%s", "simpleondemand");
+ else
+ err = request_module("governor_%s",
+ devfreq->governor_name);
+ if (err)
+ goto err_unregister;
+
+ mutex_lock(&devfreq_list_lock);
+ list_add(&devfreq->node, &devfreq_list);
+
+ governor = find_devfreq_governor(devfreq->governor_name);
+ if (IS_ERR(governor)) {
+ dev_err(dev,
+ "%s: Unable to find governor for the device\n",
+ __func__);
+ err = PTR_ERR(governor);
+ goto err_init;
+ }
}
devfreq->governor = governor;
@@ -669,7 +695,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
err_init:
list_del(&devfreq->node);
mutex_unlock(&devfreq_list_lock);
-
+err_unregister:
device_unregister(&devfreq->dev);
err_dev:
if (devfreq)
--
2.17.1
^ permalink raw reply related
* [PATCH v2] cpufreq / CPPC: Add cpuinfo_cur_freq support for CPPC
From: George Cherian @ 2018-06-15 10:03 UTC (permalink / raw)
To: linux-kernel, linux-pm; +Cc: viresh.kumar, rjw, pprakash, George Cherian
Per Section 8.4.7.1.3 of ACPI 6.2, The platform provides performance
feedback via set of performance counters. To determine the actual
performance level delivered over time, OSPM may read a set of
performance counters from the Reference Performance Counter Register
and the Delivered Performance Counter Register.
OSPM calculates the delivered performance over a given time period by
taking a beginning and ending snapshot of both the reference and
delivered performance counters, and calculating:
delivered_perf = reference_perf X (delta of delivered_perf counter / delta of reference_perf counter).
Implement the above and hook this to the cpufreq->get method.
Signed-off-by: George Cherian <george.cherian@cavium.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/cppc_cpufreq.c | 71 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index 3464580..3fe7625 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -296,10 +296,81 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy)
return ret;
}
+static int cppc_get_rate_from_fbctrs(struct cppc_cpudata *cpu,
+ struct cppc_perf_fb_ctrs fb_ctrs_t0,
+ struct cppc_perf_fb_ctrs fb_ctrs_t1)
+{
+ u64 delta_reference, delta_delivered;
+ u64 reference_perf, delivered_perf;
+
+ reference_perf = fb_ctrs_t0.reference_perf;
+ if (fb_ctrs_t1.reference > fb_ctrs_t0.reference) {
+ delta_reference = fb_ctrs_t1.reference - fb_ctrs_t0.reference;
+ } else {
+ /*
+ * Counters would have wrapped-around
+ * We also need to find whether the low level fw
+ * maintains 32 bit or 64 bit counters, to calculate
+ * the correct delta.
+ */
+ if (fb_ctrs_t0.reference > (~(u32)0))
+ delta_reference = (~((u64)0) - fb_ctrs_t0.reference) +
+ fb_ctrs_t1.reference;
+ else
+ delta_reference = (~((u32)0) - fb_ctrs_t0.reference) +
+ fb_ctrs_t1.reference;
+ }
+
+ if (fb_ctrs_t1.delivered > fb_ctrs_t0.delivered) {
+ delta_delivered = fb_ctrs_t1.delivered - fb_ctrs_t0.delivered;
+ } else {
+ /*
+ * Counters would have wrapped-around
+ * We also need to find whether the low level fw
+ * maintains 32 bit or 64 bit counters, to calculate
+ * the correct delta.
+ */
+ if (fb_ctrs_t0.delivered > (~(u32)0))
+ delta_delivered = (~((u64)0) - fb_ctrs_t0.delivered) +
+ fb_ctrs_t1.delivered;
+ else
+ delta_delivered = (~((u32)0) - fb_ctrs_t0.delivered) +
+ fb_ctrs_t1.delivered;
+ }
+
+ if (delta_reference) /* Check to avoid divide-by zero */
+ delivered_perf = (reference_perf * delta_delivered) /
+ delta_reference;
+ else
+ delivered_perf = reference_perf;
+
+ return cppc_cpufreq_perf_to_khz(cpu, delivered_perf);
+}
+
+static unsigned int cppc_cpufreq_get_rate(unsigned int cpunum)
+{
+ struct cppc_perf_fb_ctrs fb_ctrs_t0 = {0}, fb_ctrs_t1 = {0};
+ struct cppc_cpudata *cpu = all_cpu_data[cpunum];
+ int ret;
+
+ ret = cppc_get_perf_ctrs(cpunum, &fb_ctrs_t0);
+ if (ret)
+ return ret;
+
+ udelay(2); /* 2usec delay between sampling */
+
+ ret = cppc_get_perf_ctrs(cpunum, &fb_ctrs_t1);
+ if (ret)
+ return ret;
+
+ return cppc_get_rate_from_fbctrs(cpu, fb_ctrs_t0, fb_ctrs_t1);
+}
+
static struct cpufreq_driver cppc_cpufreq_driver = {
.flags = CPUFREQ_CONST_LOOPS,
.verify = cppc_verify_policy,
.target = cppc_cpufreq_set_target,
+ .get = cppc_cpufreq_get_rate,
.init = cppc_cpufreq_cpu_init,
.stop_cpu = cppc_cpufreq_stop_cpu,
.name = "cppc_cpufreq",
--
2.7.4
^ permalink raw reply related
* [PATCH V7] powercap/drivers/idle_injection: Add an idle injection framework
From: Daniel Lezcano @ 2018-06-15 9:19 UTC (permalink / raw)
To: viresh.kumar, rjw
Cc: linux-kernel, linux-pm, Eduardo Valentin, Javi Merino, Leo Yan,
Kevin Wangtao, Vincent Guittot, Rui Zhang, Daniel Thompson,
Peter Zijlstra, Andrea Parri
Initially, the cpu_cooling device for ARM was changed by adding a new
policy inserting idle cycles. The intel_powerclamp driver does a
similar action.
Instead of implementing idle injections privately in the cpu_cooling
device, move the idle injection code in a dedicated framework and give
the opportunity to other frameworks to make use of it.
The framework relies on the smpboot kthreads which handles via its
main loop the common code for hotplugging and [un]parking.
This code was previously tested with the cpu cooling device and went
through several iterations. It results now in split code and API
exported in the header file. It was tested with the cpu cooling device
with success.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Javi Merino <javi.merino@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Kevin Wangtao <kevin.wangtao@linaro.org>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Rui Zhang <rui.zhang@intel.com>
Cc: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andrea Parri <andrea.parri@amarulasolutions.com>
---
V7:
- Replace count approach by htimer_forward and restart (Peter Zijlstra)
- Wait for task inactive when stopping the idle injections
- Changed the comments and description
V6:
- Move count to wake up function (Viresh Kumar)
- Split atomic/non-atomic context to wake up tasks
- Add the park callback to handle unplug/inject race
- Replace atomic by READ_ONCE and WRITE_ONCE (Peter Zijlstra)
V5:
- Move init_completion in the init function (Viresh Kumar)
- Increment task count in the wakeup function (Viresh Kumar)
- Remove rollback at init time (Viresh Kumar)
V4:
- Wait for completion when stopping (Viresh Kumar)
- Check init already done and rollback (Viresh Kumar)
V3:
- Fixed typos (Viresh Kumar)
- Removed extra blank line (Viresh Kumar)
- Added full stop (Viresh Kumar)
- Fixed Return kerneldoc format (Viresh Kumar)
- Fixed multiple kthreads initialization (Viresh Kumar)
- Fixed rollbacking the actions in the unregister function (Viresh Kumar)
- Make idle injection kthreads name hardcoded
- Kthreads are created in the initcall process
V2: Fixed checkpatch warnings
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/powercap/Kconfig | 10 ++
drivers/powercap/Makefile | 1 +
drivers/powercap/idle_injection.c | 355 ++++++++++++++++++++++++++++++++++++++
include/linux/idle_injection.h | 29 ++++
4 files changed, 395 insertions(+)
create mode 100644 drivers/powercap/idle_injection.c
create mode 100644 include/linux/idle_injection.h
diff --git a/drivers/powercap/Kconfig b/drivers/powercap/Kconfig
index 85727ef..a767ef2 100644
--- a/drivers/powercap/Kconfig
+++ b/drivers/powercap/Kconfig
@@ -29,4 +29,14 @@ config INTEL_RAPL
controller, CPU core (Power Plance 0), graphics uncore (Power Plane
1), etc.
+config IDLE_INJECTION
+ bool "Idle injection framework"
+ depends on CPU_IDLE
+ default n
+ help
+ This enables support for the idle injection framework. It
+ provides a way to force idle periods on a set of specified
+ CPUs for power capping. Idle period can be injected
+ synchronously on a set of specified CPUs or alternatively
+ on a per CPU basis.
endif
diff --git a/drivers/powercap/Makefile b/drivers/powercap/Makefile
index 0a21ef3..c3bbfee 100644
--- a/drivers/powercap/Makefile
+++ b/drivers/powercap/Makefile
@@ -1,2 +1,3 @@
obj-$(CONFIG_POWERCAP) += powercap_sys.o
obj-$(CONFIG_INTEL_RAPL) += intel_rapl.o
+obj-$(CONFIG_IDLE_INJECTION) += idle_injection.o
diff --git a/drivers/powercap/idle_injection.c b/drivers/powercap/idle_injection.c
new file mode 100644
index 0000000..9dadfb0
--- /dev/null
+++ b/drivers/powercap/idle_injection.c
@@ -0,0 +1,355 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright 2018 Linaro Limited
+ *
+ * Author: Daniel Lezcano <daniel.lezcano@linaro.org>
+ *
+ * The idle injection framework proposes a way to force a cpu to enter
+ * an idle state during a specified amount of time for a specified
+ * period.
+ *
+ * It relies on the smpboot kthreads which handles, via its main loop,
+ * the common code for hotplugging and [un]parking.
+ *
+ * At init time, all the kthreads are created.
+ *
+ * A cpumask is specified as parameter for the idle injection
+ * registering function. The kthreads will be synchronized regarding
+ * this cpumask.
+ *
+ * The idle + run duration is specified via the helpers and then the
+ * idle injection can be started at this point.
+ *
+ * A kthread will call play_idle() with the specified idle duration
+ * from above.
+ *
+ * A timer is set after waking up all the tasks, to the next idle
+ * injection cycle.
+ *
+ * The task handling the timer interrupt will wakeup all the kthreads
+ * belonging to the cpumask.
+ *
+ * Stopping the idle injection is synchonuous, when the function
+ * returns, there is the guarantee there is no more idle injection
+ * kthread in activity.
+ *
+ * It is up to the user of this framework to provide a lock at an
+ * upper level to prevent stupid things to happen, like starting while
+ * we are unregistering.
+ */
+#define pr_fmt(fmt) "ii_dev: " fmt
+
+#include <linux/cpu.h>
+#include <linux/freezer.h>
+#include <linux/hrtimer.h>
+#include <linux/kthread.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/smpboot.h>
+
+#include <uapi/linux/sched/types.h>
+
+/**
+ * struct idle_injection_thread - task on/off switch structure
+ * @tsk: a pointer to a task_struct injecting the idle cycles
+ * @should_run: a integer used as a boolean by the smpboot kthread API
+ */
+struct idle_injection_thread {
+ struct task_struct *tsk;
+ int should_run;
+};
+
+/**
+ * struct idle_injection_device - data for the idle injection
+ * @timer: a hrtimer giving the tempo for the idle injection
+ * @idle_duration_ms: an unsigned int specifying the idle duration
+ * @run_duration_ms: an unsigned int specifying the running duration
+ * @cpumask: a cpumask containing the list of CPUs managed by the device
+ */
+struct idle_injection_device {
+ struct hrtimer timer;
+ unsigned int idle_duration_ms;
+ unsigned int run_duration_ms;
+ unsigned long int cpumask[0];
+};
+
+static DEFINE_PER_CPU(struct idle_injection_thread, idle_injection_thread);
+static DEFINE_PER_CPU(struct idle_injection_device *, idle_injection_device);
+
+/**
+ * idle_injection_wakeup - Wake up all idle injection threads
+ * @ii_dev: the idle injection device
+ *
+ * Every idle injection task belonging to the idle injection device
+ * and running on an online CPU will be wake up by this call.
+ */
+static void idle_injection_wakeup(struct idle_injection_device *ii_dev)
+{
+ struct idle_injection_thread *iit;
+ unsigned int cpu;
+
+ for_each_cpu_and(cpu, to_cpumask(ii_dev->cpumask), cpu_online_mask) {
+ iit = per_cpu_ptr(&idle_injection_thread, cpu);
+ iit->should_run = 1;
+ wake_up_process(iit->tsk);
+ }
+}
+
+/**
+ * idle_injection_wakeup_fn - idle injection timer callback
+ * @timer: a hrtimer structure
+ *
+ * This function is called when the idle injection timer expires which
+ * will wake up the idle injection tasks and these ones, in turn, play
+ * idle a specified amount of time.
+ *
+ * Return: HRTIMER_RESTART.
+ */
+static enum hrtimer_restart idle_injection_wakeup_fn(struct hrtimer *timer)
+{
+ unsigned int run_duration_ms;
+ unsigned int idle_duration_ms;
+ struct idle_injection_device *ii_dev =
+ container_of(timer, struct idle_injection_device, timer);
+
+ run_duration_ms = READ_ONCE(ii_dev->run_duration_ms);
+ idle_duration_ms = READ_ONCE(ii_dev->idle_duration_ms);
+
+ idle_injection_wakeup(ii_dev);
+
+ hrtimer_forward_now(timer,
+ ms_to_ktime(idle_duration_ms + run_duration_ms));
+
+ return HRTIMER_RESTART;
+}
+
+/**
+ * idle_injection_fn - idle injection routine
+ * @cpu: the CPU number the task belongs to
+ *
+ * The idle injection routine will stay idle the specified amount of
+ * time
+ */
+static void idle_injection_fn(unsigned int cpu)
+{
+ struct idle_injection_device *ii_dev;
+ struct idle_injection_thread *iit;
+
+ ii_dev = per_cpu(idle_injection_device, cpu);
+ iit = per_cpu_ptr(&idle_injection_thread, cpu);
+
+ /*
+ * Boolean used by the smpboot main loop and used as a
+ * flip-flop in this function
+ */
+ iit->should_run = 0;
+
+ play_idle(READ_ONCE(ii_dev->idle_duration_ms));
+}
+
+/**
+ * idle_injection_set_duration - idle and run duration helper
+ * @run_duration_ms: an unsigned int giving the running time in milliseconds
+ * @idle_duration_ms: an unsigned int giving the idle time in milliseconds
+ */
+void idle_injection_set_duration(struct idle_injection_device *ii_dev,
+ unsigned int run_duration_ms,
+ unsigned int idle_duration_ms)
+{
+ if (run_duration_ms && idle_duration_ms) {
+ WRITE_ONCE(ii_dev->run_duration_ms, run_duration_ms);
+ WRITE_ONCE(ii_dev->idle_duration_ms, idle_duration_ms);
+ }
+}
+
+/**
+ * idle_injection_get_duration - idle and run duration helper
+ * @run_duration_ms: a pointer to an unsigned int to store the running time
+ * @idle_duration_ms: a pointer to an unsigned int to store the idle time
+ */
+void idle_injection_get_duration(struct idle_injection_device *ii_dev,
+ unsigned int *run_duration_ms,
+ unsigned int *idle_duration_ms)
+{
+ *run_duration_ms = READ_ONCE(ii_dev->run_duration_ms);
+ *idle_duration_ms = READ_ONCE(ii_dev->idle_duration_ms);
+}
+
+/**
+ * idle_injection_start - starts the idle injections
+ * @ii_dev: a pointer to an idle_injection_device structure
+ *
+ * The function starts the idle injection cycles by first waking up
+ * all the tasks the ii_dev is attached to and let them handle the
+ * idle-run periods.
+ *
+ * Return: -EINVAL if the idle or the running durations are not set.
+ */
+int idle_injection_start(struct idle_injection_device *ii_dev)
+{
+ unsigned int idle_duration_ms = READ_ONCE(ii_dev->idle_duration_ms);
+ unsigned int run_duration_ms = READ_ONCE(ii_dev->run_duration_ms);
+
+ if (!idle_duration_ms || !run_duration_ms)
+ return -EINVAL;
+
+ pr_debug("Starting injecting idle cycles on CPUs '%*pbl'\n",
+ cpumask_pr_args(to_cpumask(ii_dev->cpumask)));
+
+ idle_injection_wakeup(ii_dev);
+
+ hrtimer_start(&ii_dev->timer,
+ ms_to_ktime(idle_duration_ms + run_duration_ms),
+ HRTIMER_MODE_REL);
+
+ return 0;
+}
+
+/**
+ * idle_injection_stop - stops the idle injections
+ * @ii_dev: a pointer to an idle injection_device structure
+ *
+ * The function stops the idle injection and waits for the threads to
+ * complete. If we are in the process of injecting an idle cycle, then
+ * this will wait the end of the cycle.
+ *
+ * When the function returns there is no more idle injection
+ * activity. The kthreads are scheduled out and the periodic timer is
+ * off.
+ */
+void idle_injection_stop(struct idle_injection_device *ii_dev)
+{
+ struct idle_injection_thread *iit;
+ unsigned int cpu;
+
+ pr_debug("Stopping injecting idle cycles on CPUs '%*pbl'\n",
+ cpumask_pr_args(to_cpumask(ii_dev->cpumask)));
+
+ hrtimer_cancel(&ii_dev->timer);
+
+ /*
+ * We want the guarantee we have a quescient point where
+ * parked threads stay in there state while we are stopping
+ * the idle injection. After exiting the loop, if any CPU is
+ * plugged in, the 'should_run' boolean being false, the
+ * smpboot main loop schedules the task out.
+ */
+ cpu_hotplug_disable();
+
+ for_each_cpu_and(cpu, to_cpumask(ii_dev->cpumask), cpu_online_mask) {
+ iit = per_cpu_ptr(&idle_injection_thread, cpu);
+ iit->should_run = 0;
+
+ wait_task_inactive(iit->tsk, 0);
+ }
+
+ cpu_hotplug_enable();
+}
+
+/**
+ * idle_injection_setup - initialize the current task as a RT task
+ * @cpu: the CPU number where the kthread is running on (not used)
+ *
+ * Called one time, this function is in charge of setting the task
+ * scheduler parameters.
+ */
+static void idle_injection_setup(unsigned int cpu)
+{
+ struct sched_param param = { .sched_priority = MAX_USER_RT_PRIO / 2 };
+
+ set_freezable();
+
+ sched_setscheduler(current, SCHED_FIFO, ¶m);
+}
+
+/**
+ * idle_injection_should_run - function helper for the smpboot API
+ * @cpu: the CPU number where the kthread is running on
+ *
+ * Return: a boolean telling if the thread can run.
+ */
+static int idle_injection_should_run(unsigned int cpu)
+{
+ struct idle_injection_thread *iit =
+ per_cpu_ptr(&idle_injection_thread, cpu);
+
+ return iit->should_run;
+}
+
+/**
+ * idle_injection_register - idle injection init routine
+ * @cpumask: the list of CPUs managed by the idle injection device
+ *
+ * This is the initialization function in charge of creating the
+ * initializing of the timer and allocate the structures. It does not
+ * starts the idle injection cycles.
+ *
+ * Return: NULL if an allocation fails.
+ */
+struct idle_injection_device *idle_injection_register(struct cpumask *cpumask)
+{
+ struct idle_injection_device *ii_dev;
+ int cpu;
+
+ ii_dev = kzalloc(sizeof(*ii_dev) + cpumask_size(), GFP_KERNEL);
+ if (!ii_dev)
+ return NULL;
+
+ cpumask_copy(to_cpumask(ii_dev->cpumask), cpumask);
+ hrtimer_init(&ii_dev->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
+ ii_dev->timer.function = idle_injection_wakeup_fn;
+
+ for_each_cpu(cpu, to_cpumask(ii_dev->cpumask)) {
+
+ if (per_cpu(idle_injection_device, cpu)) {
+ pr_err("cpu%d is already registered\n", cpu);
+ goto out_rollback_per_cpu;
+ }
+
+ per_cpu(idle_injection_device, cpu) = ii_dev;
+ }
+
+ return ii_dev;
+
+out_rollback_per_cpu:
+ for_each_cpu(cpu, to_cpumask(ii_dev->cpumask))
+ per_cpu(idle_injection_device, cpu) = NULL;
+
+ kfree(ii_dev);
+
+ return NULL;
+}
+
+/**
+ * idle_injection_unregister - Unregister the idle injection device
+ * @ii_dev: a pointer to an idle injection device
+ *
+ * The function is in charge of stopping the idle injections,
+ * unregister the kthreads and free the allocated memory in the
+ * register function.
+ */
+void idle_injection_unregister(struct idle_injection_device *ii_dev)
+{
+ unsigned int cpu;
+
+ idle_injection_stop(ii_dev);
+
+ for_each_cpu(cpu, to_cpumask(ii_dev->cpumask))
+ per_cpu(idle_injection_device, cpu) = NULL;
+
+ kfree(ii_dev);
+}
+
+static struct smp_hotplug_thread idle_injection_threads = {
+ .store = &idle_injection_thread.tsk,
+ .setup = idle_injection_setup,
+ .thread_fn = idle_injection_fn,
+ .thread_comm = "idle_inject/%u",
+ .thread_should_run = idle_injection_should_run,
+};
+
+static int __init idle_injection_init(void)
+{
+ return smpboot_register_percpu_thread(&idle_injection_threads);
+}
+early_initcall(idle_injection_init);
diff --git a/include/linux/idle_injection.h b/include/linux/idle_injection.h
new file mode 100644
index 0000000..ffd20d7
--- /dev/null
+++ b/include/linux/idle_injection.h
@@ -0,0 +1,29 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2018 Linaro Ltd
+ *
+ * Author: Daniel Lezcano <daniel.lezcano@linaro.org>
+ *
+ */
+#ifndef __IDLE_INJECTION_H__
+#define __IDLE_INJECTION_H__
+
+/* private idle injection device structure */
+struct idle_injection_device;
+
+struct idle_injection_device *idle_injection_register(struct cpumask *cpumask);
+
+void idle_injection_unregister(struct idle_injection_device *ii_dev);
+
+int idle_injection_start(struct idle_injection_device *ii_dev);
+
+void idle_injection_stop(struct idle_injection_device *ii_dev);
+
+void idle_injection_set_duration(struct idle_injection_device *ii_dev,
+ unsigned int run_duration_ms,
+ unsigned int idle_duration_ms);
+
+void idle_injection_get_duration(struct idle_injection_device *ii_dev,
+ unsigned int *run_duration_ms,
+ unsigned int *idle_duration_ms);
+#endif /* __IDLE_INJECTION_H__ */
--
2.7.4
^ permalink raw reply related
* Re: [PATCH v3 16/27] docs: Fix more broken references
From: Matthias Brugger @ 2018-06-15 8:46 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Linux Doc Mailing List
Cc: linux-hwmon, devicetree, alsa-devel, linux-samsung-soc,
Jonathan Corbet, netdev, linux-pm, linux-mmc, linux-kernel,
dri-devel, Mauro Carvalho Chehab, linux-rockchip, linux-usb,
intel-wired-lan, linux-fsdevel, linux-mediatek, linux-clk,
linux-arm-kernel
In-Reply-To: <e1bf52a721005b2017434acc54ec5ddc152d6fe4.1528990947.git.mchehab+samsung@kernel.org>
On 14/06/18 18:09, Mauro Carvalho Chehab wrote:
> As we move stuff around, some doc references are broken. Fix some of
> them via this script:
> ./scripts/documentation-file-ref-check --fix
>
> Manually checked that produced results are valid.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
for mt6397.txt:
Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
> .../devicetree/bindings/clock/st/st,clkgen.txt | 8 ++++----
> .../devicetree/bindings/clock/ti/gate.txt | 2 +-
> .../devicetree/bindings/clock/ti/interface.txt | 2 +-
> .../bindings/cpufreq/cpufreq-mediatek.txt | 2 +-
> .../devicetree/bindings/devfreq/rk3399_dmc.txt | 2 +-
> .../bindings/gpu/arm,mali-midgard.txt | 2 +-
> .../bindings/gpu/arm,mali-utgard.txt | 2 +-
> .../devicetree/bindings/mfd/mt6397.txt | 2 +-
> .../devicetree/bindings/mfd/sun6i-prcm.txt | 2 +-
> .../devicetree/bindings/mmc/exynos-dw-mshc.txt | 2 +-
> .../devicetree/bindings/net/dsa/ksz.txt | 2 +-
> .../devicetree/bindings/net/dsa/mt7530.txt | 2 +-
> .../devicetree/bindings/power/fsl,imx-gpc.txt | 2 +-
> .../bindings/power/wakeup-source.txt | 2 +-
> .../devicetree/bindings/usb/rockchip,dwc3.txt | 2 +-
> Documentation/hwmon/ina2xx | 2 +-
> Documentation/maintainer/pull-requests.rst | 2 +-
> Documentation/translations/ko_KR/howto.rst | 2 +-
> MAINTAINERS | 18 +++++++++---------
> drivers/net/ethernet/intel/Kconfig | 8 ++++----
> drivers/soundwire/stream.c | 8 ++++----
> fs/Kconfig.binfmt | 2 +-
> fs/binfmt_misc.c | 2 +-
> 23 files changed, 40 insertions(+), 40 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/clock/st/st,clkgen.txt b/Documentation/devicetree/bindings/clock/st/st,clkgen.txt
> index 7364953d0d0b..45ac19bfa0a9 100644
> --- a/Documentation/devicetree/bindings/clock/st/st,clkgen.txt
> +++ b/Documentation/devicetree/bindings/clock/st/st,clkgen.txt
> @@ -31,10 +31,10 @@ This binding uses the common clock binding[1].
> Each subnode should use the binding described in [2]..[7]
>
> [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
> -[3] Documentation/devicetree/bindings/clock/st,clkgen-mux.txt
> -[4] Documentation/devicetree/bindings/clock/st,clkgen-pll.txt
> -[7] Documentation/devicetree/bindings/clock/st,quadfs.txt
> -[8] Documentation/devicetree/bindings/clock/st,flexgen.txt
> +[3] Documentation/devicetree/bindings/clock/st/st,clkgen-mux.txt
> +[4] Documentation/devicetree/bindings/clock/st/st,clkgen-pll.txt
> +[7] Documentation/devicetree/bindings/clock/st/st,quadfs.txt
> +[8] Documentation/devicetree/bindings/clock/st/st,flexgen.txt
>
>
> Required properties:
> diff --git a/Documentation/devicetree/bindings/clock/ti/gate.txt b/Documentation/devicetree/bindings/clock/ti/gate.txt
> index 03f8fdee62a7..56d603c1f716 100644
> --- a/Documentation/devicetree/bindings/clock/ti/gate.txt
> +++ b/Documentation/devicetree/bindings/clock/ti/gate.txt
> @@ -10,7 +10,7 @@ will be controlled instead and the corresponding hw-ops for
> that is used.
>
> [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
> -[2] Documentation/devicetree/bindings/clock/gate-clock.txt
> +[2] Documentation/devicetree/bindings/clock/gpio-gate-clock.txt
> [3] Documentation/devicetree/bindings/clock/ti/clockdomain.txt
>
> Required properties:
> diff --git a/Documentation/devicetree/bindings/clock/ti/interface.txt b/Documentation/devicetree/bindings/clock/ti/interface.txt
> index 3111a409fea6..3f4704040140 100644
> --- a/Documentation/devicetree/bindings/clock/ti/interface.txt
> +++ b/Documentation/devicetree/bindings/clock/ti/interface.txt
> @@ -9,7 +9,7 @@ companion clock finding (match corresponding functional gate
> clock) and hardware autoidle enable / disable.
>
> [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
> -[2] Documentation/devicetree/bindings/clock/gate-clock.txt
> +[2] Documentation/devicetree/bindings/clock/gpio-gate-clock.txt
>
> Required properties:
> - compatible : shall be one of:
> diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
> index d36f07e0a2bb..0551c78619de 100644
> --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
> +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek.txt
> @@ -8,7 +8,7 @@ Required properties:
> "intermediate" - A parent of "cpu" clock which is used as "intermediate" clock
> source (usually MAINPLL) when the original CPU PLL is under
> transition and not stable yet.
> - Please refer to Documentation/devicetree/bindings/clk/clock-bindings.txt for
> + Please refer to Documentation/devicetree/bindings/clock/clock-bindings.txt for
> generic clock consumer properties.
> - operating-points-v2: Please refer to Documentation/devicetree/bindings/opp/opp.txt
> for detail.
> diff --git a/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt b/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt
> index d6d2833482c9..fc2bcbe26b1e 100644
> --- a/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt
> +++ b/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt
> @@ -12,7 +12,7 @@ Required properties:
> - clocks: Phandles for clock specified in "clock-names" property
> - clock-names : The name of clock used by the DFI, must be
> "pclk_ddr_mon";
> -- operating-points-v2: Refer to Documentation/devicetree/bindings/power/opp.txt
> +- operating-points-v2: Refer to Documentation/devicetree/bindings/opp/opp.txt
> for details.
> - center-supply: DMC supply node.
> - status: Marks the node enabled/disabled.
> diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
> index 039219df05c5..18a2cde2e5f3 100644
> --- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
> @@ -34,7 +34,7 @@ Optional properties:
> - mali-supply : Phandle to regulator for the Mali device. Refer to
> Documentation/devicetree/bindings/regulator/regulator.txt for details.
>
> -- operating-points-v2 : Refer to Documentation/devicetree/bindings/power/opp.txt
> +- operating-points-v2 : Refer to Documentation/devicetree/bindings/opp/opp.txt
> for details.
>
>
> diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt
> index c1f65d1dac1d..63cd91176a68 100644
> --- a/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt
> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt
> @@ -44,7 +44,7 @@ Optional properties:
>
> - memory-region:
> Memory region to allocate from, as defined in
> - Documentation/devicetree/bindi/reserved-memory/reserved-memory.txt
> + Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
>
> - mali-supply:
> Phandle to regulator for the Mali device, as defined in
> diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt b/Documentation/devicetree/bindings/mfd/mt6397.txt
> index d1df77f4d655..0ebd08af777d 100644
> --- a/Documentation/devicetree/bindings/mfd/mt6397.txt
> +++ b/Documentation/devicetree/bindings/mfd/mt6397.txt
> @@ -12,7 +12,7 @@ MT6397/MT6323 is a multifunction device with the following sub modules:
> It is interfaced to host controller using SPI interface by a proprietary hardware
> called PMIC wrapper or pwrap. MT6397/MT6323 MFD is a child device of pwrap.
> See the following for pwarp node definitions:
> -Documentation/devicetree/bindings/soc/pwrap.txt
> +Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
>
> This document describes the binding for MFD device and its sub module.
>
> diff --git a/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt b/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt
> index dd2c06540485..4d21ffdb0fc1 100644
> --- a/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt
> +++ b/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt
> @@ -9,7 +9,7 @@ Required properties:
>
> The prcm node may contain several subdevices definitions:
> - see Documentation/devicetree/clk/sunxi.txt for clock devices
> - - see Documentation/devicetree/reset/allwinner,sunxi-clock-reset.txt for reset
> + - see Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt for reset
> controller devices
>
>
> diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
> index a58c173b7ab9..0419a63f73a0 100644
> --- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
> +++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
> @@ -62,7 +62,7 @@ Required properties for a slot (Deprecated - Recommend to use one slot per host)
> rest of the gpios (depending on the bus-width property) are the data lines in
> no particular order. The format of the gpio specifier depends on the gpio
> controller.
> -(Deprecated - Refer to Documentation/devicetree/binding/pinctrl/samsung-pinctrl.txt)
> +(Deprecated - Refer to Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt)
>
> Example:
>
> diff --git a/Documentation/devicetree/bindings/net/dsa/ksz.txt b/Documentation/devicetree/bindings/net/dsa/ksz.txt
> index fd23904ac68e..a700943218ca 100644
> --- a/Documentation/devicetree/bindings/net/dsa/ksz.txt
> +++ b/Documentation/devicetree/bindings/net/dsa/ksz.txt
> @@ -6,7 +6,7 @@ Required properties:
> - compatible: For external switch chips, compatible string must be exactly one
> of: "microchip,ksz9477"
>
> -See Documentation/devicetree/bindings/dsa/dsa.txt for a list of additional
> +See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional
> required and optional properties.
>
> Examples:
> diff --git a/Documentation/devicetree/bindings/net/dsa/mt7530.txt b/Documentation/devicetree/bindings/net/dsa/mt7530.txt
> index a9bc27b93ee3..aa3527f71fdc 100644
> --- a/Documentation/devicetree/bindings/net/dsa/mt7530.txt
> +++ b/Documentation/devicetree/bindings/net/dsa/mt7530.txt
> @@ -31,7 +31,7 @@ Required properties for the child nodes within ports container:
> - phy-mode: String, must be either "trgmii" or "rgmii" for port labeled
> "cpu".
>
> -See Documentation/devicetree/bindings/dsa/dsa.txt for a list of additional
> +See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional
> required, optional properties and how the integrated switch subnodes must
> be specified.
>
> diff --git a/Documentation/devicetree/bindings/power/fsl,imx-gpc.txt b/Documentation/devicetree/bindings/power/fsl,imx-gpc.txt
> index b31d6bbeee16..726ec2875223 100644
> --- a/Documentation/devicetree/bindings/power/fsl,imx-gpc.txt
> +++ b/Documentation/devicetree/bindings/power/fsl,imx-gpc.txt
> @@ -14,7 +14,7 @@ Required properties:
> datasheet
> - interrupts: Should contain one interrupt specifier for the GPC interrupt
> - clocks: Must contain an entry for each entry in clock-names.
> - See Documentation/devicetree/bindings/clocks/clock-bindings.txt for details.
> + See Documentation/devicetree/bindings/clock/clock-bindings.txt for details.
> - clock-names: Must include the following entries:
> - ipg
>
> diff --git a/Documentation/devicetree/bindings/power/wakeup-source.txt b/Documentation/devicetree/bindings/power/wakeup-source.txt
> index 5d254ab13ebf..cfd74659fbed 100644
> --- a/Documentation/devicetree/bindings/power/wakeup-source.txt
> +++ b/Documentation/devicetree/bindings/power/wakeup-source.txt
> @@ -22,7 +22,7 @@ List of legacy properties and respective binding document
> 3. "has-tpo" Documentation/devicetree/bindings/rtc/rtc-opal.txt
> 4. "linux,wakeup" Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt
> Documentation/devicetree/bindings/mfd/tc3589x.txt
> - Documentation/devicetree/bindings/input/ads7846.txt
> + Documentation/devicetree/bindings/input/touchscreen/ads7846.txt
> 5. "linux,keypad-wakeup" Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt
> 6. "linux,input-wakeup" Documentation/devicetree/bindings/input/samsung-keypad.txt
> 7. "nvidia,wakeup-source" Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt
> diff --git a/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt b/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt
> index 50a31536e975..252a05c5d976 100644
> --- a/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt
> +++ b/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt
> @@ -16,7 +16,7 @@ A child node must exist to represent the core DWC3 IP block. The name of
> the node is not important. The content of the node is defined in dwc3.txt.
>
> Phy documentation is provided in the following places:
> -Documentation/devicetree/bindings/phy/rockchip,dwc3-usb-phy.txt
> +Documentation/devicetree/bindings/phy/qcom-dwc3-usb-phy.txt
>
> Example device nodes:
>
> diff --git a/Documentation/hwmon/ina2xx b/Documentation/hwmon/ina2xx
> index cfd31d94c872..72d16f08e431 100644
> --- a/Documentation/hwmon/ina2xx
> +++ b/Documentation/hwmon/ina2xx
> @@ -53,7 +53,7 @@ bus supply voltage.
>
> The shunt value in micro-ohms can be set via platform data or device tree at
> compile-time or via the shunt_resistor attribute in sysfs at run-time. Please
> -refer to the Documentation/devicetree/bindings/i2c/ina2xx.txt for bindings
> +refer to the Documentation/devicetree/bindings/hwmon/ina2xx.txt for bindings
> if the device tree is used.
>
> Additionally ina226 supports update_interval attribute as described in
> diff --git a/Documentation/maintainer/pull-requests.rst b/Documentation/maintainer/pull-requests.rst
> index a19db3458b56..22b271de0304 100644
> --- a/Documentation/maintainer/pull-requests.rst
> +++ b/Documentation/maintainer/pull-requests.rst
> @@ -41,7 +41,7 @@ named ``char-misc-next``, you would be using the following command::
>
> that will create a signed tag called ``char-misc-4.15-rc1`` based on the
> last commit in the ``char-misc-next`` branch, and sign it with your gpg key
> -(see :ref:`Documentation/maintainer/configure_git.rst <configuregit>`).
> +(see :ref:`Documentation/maintainer/configure-git.rst <configuregit>`).
>
> Linus will only accept pull requests based on a signed tag. Other
> maintainers may differ.
> diff --git a/Documentation/translations/ko_KR/howto.rst b/Documentation/translations/ko_KR/howto.rst
> index 624654bdcd8a..a8197e072599 100644
> --- a/Documentation/translations/ko_KR/howto.rst
> +++ b/Documentation/translations/ko_KR/howto.rst
> @@ -160,7 +160,7 @@ mtk.manpages@gmail.com의 메인테이너에게 보낼 것을 권장한다.
> 독특한 행동에 관하여 흔히 있는 오해들과 혼란들을 해소하고 있기
> 때문이다.
>
> - :ref:`Documentation/process/stable_kernel_rules.rst <stable_kernel_rules>`
> + :ref:`Documentation/process/stable-kernel-rules.rst <stable_kernel_rules>`
> 이 문서는 안정적인 커널 배포가 이루어지는 규칙을 설명하고 있으며
> 여러분들이 이러한 배포들 중 하나에 변경을 하길 원한다면
> 무엇을 해야 하는지를 설명한다.
> diff --git a/MAINTAINERS b/MAINTAINERS
> index ec65e33e2cf1..5871dd5060f6 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -4513,7 +4513,7 @@ DRM DRIVER FOR ILITEK ILI9225 PANELS
> M: David Lechner <david@lechnology.com>
> S: Maintained
> F: drivers/gpu/drm/tinydrm/ili9225.c
> -F: Documentation/devicetree/bindings/display/ili9225.txt
> +F: Documentation/devicetree/bindings/display/ilitek,ili9225.txt
>
> DRM DRIVER FOR INTEL I810 VIDEO CARDS
> S: Orphan / Obsolete
> @@ -4599,13 +4599,13 @@ DRM DRIVER FOR SITRONIX ST7586 PANELS
> M: David Lechner <david@lechnology.com>
> S: Maintained
> F: drivers/gpu/drm/tinydrm/st7586.c
> -F: Documentation/devicetree/bindings/display/st7586.txt
> +F: Documentation/devicetree/bindings/display/sitronix,st7586.txt
>
> DRM DRIVER FOR SITRONIX ST7735R PANELS
> M: David Lechner <david@lechnology.com>
> S: Maintained
> F: drivers/gpu/drm/tinydrm/st7735r.c
> -F: Documentation/devicetree/bindings/display/st7735r.txt
> +F: Documentation/devicetree/bindings/display/sitronix,st7735r.txt
>
> DRM DRIVER FOR TDFX VIDEO CARDS
> S: Orphan / Obsolete
> @@ -4824,7 +4824,7 @@ M: Eric Anholt <eric@anholt.net>
> S: Supported
> F: drivers/gpu/drm/v3d/
> F: include/uapi/drm/v3d_drm.h
> -F: Documentation/devicetree/bindings/display/brcm,bcm-v3d.txt
> +F: Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
> T: git git://anongit.freedesktop.org/drm/drm-misc
>
> DRM DRIVERS FOR VC4
> @@ -5735,7 +5735,7 @@ M: Madalin Bucur <madalin.bucur@nxp.com>
> L: netdev@vger.kernel.org
> S: Maintained
> F: drivers/net/ethernet/freescale/fman
> -F: Documentation/devicetree/bindings/powerpc/fsl/fman.txt
> +F: Documentation/devicetree/bindings/net/fsl-fman.txt
>
> FREESCALE QORIQ PTP CLOCK DRIVER
> M: Yangbo Lu <yangbo.lu@nxp.com>
> @@ -8700,7 +8700,7 @@ M: Guenter Roeck <linux@roeck-us.net>
> L: linux-hwmon@vger.kernel.org
> S: Maintained
> F: Documentation/hwmon/max6697
> -F: Documentation/devicetree/bindings/i2c/max6697.txt
> +F: Documentation/devicetree/bindings/hwmon/max6697.txt
> F: drivers/hwmon/max6697.c
> F: include/linux/platform_data/max6697.h
>
> @@ -9080,7 +9080,7 @@ M: Martin Donnelly <martin.donnelly@ge.com>
> M: Martyn Welch <martyn.welch@collabora.co.uk>
> S: Maintained
> F: drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
> -F: Documentation/devicetree/bindings/video/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt
> +F: Documentation/devicetree/bindings/display/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt
>
> MEGARAID SCSI/SAS DRIVERS
> M: Kashyap Desai <kashyap.desai@broadcom.com>
> @@ -10728,7 +10728,7 @@ PARALLEL LCD/KEYPAD PANEL DRIVER
> M: Willy Tarreau <willy@haproxy.com>
> M: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
> S: Odd Fixes
> -F: Documentation/misc-devices/lcd-panel-cgram.txt
> +F: Documentation/auxdisplay/lcd-panel-cgram.txt
> F: drivers/misc/panel.c
>
> PARALLEL PORT SUBSYSTEM
> @@ -13291,7 +13291,7 @@ M: Vinod Koul <vkoul@kernel.org>
> L: alsa-devel@alsa-project.org (moderated for non-subscribers)
> T: git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
> S: Supported
> -F: Documentation/sound/alsa/compress_offload.txt
> +F: Documentation/sound/designs/compress-offload.rst
> F: include/sound/compress_driver.h
> F: include/uapi/sound/compress_*
> F: sound/core/compress_offload.c
> diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig
> index 14d287bed33c..1ab613eb5796 100644
> --- a/drivers/net/ethernet/intel/Kconfig
> +++ b/drivers/net/ethernet/intel/Kconfig
> @@ -33,7 +33,7 @@ config E100
> to identify the adapter.
>
> More specific information on configuring the driver is in
> - <file:Documentation/networking/e100.txt>.
> + <file:Documentation/networking/e100.rst>.
>
> To compile this driver as a module, choose M here. The module
> will be called e100.
> @@ -49,7 +49,7 @@ config E1000
> <http://support.intel.com>
>
> More specific information on configuring the driver is in
> - <file:Documentation/networking/e1000.txt>.
> + <file:Documentation/networking/e1000.rst>.
>
> To compile this driver as a module, choose M here. The module
> will be called e1000.
> @@ -94,7 +94,7 @@ config IGB
> <http://support.intel.com>
>
> More specific information on configuring the driver is in
> - <file:Documentation/networking/e1000.txt>.
> + <file:Documentation/networking/e1000.rst>.
>
> To compile this driver as a module, choose M here. The module
> will be called igb.
> @@ -130,7 +130,7 @@ config IGBVF
> <http://support.intel.com>
>
> More specific information on configuring the driver is in
> - <file:Documentation/networking/e1000.txt>.
> + <file:Documentation/networking/e1000.rst>.
>
> To compile this driver as a module, choose M here. The module
> will be called igbvf.
> diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
> index 8974a0fcda1b..4b5e250e8615 100644
> --- a/drivers/soundwire/stream.c
> +++ b/drivers/soundwire/stream.c
> @@ -1291,7 +1291,7 @@ static int _sdw_prepare_stream(struct sdw_stream_runtime *stream)
> *
> * @stream: Soundwire stream
> *
> - * Documentation/soundwire/stream.txt explains this API in detail
> + * Documentation/driver-api/soundwire/stream.rst explains this API in detail
> */
> int sdw_prepare_stream(struct sdw_stream_runtime *stream)
> {
> @@ -1348,7 +1348,7 @@ static int _sdw_enable_stream(struct sdw_stream_runtime *stream)
> *
> * @stream: Soundwire stream
> *
> - * Documentation/soundwire/stream.txt explains this API in detail
> + * Documentation/driver-api/soundwire/stream.rst explains this API in detail
> */
> int sdw_enable_stream(struct sdw_stream_runtime *stream)
> {
> @@ -1400,7 +1400,7 @@ static int _sdw_disable_stream(struct sdw_stream_runtime *stream)
> *
> * @stream: Soundwire stream
> *
> - * Documentation/soundwire/stream.txt explains this API in detail
> + * Documentation/driver-api/soundwire/stream.rst explains this API in detail
> */
> int sdw_disable_stream(struct sdw_stream_runtime *stream)
> {
> @@ -1456,7 +1456,7 @@ static int _sdw_deprepare_stream(struct sdw_stream_runtime *stream)
> *
> * @stream: Soundwire stream
> *
> - * Documentation/soundwire/stream.txt explains this API in detail
> + * Documentation/driver-api/soundwire/stream.rst explains this API in detail
> */
> int sdw_deprepare_stream(struct sdw_stream_runtime *stream)
> {
> diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
> index 57a27c42b5ac..56df483de619 100644
> --- a/fs/Kconfig.binfmt
> +++ b/fs/Kconfig.binfmt
> @@ -168,7 +168,7 @@ config BINFMT_MISC
> will automatically feed it to the correct interpreter.
>
> You can do other nice things, too. Read the file
> - <file:Documentation/binfmt_misc.txt> to learn how to use this
> + <file:Documentation/admin-guide/binfmt-misc.rst> to learn how to use this
> feature, <file:Documentation/admin-guide/java.rst> for information about how
> to include Java support. and <file:Documentation/admin-guide/mono.rst> for
> information about how to include Mono-based .NET support.
> diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
> index 4de191563261..4b5fff31ef27 100644
> --- a/fs/binfmt_misc.c
> +++ b/fs/binfmt_misc.c
> @@ -4,7 +4,7 @@
> * Copyright (C) 1997 Richard Günther
> *
> * binfmt_misc detects binaries via a magic or filename extension and invokes
> - * a specified wrapper. See Documentation/binfmt_misc.txt for more details.
> + * a specified wrapper. See Documentation/admin-guide/binfmt-misc.rst for more details.
> */
>
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply
* Re: [PATCH V6] powercap/drivers/idle_injection: Add an idle injection framework
From: Daniel Lezcano @ 2018-06-15 8:13 UTC (permalink / raw)
To: Peter Zijlstra
Cc: viresh.kumar, rjw, linux-kernel, linux-pm, Eduardo Valentin,
Javi Merino, Leo Yan, Kevin Wangtao, Vincent Guittot, Rui Zhang,
Daniel Thompson, Andrea Parri
In-Reply-To: <20180612173514.GV12217@hirez.programming.kicks-ass.net>
On 12/06/2018 19:35, Peter Zijlstra wrote:
[ ... ]
>>>> Yes, drifting is not an issue if that happens. This scheme is simpler
>>>> and safer than setting the timer ahead before waking up the tasks with
>>>> the risk it expires before all the tasks ended their idle cycles.
>>>
>>> sloppy though..
>>
>> Ok, do you prefer to see the timer set in the wakeup function and thus
>> having a periodic tick for the idle injection ?
>
> I think having a HRTIMER_RESTART handler that does hrtimer_forward() is
> the most sensible. You will end up having to deal with threads not being
> ready, but I think that's not a real problem.
Thanks for the restartable timer suggestion. I'm finishing polishing the
code and definitively the result is much more nicer.
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply
* Re: [PATCH] cpufreq: kryo: Fix possible error code dereference
From: Viresh Kumar @ 2018-06-15 2:46 UTC (permalink / raw)
To: ilia.lin
Cc: Ilia Lin, Rafael J . Wysocki, Dan Carpenter, linux-pm,
linux-kernel
In-Reply-To: <20180614202921.32535-1-ilia.lin@gmail.com>
On 14-06-18, 22:29, ilia.lin@gmail.com wrote:
> From: Ilia Lin <ilia.lin@gmail.com>
>
> In event of error returned by the nvmem_cell_read() non-pointer value
> may be dereferenced. Fix this with error handling.
>
> Signed-off-by: Ilia Lin <ilia.lin@gmail.com>
Fixes tag ?
> ---
> drivers/cpufreq/qcom-cpufreq-kryo.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/cpufreq/qcom-cpufreq-kryo.c b/drivers/cpufreq/qcom-cpufreq-kryo.c
> index d049fe4b80c4..5e9511223ce9 100644
> --- a/drivers/cpufreq/qcom-cpufreq-kryo.c
> +++ b/drivers/cpufreq/qcom-cpufreq-kryo.c
> @@ -115,6 +115,8 @@ static int qcom_cpufreq_kryo_probe(struct platform_device *pdev)
>
> speedbin = nvmem_cell_read(speedbin_nvmem, &len);
> nvmem_cell_put(speedbin_nvmem);
> + if (IS_ERR(speedbin))
> + return PTR_ERR(speedbin);
>
> switch (msm8996_version) {
> case MSM8996_V3:
> --
> 2.11.0
--
viresh
^ permalink raw reply
* Re: [PATCH v2] cpufreq: kryo: Add module remove and exit
From: Viresh Kumar @ 2018-06-15 2:45 UTC (permalink / raw)
To: ilia.lin
Cc: Ilia Lin, Rafael J . Wysocki, Arnd Bergmann, linux-pm,
linux-kernel
In-Reply-To: <20180614204212.2028-1-ilia.lin@gmail.com>
On 14-06-18, 22:42, ilia.lin@gmail.com wrote:
> From: Ilia Lin <ilia.lin@gmail.com>
>
> Add device remove and module exit code to make the driver
> functioning as a loadable module.
>
> Fixes: ac28927659be (cpufreq: kryo: allow building as a loadable module)
> Signed-off-by: Ilia Lin <ilia.lin@gmail.com>
> ---
> drivers/cpufreq/qcom-cpufreq-kryo.c | 23 ++++++++++++++++++++---
> 1 file changed, 20 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/cpufreq/qcom-cpufreq-kryo.c b/drivers/cpufreq/qcom-cpufreq-kryo.c
> index 5e9511223ce9..01bddacf5c3b 100644
> --- a/drivers/cpufreq/qcom-cpufreq-kryo.c
> +++ b/drivers/cpufreq/qcom-cpufreq-kryo.c
> @@ -42,6 +42,8 @@ enum _msm8996_version {
> NUM_OF_MSM8996_VERSIONS,
> };
>
> +struct platform_device *cpufreq_dt_pdev, *kryo_cpufreq_pdev;
> +
> static enum _msm8996_version __init qcom_cpufreq_kryo_get_msm_id(void)
> {
> size_t len;
> @@ -74,7 +76,6 @@ static enum _msm8996_version __init qcom_cpufreq_kryo_get_msm_id(void)
> static int qcom_cpufreq_kryo_probe(struct platform_device *pdev)
> {
> struct opp_table *opp_tables[NR_CPUS] = {0};
> - struct platform_device *cpufreq_dt_pdev;
> enum _msm8996_version msm8996_version;
> struct nvmem_cell *speedbin_nvmem;
> struct device_node *np;
> @@ -129,6 +130,7 @@ static int qcom_cpufreq_kryo_probe(struct platform_device *pdev)
> BUG();
> break;
> }
> + kfree(speedbin);
Again, stuff like this can't go in this patch itself. It is a separate
bug fix and you should send it with a matching fixes tag separately.
>
> for_each_possible_cpu(cpu) {
> cpu_dev = get_cpu_device(cpu);
> @@ -164,8 +166,15 @@ static int qcom_cpufreq_kryo_probe(struct platform_device *pdev)
> return ret;
> }
>
> +static int qcom_cpufreq_kryo_remove(struct platform_device *pdev)
> +{
> + platform_device_unregister(cpufreq_dt_pdev);
> + return 0;
> +}
> +
> static struct platform_driver qcom_cpufreq_kryo_driver = {
> .probe = qcom_cpufreq_kryo_probe,
> + .remove = qcom_cpufreq_kryo_remove,
> .driver = {
> .name = "qcom-cpufreq-kryo",
> },
> @@ -200,8 +209,9 @@ static int __init qcom_cpufreq_kryo_init(void)
> if (unlikely(ret < 0))
> return ret;
>
> - ret = PTR_ERR_OR_ZERO(platform_device_register_simple(
> - "qcom-cpufreq-kryo", -1, NULL, 0));
> + kryo_cpufreq_pdev = platform_device_register_simple(
> + "qcom-cpufreq-kryo", -1, NULL, 0);
> + ret = PTR_ERR_OR_ZERO(kryo_cpufreq_pdev);
> if (0 == ret)
> return 0;
>
> @@ -210,5 +220,12 @@ static int __init qcom_cpufreq_kryo_init(void)
> }
> module_init(qcom_cpufreq_kryo_init);
>
> +static void __init qcom_cpufreq_kryo_exit(void)
> +{
> + platform_device_unregister(kryo_cpufreq_pdev);
> + platform_driver_unregister(&qcom_cpufreq_kryo_driver);
> +}
> +module_exit(qcom_cpufreq_kryo_exit);
> +
> MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Kryo CPUfreq driver");
> MODULE_LICENSE("GPL v2");
> --
> 2.11.0
--
viresh
^ permalink raw reply
* [PATCH v2] cpufreq: kryo: Add module remove and exit
From: ilia.lin @ 2018-06-14 20:42 UTC (permalink / raw)
To: Ilia Lin, Ilia Lin, Rafael J . Wysocki, Viresh Kumar
Cc: Arnd Bergmann, linux-pm, linux-kernel
In-Reply-To: <20180607205827.1588-1-ilia.lin@gmail.com>
From: Ilia Lin <ilia.lin@gmail.com>
Add device remove and module exit code to make the driver
functioning as a loadable module.
Fixes: ac28927659be (cpufreq: kryo: allow building as a loadable module)
Signed-off-by: Ilia Lin <ilia.lin@gmail.com>
---
drivers/cpufreq/qcom-cpufreq-kryo.c | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/drivers/cpufreq/qcom-cpufreq-kryo.c b/drivers/cpufreq/qcom-cpufreq-kryo.c
index 5e9511223ce9..01bddacf5c3b 100644
--- a/drivers/cpufreq/qcom-cpufreq-kryo.c
+++ b/drivers/cpufreq/qcom-cpufreq-kryo.c
@@ -42,6 +42,8 @@ enum _msm8996_version {
NUM_OF_MSM8996_VERSIONS,
};
+struct platform_device *cpufreq_dt_pdev, *kryo_cpufreq_pdev;
+
static enum _msm8996_version __init qcom_cpufreq_kryo_get_msm_id(void)
{
size_t len;
@@ -74,7 +76,6 @@ static enum _msm8996_version __init qcom_cpufreq_kryo_get_msm_id(void)
static int qcom_cpufreq_kryo_probe(struct platform_device *pdev)
{
struct opp_table *opp_tables[NR_CPUS] = {0};
- struct platform_device *cpufreq_dt_pdev;
enum _msm8996_version msm8996_version;
struct nvmem_cell *speedbin_nvmem;
struct device_node *np;
@@ -129,6 +130,7 @@ static int qcom_cpufreq_kryo_probe(struct platform_device *pdev)
BUG();
break;
}
+ kfree(speedbin);
for_each_possible_cpu(cpu) {
cpu_dev = get_cpu_device(cpu);
@@ -164,8 +166,15 @@ static int qcom_cpufreq_kryo_probe(struct platform_device *pdev)
return ret;
}
+static int qcom_cpufreq_kryo_remove(struct platform_device *pdev)
+{
+ platform_device_unregister(cpufreq_dt_pdev);
+ return 0;
+}
+
static struct platform_driver qcom_cpufreq_kryo_driver = {
.probe = qcom_cpufreq_kryo_probe,
+ .remove = qcom_cpufreq_kryo_remove,
.driver = {
.name = "qcom-cpufreq-kryo",
},
@@ -200,8 +209,9 @@ static int __init qcom_cpufreq_kryo_init(void)
if (unlikely(ret < 0))
return ret;
- ret = PTR_ERR_OR_ZERO(platform_device_register_simple(
- "qcom-cpufreq-kryo", -1, NULL, 0));
+ kryo_cpufreq_pdev = platform_device_register_simple(
+ "qcom-cpufreq-kryo", -1, NULL, 0);
+ ret = PTR_ERR_OR_ZERO(kryo_cpufreq_pdev);
if (0 == ret)
return 0;
@@ -210,5 +220,12 @@ static int __init qcom_cpufreq_kryo_init(void)
}
module_init(qcom_cpufreq_kryo_init);
+static void __init qcom_cpufreq_kryo_exit(void)
+{
+ platform_device_unregister(kryo_cpufreq_pdev);
+ platform_driver_unregister(&qcom_cpufreq_kryo_driver);
+}
+module_exit(qcom_cpufreq_kryo_exit);
+
MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Kryo CPUfreq driver");
MODULE_LICENSE("GPL v2");
--
2.11.0
^ permalink raw reply related
* [PATCH] cpufreq: kryo: Fix possible error code dereference
From: ilia.lin @ 2018-06-14 20:29 UTC (permalink / raw)
To: Ilia Lin, Ilia Lin, Rafael J . Wysocki, Viresh Kumar
Cc: Dan Carpenter, linux-pm, linux-kernel
From: Ilia Lin <ilia.lin@gmail.com>
In event of error returned by the nvmem_cell_read() non-pointer value
may be dereferenced. Fix this with error handling.
Signed-off-by: Ilia Lin <ilia.lin@gmail.com>
---
drivers/cpufreq/qcom-cpufreq-kryo.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/cpufreq/qcom-cpufreq-kryo.c b/drivers/cpufreq/qcom-cpufreq-kryo.c
index d049fe4b80c4..5e9511223ce9 100644
--- a/drivers/cpufreq/qcom-cpufreq-kryo.c
+++ b/drivers/cpufreq/qcom-cpufreq-kryo.c
@@ -115,6 +115,8 @@ static int qcom_cpufreq_kryo_probe(struct platform_device *pdev)
speedbin = nvmem_cell_read(speedbin_nvmem, &len);
nvmem_cell_put(speedbin_nvmem);
+ if (IS_ERR(speedbin))
+ return PTR_ERR(speedbin);
switch (msm8996_version) {
case MSM8996_V3:
--
2.11.0
^ permalink raw reply related
* Re: [RFC PATCH 12/12] PM / hibernate: update the resume offset on SNAPSHOT_SET_SWAP_AREA
From: Besogonov, Aleksei @ 2018-06-14 19:50 UTC (permalink / raw)
To: Pavel Machek, Agarwal, Anchal
Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
x86@kernel.org, boris.ostrovsky@oracle.com,
konrad.wilk@oracle.com, roger.pau@citrix.com,
netdev@vger.kernel.org, jgross@suse.com,
xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
Kamata, Munehisa, van der Linden, Frank, Vaidyeshwara, Vallish,
Anbalagane, Guru, Valentin, Eduardo, rjw@rjwysocki.net
In-Reply-To: <20180614194515.GE17808@amd>
(sorry for top-posting)
Well, not completely broken. It just required a restart for the offset setting to take an effect.
On 6/14/18, 12:46, "Pavel Machek" <pavel@ucw.cz> wrote:
Hi!
> From: Aleksei Besogonov <cyberax@amazon.com>
>
> The SNAPSHOT_SET_SWAP_AREA is supposed to be used to set the hibernation
> offset on a running kernel to enable hibernating to a swap file.
> However, it doesn't actually update the swsusp_resume_block variable. As
> a result, the hibernation fails at the last step (after all the data is
> written out) in the validation of the swap signature in
> mark_swapfiles().
>
> Before this patch, the command line processing was the only place where
> swsusp_resume_block was set.
Are you saying that suspend-to-file was broken, even on
non-virtualized systems?
If so, we may this to go in first...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply
* [PATCH v3 12/12] mfd: cros_ec: Add throttler sub-device
From: Matthias Kaehlcke @ 2018-06-14 19:47 UTC (permalink / raw)
To: MyungJoo Ham
Cc: Kyungmin Park, Chanwoo Choi, Arnd Bergmann, Greg Kroah-Hartman,
Rob Herring, Mark Rutland, linux-pm, devicetree, linux-kernel,
Brian Norris, Douglas Anderson, Enric Balletbo i Serra,
Rafael J . Wysocki, Viresh Kumar, Lee Jones, Matthias Kaehlcke
In-Reply-To: <20180614194712.102134-1-mka@chromium.org>
Instantiate the CrOS EC throttler if it is enabled in the kernel
configuration.
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
Changes in v3:
- patch added to series
drivers/mfd/cros_ec.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c
index 36156a41499c..5f52b6e2c21a 100644
--- a/drivers/mfd/cros_ec.c
+++ b/drivers/mfd/cros_ec.c
@@ -91,6 +91,10 @@ static int cros_ec_sleep_event(struct cros_ec_device *ec_dev, u8 sleep_event)
return cros_ec_cmd_xfer(ec_dev, &buf.msg);
}
+static const struct mfd_cell ec_throttler_cell = {
+ .name = "cros-ec-throttler",
+};
+
int cros_ec_register(struct cros_ec_device *ec_dev)
{
struct device *dev = ec_dev->dev;
@@ -153,6 +157,18 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
}
}
+ if (IS_ENABLED(CONFIG_CROS_EC_THROTTLER)) {
+ err = mfd_add_devices(ec_dev->dev, PLATFORM_DEVID_AUTO,
+ &ec_throttler_cell, 1, NULL, ec_dev->irq,
+ NULL);
+ if (err) {
+ dev_err(dev,
+ "Failed to register throttler subdevice %d\n",
+ err);
+ return err;
+ }
+ }
+
if (IS_ENABLED(CONFIG_OF) && dev->of_node) {
err = devm_of_platform_populate(dev);
if (err) {
--
2.18.0.rc1.242.g61856ae69a-goog
^ permalink raw reply related
* [PATCH v3 11/12] misc: throttler: Add Chrome OS EC throttler
From: Matthias Kaehlcke @ 2018-06-14 19:47 UTC (permalink / raw)
To: MyungJoo Ham
Cc: Kyungmin Park, Chanwoo Choi, Arnd Bergmann, Greg Kroah-Hartman,
Rob Herring, Mark Rutland, linux-pm, devicetree, linux-kernel,
Brian Norris, Douglas Anderson, Enric Balletbo i Serra,
Rafael J . Wysocki, Viresh Kumar, Lee Jones, Matthias Kaehlcke
In-Reply-To: <20180614194712.102134-1-mka@chromium.org>
The driver subscribes to throttling events from the Chrome OS
embedded controller and enables/disables system throttling based
on these events.
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
Changes in v3:
- change module license to GPL v2 as in the SPDX identifier
- don't instantiate the throttler through the DT (instantiation
by CrOS EC MFD in a separate patch)
Changes in v2:
- added SPDX line instead of license boiler-plate
- use macro to avoid splitting line
- changed variable name for throttler from 'cte' to 'ce_thr'
- formatting fixes
- Kconfig: removed odd dashes around 'help'
- added 'Reviewed-by' tag
drivers/misc/throttler/Kconfig | 10 ++
drivers/misc/throttler/Makefile | 1 +
drivers/misc/throttler/cros_ec_throttler.c | 109 +++++++++++++++++++++
3 files changed, 120 insertions(+)
create mode 100644 drivers/misc/throttler/cros_ec_throttler.c
diff --git a/drivers/misc/throttler/Kconfig b/drivers/misc/throttler/Kconfig
index 8b2e63b2ef48..ef984c96f67b 100644
--- a/drivers/misc/throttler/Kconfig
+++ b/drivers/misc/throttler/Kconfig
@@ -20,4 +20,14 @@ menuconfig THROTTLER_DEBUG
Choose N unless you want to debug throttler drivers.
+config CROS_EC_THROTTLER
+ tristate "Throttler event monitor for the Chrome OS Embedded Controller"
+ depends on MFD_CROS_EC
+ help
+ This driver adds support to throttle the system in reaction to
+ Chrome OS EC events.
+
+ To compile this driver as a module, choose M here: the
+ module will be called cros_ec_throttler.
+
endif # THROTTLER
diff --git a/drivers/misc/throttler/Makefile b/drivers/misc/throttler/Makefile
index c8d920cee315..d9b2a77dabc9 100644
--- a/drivers/misc/throttler/Makefile
+++ b/drivers/misc/throttler/Makefile
@@ -1 +1,2 @@
obj-$(CONFIG_THROTTLER) += core.o
+obj-$(CONFIG_CROS_EC_THROTTLER) += cros_ec_throttler.o
diff --git a/drivers/misc/throttler/cros_ec_throttler.c b/drivers/misc/throttler/cros_ec_throttler.c
new file mode 100644
index 000000000000..f1e9fc0a6284
--- /dev/null
+++ b/drivers/misc/throttler/cros_ec_throttler.c
@@ -0,0 +1,109 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Driver for throttling triggered by events from the Chrome OS Embedded
+ * Controller.
+ *
+ * Copyright (C) 2018 Google, Inc.
+ */
+
+#include <linux/kernel.h>
+#include <linux/mfd/cros_ec.h>
+#include <linux/module.h>
+#include <linux/notifier.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
+#include <linux/platform_device.h>
+#include <linux/throttler.h>
+
+#define nb_to_ce_thr(nb) container_of(nb, struct cros_ec_throttler, nb)
+
+struct cros_ec_throttler {
+ struct cros_ec_device *ec;
+ struct throttler *throttler;
+ struct notifier_block nb;
+};
+
+static int cros_ec_throttler_event(struct notifier_block *nb,
+ unsigned long queued_during_suspend, void *_notify)
+{
+ struct cros_ec_throttler *ce_thr = nb_to_ce_thr(nb);
+ u32 host_event;
+
+ host_event = cros_ec_get_host_event(ce_thr->ec);
+ if (host_event & EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_START)) {
+ throttler_set_level(ce_thr->throttler, 1);
+
+ return NOTIFY_OK;
+ } else if (host_event &
+ EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_STOP)) {
+ throttler_set_level(ce_thr->throttler, 0);
+
+ return NOTIFY_OK;
+ }
+
+ return NOTIFY_DONE;
+}
+
+static int cros_ec_throttler_probe(struct platform_device *pdev)
+{
+ struct cros_ec_throttler *ce_thr;
+ struct device *dev = &pdev->dev;
+ int ret;
+
+ ce_thr = devm_kzalloc(dev, sizeof(*ce_thr), GFP_KERNEL);
+ if (!ce_thr)
+ return -ENOMEM;
+
+ ce_thr->ec = dev_get_drvdata(pdev->dev.parent);
+
+ /*
+ * The core code uses the DT node of the throttler to identify its
+ * throttling devices and rates. The CrOS EC throttler is a sub-device
+ * of the CrOS EC MFD device and doesn't have its own device node. Use
+ * the node of the MFD device instead.
+ */
+ dev->of_node = dev->parent->of_node;
+
+ ce_thr->throttler = throttler_setup(dev);
+ if (IS_ERR(ce_thr->throttler))
+ return PTR_ERR(ce_thr->throttler);
+
+ dev_set_drvdata(dev, ce_thr);
+
+ ce_thr->nb.notifier_call = cros_ec_throttler_event;
+ ret = blocking_notifier_chain_register(&ce_thr->ec->event_notifier,
+ &ce_thr->nb);
+ if (ret < 0) {
+ dev_err(dev, "failed to register notifier\n");
+ throttler_teardown(ce_thr->throttler);
+ return ret;
+ }
+
+ return 0;
+}
+
+static int cros_ec_throttler_remove(struct platform_device *pdev)
+{
+ struct cros_ec_throttler *ce_thr = platform_get_drvdata(pdev);
+
+ blocking_notifier_chain_unregister(&ce_thr->ec->event_notifier,
+ &ce_thr->nb);
+
+ throttler_teardown(ce_thr->throttler);
+
+ return 0;
+}
+
+static struct platform_driver cros_ec_throttler_driver = {
+ .driver = {
+ .name = "cros-ec-throttler",
+ },
+ .probe = cros_ec_throttler_probe,
+ .remove = cros_ec_throttler_remove,
+};
+
+module_platform_driver(cros_ec_throttler_driver);
+
+MODULE_LICENSE("GPL v2");
+MODULE_AUTHOR("Matthias Kaehlcke <mka@chromium.org>");
+MODULE_DESCRIPTION("Chrome OS EC Throttler");
--
2.18.0.rc1.242.g61856ae69a-goog
^ permalink raw reply related
* [PATCH v3 10/12] misc: throttler: Add core support for non-thermal throttling
From: Matthias Kaehlcke @ 2018-06-14 19:47 UTC (permalink / raw)
To: MyungJoo Ham
Cc: Kyungmin Park, Chanwoo Choi, Arnd Bergmann, Greg Kroah-Hartman,
Rob Herring, Mark Rutland, linux-pm, devicetree, linux-kernel,
Brian Norris, Douglas Anderson, Enric Balletbo i Serra,
Rafael J . Wysocki, Viresh Kumar, Lee Jones, Matthias Kaehlcke
In-Reply-To: <20180614194712.102134-1-mka@chromium.org>
The purpose of the throttler is to provide support for non-thermal
throttling. Throttling is triggered by external event, e.g. the
detection of a high battery discharge current, close to the OCP limit
of the battery. The throttler is only in charge of the throttling, not
the monitoring, which is done by another (possibly platform specific)
driver.
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
Changes in v3:
- Kconfig: don't select CPU_FREQ and PM_DEVFREQ
- added CONFIG_THROTTLER_DEBUG option
- changed 'level' sysfs attribute to debugfs
- introduced thr_<level> macros for logging
- added debug logs
- added field clamp_freq to struct cpufreq_thrdev and devfreq_thrdev
to keep track of the current frequency limits and avoid spammy logs
Changes in v2:
- completely reworked the driver to support configuration through OPPs, which
requires a more dynamic handling
- added sysfs attribute to set the level for debugging and testing
- Makefile: depend on Kconfig option to traverse throttler directory
- Kconfig: removed 'default n'
- added SPDX line instead of license boiler-plate
- added entry to MAINTAINERS file
MAINTAINERS | 7 +
drivers/misc/Kconfig | 1 +
drivers/misc/Makefile | 1 +
drivers/misc/throttler/Kconfig | 23 ++
drivers/misc/throttler/Makefile | 1 +
drivers/misc/throttler/core.c | 687 ++++++++++++++++++++++++++++++++
include/linux/throttler.h | 21 +
7 files changed, 741 insertions(+)
create mode 100644 drivers/misc/throttler/Kconfig
create mode 100644 drivers/misc/throttler/Makefile
create mode 100644 drivers/misc/throttler/core.c
create mode 100644 include/linux/throttler.h
diff --git a/MAINTAINERS b/MAINTAINERS
index dc241b04d1bd..db359af7cb1c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14090,6 +14090,13 @@ T: git git://linuxtv.org/mhadli/v4l-dvb-davinci_devices.git
S: Maintained
F: drivers/media/platform/am437x/
+THROTTLER DRIVERS
+M: Matthias Kaehlcke <mka@chromium.org>
+L: linux-pm@vger.kernel.org
+S: Maintained
+F: drivers/misc/throttler/
+F: include/linux/throttler.h
+
TI BANDGAP AND THERMAL DRIVER
M: Eduardo Valentin <edubezval@gmail.com>
M: Keerthy <j-keerthy@ti.com>
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 3726eacdf65d..717fa3bd0e09 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -527,4 +527,5 @@ source "drivers/misc/echo/Kconfig"
source "drivers/misc/cxl/Kconfig"
source "drivers/misc/ocxl/Kconfig"
source "drivers/misc/cardreader/Kconfig"
+source "drivers/misc/throttler/Kconfig"
endmenu
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index af22bbc3d00c..0f4ecc6a7532 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -58,3 +58,4 @@ obj-$(CONFIG_ASPEED_LPC_SNOOP) += aspeed-lpc-snoop.o
obj-$(CONFIG_PCI_ENDPOINT_TEST) += pci_endpoint_test.o
obj-$(CONFIG_OCXL) += ocxl/
obj-$(CONFIG_MISC_RTSX) += cardreader/
+obj-$(CONFIG_THROTTLER) += throttler/
diff --git a/drivers/misc/throttler/Kconfig b/drivers/misc/throttler/Kconfig
new file mode 100644
index 000000000000..8b2e63b2ef48
--- /dev/null
+++ b/drivers/misc/throttler/Kconfig
@@ -0,0 +1,23 @@
+# SPDX-License-Identifier: GPL-2.0
+
+menuconfig THROTTLER
+ bool "Throttler support"
+ depends on OF
+ help
+ This option enables core support for non-thermal throttling of CPUs
+ and devfreq devices.
+
+ Note that you also need a event monitor module usually called
+ *_throttler.
+
+if THROTTLER
+
+menuconfig THROTTLER_DEBUG
+ bool "Enable throttler debugging"
+ help
+ This option enables throttler debugging features like additional
+ logging and a debugfs attribute for setting the logging level.
+
+ Choose N unless you want to debug throttler drivers.
+
+endif # THROTTLER
diff --git a/drivers/misc/throttler/Makefile b/drivers/misc/throttler/Makefile
new file mode 100644
index 000000000000..c8d920cee315
--- /dev/null
+++ b/drivers/misc/throttler/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_THROTTLER) += core.o
diff --git a/drivers/misc/throttler/core.c b/drivers/misc/throttler/core.c
new file mode 100644
index 000000000000..52350d846654
--- /dev/null
+++ b/drivers/misc/throttler/core.c
@@ -0,0 +1,687 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Core code for non-thermal throttling
+ *
+ * Copyright (C) 2018 Google, Inc.
+ */
+
+#include <linux/cpu.h>
+#include <linux/cpufreq.h>
+#include <linux/cpumask.h>
+#include <linux/debugfs.h>
+#include <linux/devfreq.h>
+#include <linux/kernel.h>
+#include <linux/list.h>
+#include <linux/mutex.h>
+#include <linux/notifier.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/pm_opp.h>
+#include <linux/slab.h>
+#include <linux/sort.h>
+#include <linux/throttler.h>
+
+/*
+ * Non-thermal throttling: throttling of system components in response to
+ * external events (e.g. high battery discharge current).
+ *
+ * The throttler supports throttling through cpufreq and devfreq. Multiple
+ * levels of throttling can be configured. At level 0 no throttling is
+ * active on behalf of the throttler, for values > 0 throttling is typically
+ * configured to be increasingly aggressive with each level.
+ * The number of throttling levels is not limited by the throttler (though
+ * it is likely limited by the throttling devices). It is not necessary to
+ * configure the same number of levels for all throttling devices. If the
+ * requested throttling level for a device is higher than the maximum level
+ * of the device the throttler will select the maximum throttling level of
+ * the device.
+ *
+ * Non-thermal throttling is split in two parts:
+ *
+ * - throttler core
+ * - parses the thermal policy
+ * - applies throttling settings for a requested level of throttling
+ *
+ * - event monitor driver
+ * - monitors events that trigger throttling
+ * - determines the throttling level (often limited to on/off)
+ * - asks throttler core to apply throttling settings
+ *
+ * It is possible for a system to have more than one throttler and the
+ * throttlers may make use of the same throttling devices, in case of
+ * conflicting settings for a device the more aggressive values will be
+ * applied.
+ *
+ */
+
+#define ci_to_throttler(ci) \
+ container_of(ci, struct throttler, devfreq.class_iface)
+
+struct thr_freq_table {
+ uint32_t *freqs;
+ int n_entries;
+};
+
+struct cpufreq_thrdev {
+ uint32_t cpu;
+ struct thr_freq_table freq_table;
+ uint32_t clamp_freq;
+ struct list_head node;
+};
+
+struct devfreq_thrdev {
+ struct devfreq *devfreq;
+ struct thr_freq_table freq_table;
+ uint32_t clamp_freq;
+ struct throttler *thr;
+ struct notifier_block nb;
+ struct list_head node;
+};
+
+struct __thr_cpufreq {
+ struct list_head list;
+ cpumask_t cm_initialized;
+ cpumask_t cm_ignore;
+ struct notifier_block nb;
+};
+
+struct __thr_devfreq {
+ struct list_head list;
+ struct class_interface class_iface;
+};
+
+struct __thr_debugfs {
+ struct dentry *dir;
+ struct dentry *attr_level;
+};
+
+struct throttler {
+ struct device *dev;
+ int level;
+ struct __thr_cpufreq cpufreq;
+ struct __thr_devfreq devfreq;
+ struct mutex lock;
+#ifdef CONFIG_THROTTLER_DEBUG
+ struct __thr_debugfs debugfs;
+#endif
+};
+
+static inline int cmp_freqs(const void *a, const void *b)
+{
+ const uint32_t *pa = a, *pb = b;
+
+ if (*pa < *pb)
+ return 1;
+ else if (*pa > *pb)
+ return -1;
+
+ return 0;
+}
+
+static int thr_handle_devfreq_event(struct notifier_block *nb,
+ unsigned long event, void *data);
+
+static unsigned long thr_get_throttling_freq(struct thr_freq_table *ft,
+ int level)
+{
+ if (level == 0) {
+ WARN(true, "level == 0");
+ return ULONG_MAX;
+ }
+
+ if (level <= ft->n_entries)
+ return ft->freqs[level - 1];
+ else
+ return ft->freqs[ft->n_entries - 1];
+}
+
+static int thr_init_freq_table(struct throttler *thr, struct device *opp_dev,
+ struct thr_freq_table *ft)
+{
+ struct device_node *np_opp_desc, *np_opp;
+ int nchilds;
+ uint32_t *freqs;
+ int nfreqs = 0;
+ int err = 0;
+
+ np_opp_desc = dev_pm_opp_of_get_opp_desc_node(opp_dev);
+ if (!np_opp_desc)
+ return -EINVAL;
+
+ nchilds = of_get_child_count(np_opp_desc);
+ if (!nchilds) {
+ err = -EINVAL;
+ goto out_node_put;
+ }
+
+ freqs = kzalloc(nchilds * sizeof(uint32_t), GFP_KERNEL);
+ if (!freqs) {
+ err = -ENOMEM;
+ goto out_node_put;
+ }
+
+ /* determine which OPPs are used by this throttler (if any) */
+ for_each_child_of_node(np_opp_desc, np_opp) {
+ int num_thr;
+ int i;
+
+ num_thr = of_property_count_u32_elems(np_opp, "opp-throttlers");
+ if (num_thr < 0)
+ continue;
+
+ for (i = 0; i < num_thr; i++) {
+ struct device_node *np_thr;
+
+ np_thr = of_parse_phandle(np_opp, "opp-throttlers", i);
+ if (!np_thr) {
+ thr_err(thr,
+ "failed to parse phandle %d: %s\n", i,
+ np_opp->full_name);
+ continue;
+ }
+
+ if (thr->dev->of_node == np_thr) {
+ u64 rate;
+
+ err = of_property_read_u64(np_opp, "opp-hz",
+ &rate);
+ if (!err) {
+ freqs[nfreqs] = rate;
+ nfreqs++;
+
+ thr_dbg(thr,
+ "OPP %s (%llu MHz) is used for throttling\n",
+ np_opp->full_name,
+ rate / 1000000);
+
+ } else {
+ thr_err(thr, "opp-hz not found: %s\n",
+ np_opp->full_name);
+ }
+ }
+
+ of_node_put(np_thr);
+ }
+ }
+
+ if (nfreqs > 0) {
+ /* sort frequencies in descending order */
+ sort(freqs, nfreqs, sizeof(*freqs), cmp_freqs, NULL);
+
+ ft->n_entries = nfreqs;
+ ft->freqs = devm_kzalloc(thr->dev,
+ nfreqs * sizeof(*freqs), GFP_KERNEL);
+ if (!ft->freqs) {
+ err = -ENOMEM;
+ goto out_free;
+ }
+
+ memcpy(ft->freqs, freqs, nfreqs * sizeof(*freqs));
+ } else {
+ err = -ENODEV;
+ }
+
+out_free:
+ kfree(freqs);
+
+out_node_put:
+ of_node_put(np_opp_desc);
+
+ return err;
+}
+
+static void thr_cpufreq_init(struct throttler *thr, int cpu)
+{
+ struct device *cpu_dev;
+ struct thr_freq_table ft;
+ struct cpufreq_thrdev *cpufreq_dev;
+ int err;
+
+ WARN_ON(!mutex_is_locked(&thr->lock));
+
+ cpu_dev = get_cpu_device(cpu);
+ if (!cpu_dev) {
+ dev_err_ratelimited(thr->dev, "failed to get CPU %d\n", cpu);
+ return;
+ }
+
+ err = thr_init_freq_table(thr, cpu_dev, &ft);
+ if (err) {
+ /* CPU is not throttled or initialization failed */
+ if (err != -ENODEV)
+ thr_err(thr, "failed to initialize CPU %d: %d", cpu,
+ err);
+
+ cpumask_set_cpu(cpu, &thr->cpufreq.cm_ignore);
+ return;
+ }
+
+ cpufreq_dev = devm_kzalloc(thr->dev, sizeof(*cpufreq_dev), GFP_KERNEL);
+ if (!cpufreq_dev) {
+ thr_err(thr, "%s: out of memory\n", __func__);
+ return;
+ }
+
+ cpufreq_dev->cpu = cpu;
+ memcpy(&cpufreq_dev->freq_table, &ft, sizeof(ft));
+ list_add_tail(&cpufreq_dev->node, &thr->cpufreq.list);
+
+ cpumask_set_cpu(cpu, &thr->cpufreq.cm_initialized);
+}
+
+static void thr_devfreq_init(struct device *dev, void *data)
+{
+ struct throttler *thr = data;
+ struct thr_freq_table ft;
+ struct devfreq_thrdev *dftd;
+ int err;
+
+ WARN_ON(!mutex_is_locked(&thr->lock));
+
+ err = thr_init_freq_table(thr, dev->parent, &ft);
+ if (err) {
+ if (err == -ENODEV)
+ return;
+
+ thr_err(thr, "failed to init frequency table of device %s: %d",
+ dev_name(dev), err);
+ return;
+ }
+
+ dftd = devm_kzalloc(thr->dev, sizeof(*dftd), GFP_KERNEL);
+ if (!dftd) {
+ thr_err(thr, "%s: out of memory\n", __func__);
+ return;
+ }
+
+ dftd->thr = thr;
+ dftd->devfreq = container_of(dev, struct devfreq, dev);
+ memcpy(&dftd->freq_table, &ft, sizeof(ft));
+
+ dftd->nb.notifier_call = thr_handle_devfreq_event;
+ err = devm_devfreq_register_notifier(thr->dev, dftd->devfreq,
+ &dftd->nb, DEVFREQ_POLICY_NOTIFIER);
+ if (err < 0) {
+ thr_err(thr, "failed to register devfreq notifier\n");
+ devm_kfree(thr->dev, dftd);
+ return;
+ }
+
+ list_add_tail(&dftd->node, &thr->devfreq.list);
+
+ thr_dbg(thr, "device '%s' is used for throttling\n",
+ dev_name(dev));
+}
+
+static int thr_handle_cpufreq_event(struct notifier_block *nb,
+ unsigned long event, void *data)
+{
+ struct throttler *thr =
+ container_of(nb, struct throttler, cpufreq.nb);
+ struct cpufreq_policy *policy = data;
+ struct cpufreq_thrdev *cftd;
+
+ if (event != CPUFREQ_ADJUST)
+ return 0;
+
+ mutex_lock(&thr->lock);
+
+ if (cpumask_test_cpu(policy->cpu, &thr->cpufreq.cm_ignore))
+ goto out;
+
+ if (!cpumask_test_cpu(policy->cpu, &thr->cpufreq.cm_initialized)) {
+ thr_cpufreq_init(thr, policy->cpu);
+
+ if (cpumask_test_cpu(policy->cpu, &thr->cpufreq.cm_ignore))
+ goto out;
+
+ thr_dbg(thr, "CPU%d is used for throttling\n", policy->cpu);
+ }
+
+ /*
+ * Can't do this check earlier, otherwise we might miss CPU policies
+ * that are added after setup().
+ */
+ if (thr->level == 0) {
+ list_for_each_entry(cftd, &thr->cpufreq.list, node) {
+ if (cftd->cpu != policy->cpu)
+ continue;
+
+ if (cftd->clamp_freq != 0) {
+ thr_dbg(thr, "unthrottling CPU%d\n", cftd->cpu);
+ cftd->clamp_freq = 0;
+ }
+ }
+
+ goto out;
+ }
+
+ list_for_each_entry(cftd, &thr->cpufreq.list, node) {
+ unsigned long clamp_freq;
+
+ if (cftd->cpu != policy->cpu)
+ continue;
+
+ clamp_freq = thr_get_throttling_freq(&cftd->freq_table,
+ thr->level) / 1000;
+ if (cftd->clamp_freq != clamp_freq) {
+ thr_dbg(thr, "throttling CPU%d to %lu MHz\n", cftd->cpu,
+ clamp_freq / 1000);
+ cftd->clamp_freq = clamp_freq;
+ }
+
+ if (clamp_freq < policy->max)
+ cpufreq_verify_within_limits(policy, 0, clamp_freq);
+ }
+
+out:
+ mutex_unlock(&thr->lock);
+
+ return NOTIFY_DONE;
+}
+
+/*
+ * Notifier called by devfreq. Can't acquire thr->lock since it might
+ * already be held by throttler_set_level(). It isn't necessary to
+ * acquire the lock for the following reasons:
+ *
+ * Only the devfreq_thrdev and thr->level are accessed in this function.
+ * The devfreq device won't go away (or change) during the execution of
+ * this function, since we are called from the devfreq core. Theoretically
+ * thr->level could change and we'd apply an outdated setting, however in
+ * this case the function would run again shortly after and apply the
+ * correct value.
+ */
+static int thr_handle_devfreq_event(struct notifier_block *nb,
+ unsigned long event, void *data)
+{
+ struct devfreq_thrdev *dftd =
+ container_of(nb, struct devfreq_thrdev, nb);
+ struct throttler *thr = dftd->thr;
+ struct devfreq_policy *policy = data;
+ unsigned long clamp_freq;
+
+ if (event != DEVFREQ_ADJUST)
+ return NOTIFY_DONE;
+
+ if (thr->level == 0) {
+ if (dftd->clamp_freq != 0) {
+ thr_dbg(thr, "unthrottling '%s'\n",
+ dev_name(&dftd->devfreq->dev));
+ dftd->clamp_freq = 0;
+ }
+
+ return NOTIFY_DONE;
+ }
+
+ clamp_freq = thr_get_throttling_freq(&dftd->freq_table, thr->level);
+ if (clamp_freq != dftd->clamp_freq) {
+ thr_dbg(thr, "throttling '%s' to %lu MHz\n",
+ dev_name(&dftd->devfreq->dev), clamp_freq / 1000000);
+ dftd->clamp_freq = clamp_freq;
+ }
+
+ if (clamp_freq < policy->max)
+ devfreq_verify_within_limits(policy, 0, clamp_freq);
+
+ return NOTIFY_DONE;
+}
+
+static void thr_cpufreq_update_policy(struct throttler *thr)
+{
+ struct cpufreq_thrdev *cftd;
+
+ WARN_ON(!mutex_is_locked(&thr->lock));
+
+ list_for_each_entry(cftd, &thr->cpufreq.list, node) {
+ struct cpufreq_policy *policy = cpufreq_cpu_get(cftd->cpu);
+
+ if (!policy) {
+ thr_warn(thr, "CPU%d does have no cpufreq policy!\n",
+ cftd->cpu);
+ continue;
+ }
+
+ /*
+ * The lock isn't really needed in this function, the list
+ * of cpufreq devices can be extended, but no items are
+ * deleted during the lifetime of the throttler. Releasing
+ * the lock is necessary since cpufreq_update_policy() ends
+ * up calling thr_handle_cpufreq_event(), which needs to
+ * acquire the lock.
+ */
+ mutex_unlock(&thr->lock);
+ cpufreq_update_policy(cftd->cpu);
+ mutex_lock(&thr->lock);
+
+ cpufreq_cpu_put(policy);
+ }
+}
+
+static int thr_handle_devfreq_added(struct device *dev,
+ struct class_interface *ci)
+{
+ struct throttler *thr = ci_to_throttler(ci);
+
+ mutex_lock(&thr->lock);
+ thr_devfreq_init(dev, thr);
+ mutex_unlock(&thr->lock);
+
+ return 0;
+}
+
+static void thr_handle_devfreq_removed(struct device *dev,
+ struct class_interface *ci)
+{
+ struct devfreq_thrdev *dftd;
+ struct throttler *thr = ci_to_throttler(ci);
+
+ mutex_lock(&thr->lock);
+
+ list_for_each_entry(dftd, &thr->devfreq.list, node) {
+ if (dev == &dftd->devfreq->dev) {
+ list_del(&dftd->node);
+ devm_kfree(thr->dev, dftd->freq_table.freqs);
+ devm_kfree(thr->dev, dftd);
+ break;
+ }
+ }
+
+ mutex_unlock(&thr->lock);
+}
+
+void throttler_set_level(struct throttler *thr, int level)
+{
+ struct devfreq_thrdev *dftd;
+
+ if (level == thr->level)
+ return;
+
+ mutex_lock(&thr->lock);
+
+ thr_dbg(thr, "throttling level: %d\n", level);
+ thr->level = level;
+
+ if (!list_empty(&thr->cpufreq.list))
+ thr_cpufreq_update_policy(thr);
+
+ list_for_each_entry(dftd, &thr->devfreq.list, node) {
+ mutex_lock(&dftd->devfreq->lock);
+ update_devfreq(dftd->devfreq);
+ mutex_unlock(&dftd->devfreq->lock);
+ }
+
+ mutex_unlock(&thr->lock);
+}
+EXPORT_SYMBOL_GPL(throttler_set_level);
+
+#ifdef CONFIG_THROTTLER_DEBUG
+
+static ssize_t thr_level_read(struct file *file, char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct throttler *thr = file->f_inode->i_private;
+ char buf[5];
+ int len;
+
+ len = scnprintf(buf, sizeof(buf), "%d\n", thr->level);
+
+ return simple_read_from_buffer(user_buf, count, ppos, buf, len);
+}
+
+static ssize_t thr_level_write(struct file *file,
+ const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ int rc;
+ int level;
+ struct throttler *thr = file->f_inode->i_private;
+
+ rc = kstrtoint_from_user(user_buf, count, 10, &level);
+ if (rc)
+ return rc;
+
+ throttler_set_level(thr, level);
+
+ return count;
+}
+
+static const struct file_operations level_debugfs_ops = {
+ .owner = THIS_MODULE,
+ .read = thr_level_read,
+ .write = thr_level_write,
+};
+#endif
+
+struct throttler *throttler_setup(struct device *dev)
+{
+ struct throttler *thr;
+ struct device_node *np = dev->of_node;
+ struct class_interface *ci;
+ int cpu;
+ int err;
+
+ if (!np)
+ /* should never happen */
+ return ERR_PTR(-EINVAL);
+
+ thr = devm_kzalloc(dev, sizeof(*thr), GFP_KERNEL);
+ if (!thr)
+ return ERR_PTR(-ENOMEM);
+
+ mutex_init(&thr->lock);
+ thr->dev = dev;
+
+ cpumask_clear(&thr->cpufreq.cm_ignore);
+ cpumask_clear(&thr->cpufreq.cm_initialized);
+
+ INIT_LIST_HEAD(&thr->cpufreq.list);
+ INIT_LIST_HEAD(&thr->devfreq.list);
+
+ thr->cpufreq.nb.notifier_call = thr_handle_cpufreq_event;
+ err = cpufreq_register_notifier(&thr->cpufreq.nb,
+ CPUFREQ_POLICY_NOTIFIER);
+ if (err < 0) {
+ thr_err(thr, "failed to register cpufreq notifier\n");
+ return ERR_PTR(err);
+ }
+
+ /*
+ * The CPU throttling configuration is parsed at runtime, when the
+ * cpufreq policy notifier is called for a CPU that hasn't been
+ * initialized yet.
+ *
+ * This is done for two reasons:
+ * - when the throttler is probed the CPU might not yet have a policy
+ * - CPUs that were offline at probe time might be hotplugged
+ *
+ * The notifier is called then the policy is added/set
+ */
+ for_each_online_cpu(cpu) {
+ struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
+
+ if (!policy)
+ continue;
+
+ cpufreq_update_policy(cpu);
+ cpufreq_cpu_put(policy);
+ }
+
+ /*
+ * devfreq devices can be added and removed at runtime, hence they
+ * must also be handled dynamically. The class_interface notifies us
+ * whenever a device is added or removed. When the interface is
+ * registered ci->add_dev() is called for all existing devfreq
+ * devices.
+ */
+ ci = &thr->devfreq.class_iface;
+ ci->class = devfreq_class;
+ ci->add_dev = thr_handle_devfreq_added;
+ ci->remove_dev = thr_handle_devfreq_removed;
+
+ err = class_interface_register(ci);
+ if (err) {
+ thr_err(thr, "failed to register devfreq class interface: %d\n",
+ err);
+ cpufreq_unregister_notifier(&thr->cpufreq.nb,
+ CPUFREQ_POLICY_NOTIFIER);
+ return ERR_PTR(err);
+ }
+
+#ifdef CONFIG_THROTTLER_DEBUG
+ thr->debugfs.dir = debugfs_create_dir(dev_name(thr->dev), NULL);
+ if (IS_ERR(thr->debugfs.dir)) {
+ thr_warn(thr, "failed to create debugfs directory: %ld\n",
+ PTR_ERR(thr->debugfs.dir));
+ thr->debugfs.dir = NULL;
+ goto skip_debugfs;
+ }
+
+ thr->debugfs.attr_level = debugfs_create_file("level", 0644,
+ thr->debugfs.dir, thr,
+ &level_debugfs_ops);
+ if (IS_ERR(thr->debugfs.dir)) {
+ thr_warn(thr, "failed to create debugfs attribute: %ld\n",
+ PTR_ERR(thr->debugfs.attr_level));
+ debugfs_remove(thr->debugfs.dir);
+ thr->debugfs.dir = NULL;
+ }
+
+skip_debugfs:
+#endif
+
+ return thr;
+}
+EXPORT_SYMBOL_GPL(throttler_setup);
+
+void throttler_teardown(struct throttler *thr)
+{
+ struct devfreq_thrdev *dftd;
+ int level;
+
+ mutex_lock(&thr->lock);
+
+ level = thr->level;
+ thr->level = 0;
+
+ class_interface_unregister(&thr->devfreq.class_iface);
+
+ if (level) {
+ /* unthrottle CPUs */
+ if (!list_empty(&thr->cpufreq.list))
+ thr_cpufreq_update_policy(thr);
+
+ /* unthrottle devfreq devices */
+ list_for_each_entry(dftd, &thr->devfreq.list, node) {
+ mutex_lock(&dftd->devfreq->lock);
+ update_devfreq(dftd->devfreq);
+ mutex_unlock(&dftd->devfreq->lock);
+ }
+ }
+
+ cpufreq_unregister_notifier(&thr->cpufreq.nb,
+ CPUFREQ_POLICY_NOTIFIER);
+
+ mutex_unlock(&thr->lock);
+}
+EXPORT_SYMBOL_GPL(throttler_teardown);
diff --git a/include/linux/throttler.h b/include/linux/throttler.h
new file mode 100644
index 000000000000..a29d99f581da
--- /dev/null
+++ b/include/linux/throttler.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __LINUX_THROTTLER_H__
+#define __LINUX_THROTTLER_H__
+
+struct throttler;
+
+extern struct throttler *throttler_setup(struct device *dev);
+extern void throttler_teardown(struct throttler *thr);
+extern void throttler_set_level(struct throttler *thr, int level);
+
+#ifdef CONFIG_THROTTLER_DEBUG
+#define thr_dbg(thr, fmt, ...) dev_info(thr->dev, fmt, ##__VA_ARGS__)
+#else
+#define thr_dbg(thr, fmt, ...) dev_dbg(thr->dev, fmt, ##__VA_ARGS__)
+#endif
+
+#define thr_info(thr, fmt, ...) dev_info(thr->dev, fmt, ##__VA_ARGS__)
+#define thr_warn(thr, fmt, ...) dev_warn(thr->dev, fmt, ##__VA_ARGS__)
+#define thr_err(thr, fmt, ...) dev_warn(thr->dev, fmt, ##__VA_ARGS__)
+
+#endif /* __LINUX_THROTTLER_H__ */
--
2.18.0.rc1.242.g61856ae69a-goog
^ permalink raw reply related
* [PATCH v3 09/12] dt-bindings: PM / OPP: add opp-throttlers property
From: Matthias Kaehlcke @ 2018-06-14 19:47 UTC (permalink / raw)
To: MyungJoo Ham
Cc: Kyungmin Park, Chanwoo Choi, Arnd Bergmann, Greg Kroah-Hartman,
Rob Herring, Mark Rutland, linux-pm, devicetree, linux-kernel,
Brian Norris, Douglas Anderson, Enric Balletbo i Serra,
Rafael J . Wysocki, Viresh Kumar, Lee Jones, Matthias Kaehlcke
In-Reply-To: <20180614194712.102134-1-mka@chromium.org>
The optional opp-throttlers property is used to configure the throttlers
(see drivers/misc/throttler/*) that use a given OPP to throttle the
corresponding device(s).
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
Changes in v3:
- none
Changes in v2:
- patch added to series
Documentation/devicetree/bindings/opp/opp.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt
index c396c4c0af92..747e79740c75 100644
--- a/Documentation/devicetree/bindings/opp/opp.txt
+++ b/Documentation/devicetree/bindings/opp/opp.txt
@@ -170,6 +170,9 @@ Optional properties:
functioning of the current device at the current OPP (where this property is
present).
+- opp-throttlers: Array with phandles of throttlers that use this OPP to
+ throttle the corresponding device(s).
+
Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together.
/ {
--
2.18.0.rc1.242.g61856ae69a-goog
^ permalink raw reply related
* [PATCH v3 08/12] cpufreq: Add stub for cpufreq_update_policy()
From: Matthias Kaehlcke @ 2018-06-14 19:47 UTC (permalink / raw)
To: MyungJoo Ham
Cc: Kyungmin Park, Chanwoo Choi, Arnd Bergmann, Greg Kroah-Hartman,
Rob Herring, Mark Rutland, linux-pm, devicetree, linux-kernel,
Brian Norris, Douglas Anderson, Enric Balletbo i Serra,
Rafael J . Wysocki, Viresh Kumar, Lee Jones, Matthias Kaehlcke
In-Reply-To: <20180614194712.102134-1-mka@chromium.org>
cpufreq stubs out some functions when CONFIG_CPU_FREQ=n , but
cpufreq_update_policy() is not among them. The throttler driver
(https://patchwork.kernel.org/patch/10453351/) uses cpufreq as one
possible throttling mechanism, but it can still be useful without
cpufreq. Stubbing out cpufreq_update_policy() allows the throttler
driver to be built without ugly #ifdef'ery when cpufreq is disabled.
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
Changes in v3:
- patch added to series
include/linux/cpufreq.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 882a9b9e34bc..dba8c4951e2e 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -210,6 +210,7 @@ static inline unsigned int cpufreq_quick_get_max(unsigned int cpu)
return 0;
}
static inline void disable_cpufreq(void) { }
+static inline void cpufreq_update_policy(unsigned int cpu) { }
#endif
#ifdef CONFIG_CPU_FREQ_STAT
--
2.18.0.rc1.242.g61856ae69a-goog
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox