Re: [PATCH] cpufreq: Covert to exit callback returning void

2024-04-12 Thread Viresh Kumar
On 10-04-24, 06:22, Lizhe wrote: > For the exit() callback function returning an int type value. > this leads many driver authors mistakenly believing that error > handling can be performed by returning an error code. However. > the returned value is ignore, and to improve this situation. > it is

Re: [PATCH v2] cpufreq: pmac32: Use of_property_read_reg() to parse "reg"

2023-09-27 Thread Viresh Kumar
On 25-09-23, 14:02, Rob Herring wrote: > Use the recently added of_property_read_reg() helper to get the > untranslated "reg" address value. > > Acked-by: Viresh Kumar > Signed-off-by: Rob Herring > --- > v2: > - Add missing include > --- > drivers/c

Re: [PATCH] cpufreq: pmac32: Use of_property_read_reg() to parse "reg"

2023-07-02 Thread Viresh Kumar
0, , NULL) < 0) > return 0; > /* That works for all keylargos but shall be fixed properly >* some day... The problem is that it seems we can't rely Acked-by: Viresh Kumar -- viresh

Re: [PATCH 18/19] OPP: Adjust includes to remove of_device.h

2023-03-29 Thread Viresh Kumar
5adf0..63b126c6215e 100644 > --- a/drivers/opp/of.c > +++ b/drivers/opp/of.c > @@ -13,7 +13,7 @@ > #include > #include > #include > -#include > +#include > #include > #include > #include Acked-by: Viresh Kumar -- viresh

Re: [PATCH 15/19] cpufreq: sun50i: Add explicit include for cpu.h

2023-03-29 Thread Viresh Kumar
> @@ -10,9 +10,10 @@ > > #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > > +#include > #include > #include > -#include > +#include > #include > #include > #include Acked-by: Viresh Kumar -- viresh

Re: [PATCH 14/19] cpufreq: Adjust includes to remove of_device.h

2023-03-29 Thread Viresh Kumar
de/linux/cpufreq.h | 1 - > 10 files changed, 8 insertions(+), 11 deletions(-) Acked-by: Viresh Kumar -- viresh

Re: [PATCH] cpufreq: pmac32: Use of_property_read_bool() for boolean properties

2023-03-12 Thread Viresh Kumar
ty_read_bool(). > > Signed-off-by: Rob Herring > --- > drivers/cpufreq/pmac32-cpufreq.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Acked-by: Viresh Kumar -- viresh

Re: [PATCH] cpufreq: pmac32-cpufreq: Fix refcount leak bug

2022-06-19 Thread Viresh Kumar
On 18-06-22, 10:25, Liang He wrote: > In pmac_cpufreq_init_MacRISC3(), we need to add corresponding > of_node_put() for the three node pointers whose refcount have > been incremented by of_find_node_by_name(). > > Signed-off-by: Liang He > --- > drivers/cpufreq/pmac32-cpufreq.c | 4 > 1

Re: [PATCH] cpufreq: Prepare cleanup of powerpc's asm/prom.h

2022-04-04 Thread Viresh Kumar
> b/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c > index 037fe23bc6ed..4fba3637b115 100644 > --- a/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c > +++ b/drivers/cpufreq/ppc_cbe_cpufreq_pmi.c > @@ -13,9 +13,9 @@ > #include > #include > #include > +#include > > #include > -#include > #include > #include Acked-by: Viresh Kumar -- viresh

Re: [PATCH V4 3/4] cpufreq: powerenv: Migrate to ->exit() callback instead of ->stop_cpu()

2021-06-23 Thread Viresh Kumar
On 23-06-21, 15:45, Michael Ellerman wrote: > Viresh Kumar writes: > > > > Subject: Re: [PATCH V4 3/4] cpufreq: powerenv: Migrate to ->exit() callback > > instead of ->stop_cpu() > > Typo in subject should be "powernv". Thanks for noticing it :) -- viresh

[PATCH V4.1 3/4] cpufreq: powernv: Migrate to ->exit() callback instead of ->stop_cpu()

2021-06-23 Thread Viresh Kumar
callbacks for cpufreq drivers, i.e. stop_cpu() and exit(), as everything can be done from the exit() callback itself. Migrate to using the exit() callback instead of stop_cpu(). Signed-off-by: Viresh Kumar --- V4->V4.1: - s/powerenv/powernv/ drivers/cpufreq/powernv-cpufreq.c | 23 +-

[PATCH V4 3/4] cpufreq: powerenv: Migrate to ->exit() callback instead of ->stop_cpu()

2021-06-22 Thread Viresh Kumar
callbacks for cpufreq drivers, i.e. stop_cpu() and exit(), as everything can be done from the exit() callback itself. Migrate to using the exit() callback instead of stop_cpu(). Signed-off-by: Viresh Kumar --- drivers/cpufreq/powernv-cpufreq.c | 23 +-- 1 file changed, 9 inserti

[PATCH V4 0/4] cpufreq: Migrate away from ->stop_cpu() callback

2021-06-22 Thread Viresh Kumar
from 5.13-rc7. - No need to update exit() for intel pstate anymore. - Remove the stop_cpu() callback completely. -- Viresh [1] https://lore.kernel.org/linux-pm/5490292.DvuYhMxLoT@kreacher/ Viresh Kumar (4): cpufreq: cppc: Migrate to ->exit() callback instead of ->stop_cpu() cpufreq: in

[PATCH V2 3/3] cpufreq: powerenv: Migrate to ->exit() callback instead of ->stop_cpu()

2021-06-16 Thread Viresh Kumar
callbacks for cpufreq drivers, i.e. stop_cpu() and exit(), as everything can be done from the exit() callback itself. Migrate to using the exit() callback instead of stop_cpu(). Signed-off-by: Viresh Kumar --- drivers/cpufreq/powernv-cpufreq.c | 23 +-- 1 file changed, 9 inserti

[PATCH V2 0/3] cpufreq: Migrate away from ->stop_cpu() callback

2021-06-16 Thread Viresh Kumar
) callback instead of stop_cpu(). The stop_cpu() callback isn't removed from core as it will be reused in a different way in a separate patchset. -- Viresh Viresh Kumar (3): cpufreq: cppc: Migrate to ->exit() callback instead of ->stop_cpu() cpufreq: intel_pstate: Migrate to ->exit

Re: [PATCH 0/5] cpufreq: cppc: Fix suspend/resume specific races with FIE code

2021-06-15 Thread Viresh Kumar
On 15-06-21, 08:17, Qian Cai wrote: > On 6/15/2021 3:50 AM, Viresh Kumar wrote: > > This is a strange place to get the issue from. And this is a new > > issue. > > Well, it was still the same exercises with CPU online/offline. > > > > >> [ 4

Re: [PATCH 0/5] cpufreq: cppc: Fix suspend/resume specific races with FIE code

2021-06-15 Thread Viresh Kumar
On 15-06-21, 13:20, Viresh Kumar wrote: > I can see one place where race can happen, i.e. between > topology_clear_scale_freq_source() and topology_scale_freq_tick(). It > is possible that sfd->set_freq_scale() may get called for a previously > set handler as there is no protectio

Re: [PATCH 0/5] cpufreq: cppc: Fix suspend/resume specific races with FIE code

2021-06-15 Thread Viresh Kumar
Hi Qian, First of all thanks for testing this, I need more of your help to test this out :) FWIW, I did test this on my Hikey board today, with some hacks, and tried multiple insmod/rmmod operations for the driver, and I wasn't able to reproduce the issue you reported. I did enable the

[PATCH 3/5] cpufreq: powerenv: Migrate to ->exit() callback instead of ->stop_cpu()

2021-06-10 Thread Viresh Kumar
callbacks for cpufreq drivers, i.e. stop_cpu() and exit(), as everything can be done from the exit() callback itself. Migrate to using the exit() callback instead of stop_cpu(). Signed-off-by: Viresh Kumar --- drivers/cpufreq/powernv-cpufreq.c | 23 +-- 1 file changed, 9 inserti

[PATCH 0/5] cpufreq: cppc: Fix suspend/resume specific races with FIE code

2021-06-10 Thread Viresh Kumar
cpu() callbacks in the cpufreq core, which will be called for each CPU's addition/removal. A similar call was already available in the cpufreq core, which isn't required anymore and so its users are migrated to use exit() callback instead. This is targeted for v5.14-rc1. -- Viresh Viresh Kumar

Re: [PATCH v3 2/2] powerpc: Remove remaining parts of oprofile

2021-03-01 Thread Viresh Kumar
and so left it for the right people to handle. :) Acked-by: Viresh Kumar -- viresh

[PATCH] cpufreq: Remove unused flag CPUFREQ_PM_NO_WARN

2021-02-01 Thread Viresh Kumar
This flag is set by one of the drivers but it isn't used in the code otherwise. Remove the unused flag and update the driver. Signed-off-by: Viresh Kumar --- Rebased over: https://lore.kernel.org/lkml/a59bb322b22c247d570b70a8e94067804287623b.1612241683.git.viresh.ku...@linaro.org/ drivers

Re: [PATCH 10/18] arch: powerpc: Stop building and using oprofile

2021-01-17 Thread Viresh Kumar
On 14-01-21, 17:05, Viresh Kumar wrote: > The "oprofile" user-space tools don't use the kernel OPROFILE support > any more, and haven't in a long time. User-space has been converted to > the perf interfaces. > > This commits stops building oprofile for powerpc an

Re: [PATCH 10/18] arch: powerpc: Stop building and using oprofile

2021-01-14 Thread Viresh Kumar
On 14-01-21, 17:05, Viresh Kumar wrote: > The "oprofile" user-space tools don't use the kernel OPROFILE support > any more, and haven't in a long time. User-space has been converted to > the perf interfaces. > > This commits stops building oprofile for powerpc an

[PATCH 11/18] arch: powerpc: Remove oprofile

2021-01-14 Thread Viresh Kumar
The previous commit already disabled building oprofile, lets remove the oprofile directory now. Suggested-by: Christoph Hellwig Suggested-by: Linus Torvalds Signed-off-by: Viresh Kumar --- arch/powerpc/oprofile/Makefile | 19 - arch/powerpc/oprofile/backtrace.c | 120

[PATCH 10/18] arch: powerpc: Stop building and using oprofile

2021-01-14 Thread Viresh Kumar
uggested-by: Christoph Hellwig Suggested-by: Linus Torvalds Signed-off-by: Viresh Kumar --- arch/powerpc/Kconfig | 1 - arch/powerpc/Makefile | 2 - arch/powerpc/configs/44x/akebono_defconfig| 1 - arch/powerpc/configs/44x/currituck_de

Re: [PATCH v2 06/13] cpufreq: powernv-cpufreq: Functions only used in call-backs should be static

2020-07-15 Thread Viresh Kumar
vious prototype for > ‘powernv_cpufreq_work_fn’ [-Wmissing-prototypes] > > Cc: Michael Ellerman > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: linuxppc-dev@lists.ozlabs.org > Signed-off-by: Lee Jones > Acked-by: Viresh Kumar > --- > drivers/cpufreq/po

Re: [PATCH 05/13] cpufreq/arch: powerpc: pasemi: Move prototypes to shared header

2020-07-15 Thread Viresh Kumar
On 15-07-20, 07:36, Lee Jones wrote: > I searched for "include.*platforms/" in drivers/, and was scared off > this method since no one else does this. Yeah its not right for generic drivers, but this is very much platform specific so it is fine here. -- viresh

Re: [PATCH 05/13] cpufreq/arch: powerpc: pasemi: Move prototypes to shared header

2020-07-14 Thread Viresh Kumar
On 14-07-20, 20:49, Olof Johansson wrote: > On Tue, Jul 14, 2020 at 8:07 PM Viresh Kumar wrote: > > > > On 14-07-20, 15:50, Lee Jones wrote: > > > If function callers and providers do not share the same prototypes the > > > compiler complains of missin

Re: [PATCH -next] cpufreq: powernv: Make some symbols static

2020-07-14 Thread Viresh Kumar
ns(-) Lee also sent a fix for this, but yours look complete :) https://lore.kernel.org/lkml/20200714145049.2496163-7-lee.jo...@linaro.org/ Acked-by: Viresh Kumar -- viresh

Re: [PATCH 07/13] cpufreq: powernv-cpufreq: Fix a bunch of kerneldoc related issues

2020-07-14 Thread Viresh Kumar
e void queue_gpstate_timer(struct > global_pstate_info *gpstates) > /** > * gpstate_timer_handler > * > - * @data: pointer to cpufreq_policy on which timer was queued > + * @t: Timer context used to fetch global pstate info struct > * > * This handler brings down the global pstate closer to the local pstate > * according quadratic equation. Queues a new timer if it is still not equal Acked-by: Viresh Kumar -- viresh

Re: [PATCH 06/13] cpufreq: powernv-cpufreq: Functions only used in call-backs should be static

2020-07-14 Thread Viresh Kumar
cpufreq_reboot_notifier, > }; > > -void powernv_cpufreq_work_fn(struct work_struct *work) > +static void powernv_cpufreq_work_fn(struct work_struct *work) > { > struct chip *chip = container_of(work, struct chip, throttle); > struct cpufreq_policy *policy; Acked-by: Viresh Kumar -- viresh

Re: [PATCH 05/13] cpufreq/arch: powerpc: pasemi: Move prototypes to shared header

2020-07-14 Thread Viresh Kumar
On 14-07-20, 15:50, Lee Jones wrote: > If function callers and providers do not share the same prototypes the > compiler complains of missing prototypes. Fix this by moving the > already existing prototypes out to a mutually convenient location. > > Fixes the following W=1 kernel build

[PATCH V4 2/3] cpufreq: Register governors at core_initcall

2020-06-29 Thread Viresh Kumar
. Acked-by: Viresh Kumar Signed-off-by: Quentin Perret Signed-off-by: Viresh Kumar --- .../platforms/cell/cpufreq_spudemand.c| 26 ++- drivers/cpufreq/cpufreq_conservative.c| 22 drivers/cpufreq/cpufreq_ondemand.c| 24

[PATCH V4 0/3] cpufreq: Allow default governor on cmdline and fix locking issues

2020-06-29 Thread Viresh Kumar
pecify default governor on command line Viresh Kumar (1): cpufreq: Fix locking issues with governors .../admin-guide/kernel-parameters.txt | 5 ++ Documentation/admin-guide/pm/cpufreq.rst | 6 +- .../platforms/cell/cpufreq_spudemand.c| 26 +- drivers/cpufreq/cpu

[PATCH V3 2/3] cpufreq: Register governors at core_initcall

2020-06-25 Thread Viresh Kumar
. Acked-by: Viresh Kumar Signed-off-by: Quentin Perret Signed-off-by: Viresh Kumar --- .../platforms/cell/cpufreq_spudemand.c| 26 ++- drivers/cpufreq/cpufreq_conservative.c| 22 drivers/cpufreq/cpufreq_ondemand.c| 24

[PATCH v3 0/3] cpufreq: Allow default governor on cmdline and fix locking issues

2020-06-25 Thread Viresh Kumar
ead of the driver registration (Viresh) Quentin Perret (2): cpufreq: Register governors at core_initcall cpufreq: Specify default governor on command line Viresh Kumar (1): cpufreq: Fix locking issues with governors .../admin-guide/kernel-parameters.txt | 5 + Documentation/admin-guide

Re: [PATCH v2 2/2] cpufreq: Specify default governor on command line

2020-06-25 Thread Viresh Kumar
On 23-06-20, 15:21, Quentin Perret wrote: > @@ -2789,7 +2796,13 @@ static int __init cpufreq_core_init(void) > cpufreq_global_kobject = kobject_create_and_add("cpufreq", > _subsys.dev_root->kobj); > BUG_ON(!cpufreq_global_kobject); > > + mutex_lock(_governor_mutex); > + if

Re: [PATCH v2 2/2] cpufreq: Specify default governor on command line

2020-06-23 Thread Viresh Kumar
efault_governor(); > mutex_unlock(_governor_mutex); > } > EXPORT_SYMBOL_GPL(cpufreq_unregister_governor); > @@ -2789,7 +2796,13 @@ static int __init cpufreq_core_init(void) > cpufreq_global_kobject = kobject_create_and_add("cpufreq", > _subsys.dev_root

Re: [PATCH 2/2] cpufreq: Specify default governor on command line

2020-06-16 Thread Viresh Kumar
On 16-06-20, 10:48, Quentin Perret wrote: > ---8<--- > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > index 0f05caedc320..a9219404e07f 100644 > --- a/drivers/cpufreq/cpufreq.c > +++ b/drivers/cpufreq/cpufreq.c > @@ -2340,6 +2340,11 @@ int cpufreq_register_governor(struct

Re: [PATCH 2/2] cpufreq: Specify default governor on command line

2020-06-16 Thread Viresh Kumar
On 16-06-20, 09:31, Quentin Perret wrote: > Right, so the reason I avoided cpufreq_core_init() was because it is > called at core_initcall() time, which means I can't really assume the > governors have been loaded by that time. By waiting for the driver to > probe before detecting the default gov,

Re: [PATCH 2/2] cpufreq: Specify default governor on command line

2020-06-15 Thread Viresh Kumar
On 15-06-20, 17:55, Quentin Perret wrote: > +static void cpufreq_get_default_governor(void) > +{ > + default_governor = cpufreq_parse_governor(cpufreq_param_governor); > + if (!default_governor) { > + if (*cpufreq_param_governor) > + pr_warn("Failed to find

Re: [PATCH 1/2] cpufreq: Register governors at core_initcall

2020-06-15 Thread Viresh Kumar
req_powersave.c | 18 +++-- > drivers/cpufreq/cpufreq_userspace.c | 18 +++-- > include/linux/cpufreq.h | 14 ++ > kernel/sched/cpufreq_schedutil.c | 6 + > 8 files changed, 36 insertions(+), 106 deletions(-) Acked-by: Viresh Kumar -- viresh

Re: [PATCH v2 1/2] cpufreq: qoriq: convert to a platform driver

2020-05-06 Thread Viresh Kumar
On 28-04-20, 16:31, Viresh Kumar wrote: > On 21-04-20, 10:29, Mian Yousaf Kaukab wrote: > > The driver has to be manually loaded if it is built as a module. It > > is neither exporting MODULE_DEVICE_TABLE nor MODULE_ALIAS. Moreover, > > no platform-device is created (and t

Re: [PATCH v2 1/2] cpufreq: qoriq: convert to a platform driver

2020-04-28 Thread Viresh Kumar
s it depends on. > > Convert the module to a platform driver with its own alias. Moreover, > drop whitelisted SOCs. Platform device will be created only for the > compatible platforms. > > Reviewed-by: Yuantian Tang > Acked-by: Viresh Kumar > Signed-off-by: Mian Yousaf Kaukab > -

Re: [PATCH 1/2] cpufreq: qoriq: convert to a platform driver

2020-04-05 Thread Viresh Kumar
- > 1 file changed, 29 insertions(+), 47 deletions(-) For both patches, Acked-by: Viresh Kumar -- viresh

Re: [PATCH v3] cpufreq: powernv: fix stack bloat and hard limit on num cpus

2019-10-31 Thread Viresh Kumar
due to Pmax > capping at chip level") > Cc: Michael Ellerman > Cc: Shilpasri G Bhat > Cc: Preeti U Murthy > Cc: Viresh Kumar > Cc: Rafael J. Wysocki > Cc: linux...@vger.kernel.org > Cc: linuxppc-dev@lists.ozlabs.org > Signed-off-by: John Hubbard > --- Acked-by: Viresh Kumar

Re: [PATCH v2] cpufreq: powernv: fix stack bloat and NR_CPUS limitation

2019-10-17 Thread Viresh Kumar
llocating based on CONFIG_NR_CPUS. > > Fixes: 053819e0bf840 ("cpufreq: powernv: Handle throttling due to Pmax > capping at chip level") > Cc: Shilpasri G Bhat > Cc: Preeti U Murthy > Cc: Viresh Kumar > Cc: Rafael J. Wysocki > Cc: linux...@vger.kernel.org > Cc: lin

Re: [PATCH] cpufreq: powernv: fix stack bloat and NR_CPUS limitation

2019-10-17 Thread Viresh Kumar
On 17-10-19, 21:41, John Hubbard wrote: > On 10/17/19 9:38 PM, Viresh Kumar wrote: > > On 17-10-19, 21:34, John Hubbard wrote: > >> On 10/17/19 9:27 PM, Viresh Kumar wrote: > >>> On 17-10-19, 17:04, John Hubbard wrote: > >>>> The following bu

Re: [PATCH] cpufreq: powernv: fix stack bloat and NR_CPUS limitation

2019-10-17 Thread Viresh Kumar
On 17-10-19, 21:34, John Hubbard wrote: > On 10/17/19 9:27 PM, Viresh Kumar wrote: > > On 17-10-19, 17:04, John Hubbard wrote: > >> The following build warning occurred on powerpc 64-bit builds: > >> > >> drivers/cpufreq/powernv-cpufreq.c: In function 'init_chip

Re: [PATCH] cpufreq: powernv: fix stack bloat and NR_CPUS limitation

2019-10-17 Thread Viresh Kumar
R_CPUS > 256. > > Fix both problems by dynamically allocating based on CONFIG_NR_CPUS. > > Fixes: 053819e0bf840 ("cpufreq: powernv: Handle throttling due to Pmax > capping at chip level") > Cc: Shilpasri G Bhat > Cc: Preeti U Murthy > Cc: Viresh Kumar > Cc: Rafael J.

[PATCH V2 03/10] powerpc: macintosh: Switch to QoS requests instead of cpufreq notifier

2019-07-23 Thread Viresh Kumar
The cpufreq core now takes the min/max frequency constraints via QoS requests and the CPUFREQ_ADJUST notifier shall get removed later on. Switch over to using the QoS request for maximum frequency constraint for windfarm_cpufreq_clamp driver. Signed-off-by: Viresh Kumar --- drivers/macintosh

[PATCH V2 00/10] cpufreq: Migrate users of policy notifiers to QoS requests

2019-07-23 Thread Viresh Kumar
;V2: - Added Acked-by tags - Reordered to keep cleanups at the bottom - Rebased over 5.3-rc1 -- viresh Viresh Kumar (10): cpufreq: Add policy create/remove notifiers thermal: cpu_cooling: Switch to QoS requests instead of cpufreq notifier powerpc: macintosh: Switch to QoS requests inst

Re: [PATCH v7] cpufreq/pasemi: fix an use-after-free in pas_cpufreq_cpu_init()

2019-07-16 Thread Viresh Kumar
Wen Yang > Cc: "Rafael J. Wysocki" > Cc: Viresh Kumar > Cc: Michael Ellerman > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux...@vger.kernel.org > Cc: linux-ker...@vger.kernel.org > --- > v7: adapt to commit ("cpufreq: Make cpufreq_generic_init(

Re: [PATCH 00/10] cpufreq: Migrate users of policy notifiers to QoS requests

2019-07-16 Thread Viresh Kumar
On 16-07-19, 12:06, Rafael J. Wysocki wrote: > On Tue, Jul 16, 2019 at 11:49 AM Viresh Kumar wrote: > > > > Hello, > > > > Now that cpufreq core supports taking QoS requests for min/max cpu > > frequencies, lets migrate rest of the users to using them in

[PATCH 06/10] powerpc: macintosh: Switch to QoS requests instead of cpufreq notifier

2019-07-16 Thread Viresh Kumar
The cpufreq core now takes the min/max frequency constraints via QoS requests and the CPUFREQ_ADJUST notifier shall get removed later on. Switch over to using the QoS request for maximum frequency constraint for windfarm_cpufreq_clamp driver. Signed-off-by: Viresh Kumar --- drivers/macintosh

[PATCH 00/10] cpufreq: Migrate users of policy notifiers to QoS requests

2019-07-16 Thread Viresh Kumar
CPUFREQ_CREATE_POLICY and CPUFREQ_REMOVE_POLICY events to it for the acpi stuff specifically. So the policy notifiers aren't completely removed. Boot tested on my x86 PC and ARM hikey board. Nothing looked broken :) This has already gone through build bot for a few days now. -- viresh Viresh Kumar (10): cpufreq

Re: [PATCH v6] cpufreq/pasemi: fix an use-after-free inpas_cpufreq_cpu_init()

2019-07-16 Thread Viresh Kumar
On 16-07-19, 16:26, wen.yan...@zte.com.cn wrote: > Okay thank you. > Now this patch > (https://lore.kernel.org/lkml/ee8cf5fb4b4a01fdf9199037ff6d835b935cfd13.1562902877.git.viresh.ku...@linaro.org/) > > seems to have not been merged into the linux-next. > > In order to avoid code conflicts, we

[PATCH V3] cpufreq: Make cpufreq_generic_init() return void

2019-07-15 Thread Viresh Kumar
It always returns 0 (success) and its return type should really be void. Over that, many drivers have added error handling code based on its return value, which is not required at all. change its return type to void and update all the callers. Signed-off-by: Viresh Kumar --- V2->V3: - Upd

[PATCH V2] cpufreq: Make cpufreq_generic_init() return void

2019-07-13 Thread Viresh Kumar
It always returns 0 (success) and its return type should really be void. Over that, many drivers have added error handling code based on its return value, which is not required at all. change its return type to void and update all the callers. Signed-off-by: Viresh Kumar --- V1->V2: - Fi

Re: [PATCH v6] cpufreq/pasemi: fix an use-after-free in pas_cpufreq_cpu_init()

2019-07-11 Thread Viresh Kumar
Wen Yang > Cc: "Rafael J. Wysocki" > Cc: Viresh Kumar > Cc: Michael Ellerman > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux...@vger.kernel.org > Cc: linux-ker...@vger.kernel.org > --- > v6: keep the blank line and fix warning: label 'out_unmap_sdcpwr' defin

[PATCH] cpufreq: Make cpufreq_generic_init() return void

2019-07-11 Thread Viresh Kumar
It always returns 0 (success) and its return type should really be void. Over that, many drivers have added error handling code based on its return value, which is not required at all. change its return type to void and update all the callers. Signed-off-by: Viresh Kumar --- drivers/cpufreq

Re: [PATCH v5] cpufreq/pasemi: fix an use-after-free in pas_cpufreq_cpu_init()

2019-07-09 Thread Viresh Kumar
Wen Yang > Cc: "Rafael J. Wysocki" > Cc: Viresh Kumar > Cc: Michael Ellerman > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux...@vger.kernel.org > Cc: linux-ker...@vger.kernel.org > --- > v5: put together the code to get, use, and release cpu device_node. >

Re: [PATCH v4] cpufreq/pasemi: fix an use-after-free in pas_cpufreq_cpu_init()

2019-07-08 Thread Viresh Kumar
Wen Yang > Cc: "Rafael J. Wysocki" > Cc: Viresh Kumar > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux...@vger.kernel.org > Cc: linux-ker...@vger.kernel.org > --- > v4: restore the blank line. I don't find it restored in the below code. > v3: fix a leaked reference

Re: [PATCH v3] cpufreq/pasemi: fix an use-after-free in pas_cpufreq_cpu_init()

2019-07-08 Thread Viresh Kumar
Wen Yang > Cc: "Rafael J. Wysocki" > Cc: Viresh Kumar > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux...@vger.kernel.org > Cc: linux-ker...@vger.kernel.org > --- > v3: fix a leaked reference. > v2: clean up the code according to the advice of viresh. > > dri

Re: [PATCH v2] cpufreq/pasemi: fix an use-after-free in pas_cpufreq_cpu_init()

2019-07-08 Thread Viresh Kumar
Wen Yang > Cc: "Rafael J. Wysocki" > Cc: Viresh Kumar > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux...@vger.kernel.org > Cc: linux-ker...@vger.kernel.org > --- > v2: clean up the code according to the advice of viresh. > > drivers/cpufreq/pasemi-cpufreq.c |

Re: [PATCH] cpufreq/pasemi: fix an use-after-free in pas_cpufreq_cpu_init()

2019-07-08 Thread Viresh Kumar
Wen Yang > Cc: "Rafael J. Wysocki" > Cc: Viresh Kumar > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux...@vger.kernel.org > Cc: linux-ker...@vger.kernel.org > --- > drivers/cpufreq/pasemi-cpufreq.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-)

Re: [PATCH] cpufreq: powernv: fix missing check of return value in init_powernv_pstates()

2019-02-17 Thread Viresh Kumar
On 16-02-19, 12:06, Yangtao Li wrote: > kmalloc() could fail, so insert a check of its return value. And > if it fails, returns -ENOMEM. > > And remove (struct pstate_idx_revmap_data *) to fix coccinelle WARNING > by the way. > > WARNING: casting value returned by memory allocation function to

Re: [PATCH v2 28/34] dt-bindings: arm: Convert SPEAr board/soc bindings to json-schema

2018-12-03 Thread Viresh Kumar
On 03-12-18, 15:32, Rob Herring wrote: > Convert SPEAr SoC bindings to DT schema format using json-schema. > > Cc: Viresh Kumar > Cc: Shiraz Hashim > Cc: Mark Rutland > Cc: devicet...@vger.kernel.org > Signed-off-by: Rob Herring > --- > .../devicetree/bindings

Re: [PATCH v2] cpufreq: pmac64: add of_node_put()

2018-11-25 Thread Viresh Kumar
On 23-11-18, 08:33, Yangtao Li wrote: > of_find_node_by_path() acquires a reference to the node > returned by it and that reference needs to be dropped by its caller. > g5_neo2_cpufreq_init() doesn't do that, so fix it. > > Signed-off-by: Yangtao Li > Acked-by: Viresh Kuma

Re: [PATCH v2] cpufreq: powernv: add of_node_put()

2018-11-20 Thread Viresh Kumar
anges in v2 > -update changelog > --- > drivers/cpufreq/powernv-cpufreq.c | 17 +++-- > 1 file changed, 11 insertions(+), 6 deletions(-) Acked-by: Viresh Kumar -- viresh

Re: [PATCH] cpufreq: pmac64: add of_node_put()

2018-11-20 Thread Viresh Kumar
NULL) { > pr_err("Can't find required platform function\n"); Acked-by: Viresh Kumar -- viresh

Re: [PATCH 1/7] drivers/cpufreq: change CONFIG_6xx to CONFIG_PPC_BOOK3S_32

2018-11-18 Thread Viresh Kumar
static int dfs_set_cpu_speed(int low_speed) > } > > /* set frequency */ > -#ifdef CONFIG_6xx > +#ifdef CONFIG_PPC_BOOK3S_32 > low_choose_7447a_dfs(low_speed); > #endif > udelay(100); Acked-by: Viresh Kumar -- viresh

Re: [PATCH v4 4/6] clk: qoriq: Add clockgen support for lx2160a

2018-10-04 Thread Viresh Kumar
> { .compatible = "fsl,p4080-clockgen", }, > { .compatible = "fsl,qoriq-clockgen-1.0", }, > { .compatible = "fsl,qoriq-clockgen-2.0", }, Acked-by: Viresh Kumar -- viresh

Re: [PATCH V3] cpufreq: powernv: Fix the hardlockup by synchronus smp_call in timer interrupt

2018-04-25 Thread Viresh Kumar
ta...@vger.kernel.org>[4.8+] > Reported-by: Nicholas Piggin <npig...@gmail.com> > Reported-by: Pridhiviraj Paidipeddi <ppaid...@linux.vnet.ibm.com> > Signed-off-by: Shilpasri G Bhat <shilpa.b...@linux.vnet.ibm.com> > --- > Changes from V2: > - Remove the c

Re: [PATCH V2] cpufreq: powernv: Fix the hardlockup by synchronus smp_call in timer interrupt

2018-04-25 Thread Viresh Kumar
On 25-04-18, 15:32, Shilpasri G Bhat wrote: > Hi, > > On 04/25/2018 02:47 PM, Viresh Kumar wrote: > > On 25-04-18, 14:32, Shilpasri G Bhat wrote: > >> gpstate_timer_handler() uses synchronous smp_call to set the pstate > >> on the requested core.

Re: [PATCH V2] cpufreq: powernv: Fix the hardlockup by synchronus smp_call in timer interrupt

2018-04-25 Thread Viresh Kumar
On 25-04-18, 14:32, Shilpasri G Bhat wrote: > gpstate_timer_handler() uses synchronous smp_call to set the pstate > on the requested core. This causes the below hard lockup: > > [c03fe566b320] [c01d5340] smp_call_function_single+0x110/0x180 > (unreliable) > [c03fe566b390]

Re: [PATCH] cpufreq: powernv: Remove global pstate ramp-down timer in POWER9

2018-04-25 Thread Viresh Kumar
> return 0; > } > @@ -990,7 +1002,8 @@ static void powernv_cpufreq_stop_cpu(struct > cpufreq_policy *policy) > freq_data.pstate_id = idx_to_pstate(powernv_pstate_info.min); > freq_data.gpstate_id = idx_to_pstate(powernv_pstate_info.min); > smp_call_f

Re: [PATCH 00/27] cpufreq: Stop validating cpufreq table in drivers

2018-03-09 Thread Viresh Kumar
On 26-02-18, 10:38, Viresh Kumar wrote: > Hi, > > A patchset [1] sent last week already updated the cpufreq core to start > validating cpufreq table if the policy contains a valid > "policy->freq_table" pointer. > > This series updates all such drivers to s

[PATCH V2 15/27] cpufreq: powernv: Don't validate the frequency table twice

2018-03-04 Thread Viresh Kumar
frequency table from powernv driver. Signed-off-by: Viresh Kumar <viresh.ku...@linaro.org> --- V1->V2: - s/powerenv/powernv/ drivers/cpufreq/powernv-cpufreq.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drive

Re: [PATCH 15/27] cpufreq: powerenv: Don't validate the frequency table twice

2018-02-26 Thread Viresh Kumar
On 26-02-18, 22:53, Michael Ellerman wrote: > Viresh Kumar <viresh.ku...@linaro.org> writes: > > Subject: Re: [PATCH 15/27] cpufreq: powerenv: Don't validate the frequency > > table twice >^ >

[PATCH 15/27] cpufreq: powerenv: Don't validate the frequency table twice

2018-02-25 Thread Viresh Kumar
frequency table from powerenv driver. Signed-off-by: Viresh Kumar <viresh.ku...@linaro.org> --- drivers/cpufreq/powernv-cpufreq.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c ind

[PATCH 00/27] cpufreq: Stop validating cpufreq table in drivers

2018-02-25 Thread Viresh Kumar
linaro.org [2] https://lkml.kernel.org/r/77d470741dab32c2076a35253b9c0c2f0136583b.1519293292.git.viresh.ku...@linaro.org [3] https://lkml.kernel.org/r/6b737a9c285840b4b2036fa51b692ee835664ec8.1519358505.git.viresh.ku...@linaro.org Viresh Kumar (27): cpufreq: imx6q: Find max freq from frequency

Re: [PATCH] cpufreq: powernv: Check negative value returned by cpufreq_table_find_index_dl()

2018-02-21 Thread Viresh Kumar
On 21-02-18, 11:17, Rafael J. Wysocki wrote: > The driver is expected to call cpufreq_table_validate_and_show() at > ->init() time and fail ->init() if that fails. > > That's kind of fragile, because it depends on the driver to do the right > thing. That's exactly what I am trying to explore

Re: [PATCH] cpufreq: powernv: Check negative value returned by cpufreq_table_find_index_dl()

2018-02-21 Thread Viresh Kumar
On 21-02-18, 10:27, Rafael J. Wysocki wrote: > To be precise, ->init() should fail as that's where the table is > created. The registration fails as a result then. > > But what if the bug is that ->init() doesn't fail when it should? > > I guess the core could double check the frequency table

Re: [PATCH] cpufreq: powernv: Check negative value returned by cpufreq_table_find_index_dl()

2018-02-20 Thread Viresh Kumar
On 21-02-18, 16:39, Michael Ellerman wrote: > Viresh Kumar <viresh.ku...@linaro.org> writes: > > AFAICT, you will get -1 here only if the freq table had no valid > > frequencies (or the freq table is empty). Why would that happen ? > > Bugs? The cupfreq driver shoul

Re: [PATCH] cpufreq: powernv: Check negative value returned by cpufreq_table_find_index_dl()

2018-02-12 Thread Viresh Kumar
On 12-02-18, 16:03, Shilpasri G Bhat wrote: > I agree too. There is no way we can get -1 with initialized cpu frequency > table. > We don't initialize powernv-cpufreq if we don't have valid CPU frequency > entries. Is there any other way to suppress the Coverity tool warning apart > from >

Re: [PATCH] cpufreq: powernv: Check negative value returned by cpufreq_table_find_index_dl()

2018-02-12 Thread Viresh Kumar
On 12-02-18, 15:51, Shilpasri G Bhat wrote: > This patch fixes the below Coverity warning: > > *** CID 182816: Memory - illegal accesses (NEGATIVE_RETURNS) > /drivers/cpufreq/powernv-cpufreq.c: 1008 in powernv_fast_switch() > 1002 unsigned int

Re: [PATCH] cpufreq: powernv: Dont assume distinct pstate values for nominal and pmin

2018-01-12 Thread Viresh Kumar
info.nominal = i; > - else if (id == pstate_min) > + if (id == pstate_min) > powernv_pstate_info.min = i; > > if (powernv_pstate_info.wof_enabled && id == pstate_turbo) { Acked-by: Viresh Kumar <viresh.ku...@linaro.org> -- viresh

Re: [v3 PATCH 0/3] powernv-cpufreq: Multiple pstate related fixes.

2018-01-10 Thread Viresh Kumar
On 13-12-17, 12:27, Gautham R. Shenoy wrote: > From: "Gautham R. Shenoy" <e...@linux.vnet.ibm.com> > > This is a third version of the patch to fix pstate related issues in > the powernv-cpufreq driver. Acked-by: Viresh Kumar <viresh.ku...@linaro.org> -- viresh

Re: [PATCH v2] cpufreq: powernv: Add support of frequency domain

2017-12-19 Thread Viresh Kumar
On 20-12-17, 12:12, Abhishek Goel wrote: > diff --git a/drivers/cpufreq/powernv-cpufreq.c > b/drivers/cpufreq/powernv-cpufreq.c > index b6d7c4c..fd642bc 100644 > --- a/drivers/cpufreq/powernv-cpufreq.c > +++ b/drivers/cpufreq/powernv-cpufreq.c > @@ -37,6 +37,7 @@ > #include /* Required for

Re: [PATCH] cpufreq: powernv: Add support of frequency domain

2017-12-18 Thread Viresh Kumar
On 18-12-17, 10:41, Abhishek wrote: > We need to do it in this way as the current implementation takes the max of > the PMSR of the cores. Thus, when the frequency is required to be ramped up, > it suffices to write to just the local PMSR, but when the frequency is to be > ramped down, if we don't

Re: [PATCH] cpufreq: powernv: Add support of frequency domain

2017-12-13 Thread Viresh Kumar
+ Gautham, @Gautham: Can you please help reviewing this one ? On 13-12-17, 13:49, Abhishek Goel wrote: > @@ -693,6 +746,8 @@ static int powernv_cpufreq_target_index(struct > cpufreq_policy *policy, > { > struct powernv_smp_call_data freq_data; > unsigned int cur_msec, gpstate_idx;

Re: [PATCH] cpufreq: powernv: Define methods to parse positive & negative pstates

2017-12-04 Thread Viresh Kumar
o read the correct pstate value. > > Signed-off-by: Gautham R. Shenoy <e...@linux.vnet.ibm.com> > Tested-by: Shilpasri G Bhat <shilpa.b...@linux.vnet.ibm.com> > --- > drivers/cpufreq/powernv-cpufreq.c | 43 > ++- > 1 file changed, 33 i

[PATCH V3 8/9] cpufreq: Add CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING cpufreq driver flag

2017-07-19 Thread Viresh Kumar
ing transition_latency unconditionally to CPUFREQ_ETERNAL are updated to use it. They don't need to set transition_latency anymore. There shouldn't be any functional change after this patch. Signed-off-by: Viresh Kumar <viresh.ku...@linaro.org> --- drivers/cpufreq/cpufreq-nforce2.c | 2 +-

[PATCH V3 0/9] cpufreq: transition-latency cleanups

2017-07-19 Thread Viresh Kumar
where the transition latency set to CPUFREQ_ETERNAL would not allow use of ondemand/conservative governors. Thanks to Dominik for his feedback on that. -- viresh Viresh Kumar (9): cpufreq: governor: Drop min_sampling_rate cpufreq: Use transition_delay_us for legacy governors as well cpufre

Re: [PATCH] cpufreq: Convert to using %pOF instead of full_name

2017-07-19 Thread Viresh Kumar
; Cc: "Rafael J. Wysocki" <r...@rjwysocki.net> > Cc: Viresh Kumar <viresh.ku...@linaro.org> > Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org> > Cc: Paul Mackerras <pau...@samba.org> > Cc: Michael Ellerman <m...@ellerman.id.au> > Cc: Patrice

Re: [patch 09/18] cpufreq/pasemi: Adjust system_state check

2017-05-14 Thread Viresh Kumar
es. > > Signed-off-by: Thomas Gleixner <t...@linutronix.de> > Cc: "Rafael J. Wysocki" <r...@rjwysocki.net> > Cc: Viresh Kumar <viresh.ku...@linaro.org> > Cc: linuxppc-dev@lists.ozlabs.org > --- > drivers/cpufreq/pasemi-cpufreq.c |2 +- > 1 fil

[PATCH] cpufreq: Remove CONFIG_CPU_FREQ_STAT_DETAILS config option

2017-01-05 Thread Viresh Kumar
with CONFIG_CPU_FREQ_STAT now in them, as users wanted stats to be enabled. Signed-off-by: Viresh Kumar <viresh.ku...@linaro.org> --- arch/arm/configs/exynos_defconfig | 2 +- arch/arm/configs/multi_v5_defconfig | 2 +- arch/arm/configs/multi_v7_defconfig | 2 +- arch/arm/c

Re: [PATCH V2] cpufreq: powernv: Add boost files to export ultra-turbo frequencies

2017-01-03 Thread Viresh Kumar
e...@linux.vnet.ibm.com> > --- > Changes from v1: > - Print if WOF is enabled > - s/clean_notifiers/cleanup_notifiers > > drivers/cpufreq/powernv-cpufreq.c | 50 > ++++--- > 1 file changed, 47 insertions(+), 3 deletions(-) Acked-by: Viresh Kumar <viresh.ku...@linaro.org> -- viresh

  1   2   3   >