[RFC v2 2/2] powerpc/powernv : Introduce capability for firmware-enabled-stop

2020-07-05 Thread Abhishek Goel
if firmware-stop-supported property is present. Earlier part of this patch was posted in this series : https://lkml.org/lkml/2020/3/4/589 Signed-off-by: Abhishek Goel Signed-off-by: Pratik Rajesh Sampat --- v1->v2 : Combined patch 2 and 3 from previous iteration and rebased it. arch/powe

[PATCH] cpuidle/powernv : Remove dead code block

2020-07-05 Thread Abhishek Goel
Commit 1961acad2f88559c2cdd2ef67c58c3627f1f6e54 removes usage of function "validate_dt_prop_sizes". This patch removes this unused function. Signed-off-by: Abhishek Goel --- drivers/cpuidle/cpuidle-powernv.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drive

[RFC v2 1/2] powerpc/powernv : Add support for pre-entry and post-exit of stop state using OPAL V4 OS services

2020-07-05 Thread Abhishek Goel
, are then handled in opal, from where we return successfully back to kernel. Signed-off-by: Abhishek Goel --- v1->v2 : Rebased the patch on Nick's Opal V4 OS patchset arch/powerpc/include/asm/opal-api.h| 4 +++- arch/powerpc/include/asm/opal.h| 1 + arch/powerpc/p

[RFC 3/3] powernv/cpuidle : Introduce capability for firmware-enabled-stop

2020-04-26 Thread Abhishek Goel
if firmware-stop-supported property is present. Earlier this patch was posted as part of this series : https://lkml.org/lkml/2020/3/4/589 Signed-off-by: Pratik Rajesh Sampat Signed-off-by: Abhishek Goel --- v1->v2: This patch is newly added in this series. arch/powerpc/include/

[RFC 2/3] powernv/cpuidle : Interface for an idle-stop dependency structure

2020-04-26 Thread Abhishek Goel
l/2020/3/4/589 Signed-off-by: Pratik Rajesh Sampat Signed-off-by: Abhishek Goel --- v1->v2: This patch is newly added in this series. arch/powerpc/include/asm/processor.h | 17 + arch/powerpc/kernel/dt_cpu_ftrs.c | 5 + arch/powerpc/platforms/powern

[RFC 1/3] powernv/cpuidle : Support for pre-entry and post exit of stop state in firmware

2020-04-26 Thread Abhishek Goel
/1245275/ Signed-off-by: Abhishek Goel Signed-off-by: Nicholas Piggin --- v1->v2 : No change in this patch. arch/powerpc/include/asm/opal-api.h| 8 - arch/powerpc/include/asm/opal.h| 3 ++ arch/powerpc/kernel/idle_book3s.S | 5 +++ arch/powerpc/platforms/powe

[RFC] cpuidle/powernv : Support for pre-entry and post exit of stop state in firmware

2020-04-03 Thread Abhishek Goel
: Abhishek Goel Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/opal-api.h| 8 - arch/powerpc/include/asm/opal.h| 3 ++ arch/powerpc/kernel/idle_book3s.S | 5 +++ arch/powerpc/platforms/powernv/idle.c | 37 ++ arch/powerpc

[RFC v5 3/3] cpuidle-powernv : Recompute the idle-state timeouts when state usage is enabled/disabled

2019-10-02 Thread Abhishek Goel
idle path. We also use the computed timeout to get timeout for snooze, thus getting rid of get_snooze_timeout for snooze loop. Signed-off-by: Abhishek Goel --- drivers/cpuidle/cpuidle-powernv.c | 35 +++ include/linux/cpuidle.h | 1 + 2 files changed, 13

[RFC v5 2/3] cpuidle : Add callback whenever a state usage is enabled/disabled

2019-10-02 Thread Abhishek Goel
: Abhishek Goel --- drivers/cpuidle/sysfs.c | 15 ++- include/linux/cpuidle.h | 3 +++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index 2bb2683b4..6c9bf2f7b 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers/cpuidle

[PATCH v5 1/3] cpuidle-powernv : forced wakeup for stop states

2019-10-02 Thread Abhishek Goel
essentially train the governor to select a deeper state for that cpu, as the timer here corresponds to the next available cpuidle state residency. Thus, cpu will eventually end up in the deepest possible state. Signed-off-by: Abhishek Goel --- Auto-promotion v1 : started as auto promotion logic for

[PATCH v5 0/3] Forced-wakeup for stop states on Powernv

2019-10-02 Thread Abhishek Goel
tches that was found out in recent experiments. No change in patch 2 and 3. Abhishek Goel (3): cpuidle-powernv : forced wakeup for stop states cpuidle : Add callback whenever a state usage is enabled/disabled cpuidle-powernv : Recompute the idle-state timeouts when state usage

[RFC 3/3] cpuidle/powernv : Add flags to identify stop state type

2019-08-23 Thread Abhishek Goel
Removed threshold latency which was being used to decide if a state is cpuidle type or not. This decision can be taken using flags, as this information has been encapsulated in the state->flags and being read from idle device-tree. Signed-off-by: Abhishek Goel --- arch/powerpc/include/asm/o

[RFC 2/3] cpuidle/powernv: Add support for versioned stop states

2019-08-23 Thread Abhishek Goel
bility of the code. Stop handle corresponding to each state can be called directly since state pointer is being passed now. Signed-off-by: Abhishek Goel --- arch/powerpc/include/asm/cpuidle.h| 8 +- arch/powerpc/platforms/powernv/idle.c | 331 +++--- 2 files changed,

[RFC 1/3] cpuidle/powernv : Pass state pointer instead of values to stop loop

2019-08-23 Thread Abhishek Goel
info. Signed-off-by: Abhishek Goel --- arch/powerpc/include/asm/processor.h | 5 +- arch/powerpc/platforms/powernv/idle.c | 50 --- drivers/cpuidle/cpuidle-powernv.c | 69 +-- 3 files changed, 55 insertions(+), 69 deletions(-) diff --git a/arch/powerpc

[RFC 0/3] New idle device-tree format and support for versioned stop state

2019-08-23 Thread Abhishek Goel
residency-ns = <0x989680>; psscr = <0x0 0x300374>; ... }; ... stop11 { ... compatible = "stop11,v1", ... };

[RFC v4 3/3] cpuidle-powernv : Recompute the idle-state timeouts when state usage is enabled/disabled

2019-07-12 Thread Abhishek Goel
idle path. We also use the computed timeout to get timeout for snooze, thus getting rid of get_snooze_timeout for snooze loop. Signed-off-by: Abhishek Goel --- drivers/cpuidle/cpuidle-powernv.c | 35 +++ include/linux/cpuidle.h | 1 + 2 files changed, 13

[RFC v4 2/3] cpuidle : Add callback whenever a state usage is enabled/disabled

2019-07-12 Thread Abhishek Goel
-by: Abhishek Goel --- drivers/cpuidle/sysfs.c | 15 ++- include/linux/cpuidle.h | 4 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index eb20adb5de23..141671a53967 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers

[PATCH v4 1/3] cpuidle-powernv : forced wakeup for stop states

2019-07-12 Thread Abhishek Goel
essentially train the governor to select a deeper state for that cpu, as the timer here corresponds to the next available cpuidle state residency. Thus, cpu will eventually end up in the deepest possible state. Signed-off-by: Abhishek Goel --- Auto-promotion v1 : started as auto promotion logic for

[PATCH v4 0/3] Forced-wakeup for stop states on Powernv

2019-07-12 Thread Abhishek Goel
ame of set/reset decrementer function. Handled irq work pending in try_set_dec_before_idle. No change in patch 2 and 3. Abhishek Goel (3): cpuidle-powernv : forced wakeup for stop states cpuidle : Add callback whenever a state usage is enabled/disabled cpuidle-powernv : Recomput

[RFC v3 3/3] cpuidle-powernv : Recompute the idle-state timeouts when state usage is enabled/disabled

2019-07-04 Thread Abhishek Goel
idle path. We also use the computed timeout to get timeout for snooze, thus getting rid of get_snooze_timeout for snooze loop. Signed-off-by: Abhishek Goel --- drivers/cpuidle/cpuidle-powernv.c | 35 +++ include/linux/cpuidle.h | 1 + 2 files changed, 13

[RFC v3 2/3] cpuidle : Add callback whenever a state usage is enabled/disabled

2019-07-04 Thread Abhishek Goel
-by: Abhishek Goel --- drivers/cpuidle/sysfs.c | 15 ++- include/linux/cpuidle.h | 4 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index eb20adb5d..141671a53 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers

[PATCH v3 1/3] cpuidle-powernv : forced wakeup for stop states

2019-07-04 Thread Abhishek Goel
essentially train the governor to select a deeper state for that cpu, as the timer here corresponds to the next available cpuidle state residency. Thus, cpu will eventually end up in the deepest possible state. Signed-off-by: Abhishek Goel --- Auto-promotion v1 : started as auto promotion logic for

[PATCH v3 0/3] Forced-wakeup for stop states on Powernv

2019-07-04 Thread Abhishek Goel
whenever a state is enbaled or disabled instead of computing everytime in fast idle path. 3) Use disable callback to recompute timeout whenever state usage is changed for a state. Also, cleaned up the get_snooze_timeout function. Abhishek Goel (3): cpuid

[PATCH v2 1/1] cpuidle-powernv : forced wakeup for stop states

2019-06-17 Thread Abhishek Goel
essentially train the governor to select a deeper state for that cpu, as the timer here corresponds to the next available cpuidle state residency. Thus, cpu will eventually end up in the deepest possible state. Signed-off-by: Abhishek Goel --- Auto-promotion v1 : started as auto promotion logic for

[PATCH v2 0/1] Forced-wakeup for stop states on Powernv

2019-06-17 Thread Abhishek Goel
ced wakeup instead of auto-promotion v2 of forced-wakeup : Extended the forced wakeup logic for all states. Setting the decrementer instead of queuing up a hrtimer to implement the logic. Abhishek Goel (1): cpuidle-powernv : forced wakeup for stop states drivers/cpuidle/cpuidle-powe

[PATCH 1/1] cpuidle-powernv : forced wakeup for stop lite states

2019-04-21 Thread Abhishek Goel
. Few such iterations will essentially train the governor to select a deeper state for that cpu, as the timer here corresponds to the next available cpuidle state residency. Cpu will be kicked out of the lite state and end up in a non-lite state. Signed-off-by: Abhishek Goel --- arch/powerpc/include

[PATCH 0/1] Forced-wakeup for stop lite states on Powernv

2019-04-21 Thread Abhishek Goel
down power consumption. We may extend this model for other states in future. Abhishek Goel (1): cpuidle-powernv : forced wakeup for stop lite states arch/powerpc/include/asm/opal-api.h | 1 + drivers/cpuidle/cpuidle-powernv.c | 71 - 2 files changed, 71 insertions(+),

[PATCH v2 2/2] cpuidle : Add auto-promotion flag to cpuidle flags

2019-04-05 Thread Abhishek Goel
This patch sets up flags for the state which needs to be auto-promoted. On POWERNV system, only lite states need to be autopromoted. We identify lite states by those which do not lose user context. That information has been used to set the flag for lite states. Signed-off-by: Abhishek Goel

[PATCH v2 1/2] cpuidle : auto-promotion for cpuidle states

2019-04-05 Thread Abhishek Goel
as soon as possible. Signed-off-by: Abhishek Goel --- v1->v2 : Removed timeout_needed and rebased to current upstream kernel drivers/cpuidle/cpuidle.c | 68 +- drivers/cpuidle/governors/ladder.c | 3 +- drivers/cpuidle/governors/menu.c |

[PATCH v2 0/2] Auto-promotion logic for cpuidle states

2019-04-05 Thread Abhishek Goel
-promotion only for stop0_lite, as it gives performance benefit(primary reason) along with lowering down power consumption. We may extend this model for other states in future. Abhishek Goel (2): cpuidle : auto-promotion for cpuidle states cpuidle : Add auto-promotion flag to cpuidle flags ar

[PATCH 2/2] cpuidle : Add auto-promotion flag to cpuidle flags

2019-03-22 Thread Abhishek Goel
This patch sets up flags for the state which needs to be auto-promoted. For powernv systems, lite states do not even lose user context. That information has been used to set the flag for lite states. Signed-off-by: Abhishek Goel --- arch/powerpc/include/asm/opal-api.h | 1 + drivers/cpuidle

[PATCH 1/2] cpuidle : auto-promotion for cpuidle states

2019-03-22 Thread Abhishek Goel
as soon as possible. Signed-off-by: Abhishek Goel --- drivers/cpuidle/cpuidle.c | 79 +- drivers/cpuidle/governors/ladder.c | 3 +- drivers/cpuidle/governors/menu.c | 23 - include/linux/cpuidle.h| 12 +++-- 4 files changed, 111

[PATCH 0/2] Auto-promotion logic for cpuidle states

2019-03-22 Thread Abhishek Goel
case will occur in the scenario when no other shallow states are enbaled, and only deep states are available for auto-promotion. Abhishek Goel (2): cpuidle : auto-promotion for cpuidle states cpuidle : Add auto-promotion flag to cpuidle flags arch/powerpc/include/asm/opal-api.h | 1 + drivers

[PATCH 0/2] Auto-promotion logic for cpuidle states

2019-03-21 Thread Abhishek Goel
case will occur in the scenario when no other shallow states are enbaled, and only deep states are available for auto-promotion. Abhishek Goel (2): cpuidle : auto-promotion for cpuidle states cpuidle : Add auto-promotion flag to cpuidle flags arch/powerpc/include/asm/opal-api.h | 1 + drivers

[PATCH 2/2] cpuidle : Add auto-promotion flag to cpuidle flags

2019-03-21 Thread Abhishek Goel
This patch sets up flags for the state which needs to be auto-promoted. For powernv systems, lite states do not even lose user context. That information has been used to set the flag for lite states. Signed-off-by: Abhishek Goel --- arch/powerpc/include/asm/opal-api.h | 1 + drivers/cpuidle

[PATCH 1/2] cpuidle : auto-promotion for cpuidle states

2019-03-21 Thread Abhishek Goel
as soon as possible. Signed-off-by: Abhishek Goel --- drivers/cpuidle/cpuidle.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 2406e2655..c4d1c1b38 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -584,11

[RFC 1/1] cpuidle : Move saving and restoring of sprs to opal

2018-07-23 Thread Abhishek Goel
-stop exit actions in OPAL. If a kernel knows about this opal call, then just a firmware supporting newer hardware is required, instead of waiting for kernel updates. Signed-off-by: Abhishek Goel --- Link to the Skiboot patch corresponding to this patch: http://patchwork.ozlabs.org/patch/947568

[PATCH v2] cpuidle/powernv : Add Description for cpuidle state

2018-06-04 Thread Abhishek Goel
"cpupower monitor -l" or "cpupower idle-info". Signed-off-by: Abhishek Goel --- The skiboot patch which adds description for idle states in device tree can be found here: https://patchwork.ozlabs.org/patch/924879/ drivers/cpuidle/cpuidle-powernv.c | 19 ++

[PATCH] cpuidle/powernv : Add Description for cpuidle state

2018-05-28 Thread Abhishek Goel
l" or "cpupower idle-info". Signed-off-by: Abhishek Goel --- The skiboot patch which adds description for idle states in device tree can be found here: https://patchwork.ozlabs.org/patch/921637/ drivers/cpuidle/cpuidle-powernv.c | 17 + include/linux/cpuidle.h

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

2018-01-22 Thread Abhishek Goel
y. Signed-off-by: Abhishek Goel --- Skiboot patch required for the corresponding device-tree changes have been posted here : http://patchwork.ozlabs.org/patch/862256/ drivers/cpufreq/powernv-cpufreq.c | 104 ++ 1 file changed, 95 insertions(+), 9 deletion

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

2017-12-19 Thread Abhishek Goel
y. Signed-off-by: Abhishek Goel --- drivers/cpufreq/powernv-cpufreq.c | 110 ++ 1 file changed, 100 insertions(+), 10 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index b6d7c4c..fd642bc 100644 --- a/drive

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

2017-12-13 Thread Abhishek Goel
y. Signed-off-by: Abhishek Goel --- drivers/cpufreq/powernv-cpufreq.c | 95 +++ 1 file changed, 87 insertions(+), 8 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index b6d7c4c..9384110 100644 --- a/drive