[PATCH] thermal/core: Make 'forced_passive' as obsolete candidate

2020-12-08 Thread Daniel Lezcano
-by: Daniel Lezcano --- Documentation/ABI/obsolete/sysfs-thermal-passive | 13 + drivers/thermal/thermal_sysfs.c | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 Documentation/ABI/obsolete/sysfs-thermal-passive diff --git a/Documentation/ABI/obsolete

Re: [PATCH] thermal/core: Emit a warning if the thermal zone is updated without ops

2020-12-08 Thread Daniel Lezcano
On 08/12/2020 15:37, Lukasz Luba wrote: > > > On 12/8/20 1:51 PM, Daniel Lezcano wrote: >> >> Hi Lukasz, >> >> On 08/12/2020 10:36, Lukasz Luba wrote: >>> Hi Daniel, >> >> [ ... ] >> >>>>      static void thermal_zone

Re: [PATCH] thermal/core: Emit a warning if the thermal zone is updated without ops

2020-12-08 Thread Daniel Lezcano
Hi Lukasz, On 08/12/2020 10:36, Lukasz Luba wrote: > Hi Daniel, [ ... ] >>     static void thermal_zone_device_init(struct thermal_zone_device *tz) >> @@ -553,11 +555,9 @@ void thermal_zone_device_update(struct >> thermal_zone_device *tz, >>   if (atomic_read(_suspend)) >>  

[PATCH v2 1/4] thermal/core: Rename passive_delay and polling_delay with units

2020-12-07 Thread Daniel Lezcano
is using, so keeping it under the jiffies instead of msecs will save some pointless conversion. Set the scene to directly store the delays under their jiffies form by adding to the variable name the 'ms' suffix. Signed-off-by: Daniel Lezcano --- drivers/platform/x86/acerhdf.c

[PATCH v2 4/4] thermal/core: Remove ms based delay fields

2020-12-07 Thread Daniel Lezcano
The code does no longer use the ms unit based fields to set the delays as they are replaced by the jiffies. Remove them and replace their user to use the jiffies version instead. Signed-off-by: Daniel Lezcano --- drivers/platform/x86/acerhdf.c | 3 ++- drivers/thermal

[PATCH v2 3/4] thermal/core: Use precomputed jiffies for the polling

2020-12-07 Thread Daniel Lezcano
The delays are also stored in jiffies based unit. Use them instead of the ms. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index

[PATCH v2 2/4] thermal/core: Precompute the delays from msecs to jiffies

2020-12-07 Thread Daniel Lezcano
The delays are stored in ms units and when the polling function is called this delay is converted into jiffies at each call. Instead of doing the conversion again and again, compute the jiffies at init time and use the value directly when setting the polling. Signed-off-by: Daniel Lezcano

[PATCH] thermal/core: Emit a warning if the thermal zone is updated without ops

2020-12-07 Thread Daniel Lezcano
and the WARN in the thermal_zone_device_update() function. Just remove the check and let the next call to raise the warning. Cc: Thara Gopinath Cc: Amit Kucheria Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.c | 16

Re: [PATCH v2 2/2] platform/x86/drivers/acerhdf: Check the interval value when it is set

2020-12-07 Thread Daniel Lezcano
On 07/12/2020 15:54, Hans de Goede wrote: > Hi, > > On 12/4/20 12:43 PM, Daniel Lezcano wrote: >> On 03/12/2020 22:22, Peter Kästle wrote: >>> 3. Dezember 2020 08:17, "Daniel Lezcano" >>> schrieb: >>> >>>> Currently the code c

[PATCH RFD] thermal: core: Browse the trip points in reverse order and exit

2020-12-06 Thread Daniel Lezcano
Cc: Len Brown Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 9d6a7b7f8ab4..d745b62a63af 100644 --- a/drivers/thermal/thermal_core.c

Re: [PATCH v3 2/2] clocksource: arm_arch_timer: Correct fault programming of CNTKCTL_EL1.EVNTI

2020-12-05 Thread Daniel Lezcano
Hi Marc, On 05/12/2020 19:22, Marc Zyngier wrote: > Hi Daniel, > > On 2020-12-05 11:15, Daniel Lezcano wrote: >> Hi Marc, >> >> are you fine with this patch ? > > I am, although there still isn't any justification for the pos/lsb > rework in the commit me

Re: [PATCHv2] clocksource: dw_apb_timer_of: add error handling if no clock available

2020-12-05 Thread Daniel Lezcano
On 05/12/2020 11:55, Dinh Nguyen wrote: > Hi Daniel, > > On 12/5/20 2:50 AM, Daniel Lezcano wrote: >> On 04/12/2020 23:39, Dinh Nguyen wrote: >>> >>> >>> On 12/4/20 2:00 PM, Daniel Lezcano wrote: >>>> On 04/12/2020 16:36, Dinh Nguyen wr

Re: [PATCH] drivers: thermal: Add NULL pointer check before using cooling device stats

2020-12-05 Thread Daniel Lezcano
On 04/12/2020 20:09, Manaf Meethalavalappu Pallikunhi wrote: > There is a possible chance that some cooling device stats buffer > allocation fails due to very high cooling device max state value. > Later cooling device update or cooling stats sysfs will try to > access stats data for the same

Re: [PATCH v3 2/2] clocksource: arm_arch_timer: Correct fault programming of CNTKCTL_EL1.EVNTI

2020-12-05 Thread Daniel Lezcano
Hi Marc, are you fine with this patch ? On 04/12/2020 08:31, Keqian Zhu wrote: > ARM virtual counter supports event stream, it can only trigger an event > when the trigger bit (the value of CNTKCTL_EL1.EVNTI) of CNTVCT_EL0 changes, > so the actual period of event stream is 2^(cntkctl_evnti +

Re: [PATCHv2] clocksource: dw_apb_timer_of: add error handling if no clock available

2020-12-05 Thread Daniel Lezcano
On 04/12/2020 23:39, Dinh Nguyen wrote: > > > On 12/4/20 2:00 PM, Daniel Lezcano wrote: >> On 04/12/2020 16:36, Dinh Nguyen wrote: >>> commit ("b0fc70ce1f02 arm64: berlin: Select DW_APB_TIMER_OF") added the >>> support for the dw_apb_timer

Re: [PATCHv2] clocksource: dw_apb_timer_of: add error handling if no clock available

2020-12-04 Thread Daniel Lezcano
instead of just hitting the panic. > > Signed-off-by: Dinh Nguyen Did you have time to test the different combinations ? > --- > v2: address comments from Daniel Lezcano > update commit message > --- > drivers/clocksource/dw_apb_timer_of.c | 60 ++

Re: [PATCH] drivers: thermal: Add NULL pointer check before using cooling device stats

2020-12-04 Thread Daniel Lezcano
On 04/12/2020 20:09, Manaf Meethalavalappu Pallikunhi wrote: > There is a possible chance that some cooling device stats buffer > allocation fails due to very high cooling device max state value. > Later cooling device update or cooling stats sysfs will try to > access stats data for the same

Re: [PATCH v2 2/2] platform/x86/drivers/acerhdf: Check the interval value when it is set

2020-12-04 Thread Daniel Lezcano
On 03/12/2020 22:22, Peter Kästle wrote: > 3. Dezember 2020 08:17, "Daniel Lezcano" schrieb: > >> Currently the code checks the interval value when the temperature is >> read which is bad for two reasons: >> >> - checking and setting the interval i

[tip: timers/core] clocksource/drivers/ingenic: Fix section mismatch

2020-12-03 Thread tip-bot2 for Daniel Lezcano
The following commit has been merged into the timers/core branch of tip: Commit-ID: 5bd7cb29eceb52e4b108917786fdbf2a2c2048ef Gitweb: https://git.kernel.org/tip/5bd7cb29eceb52e4b108917786fdbf2a2c2048ef Author:Daniel Lezcano AuthorDate:Wed, 25 Nov 2020 11:23:45 +01:00

[PATCH 13/13] clocksource/drivers/riscv: Make RISCV_TIMER depends on RISCV_SBI

2020-12-03 Thread Daniel Lezcano
er Dabbelt Acked-by: Palmer Dabbelt Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201028131230.72907-1-wangkefeng.w...@huawei.com --- drivers/clocksource/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kco

[PATCH 09/13] dt-bindings: timer: renesas: tmu: Document r8a774e1 bindings

2020-12-03 Thread Daniel Lezcano
From: Marian-Cristian Rotariu Document RZ/G2H (R8A774E1) SoC in the Renesas TMU bindings. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r

[PATCH 11/13] clocksource/drivers/cadence_ttc: Fix memory leak in ttc_setup_clockevent()

2020-12-03 Thread Daniel Lezcano
Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201116135123.2164033-1-yuku...@huawei.com --- drivers/clocksource/timer-cadence-ttc.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/clocksource/timer-cadence-ttc.c b/drivers/clocksource/tim

[PATCH 10/13] dt-bindings: timer: renesas: tmu: Convert to json-schema

2020-12-03 Thread Daniel Lezcano
From: Geert Uytterhoeven Convert the Renesas R-Mobile/R-Car Timer Unit (TMU) Device Tree binding documentation to json-schema. Document missing properties. Update the example to match reality. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano Reviewed

[PATCH 12/13] clocksource/drivers/ingenic: Fix section mismatch

2020-12-03 Thread Daniel Lezcano
(clocksource/drivers/ingenic: Add high resolution timer support for SMP/SMT) Reported-by: kernel test robot Signed-off-by: Daniel Lezcano Reviewed-by: Paul Cercueil Tested-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/20201125102346.1816310-1-daniel.lezc...@linaro.org --- drivers/clocksource

[PATCH 08/13] clocksource/drivers/orion: Add missing clk_disable_unprepare() on error path

2020-12-03 Thread Daniel Lezcano
From: Yang Yingliang After calling clk_prepare_enable(), clk_disable_unprepare() need be called on error path. Fixes: fbe4b3566ddc ("clocksource/drivers/orion: Convert init function...") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Daniel Lezcano Li

[PATCH 07/13] clocksource/drivers/nps: Remove EZChip NPS clocksource driver

2020-12-03 Thread Daniel Lezcano
From: Vineet Gupta NPS platform has been removed from ARC port and there are no in-tree users of it now. So RIP ! Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Vineet Gupta Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r

[PATCH 06/13] dt-bindings: timer: Add new OST support for the upcoming new driver.

2020-12-03 Thread Daniel Lezcano
d-by: 周正 (Zhou Zheng) Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201026155842.10196-2-zhouyan...@wanyeetech.com --- include/dt-bindings/clock/ingenic,sysost.h | 10 +++--- 1 file changed, 7 insertions(+), 3 dele

[PATCH 04/13] clocksource/drivers/sp804: Correct clk_get_rate handle

2020-12-03 Thread Daniel Lezcano
From: Kefeng Wang clk_get_rate won't return negative value, correct clk_get_rate handle. Signed-off-by: Kefeng Wang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201029123317.90286-4-wangkefeng.w...@huawei.com --- drivers/clocksource/timer-sp804.c | 10 +- 1 file

[PATCH 03/13] clocksource/drivers/sp804: Use clk_prepare_enable and clk_disable_unprepare

2020-12-03 Thread Daniel Lezcano
From: Kefeng Wang Directly use clk_prepare_enable and clk_disable_unprepare. Signed-off-by: Kefeng Wang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201029123317.90286-3-wangkefeng.w...@huawei.com --- drivers/clocksource/timer-sp804.c | 13 ++--- 1 file changed, 2

[PATCH 02/13] clocksource/drivers/sp804: Make some symbol static

2020-12-03 Thread Daniel Lezcano
-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201029123317.90286-2-wangkefeng.w...@huawei.com --- drivers/clocksource/timer-sp804.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c index

[PATCH 05/13] clocksource/drivers/sp804: Use pr_fmt

2020-12-03 Thread Daniel Lezcano
From: Kefeng Wang Add pr_fmt to prefix pr_ output. Signed-off-by: Kefeng Wang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201029123317.90286-5-wangkefeng.w...@huawei.com --- drivers/clocksource/timer-sp804.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions

[PATCH 01/13] clocksource/drivers/sp804: Add static for functions such as sp804_clockevents_init()

2020-12-03 Thread Daniel Lezcano
ddc7b6 ("clocksource/drivers/sp804: Remove unused sp804_timer_disable() and timer-sp804.h") Reported-by: kernel test robot Signed-off-by: Zhen Lei Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201021012259.2067-2-thunder.leiz...@huawei.com --- drivers/clocksource/time

[GIT PULL] timer drivers for v5.11

2020-12-03 Thread Daniel Lezcano
timer driver (Daniel Lezcano) - Make RISCV_TIMER depends on RISCV_SBI (Kefeng Wang) Daniel Lezcano (1): clocksource/drivers/ingenic: Fix section mismatch Geert Uytterhoeven (1): dt-bindings: timer: renesas: tmu: Convert

Re: [PATCH v2 2/5] thermal: devfreq_cooling: get a copy of device status

2020-12-03 Thread Daniel Lezcano
On 03/12/2020 16:38, Lukasz Luba wrote: > > > On 12/3/20 1:09 PM, Daniel Lezcano wrote: >> On 18/11/2020 13:03, Lukasz Luba wrote: >>> Devfreq cooling needs to now the correct status of the device in order >>> to operate. Do not rely on Devfreq last_statu

Re: [PATCH v2 3/5] thermal: devfreq_cooling: add new registration functions with Energy Model

2020-12-03 Thread Daniel Lezcano
On 18/11/2020 13:03, Lukasz Luba wrote: > The Energy Model (EM) framework supports devices such as Devfreq. Create > new registration functions which automatically register EM for the thermal > devfreq_cooling devices. This patch prepares the code for coming changes > which are going to replace

Re: [PATCH v2 2/5] thermal: devfreq_cooling: get a copy of device status

2020-12-03 Thread Daniel Lezcano
On 18/11/2020 13:03, Lukasz Luba wrote: > Devfreq cooling needs to now the correct status of the device in order > to operate. Do not rely on Devfreq last_status which might be a stale data > and get more up-to-date values of the load. > > Devfreq framework can change the device status in the

Re: [PATCH] clocksource: dw_apb_timer_of: return EPROBE_DEFER if no clock available

2020-12-03 Thread Daniel Lezcano
Hi Dinh, On 19/11/2020 13:12, Dinh Nguyen wrote: > commit ("b0fc70ce1f02 arm64: berlin: Select DW_APB_TIMER_OF") added the > support for the dw_apb_timer into the arm64 defconfig. However, for some > platforms like the Intel Stratix10 and Agilex, the clock manager doesn't > get probed until

[PATCH v2 2/2] platform/x86/drivers/acerhdf: Check the interval value when it is set

2020-12-02 Thread Daniel Lezcano
is not updated in this case as that will happen in the init function when registering the thermal zone device. I don't have any hardware to test the changes. Signed-off-by: Daniel Lezcano --- V2: - Fixed static function annotation --- drivers/platform/x86/acerhdf.c | 22

[PATCH v2 1/2] platform/x86/drivers/acerhdf: Use module_param_cb to set/get polling interval

2020-12-02 Thread Daniel Lezcano
The module parameter can be set by using ops to get and set the values. The change will allow to check the correctness of the interval value everytime it is changed instead of checking in the get_temp function. Signed-off-by: Daniel Lezcano --- drivers/platform/x86/acerhdf.c | 10 -- 1

[PATCH 1/2] platform/x86/drivers/acerhdf: Use module_param_cb to set/get polling interval

2020-12-02 Thread Daniel Lezcano
The module parameter can be set by using ops to get and set the values. The change will allow to check the correctness of the interval value everytime it is changed instead of checking in the get_temp function. Signed-off-by: Daniel Lezcano --- drivers/platform/x86/acerhdf.c | 10 -- 1

[PATCH 2/2] platform/x86/drivers/acerhdf: Check the interval value when it is set

2020-12-02 Thread Daniel Lezcano
is not updated in this case as that will happen in the init function when registering the thermal zone device. I don't have any hardware to test the changes. Signed-off-by: Daniel Lezcano --- drivers/platform/x86/acerhdf.c | 20 1 file changed, 16 insertions(+), 4 deletions

Re: [PATCH v2 0/5] Thermal devfreq cooling improvements with Energy Model

2020-12-02 Thread Daniel Lezcano
On 18/11/2020 13:03, Lukasz Luba wrote: > Hi all, > > This patch set is a continuation of my previous work, which aimed > to add Energy Model to all devices. This series is a follow up > for the patches which got merged to v5.9-rc1. It aims to change > the thermal devfreq cooling and use the

[PATCH 3/4] thermal/core: Use precomputed jiffies for the polling

2020-12-02 Thread Daniel Lezcano
The delays are also stored in jiffies based unit. Use them instead of the ms. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index

[PATCH 4/4] thermal/core: Remove ms based delay fields

2020-12-02 Thread Daniel Lezcano
The code does no longer use the ms unit based fields to set the delays as they are replaced by the jiffies. Remove them. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.h | 2 -- drivers/thermal/thermal_sysfs.c | 2 +- include/linux/thermal.h | 7 --- 3 files

[PATCH 2/4] thermal/core: Precompute the jiffies

2020-12-02 Thread Daniel Lezcano
The delays are stored in ms units and when the polling function is called this delay is converted into jiffies at each call. Instead of doing the conversion again and again, compute the jiffies at init time and use the value directly when setting the polling. Signed-off-by: Daniel Lezcano

[PATCH 1/4] thermal/core: Rename passive_delay and polling_delay with units

2020-12-02 Thread Daniel Lezcano
Set the scene to directly store the delays under their jiffies form. Add to the variable name the 'ms' suffix. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.c | 10 +- drivers/thermal/thermal_of.c| 8 drivers/thermal/thermal_sysfs.c | 6 +++--- include

[PATCH v4 4/4] powercap/drivers/dtpm: Add CPU energy model based support

2020-12-01 Thread Daniel Lezcano
return dtpm_register_cpu(pkg); } static struct dtpm_descr descr = { .name = "pkg", .init = dtpm_register_pkg, }; DTPM_DECLARE(descr); Cc: Thara Gopinath Cc: Lina Iyer Cc: Ram Chandrasekar Cc: Zhang Rui Signed-off-by: Daniel Lezcano --- drivers/powercap/Kconfig| 7 +

[PATCH v4 3/4] powercap/drivers/dtpm: Add API for dynamic thermal power management

2020-12-01 Thread Daniel Lezcano
: Ram Chandrasekar Cc: Zhang Rui Signed-off-by: Daniel Lezcano Reviewed-by: Lukasz Luba --- drivers/powercap/Kconfig | 6 + drivers/powercap/Makefile | 1 + drivers/powercap/dtpm.c | 470 ++ include/asm-generic/vmlinux.lds.h | 11

[PATCH v4 2/4] Documentation/powercap/dtpm: Add documentation for dtpm

2020-12-01 Thread Daniel Lezcano
framework provides an unified API to userspace to act on the power. Document this framework. Cc: Thara Gopinath Cc: Lina Iyer Cc: Ram Chandrasekar Cc: Zhang Rui Cc: Jonathan Corbet Signed-off-by: Daniel Lezcano --- Documentation/power/index.rst | 1 + Documentation/power/powercap

[PATCH V4 0/4] powercap/dtpm: Add the DTPM framework

2020-12-01 Thread Daniel Lezcano
missing kfree for dtpm_cpu - Capitalize letters in the Kconfig description - Reduced name description - Stringified section name - Added more debug traces in the code - Removed duplicate initialization in the dtpm cpu Daniel Lezcano (4): units: Add Watt units Documentation/powercap

[PATCH v4 1/4] units: Add Watt units

2020-12-01 Thread Daniel Lezcano
As there are the temperature units, let's add the Watt macros definition. Cc: Thara Gopinath Cc: Lina Iyer Cc: Ram Chandrasekar Cc: Zhang Rui Cc: Lukasz Luba Signed-off-by: Daniel Lezcano Reviewed-by: Lukasz Luba --- include/linux/units.h | 4 1 file changed, 4 insertions(+) diff

Re: [RFC 1/2] dt-bindings: thermal: sprd: Add virtual thermal documentation

2020-11-30 Thread Daniel Lezcano
ive a pointer to a DT describing your hardware ? > On 27/11/2020, Lukasz Luba wrote: >> >> >> On 11/27/20 1:26 PM, Daniel Lezcano wrote: >>> >>> Hi Lukasz, >>> >>> On 27/11/2020 10:27, Lukasz Luba wrote: >>>> >>>>

Re: [PATCH 1/3] thermal: core: Add indication for userspace usage

2020-11-29 Thread Daniel Lezcano
[Added Srinivas] On 28/11/2020 18:54, Kai-Heng Feng wrote: > We are seeing thermal shutdown on Intel based mobile workstations, the > shutdown happens during the first trip handle in > thermal_zone_device_register(): > kernel: thermal thermal_zone15: critical temperature reached (101 C), >

Re: [RFC 1/2] dt-bindings: thermal: sprd: Add virtual thermal documentation

2020-11-27 Thread Daniel Lezcano
Hi Lukasz, On 27/11/2020 10:27, Lukasz Luba wrote: > > > On 11/27/20 8:35 AM, gao.yunxi...@gmail.com wrote: >> From: "jeson.gao" >> >> virtual thermal node definition description in dts file >> >> Signed-off-by: jeson.gao >> --- [ ... ] > It's coming back. There were attempts to solve

Re: [PATCH v3 4/4] powercap/drivers/dtpm: Add CPU energy model based support

2020-11-26 Thread Daniel Lezcano
Hi Lukasz, On 26/11/2020 11:06, Lukasz Luba wrote: > Hi Daniel, > > On 11/23/20 9:42 PM, Daniel Lezcano wrote: >> With the powercap dtpm controller, we are able to plug devices with >> power limitation features in the tree. >> > > [snip] > >> + &g

Re: [PATCH v4 0/3] Improve the estimations in Intelligent Power Allocation

2020-11-26 Thread Daniel Lezcano
On 26/11/2020 15:02, Lukasz Luba wrote: [ ... ] >>> changed via sysfs. >>> >>> Could you take it please? It should apply smoothly in your tree. >> >> Actually, I'm waiting for Ionela and Dietmar ack. >> >> > > Are they maintainers of this file that you need their ACKs? > Maybe I should drop

Re: [PATCH v4 0/3] Improve the estimations in Intelligent Power Allocation

2020-11-26 Thread Daniel Lezcano
On 26/11/2020 13:49, Lukasz Luba wrote: > Hi Daniel, > > On 11/24/20 4:10 PM, Lukasz Luba wrote: >> Hi all, >> >> The Intelligent Power Allocation (IPA) estimates the needed >> coefficients for >> internal algorithm. It can also estimate the sustainable power value >> when the >> DT has not

Re: [PATCH] thermal: amlogic_thermal: Add hwmon support

2020-11-25 Thread Daniel Lezcano
Hi Thanks for your patch but exactly the same patch was submitted and merged [1] -- Daniel [1] https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/commit/?h=thermal/next=cb68a8580e2086fad38597af4c60d39de8df0cde On 25/11/2020 17:24, Dongjin Kim wrote: > Expose Amlogic thermal as

[PATCH] clocksource/drivers/ingenic: Fix section mismatch

2020-11-25 Thread Daniel Lezcano
(clocksource/drivers/ingenic: Add high resolution timer support for SMP/SMT) Reported-by: kernel test robot Signed-off-by: Daniel Lezcano --- drivers/clocksource/ingenic-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clocksource/ingenic-timer.c b/drivers

[PATCH V2 0/4] powercap/dtpm: Add the DTPM framework

2020-11-23 Thread Daniel Lezcano
in the dtpm cpu Daniel Lezcano (4): units: Add Watt units Documentation/powercap/dtpm: Add documentation for dtpm powercap/drivers/dtpm: Add API for dynamic thermal power management powercap/drivers/dtpm: Add CPU energy model based support Documentation/power/index.rst | 1

[PATCH v3 4/4] powercap/drivers/dtpm: Add CPU energy model based support

2020-11-23 Thread Daniel Lezcano
return dtpm_register_cpu(pkg); } static struct dtpm_descr descr = { .name = "pkg", .init = dtpm_register_pkg, }; DTPM_DECLARE(descr); Signed-off-by: Daniel Lezcano --- drivers/powercap/Kconfig| 7 + drivers/powercap/Makefile | 1 + drivers

[PATCH v3 3/4] powercap/drivers/dtpm: Add API for dynamic thermal power management

2020-11-23 Thread Daniel Lezcano
the percentage of power distribution of the children's node. This percentage is used to dispatch the power limit to the children. The weight is computed against the max power of the siblings. This simple approach allows to do a fair distribution of the power limit. Signed-off-by: Daniel Lezcano Reviewed

[PATCH v3 2/4] Documentation/powercap/dtpm: Add documentation for dtpm

2020-11-23 Thread Daniel Lezcano
framework provides an unified API to userspace to act on the power. Document this framework. Signed-off-by: Daniel Lezcano --- Documentation/power/index.rst | 1 + Documentation/power/powercap/dtpm.rst | 210 ++ 2 files changed, 211 insertions(+) create mode 100644

[PATCH v3 1/4] units: Add Watt units

2020-11-23 Thread Daniel Lezcano
As there are the temperature units, let's add the Watt macros definition. Signed-off-by: Daniel Lezcano Reviewed-by: Lukasz Luba --- include/linux/units.h | 4 1 file changed, 4 insertions(+) diff --git a/include/linux/units.h b/include/linux/units.h index aaf716364ec3..92c234e71cab

[GIT PULL] thermal fixes for v5.10-rc5

2020-11-19 Thread Daniel Lezcano
The following changes since commit f8394f232b1eab649ce2df5c5f15b0e528c92091: Linux 5.10-rc3 (2020-11-08 16:10:16 -0800) are available in the Git repository at: ssh://g...@gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git tags/thermal-v5.10-rc5 for you to fetch changes up to

Re: [PATCH v2 2/4] Documentation/powercap/dtpm: Add documentation for dtpm

2020-11-17 Thread Daniel Lezcano
On 17/11/2020 17:08, Jonathan Corbet wrote: > On Mon, 16 Nov 2020 16:26:47 +0100 > Daniel Lezcano wrote: > >> The dynamic thermal and power management is a technique to dynamically >> adjust the power consumption of different devices in order to ensure a >>

Re: [PATCH v2 4/4] powercap/drivers/dtpm: Add CPU energy model based support

2020-11-17 Thread Daniel Lezcano
On 17/11/2020 14:15, Lukasz Luba wrote: > Hi Daniel, > > Only one small comment regarding the setup of 'power_limit'. > > On 11/16/20 3:26 PM, Daniel Lezcano wrote: >> With the powercap dtpm controller, we are able to plug devices with >> power limi

Re: [PATCH] thermal: Fix NULL pointer dereference issue

2020-11-17 Thread Daniel Lezcano
On 17/11/2020 12:27, Zhang Rui wrote: > On Tue, 2020-11-17 at 09:57 +0100, Daniel Lezcano wrote: >> On 17/11/2020 08:18, Zhang Rui wrote: >>> On Mon, 2020-11-16 at 21:59 +0530, Mukesh Ojha wrote: >>>> Cooling stats variable inside >>>> thermal_cooling_d

Re: [PATCH V4] clocksource/drivers/cadence_ttc: fix memory leak in ttc_setup_clockevent()

2020-11-17 Thread Daniel Lezcano
On 16/11/2020 14:51, Yu Kuai wrote: > If clk_notifier_register() failed, ttc_setup_clockevent() will return > without freeing 'ttcce', which will leak memory. > > Fixes: 70504f311d4b ("clocksource/drivers/cadence_ttc: Convert init function > to return error") > Reported-by: Hulk Robot >

Re: [PATCH] thermal: Fix NULL pointer dereference issue

2020-11-17 Thread Daniel Lezcano
On 17/11/2020 08:18, Zhang Rui wrote: > On Mon, 2020-11-16 at 21:59 +0530, Mukesh Ojha wrote: >> Cooling stats variable inside thermal_cooling_device_stats_update() >> can get NULL. We should add a NULL check on stat inside for sanity. >> >> Signed-off-by: Mukesh Ojha >> --- >>

[PATCH V2 0/4] powercap/dtpm: Add the DTPM framework

2020-11-16 Thread Daniel Lezcano
in the code - Removed duplicate initialization in the dtpm cpu Daniel Lezcano (4): units: Add Watt units Documentation/powercap/dtpm: Add documentation for dtpm powercap/drivers/dtpm: Add API for dynamic thermal power management powercap/drivers/dtpm: Add CPU energy model based support

[PATCH v2 3/4] powercap/drivers/dtpm: Add API for dynamic thermal power management

2020-11-16 Thread Daniel Lezcano
the percentage of power distribution of the children's node. This percentage is used to dispatch the power limit to the children. The weight is computed against the max power of the siblings. This simple approach allows to do a fair distribution of the power limit. Signed-off-by: Daniel Lezcano Reviewed

[PATCH v2 4/4] powercap/drivers/dtpm: Add CPU energy model based support

2020-11-16 Thread Daniel Lezcano
return dtpm_register_cpu(pkg); } static struct dtpm_descr descr = { .name = "pkg", .init = dtpm_register_pkg, }; DTPM_DECLARE(descr); Signed-off-by: Daniel Lezcano --- drivers/powercap/Kconfig| 7 + drivers/powercap/Makefile | 1 + drivers

[PATCH v2 2/4] Documentation/powercap/dtpm: Add documentation for dtpm

2020-11-16 Thread Daniel Lezcano
framework provides an unified API to userspace to act on the power. Document this framework. Signed-off-by: Daniel Lezcano --- Documentation/power/powercap/dtpm.rst | 222 ++ 1 file changed, 222 insertions(+) create mode 100644 Documentation/power/powercap/dtpm.rst diff --git

[PATCH v2 1/4] units: Add Watt units

2020-11-16 Thread Daniel Lezcano
As there are the temperature units, let's add the Watt macros definition. Signed-off-by: Daniel Lezcano Reviewed-by: Lukasz Luba --- include/linux/units.h | 4 1 file changed, 4 insertions(+) diff --git a/include/linux/units.h b/include/linux/units.h index aaf716364ec3..92c234e71cab

Re: [PATCH] thermal: amlogic: Add hwmon support

2020-11-16 Thread Daniel Lezcano
On 15/11/2020 20:06, Martin Blumenstingl wrote: > Many monitoring tools read the CPU temperature using the hwmon > interface. Expose the thermal sensors on Amlogic boards as hwmon > devices. > > Without this lm_sensors' "sensors" tool does not find any temperature > sensors. Now it prints: >

Re: [PATCH] thermal: intel_pch_thermal: Add PCI ids for Lewisburg PCH.

2020-11-16 Thread Daniel Lezcano
river should work without changes for > Lewisburg. > > I suspect there's some other PCI IDs missing. But I hope somebody at > Intel would have an easier time figuring that out than I... > > Cc: Daniel Lezcano > Cc: Srinivas Pandruvada > Cc: Tushar Dave > Cc: Zhang R

Re: [PATCH v5 0/2] dt-bindings: timer: renesas: tmu: Document r8a774e1 and

2020-11-12 Thread Daniel Lezcano
On 10/11/2020 17:20, Geert Uytterhoeven wrote: > Hi Daniel, Thomas, > > This patch series picks up missing Device Tree binding updates for the > Renesas Timer Unit (TMU), and converts the bindings to json-schema. > > Thanks for applying! > > Geert Uytterhoeven (1): > dt-bindings: timer:

Re: [PATCH v2 05/17] clocksource/hyperv: use MSR-based access if running as root

2020-11-12 Thread Daniel Lezcano
On 12/11/2020 12:24, Wei Liu wrote: > On Thu, Nov 12, 2020 at 10:56:17AM +0100, Daniel Lezcano wrote: >> On 05/11/2020 17:58, Wei Liu wrote: >>> Signed-off-by: Wei Liu Acked-by: Daniel Lezcano >>> --- >> >> I would like to apply this patch b

Re: [PATCH] docs: thermal: time_in_state is displayed in msec and not usertime

2020-11-12 Thread Daniel Lezcano
On 10/11/2020 11:43, Viresh Kumar wrote: > The sysfs stats for cooling devices shows the time_in_state in msec, > remove the unwanted usertime comment. > > Signed-off-by: Viresh Kumar > --- Applied, thanks -- Linaro.org │ Open source software for ARM SoCs Follow

Re: [PATCH] thermal: intel_pch_thermal: Add PCI ids for Lewisburg PCH.

2020-11-12 Thread Daniel Lezcano
On 28/10/2020 21:21, Andres Freund wrote: > Hi, > > On 2020-01-16 11:41:34 -0800, Srinivas Pandruvada wrote: >> On Thu, 2020-01-16 at 10:42 -0800, Andres Freund wrote: >>> Hi, >>> >>> On 2020-01-16 05:53:13 -0800, Srinivas Pandruvada wrote: On Wed, 2020-01-15 at 10:44 -0800, Andres Freund

Re: [PATCH] thermal: ti-soc-thermal: Disable the CPU PM notifier for OMAP4430

2020-11-12 Thread Daniel Lezcano
On 03/11/2020 07:42, Peter Ujfalusi wrote: > Eduardo, Keerthy, > > On 29/10/2020 12.51, Tony Lindgren wrote: >> * Peter Ujfalusi [201029 10:03]: >>> Disabling the notifier fixes the random shutdowns on OMAP4430 (ES2.0 and >>> ES2.1) >>> but it does not cause any issues on OMAP4460 (PandaES) or

Re: [PATCH] thermal: intel_pch_thermal: Add PCI ids for Lewisburg PCH.

2020-11-12 Thread Daniel Lezcano
On 28/10/2020 21:21, Andres Freund wrote: > Hi, > > On 2020-01-16 11:41:34 -0800, Srinivas Pandruvada wrote: >> On Thu, 2020-01-16 at 10:42 -0800, Andres Freund wrote: >>> Hi, >>> >>> On 2020-01-16 05:53:13 -0800, Srinivas Pandruvada wrote: On Wed, 2020-01-15 at 10:44 -0800, Andres Freund

Re: [PATCH v2] thermal/drivers/cpufreq_cooling: Update cpufreq_state only if state has changed

2020-11-12 Thread Daniel Lezcano
On 06/11/2020 10:22, zhuguangqin...@gmail.com wrote: > From: Zhuguangqing > > If state has not changed successfully and we updated cpufreq_state, > next time when the new state is equal to cpufreq_state (not changed > successfully last time), we will return directly and miss a >

Re: [Resend][PATCH] drivers/thermal: fix potential memleak in error branch

2020-11-12 Thread Daniel Lezcano
On 10/11/2020 09:10, Bernard wrote: > Function __thermal_cooling_device_register, when device_register > failed, cdev is not free after error value return, this may > bring in potential memleak. > > Signed-off-by: Bernard Zhao > --- > drivers/thermal/thermal_core.c | 1 + > 1 file changed, 1

Re: [Resend][PATCH] drivers/thermal: cleanup coding style a bit

2020-11-12 Thread Daniel Lezcano
On 10/11/2020 09:10, Bernard wrote: > Function thermal_add_hwmon_sysfs, hwmon will be NULL when > new_hwmon_device = 0, so there is no need to check, kfree will > handle NULL point. > > Signed-off-by: Bernard Zhao > --- Applied, thanks -- Linaro.org │ Open source

Re: [PATCH v2] thermal: sun8i: Use bitmap API instead of open code

2020-11-12 Thread Daniel Lezcano
On 09/11/2020 12:46, Frank Lee wrote: > From: Yangtao Li > > The bitmap_* API is the standard way to access data in the bitfield. > So convert irq_ack to return an unsigned long, and make things to use > bitmap API. > > Signed-off-by: Yangtao Li > --- > v2: > Make irq_ack to return an unsigned

Re: [PATCH V2] clocksource/drivers/cadence_ttc: fix memory leak in ttc_setup_clockevent()

2020-11-12 Thread Daniel Lezcano
On 11/11/2020 02:16, Yu Kuai wrote: > If clk_notifier_register() failed, ttc_setup_clockevent() will return > without freeing 'ttcce', which will leak memory. > > Fixes: 70504f311d4b ("clocksource/drivers/cadence_ttc: Convert init function > to return error") > Reported-by: Hulk Robot >

Re: [PATCH v2 05/17] clocksource/hyperv: use MSR-based access if running as root

2020-11-12 Thread Daniel Lezcano
On 05/11/2020 17:58, Wei Liu wrote: > Signed-off-by: Wei Liu > --- I would like to apply this patch but the changelog is too short (one line). Please add a small paragraph (no need to resend just answer here, I will amend the log myself. > drivers/clocksource/hyperv_timer.c | 3 +++ > 1 file

Re: [PATCH 1/3] drivers/clocksource: Remove EZChip NPS clocksource driver

2020-11-12 Thread Daniel Lezcano
On 05/11/2020 22:22, Vineet Gupta wrote: > NPS platform has been removed from ARC port and there are no in-tree > users of it now. So RIP ! > > Cc: Daniel Lezcano > Cc: Thomas Gleixner > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Vineet Gupta > --- Appl

Re: [PATCH 3/4] powercap/drivers/dtpm: Add API for dynamic thermal power management

2020-11-10 Thread Daniel Lezcano
On 10/11/2020 12:05, Lukasz Luba wrote: > > Actually I've found one issue when I have been trying to clean > my testing branch with modified scmi-cpufreq.c. IMO, those errors are not the dtpm framework fault but the scmi-cpufreq. You should add a component in the drivers/powercap which does the

Re: [PATCH 3/4] powercap/drivers/dtpm: Add API for dynamic thermal power management

2020-11-10 Thread Daniel Lezcano
Hi Lukasz, thanks for the review On 10/11/2020 10:59, Lukasz Luba wrote: [ ... ] >> +/* Init section thermal table */ >> +extern struct dtpm_descr *__dtpm_table[]; >> +extern struct dtpm_descr *__dtpm_table_end[]; >> + >> +#define DTPM_TABLE_ENTRY(name)    \ >> +    static

Re: [PATCH 1/5] cpuidle: Remove pointless stub

2020-11-05 Thread Daniel Lezcano
Hi Rafael, On 05/11/2020 15:14, Rafael J. Wysocki wrote: [ ... ] >> [ ... ] >> >>> Applied (this patch alone) as 5.10-rc material with some minor edits >>> in the changelog, thanks! >> >> Does it mean you disagree the other patches? Or are you waiting for more >> comments? > > Actually,

Re: [PATCH] thermal: Rearrange thermal_zone_device_set_polling()

2020-11-05 Thread Daniel Lezcano
On 05/11/2020 10:13, Viresh Kumar wrote: > Rearrange thermal_zone_device_set_polling() to make it more readable and > reduce duplicate code. > > Signed-off-by: Viresh Kumar > --- Hi Viresh, I have a series where this function is reworked and conflicts with your changes. The delay is converted

Re: [PATCH 4/4] powercap/drivers/dtpm: Add CPU energy model based support

2020-11-04 Thread Daniel Lezcano
On 04/11/2020 11:57, Lukasz Luba wrote: [ ... ] > Let me go again through the patches and then I will add my reviewed by. > > I will also run LTP hotplug or LISA hotplug torture on this tree, > just to check it's fine. Ah yes, good idea. Thanks for doing that. --

Re: [PATCH 4/4] powercap/drivers/dtpm: Add CPU energy model based support

2020-11-04 Thread Daniel Lezcano
Hi Lukasz, On 23/10/2020 15:27, Lukasz Luba wrote: > Hi Daniel, > > > On 10/6/20 1:20 PM, Daniel Lezcano wrote: >> With the powercap dtpm controller, we are able to plug devices with >> power limitation features in the tree. >> >> The following patch intro

Re: [PATCH 3/4] powercap/drivers/dtpm: Add API for dynamic thermal power management

2020-11-03 Thread Daniel Lezcano
Thermal Power Management? Ok, noted. [ ... ] >> +++ b/drivers/powercap/dtpm.c >> @@ -0,0 +1,430 @@ >> +// SPDX-License-Identifier: GPL-2.0-only >> +/* >> + * Copyright 2020 Linaro Limited >> + * >> + * Author: Daniel Lezcano >> + * >> + * The

Re: [PATCH 1/3] dt-bindings: thermal: mediatek: make resets property optional

2020-10-27 Thread Daniel Lezcano
On 21/10/2020 18:42, Fabien Parent wrote: > MT8516 Thermal IP does not support reset. Make the resets property > optional in order to be able to support MT8516 SoC. > > Signed-off-by: Fabien Parent > --- Applied, thanks -- Linaro.org │ Open source software for ARM

Re: [PATCH] thermal: rcar: replace spin_lock_irqsave by spin_lock in hard IRQ

2020-10-27 Thread Daniel Lezcano
On 27/10/2020 02:06, Tian Tao wrote: > On RT or even on mainline with 'threadirqs' on the command line all > interrupts which are not explicitly requested with IRQF_NO_THREAD > run their handlers in thread context. The same applies to soft interrupts. > That means they are subject to the normal

Re: [PATCH v2] drivers/thermal: optimize the for circle to run a bit fast

2020-10-27 Thread Daniel Lezcano
On 27/10/2020 02:37, Bernard Zhao wrote: > Function thermal_zone_device_register, in the for circle, if the > first if branch set the count bit in tz->trips_disabled, there is > no need to set in the other if branch again. > This change is to make the code run a bit fast and readable. > >

<    1   2   3   4   5   6   7   8   9   10   >