Re: [PATCH v5 02/10] powerpc/powernv/idle: Restore AMR/UAMOR/AMOR after idle

2019-03-13 Thread Akshay Adiga
On Fri, Mar 08, 2019 at 12:16:11PM +1100, Michael Ellerman wrote: > In order to implement KUAP (Kernel Userspace Access Protection) on > Power9 we will be using the AMR, and therefore indirectly the > UAMOR/AMOR. > > So save/restore these regs in the idle code. > > Signed-off-by: Michael

Re: [PATCH v4 2/9] powerpc/powernv/idle: Restore AMR/UAMOR/AMOR after idle

2019-03-13 Thread Akshay Adiga
On Fri, Mar 01, 2019 at 01:49:10AM +1100, Michael Ellerman wrote: > In order to implement KUAP (Kernel Userspace Access Protection) on > Power9 we will be using the AMR, and therefore indirectly the > UAMOR/AMOR. > > So save/restore these regs in the idle code. > > Signed-off-by: Michael

Re: [PATCH v2] powerpc/powernv/idle: Restore IAMR after idle

2019-02-27 Thread Akshay Adiga
> which won't fault, then boot the kernel with powersave=off, where it > will fault. Applying this patch will fix this. > > Fixes: 3b10d0095a1e ("powerpc/mm/radix: Prevent kernel execution of user > space") > Cc: > Signed-off-by: Russell Currey Reviewed-by: Akshay Adiga

Re: [PATCH] powerpc/powernv/idle: Restore IAMR after idle

2019-02-20 Thread Akshay Adiga
On Wed, Feb 06, 2019 at 05:28:37PM +1100, Russell Currey wrote: > Without restoring the IAMR after idle, execution prevention on POWER9 > with Radix MMU is overwritten and the kernel can freely execute userspace > without > faulting. > > This is necessary when returning from any stop state that

Re: [PATCH] powerpc/powernv/idle: Restore IAMR after idle

2019-02-19 Thread Akshay Adiga
On Wed, Feb 06, 2019 at 05:28:37PM +1100, Russell Currey wrote: > Without restoring the IAMR after idle, execution prevention on POWER9 > with Radix MMU is overwritten and the kernel can freely execute userspace > without > faulting. > > This is necessary when returning from any stop state that

Re: [PATCH] powerpc/powernv/idle: Restore IAMR after idle

2019-02-19 Thread Akshay Adiga
On Tue, Feb 19, 2019 at 02:21:04PM +1000, Nicholas Piggin wrote: > Michael Ellerman's on February 8, 2019 11:04 am: > > Nicholas Piggin writes: > >> Russell Currey's on February 6, 2019 4:28 pm: > >>> Without restoring the IAMR after idle, execution prevention on POWER9 > >>> with Radix MMU is

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

2019-02-17 Thread Akshay Adiga
On Sat, Feb 16, 2019 at 12:06:23PM -0500, 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

[RFC PATCH v2 3/3] cpuidle/powernv: save-restore sprs in opal

2018-10-11 Thread Akshay Adiga
about this opal call, then just a firmware supporting newer hardware is required, instead of waiting for kernel updates. Signed-off-by: Abhishek Goel Signed-off-by: Akshay Adiga --- Changes from v1 : - Code is rebased on Nick Piggin's v4 patch "powerpc/64s: reimplement book3s idle code

[RFC PATCH v2 2/3] powernv/cpuidle: Pass pointers instead of values to stop loop

2018-10-11 Thread Akshay Adiga
Passing pointer to the pnv_idle_state instead of psscr value and mask. This helps us to pass more information to the stop loop. This will help to figure out the method to enter/exit idle state. Signed-off-by: Akshay Adiga --- Changes from v1 : - Code is rebased on Nick Piggin's v4 patch

[RFC PATCH v2 1/3] cpuidle/powernv: Add support for states with ibm, cpuidle-state-v1

2018-10-11 Thread Akshay Adiga
uot; : indicates it should be used by hotplug driver compatible strings : "ibm,state-v1" : kernel checks if it knows about this version "opal-supported" : indicates kernel can fall back to use opal for stop-transitions Signed-off-by: Akshay Adiga --- Change

[RFC PATCH v2 0/3] New device-tree format and Opal based idle save-restore

2018-10-11 Thread Akshay Adiga
by OPAL - All the decision making such as identifying first thread in the core and taking locks before restoring in such cases have also been moved to OPAL Abhishek Goel (1): cpuidle/powernv: save-restore sprs in opal Akshay Adiga (2): cpuidle/powernv: Add support for states with ibm,cpuid

Re: [PATCH v4] powerpc/64s: reimplement book3s idle code in C

2018-09-26 Thread Akshay Adiga
On Fri, Sep 14, 2018 at 11:52:40AM +1000, Nicholas Piggin wrote: > + > + /* > + * On POWER9, SRR1 bits do not match exactly as expected. > + * SRR1_WS_GPRLOSS (10b) can also result in SPR loss, so > + * always test PSSCR if there is any state loss. > + */ > + if

Re: [PATCH] powernv/cpuidle: Fix idle states all being marked invalid

2018-08-03 Thread Akshay Adiga
Thanks nick for fixing this. We definatetely need this. > Cc: Akshay Adiga > Cc: Gautham R. Shenoy > Signed-off-by: Nicholas Piggin Acked-by: Akshay Adiga > --- > arch/powerpc/platforms/powernv/idle.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff

[RFC PATCH 3/3] cpuidle/powernv: Conditionally save-restore sprs using opal

2018-08-01 Thread Akshay Adiga
opal call, then just a firmware supporting newer hardware is required, instead of waiting for kernel updates. Signed-off-by: Abhishek Goel Signed-off-by: Akshay Adiga --- arch/powerpc/include/asm/cpuidle.h| 1 + arch/powerpc/include/asm/opal-api.h | 4 +- arch/powerpc/i

[RFC PATCH 2/3] powernv/cpuidle: Pass pointers instead of values to stop loop

2018-08-01 Thread Akshay Adiga
Passing pointer to the pnv_idle_state instead of psscr value and mask. This helps us to pass more information to the stop loop. This will help to figure out the method to enter/exit idle state. Signed-off-by: Akshay Adiga --- arch/powerpc/include/asm/processor.h | 3 +- arch/powerpc/platforms

[RFC PATCH 1/3] cpuidle/powernv: Add support for states with ibm, cpuidle-state-v1

2018-08-01 Thread Akshay Adiga
ver "cpuoffline" : indicates it should be used by hotplug driver "ibm,state-v1" : kernel checks if it knows about this version "opal-supported" : indicates kernel can fall back to use opal for stop-transitions Signed-off-by: Akshay Adiga --- arch/power

[RFC PATCH 0/3] New device-tree format and Opal based idle save-restore

2018-08-01 Thread Akshay Adiga
around in kernel and add "ibm-state-v2" as known versions The kernel will now be able to handle stop4 and deeper states. Also includes Abhishek's RFC which was posted there : https://patchwork.ozlabs.org/patch/947568/ This patch-set is on top of mpe-next Abhishek Goel (1): cpuidle/powernv: Conditio

[PATCH v4 2/2] powernv/cpuidle: Use parsed device tree values for cpuidle_init

2018-07-05 Thread Akshay Adiga
Export pnv_idle_states and nr_pnv_idle_states so that its accessible to cpuidle driver. Use properties from pnv_idle_states structure for powernv cpuidle_init. Signed-off-by: Akshay Adiga Reviewed-by: Nicholas Piggin Reviewed-by: Gautham R. Shenoy --- arch/powerpc/include/asm/cpuidle.h | 2

[PATCH v4 1/2] powernv/cpuidle: Parse dt idle properties into global structure

2018-07-05 Thread Akshay Adiga
to the properties in the device tree the number of available states is also required. Signed-off-by: Akshay Adiga Reviewed-by: Nicholas Piggin Reviewed-by: Gautham R. Shenoy --- arch/powerpc/include/asm/cpuidle.h| 11 ++ arch/powerpc/platforms/powernv/idle.c | 216 -- 2

[PATCH v4 0/2] powernv/cpuidle Device-tree parsing cleanup

2018-07-05 Thread Akshay Adiga
of pnv_parse_cpuidle_dt - Added error handling code. Akshay Adiga (2): powernv/cpuidle: Parse dt idle properties into global structure powernv/cpuidle: Use parsed device tree values for cpuidle_init arch/powerpc/include/asm/cpuidle.h| 13 ++ arch/powerpc/platforms/powernv/idle.c | 216

[PATCH v3 2/2] powernv/cpuidle: Use parsed device tree values for cpuidle_init

2018-07-03 Thread Akshay Adiga
Export pnv_idle_states and nr_pnv_idle_states so that its accessible to cpuidle driver. Use properties from pnv_idle_states structure for powernv cpuidle_init. Signed-off-by: Akshay Adiga Reviewed-by: Nicholas Piggin --- arch/powerpc/include/asm/cpuidle.h | 2 + drivers/cpuidle/cpuidle

[PATCH v3 1/2] powernv/cpuidle: Parse dt idle properties into global structure

2018-07-03 Thread Akshay Adiga
to the properties in the device tree the number of available states is also required. Signed-off-by: Akshay Adiga Reviewed-by: Nicholas Piggin --- arch/powerpc/include/asm/cpuidle.h| 11 ++ arch/powerpc/platforms/powernv/idle.c | 216 -- 2 files changed, 149 insertions

[PATCH v3 0/2] powernv/cpuidle Device-tree parsing cleanup

2018-07-03 Thread Akshay Adiga
. Akshay Adiga (2): powernv/cpuidle: Parse dt idle properties into global structure powernv/cpuidle: Use parsed device tree values for cpuidle_init arch/powerpc/include/asm/cpuidle.h| 13 ++ arch/powerpc/platforms/powernv/idle.c | 216 -- drivers/cpuidle/cpuidle

[PATCH v2 2/2] powernv/cpuidle: Use parsed device tree values for cpuidle_init

2018-07-02 Thread Akshay Adiga
Export pnv_idle_states and nr_pnv_idle_states so that its accessible to cpuidle driver. Use properties from pnv_idle_states structure for powernv cpuidle_init. Signed-off-by: Akshay Adiga --- arch/powerpc/include/asm/cpuidle.h | 2 + drivers/cpuidle/cpuidle-powernv.c | 143

[PATCH v2 1/2] powernv/cpuidle: Parse dt idle properties into global structure

2018-07-02 Thread Akshay Adiga
to the properties in the device tree the number of available states is also required. Signed-off-by: Akshay Adiga --- arch/powerpc/include/asm/cpuidle.h| 11 ++ arch/powerpc/platforms/powernv/idle.c | 216 -- drivers/cpuidle/cpuidle-powernv.c | 11 +- 3 files changed

[PATCH v2 0/2] powernv/cpuidle Device-tree parsing cleanup

2018-07-02 Thread Akshay Adiga
if the psscr-mask/val are valid combination, - Change function description of pnv_parse_cpuidle_dt - Added error handling code. Akshay Adiga (2): powernv/cpuidle: Parse dt idle properties into global

[PATCH 3/3] powernv/cpuidle: Use parsed device tree values for cpuidle_init

2018-06-18 Thread Akshay Adiga
Export pnv_idle_states and nr_pnv_idle_states so that its accessible to cpuidle driver. Use properties from pnv_idle_states structure for powernv cpuidle_init. Signed-off-by: Akshay Adiga --- arch/powerpc/include/asm/cpuidle.h | 2 ++ drivers/cpuidle/cpuidle-powernv.c | 49

[PATCH 2/3] cpuidle/powernv: Change platform init to avoid reparsing dt

2018-06-18 Thread Akshay Adiga
The required data is accessible from cpuidle_states structure and nr_cpu_idle_states. This patch makes changes to avoid reparsing and use data from these structures. Signed-off-by: Akshay Adiga --- arch/powerpc/platforms/powernv/idle.c | 37 --- 1 file changed, 8

[PATCH 1/3] powernv/cpuidle: Parse dt idle properties into global structure

2018-06-18 Thread Akshay Adiga
things so that number of available idle states can be accessible to cpuidle-powernv driver. Hence adding nr_pnv_idle_states to track number of idle states. Signed-off-by: Akshay Adiga --- arch/powerpc/include/asm/cpuidle.h| 14 +++ arch/powerpc/platforms/powernv/idle.c | 197

[PATCH 0/3] powernv/cpuidle Device-tree parsing cleanup

2018-06-18 Thread Akshay Adiga
in these 3 places. This series adds code to parse device tree once and save in global structure. Akshay Adiga (3): powernv/cpuidle: Parse dt idle properties into global structure cpuidle/powernv: Change platform init to avoid reparsing dt powernv/cpuidle: Use parsed device tree values

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

2018-06-05 Thread Akshay Adiga
On Tue, Jun 05, 2018 at 02:24:39PM +0530, Abhishek wrote: > > > On 06/04/2018 05:15 PM, Akshay Adiga wrote: > > On Mon, Jun 04, 2018 at 07:04:14PM +1000, Benjamin Herrenschmidt wrote: > > > Is this a new property ? I'm not fan of adding yet another of those > >

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

2018-06-04 Thread Akshay Adiga
On Mon, Jun 04, 2018 at 07:04:14PM +1000, Benjamin Herrenschmidt wrote: > Is this a new property ? I'm not fan of adding yet another of those > silly arrays. > > I would say this is the right time now to switch over to a node per > state instead, as we discussed with Vaidy. I posted the node

Re: [PATCH] [SCHEME 2]powernv/cpuidle: Add support for new idle state device-tree format

2018-05-30 Thread Akshay Adiga
On Thu, May 31, 2018 at 08:23:20AM +0530, Akshay Adiga wrote: > This patch adds support for new device-tree format for idle state > description. > > Previously if a older kernel runs on a newer firmware, it may enable > all available states irrespective of its capability of han

Re: [PATCH] [SCHEME 1] Add support for new idle device tree format

2018-05-30 Thread Akshay Adiga
On Thu, May 31, 2018 at 08:23:04AM +0530, Akshay Adiga wrote: > This patch adds support for new device-tree format for idle state > description. > > Previously if a older kernel runs on a newer firmware, it may enable > all available states irrespective of its capability of han

[PATCH] [SCHEME 2]powernv/cpuidle: Add support for new idle state device-tree format

2018-05-30 Thread Akshay Adiga
= "ibm,idle-state-v1 ", "ibm,idle-state-v1", "ibm,idle-state-v1", "ibm,idle-state-v1"; ibm,cpu-idle-state-flags = <0x101000 0x101000 0x207000 0x207000>; } } Signed-off-by: Akshay Adiga --- arch/powerpc/platforms/powernv/idle.c |

[PATCH] [SCHEME 1] Add support for new idle device tree format

2018-05-30 Thread Akshay Adiga
... compatible = "ibm,cpuoffline-state-v1"; ... }; }; Signed-off-by: Akshay Adiga --- arch/powerpc/platforms/powernv/idle.c | 70 ++- drivers/cpuidle/cpuidle-powernv.c | 26 - 2 files changed, 85 insertions

Re: [PATCH] cpuidle/powernv : init all present cpus for deep states

2018-05-24 Thread Akshay Adiga
On Wed, May 16, 2018 at 05:32:14PM +0530, Akshay Adiga wrote: > Init all present cpus for deep states instead of "all possible" cpus. > Init fails if the possible cpu is gaurded. Resulting in making only > non-deep states available for cpuidle/hotplug. > > Signed-off-by

Re: [PATCH] cpuidle/powernv : init all present cpus for deep states

2018-05-16 Thread Akshay Adiga
Yes this needs to be sent to stable. Fixes: d405a98c ("powerpc/powernv: Move cpuidle related code from setup.c to new file")

[PATCH] cpuidle/powernv : init all present cpus for deep states

2018-05-16 Thread Akshay Adiga
Init all present cpus for deep states instead of "all possible" cpus. Init fails if the possible cpu is gaurded. Resulting in making only non-deep states available for cpuidle/hotplug. Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> --- arch/powerpc/platforms/po

Re: [Skiboot] [PATCH 1/2] SLW: Remove stop1_lite and stop0 stop states

2018-05-10 Thread Akshay Adiga
On Thu, May 03, 2018 at 08:15:59PM +1000, Nicholas Piggin wrote: > On Thu, 03 May 2018 20:03:55 +1000 > Stewart Smith <stew...@linux.vnet.ibm.com> wrote: > > > Nicholas Piggin <npig...@gmail.com> writes: > > > On Thu, 3 May 2018 14:36:47 +0530 > > >

Re: [Skiboot] [PATCH 1/2] SLW: Remove stop1_lite and stop0 stop states

2018-05-03 Thread Akshay Adiga
On Tue, May 01, 2018 at 01:47:23PM +1000, Nicholas Piggin wrote: > On Mon, 30 Apr 2018 14:42:08 +0530 > Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> wrote: > > > Powersaving for stop0_lite and stop1_lite is observed to be quite similar > > and both states resum

[RESEND][PATCH] cpuidle/powernv : Restore different PSSCR for idle and hotplug

2018-02-28 Thread Akshay Adiga
deepest stop state. On onlining cpu, request restore of PSSCR to deepest stop state used by cpuidle. Cc: <sta...@vger.kernel.org> # v4.14+ Fixes : 1e1601b38e6e ("powerpc/powernv/idle: Restore SPRs for deep idle states via stop API.") Reported-by: Pridhiviraj Paidipeddi <ppaid...@lin

Re: [PATCH] cpuidle/powernv : Restore different PSSCR for idle and hotplug

2018-02-28 Thread Akshay Adiga
On Mon, Feb 26, 2018 at 03:47:12PM +1100, Stewart Smith wrote: > Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> writes: > > commit 1e1601b38e6e ("powerpc/powernv/idle: Restore SPRs for deep idle > > states via stop API.") uses stop-api provided by the firmware to r

[PATCH] cpuidle/powernv : Restore different PSSCR for idle and hotplug

2018-02-19 Thread Akshay Adiga
deepest stop state. On onlining cpu, request restore of PSSCR to deepest stop state used by cpuidle. Fixes : 1e1601b38e6e ("powerpc/powernv/idle: Restore SPRs for deep idle states via stop API.") Reported-by: Pridhiviraj Paidipeddi <ppaid...@linux.vnet.ibm.com> Signed-off-by: Akshay Adiga

Re: [PATCH] powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state offline

2017-09-19 Thread Akshay Adiga
Hi Michael, Any comments on this patch ? On 09/06/2017 02:32 PM, pavrampu wrote: On 2017-08-31 17:17, Gautham R. Shenoy wrote: > From: "Gautham R. Shenoy" > > commit 24be85a23d1f ("powerpc/powernv: Clear PECE1 in LPCR via > stop-api only on Hotplug") clears the PECE1

Re: [PATCH] powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state offline

2017-09-01 Thread Akshay Adiga
On 08/31/2017 05:37 PM, Nicholas Piggin wrote: On Thu, 31 Aug 2017 17:17:41 +0530 "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > commit 24be85a23d1f ("powerpc/powernv: Clear PECE1 in LPCR via > stop-api only on Hotplug") clears

[PATCH] powernv:idle: Clear r12 on wakeup from stop lite

2017-06-27 Thread Akshay Adiga
in pnv_wakeup_noloss if the R12[42:45] corresponds to HMI as wakeup reason. Bug existed prior to "commit 9d29250136f6 ("powerpc/64s/idle: Avoid SRR usage in idle sleep/wake paths") but was never hit in practice Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com>

[PATCH -next] powernv: cpufreq: Fix uninitialized lpstate_idx in gpstates_timer_handler

2016-11-14 Thread Akshay Adiga
othwell <s...@canb.auug.org.au> Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> --- drivers/cpufreq/powernv-cpufreq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index c82304b..c5c5bc3 100644 --- a/d

Re: [PATCH v2 2/2] cpufreq: powernv: Use PMCR to verify global and local pstate

2016-11-08 Thread Akshay Adiga
Thanks gautham for the review. Good point, I have made the macros more generic in the next version as you have mentioned. I will post a separate patch to set pstates using these macros. :) On 11/08/2016 09:10 AM, Gautham R Shenoy wrote: On Mon, Nov 07, 2016 at 01:09:09PM +0530, Akshay Adiga

[PATCH v3 2/2] cpufreq: powernv: Use PMCR to verify global and local pstate

2016-11-08 Thread Akshay Adiga
will be called for a given govenor, but gpstate_timer can fire after the governor has changed to schedutil. Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> Reviewed-by: Gautham R. Shenoy <e...@linux.vnet.ibm.com> Acked-by: Viresh Kumar <viresh.ku...@linaro.org> --- Changes

[PATCH v3 1/2] cpufreq: powernv: Adding fast_switch for schedutil

2016-11-08 Thread Akshay Adiga
Adding fast_switch which does light weight operation to set the desired pstate. Both global and local pstates are set to the same desired pstate. Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> Reviewed-by: Gautham R. Shenoy <e...@linux.vnet.ibm.com> Acked-by:

[PATCH v2 1/2] cpufreq: powernv: Adding fast_switch for schedutil

2016-11-06 Thread Akshay Adiga
Adding fast_switch which does light weight operation to set the desired pstate. Both global and local pstates are set to the same desired pstate. Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> --- Changes from v1 : - Removed unnecessary check for index out of bound. d

[PATCH v2 2/2] cpufreq: powernv: Use PMCR to verify global and local pstate

2016-11-06 Thread Akshay Adiga
will be called for a given govenor, but gpstate_timer can fire after the governor has changed to schedutil. Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> --- Changes from v1 : - Corrected Commit message - Type cast pstate values read from PMCR to type s8 - Added Macros to get

Re: [PATCH 2/2] cpufreq: powernv: Use PMSR to verify global and local pstate

2016-11-06 Thread Akshay Adiga
Thanks Viresh for taking a look at it. I will make the mentioned changes in the next version of the patch and will add Shilpa and Gautham to the mail chain. Regards Akshay Adiga On 11/04/2016 12:11 PM, Viresh Kumar wrote: On 04-11-16, 10:57, Akshay Adiga wrote: As fast_switch may get

Re: [PATCH 1/2] cpufreq: powernv: Adding fast_switch for schedutil

2016-11-06 Thread Akshay Adiga
Thanks Viresh for taking a look at it. I will make the mentioned changes in the next version of the patch. Regards Akshay Adiga On 11/04/2016 12:03 PM, Viresh Kumar wrote: On 04-11-16, 10:57, Akshay Adiga wrote: Adding fast_switch which does light weight operation to set the desired

[PATCH 1/2] cpufreq: powernv: Adding fast_switch for schedutil

2016-11-03 Thread Akshay Adiga
Adding fast_switch which does light weight operation to set the desired pstate. Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> --- drivers/cpufreq/powernv-cpufreq.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/p

[PATCH 2/2] cpufreq: powernv: Use PMSR to verify global and local pstate

2016-11-03 Thread Akshay Adiga
to a different value. Hence the timer handler cannot rely on the cached values of local and global pstate and needs to read it from the PMSR. Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> --- drivers/cpufreq/powernv-cpufreq.c | 32 ++-- 1 file chang

Re: [PATCH] Work around for enabling CONFIG_CMDLINE on ppc64le

2016-09-27 Thread Akshay Adiga
Hi Michael, Here is the link to the bug raised on launchpad. https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1628207 On 09/23/2016 09:45 AM, Akshay Adiga wrote: Hi Michael, Anton found this bug and raised it against gcc v7.0 and a fix is available in upstream gcc. https

Re: [PATCH] Work around for enabling CONFIG_CMDLINE on ppc64le

2016-09-22 Thread Akshay Adiga
raised bug against Ubuntu for fixing gcc for 16.04. https://bugzilla.linux.ibm.com/show_bug.cgi?id=146668 On 09/22/2016 03:51 PM, Michael Ellerman wrote: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> writes: Observed that boot arguments (passed as CONFIG_CMDLINE) are not being pic

[PATCH] Work around for enabling CONFIG_CMDLINE on ppc64le

2016-09-22 Thread Akshay Adiga
3308ec: 78 f3 c3 7f mr r3,r30 c03308f0: 5d 08 e3 4b bl c016114c c03308f4: 00 00 00 60 nop The problem goes away when compiler optimization is restricted to -O1. Reported-by: Madhavan Srinivasan <ma...@linux.vnet.ibm.com> Signed-of

[PATCH] cpufreq: powernv: Fix crash in gpstate_timer_handler

2016-08-04 Thread Akshay Adiga
ux.vnet.ibm.com> Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> --- drivers/cpufreq/powernv-cpufreq.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index 87796

Re: [PATCH v2] cpufreq: powernv: Replacing pstate_id with frequency table index

2016-07-06 Thread Akshay Adiga
On 06/30/2016 11:53 AM, Akshay Adiga wrote: Refactoring code to use frequency table index instead of pstate_id. This abstraction will make the code independent of the pstate values. - No functional changes - The highest frequency is at frequency table index 0 and the frequency decreases

[PATCH v2] cpufreq: powernv: Replacing pstate_id with frequency table index

2016-06-30 Thread Akshay Adiga
store index instead of pstate Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> Reviewed-by: Gautham R. Shenoy <e...@linux.vnet.ibm.com> --- Changes from v1: - changed macro names from get_pstate()/ get_index() to idx_to_pstate()/ pstate_to_idx() - Renamed variables that

Re: [PATCH] cpufreq: powernv: Replacing pstate_id with frequency table index

2016-06-27 Thread Akshay Adiga
Hi viresh, My apologies. I realize that i have messed it up a quite a few places. Surely with the checkpatch as well. I will send a v2 with corrections. On 06/27/2016 12:00 PM, Viresh Kumar wrote: Hi Akshay, Did you try running checkpatch for this? On 24-06-16, 19:33, Akshay Adiga wrote

[PATCH] cpufreq: powernv: Replacing pstate_id with frequency table index

2016-06-24 Thread Akshay Adiga
() and get_pstate() can be used for conversion between pstate_id and index. - powernv_pstate_info now contains frequency table index to min, max and nominal frequency (instead of pstate_ids) Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> --- drivers/cpufreq/powernv-cpufreq.c

Re: [PATCH-next v2 0/2] cpufreq: powernv: Fixes for Global pstate management

2016-05-09 Thread Akshay Adiga
On 05/03/2016 08:49 PM, Akshay Adiga wrote: Fixes are based on patch https://patchwork.ozlabs.org/patch/612058/ which is in Rafael's linux-next. - Patch [1] fixes WARN_ON in powernv_target_index() - Patch [2] Deleting any pending timer to saves an unnecessary irq call in powernv_target_index

[PATCH-next v2 0/2] cpufreq: powernv: Fixes for Global pstate management

2016-05-03 Thread Akshay Adiga
Fixes are based on patch https://patchwork.ozlabs.org/patch/612058/ which is in Rafael's linux-next. - Patch [1] fixes WARN_ON in powernv_target_index() - Patch [2] Deleting any pending timer to saves an unnecessary irq call in powernv_target_index() Akshay Adiga (2): cpufreq: powernv: Move

[PATCH-next v2 1/2] cpufreq: powernv: Move smp_call_function_any() out of irq safe block

2016-05-03 Thread Akshay Adiga
igned-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> --- Patch is based on Rafael's linux-next drivers/cpufreq/powernv-cpufreq.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index 1

[PATCH-next v2 2/2] cpufreq: powernv: del_timer_sync when global and local pstate are equal

2016-05-03 Thread Akshay Adiga
When global and local pstate are equal in a powernv_target_index() call, we don't queue a timer. But we may have timer already queued for future. This could cause the timer to fire one additional time for no use. Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> --- Patch is

Re: [PATCH -next 1/2] cpufreq: powernv: Move smp_call_function_any() out of irq safe block

2016-05-03 Thread Akshay Adiga
Hi Viresh, On 05/03/2016 05:19 PM, Viresh Kumar wrote: On 03-05-16, 15:10, Akshay Adiga wrote: Fixing a WARN_ON caused by smp_call_function_any() when irq is disabled, because of changes made in the patch ('cpufreq: powernv: Ramp-down global pstate slower than local-pstate') https

[PATCH -next 0/2] cpufreq: powernv: Fixes for Global pstate management

2016-05-03 Thread Akshay Adiga
Fixes are based on patch https://patchwork.ozlabs.org/patch/612058/ which is in Rafael's linux-next. - Patch [1] fixes WARN_ON in powernv_target_index() - Patch [2] Deleting any pending timer to saves an unnecessary irq call in powernv_target_index() Akshay Adiga (2): cpufreq: powernv: Move

[PATCH -next 2/2] cpufreq: powernv: del_timer_sync when global and local pstate are equal

2016-05-03 Thread Akshay Adiga
Deleting pending gpstates->timer for the policy when global and local pstate are equal while executing target_index(). This saves an unnecessary irq call. Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> --- Patch is based on Rafael's linux-next drivers/cpufreq/powernv-cpuf

[PATCH -next 1/2] cpufreq: powernv: Move smp_call_function_any() out of irq safe block

2016-05-03 Thread Akshay Adiga
ed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> --- Patch is based on Rafael's linux-next drivers/cpufreq/powernv-cpufreq.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index 144c732..1f

Re: [PATCH v2 2/2] cpufreq: powernv: Ramp-down global pstate slower than local-pstate

2016-04-22 Thread Akshay Adiga
Hi Stewart, On 04/20/2016 03:41 AM, Stewart Smith wrote: Akshay Adiga<akshay.ad...@linux.vnet.ibm.com> writes: Iozone results show fairly consistent performance boost. YCSB on redis shows improved Max latencies in most cases. What about power consumption? Iozone write/rewite test wer

[PATCH v3 2/2] cpufreq: powernv: Ramp-down global pstate slower than local-pstate

2016-04-19 Thread Akshay Adiga
-41.24 Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> Reviewed-by: Gautham R. Shenoy <e...@linux.vnet.ibm.com> Acked-by: Viresh Kumar <viresh.ku...@linaro.org> --- drivers/cpufreq/powernv-cpufreq.c | 258 -- 1 file changed, 25

[PATCH v3 0/2] cpufreq: powernv: Ramp-down global pstate slower than local-pstate

2016-04-19 Thread Akshay Adiga
v2: - dropped the unreated change. Akshay Adiga (1): cpufreq: powernv: Ramp-down global pstate slower than local-pstate Shilpasri G Bhat (1): cpufreq: powernv: Remove flag use-case of policy->driver_data drivers/cpufreq/powernv-cpufreq.c | 269 -- 1 file changed

[PATCH v3 1/2] cpufreq: powernv: Remove flag use-case of policy->driver_data

2016-04-19 Thread Akshay Adiga
ck if the attribute already exists. This is required as policy->driver_data is used for other purposes in the later patch. Signed-off-by: Shilpasri G Bhat <shilpa.b...@linux.vnet.ibm.com> Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> Acked-by: Viresh Kumar <viresh.k

Re: [PATCH v2 2/2] cpufreq: powernv: Ramp-down global pstate slower than local-pstate

2016-04-19 Thread Akshay Adiga
Hi Viresh, On 04/18/2016 03:48 PM, Viresh Kumar wrote: On 15-04-16, 11:58, Akshay Adiga wrote: static int powernv_cpufreq_reboot_notifier(struct notifier_block *nb, - unsigned long action, void *unused) + unsigned long

[PATCH v2 2/2] cpufreq: powernv: Ramp-down global pstate slower than local-pstate

2016-04-15 Thread Akshay Adiga
-41.24 Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> Reviewed-by: Gautham R. Shenoy <e...@linux.vnet.ibm.com> --- drivers/cpufreq/powernv-cpufreq.c | 261 -- 1 file changed, 252 insertions(+), 9 deletions(-) diff --git a/drivers/cpu

[PATCH v2 1/2] cpufreq: powernv: Remove flag use-case of policy->driver_data

2016-04-15 Thread Akshay Adiga
ck if the attribute already exists. This is required as policy->driver_data is used for other purposes in the later patch. Signed-off-by: Shilpasri G Bhat <shilpa.b...@linux.vnet.ibm.com> Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> --- drivers/cpufreq/powernv-cpufreq.

[PATCH v2 0/2] cpufreq: powernv: Ramp-down global pstate slower than local-pstate

2016-04-15 Thread Akshay Adiga
shows better MaxLatency with this patch. Changes from v1: - Fixed coding style - Added a routine to reset global_pstate_info instead of hacky memset - Handled case when cpufreq_table_validate_and_show() fails - changed int queue_gpstate_timer() to void queue_gpstate_timer() Akshay Adiga (1): cpu

Re: [PATCH 2/2] cpufreq: powernv: Ramp-down global pstate slower than local-pstate

2016-04-14 Thread Akshay Adiga
Hi Balbir, On 04/14/2016 11:10 AM, Balbir Singh wrote: On 13/04/16 04:06, Akshay Adiga wrote: This patch brings down global pstate at a slower rate than the local pstate. As the frequency transition latency from pmin to pmax is observed to be in few millisecond granurality. It takes

Re: [PATCH 2/2] cpufreq: powernv: Ramp-down global pstate slower than local-pstate

2016-04-13 Thread Akshay Adiga
patches upstream. Thanks for pointing out the --strict option, was not aware of that. I will run checkpatch --strict on the next versions. On 12-04-16, 23:36, Akshay Adiga wrote: + +/* + * While resetting we don't want "timer" fields to be set to zero as we + * may lose trac

[PATCH 2/2] cpufreq: powernv: Ramp-down global pstate slower than local-pstate

2016-04-12 Thread Akshay Adiga
target op/s) 47659 Read83061.4 136440.6-39.12 47659 cleanup 195.8 193.8 1.03 47659 update 73429.4 124971.8-41.24 Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> Reviewed-by: Gautham R. She

[PATCH 1/2] cpufreq: powernv: Remove flag use-case of policy->driver_data

2016-04-12 Thread Akshay Adiga
ck if the attribute already exists. This is required as policy->driver_data is used for other purposes in the later patch. Signed-off-by: Shilpasri G Bhat <shilpa.b...@linux.vnet.ibm.com> Signed-off-by: Akshay Adiga <akshay.ad...@linux.vnet.ibm.com> Reviewed-by: Shreyas B.

[PATCH 0/2] cpufreq: powernv: Ramp-down global pstate slower than local-pstate

2016-04-12 Thread Akshay Adiga
second shows better MaxLatency with this patch. Akshay Adiga (1): powernv: Ramp-down global pstate slower than local-pstate Shilpasri G Bhat (1): cpufreq: powernv: Remove flag use-case of policy->driver_data drivers/cpufreq/powernv-cpufreq.c | 250 -- 1 f